ancient-vegetable-10556
12/20/2022, 5:22 PMrules()
functions.
So I was wondering if there’s enough information in the rule graph to statically generate correct and complete rules
functions for a given module. Is there? What would it take to make that work?ancient-vegetable-10556
12/20/2022, 5:24 PM@rule
function would probably be enough, given each type should have the origin module embedded)hundreds-father-404
12/20/2022, 5:38 PMI’ve noticed that there’s a bunch of modules that don’t declare their dependency rules in the rules() functions.Yeah, I think we should use this pattern more
So I was wondering if there’s enough information in the rule graph to statically generate correct and complete rules functions for a given module.A major issue I can think of is unions. We don't know which you want activated, and it does matter—think toggling whether a backend is activatd
ancient-vegetable-10556
12/20/2022, 5:40 PMancient-vegetable-10556
12/20/2022, 5:41 PMhundreds-father-404
12/20/2022, 5:41 PMcurved-television-6568
12/20/2022, 5:42 PM(naïvely, having the param and return types from eachLike this?function would probably be enough, given each type should have the origin module embedded)@rule
╰─❯ ./pants javac_check --help-advanced
`pants.backend.java.goals.check.javac_check` rule
-------------------------------------------------
Check javac compilation
Undocumented.
activated by : pants.backend.experimental.java
returns : CheckResults
takes 2 inputs: JavacCheckRequest, ClasspathEntryRequestFactory
awaits 3 gets : Get(CoarsenedTargets, Addresses, ..)
Get(CoursierResolveKey, CoarsenedTargets, ..)
Get(FallibleClasspathEntry, ClasspathEntryRequest, ..)
ancient-vegetable-10556
12/20/2022, 5:42 PMcurved-television-6568
12/20/2022, 5:43 PM╰─❯ ./pants CoursierResolveKey --help-advanced
`pants.jvm.resolve.key.CoursierResolveKey` api type
---------------------------------------------------
CoursierResolveKey(name: 'str', path: 'str', digest: 'Digest')
activated by : pants.backend.experimental.java, pants.jvm.resolve.key
dependencies : builtins
pants.backend.experimental.go
pants.core
pants.engine.target
dependents : pants.backend.experimental.java
pants.backend.experimental.scala
returned by 1 rule: pants.jvm.resolve.coursier_fetch.select_coursier_resolve_for_targets
consumed by 1 rule: pants.jvm.resolve.coursier_fetch.get_coursier_lockfile_for_resolve
used in 8 rules : pants.backend.java.bsp.rules.bsp_java_compile_request
pants.backend.java.goals.check.javac_check
pants.backend.scala.bsp.rules.bsp_scala_compile_request
pants.backend.scala.bsp.rules.collect_thirdparty_modules
pants.backend.scala.goals.check.scalac_check
pants.jvm.classpath.classpath
pants.jvm.resolve.coursier_fetch.fetch_with_coursier
pants.jvm.resolve.coursier_fetch.materialize_classpath_for_tool
curved-television-6568
12/20/2022, 5:43 PM./pants help-all
ancient-vegetable-10556
12/20/2022, 5:45 PMancient-vegetable-10556
12/20/2022, 5:45 PMancient-vegetable-10556
12/20/2022, 5:46 PMcurved-television-6568
12/20/2022, 5:47 PMancient-vegetable-10556
12/20/2022, 5:55 PM