glamorous-helicopter-68480
05/04/2022, 9:38 AMException: Get(Targets, DependenciesRequest, DependenciesRequest(field=<class 'pants.engine.target.Dependencies'>(alias='dependencies', address=//path/to/file.py:../../../asdf, value=None, default=None), include_special_cased_deps=False)) was not detected in your @rule body at rule compile time. Was the `Get` constructor called in a separate function, or perhaps dynamically? If so, it must be inlined into the @rule body.
Does this mean that I cannot have a recursive function that calls Get?curved-television-6568
05/04/2022, 9:44 AMpaths
goal: https://www.pantsbuild.org/docs/reference-pathscurved-television-6568
05/04/2022, 9:46 AMGet
from a method that is not decorated as a @rule
which is not supported.
There is a new @rule_helper
that will let you do this, but is not yet in a stable release of Pants.
https://github.com/pantsbuild/pants/pull/15025glamorous-helicopter-68480
05/04/2022, 10:23 AMglamorous-helicopter-68480
05/04/2022, 12:19 PM.dot
file)flat-zoo-31952
05/04/2022, 12:27 PMpaths
added? That's coolcurved-television-6568
05/04/2022, 2:47 PMhundreds-father-404
05/04/2022, 3:27 PMpaths
enough, actually! It's not in release blogs. Looks like 2.9happy-kitchen-89482
05/04/2022, 5:24 PM./pants peek
but you'll have to transform it to dot formatflat-zoo-31952
05/04/2022, 5:46 PMnetworkx
as a plugin requiremnt and use it to run graph algorithmshappy-kitchen-89482
05/04/2022, 6:56 PM./pants graph
goal, but not everyone agrees it should exist.flat-zoo-31952
05/04/2022, 6:59 PMgraph
goal would do that would meet people's needshundreds-father-404
05/04/2022, 7:12 PMflat-zoo-31952
05/04/2022, 7:31 PM./pants paths
should work nicely with that, since it doesn't seem to return cycles (according to https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/project_info/paths.py)happy-kitchen-89482
05/04/2022, 7:40 PMpaths
on its own returns enough information for a graph, as you have to provide --from and --to? peek
is probably what you wantbitter-ability-32190
05/04/2022, 7:42 PMpeek
for my PoCflat-zoo-31952
05/04/2022, 8:39 PMflat-zoo-31952
05/04/2022, 8:41 PM./pants graph
would be to output peek-style info in typical graph formatsglamorous-helicopter-68480
05/05/2022, 7:12 AMpants paths
to graphviz edges.