ambitious-student-81104
09/15/2021, 3:15 PM./pants test ::
at the top level? ./pants goal path/to::
does not seem to work.curved-television-6568
09/15/2021, 3:23 PM$ ./pants list tests::
tests/python/pants_test/init
tests/python/pants_test/init:tests
tests/python/pants_test/integration
tests/python/pants_test/integration:build_ignore_integration
tests/python/pants_test/integration:goal_rule_integration
tests/python/pants_test/integration:graph_integration
...
ambitious-student-81104
09/15/2021, 3:33 PMdependencies=["path/to/module::", ]
and it said InvalidTargetName: Address spec path/to/module:: has no name part.
./pants list
on a path to modul workscurved-television-6568
09/15/2021, 3:35 PMdependencies=["path/to/module/**"]
?ambitious-student-81104
09/15/2021, 3:37 PMTarget path/to/module's `sources` field does not match a file path/to/module/**.
happy-kitchen-89482
09/15/2021, 3:41 PM./pants goal path/to::
works on the cmd line, but not in dependenciestarget
, that has as its dependencies
all the underlying targets) and then depend on that, so at least you only have to enumerate once.ambitious-student-81104
09/15/2021, 3:43 PMhappy-kitchen-89482
09/15/2021, 3:43 PMambitious-student-81104
09/15/2021, 3:43 PMhappy-kitchen-89482
09/15/2021, 3:43 PMambitious-student-81104
09/15/2021, 3:47 PMis dep inference not working?It does not include the subdirectory targets under
path/to/module
What is the example of needing these globs?building a whl of a library
hundreds-father-404
09/15/2021, 3:50 PMI'm not sure if our current macros would support this, but the upcoming "target generators" probably couldYeah. You'll soon have two options: a macro https://www.pantsbuild.org/docs/macros which is really limited but sometimes all you need, or creating a "target generator" which can access the full Rules API. Meaning you can do things like run a process or read from the filesystem
ambitious-student-81104
09/15/2021, 3:51 PMtarget(name="lib_name", dependencies=[<output of ./pants list path::>])
hundreds-father-404
09/15/2021, 3:54 PMIt does not include the subdirectory targets underĀ path/to/moduleHm, you shouldn't need to explicitly depend on every target you want included due to transitive dependencies. For example, if you add
dependencies=["src/py/project:app"]
, and that itself already depends on src/py/project/util
etc (e.g. via dependency inference), then you will pull in that dependency transitively
Does ./pants dependencies --transitive path/to:python_distribution
already have some things you want, or it's missing everything?ambitious-student-81104
09/15/2021, 4:01 PMthat itself already depends onĀPants thinks it doesn't depend on its submodules. thesrc/py/project/util
__init__.py
files are empty, not explicitly importing submodules../pants dependencies --transitive path/to:python_distributionIt has some things I want but missing some others
enough-analyst-54434
09/15/2021, 4:32 PMhappy-kitchen-89482
09/15/2021, 5:10 PMambitious-student-81104
09/15/2021, 8:22 PM