Hi guys, I'm seeking for suggestion on how to solv...
# plugins
a
Hi guys, I'm seeking for suggestion on how to solve a problem with
PythonResolveField
. I would like to write a plugin since when I apply this field, for instance to extend
python_distribution
, it doesn't treat correctly exclude addresses in
dependencies
. For instance, if I use
parametrize
on the resolve
field
, all the dependencies get a correct
@resolve=
suffix, while the exclude ones
!!
don't. Any idea on how to work with this?
f
Maybe it is a bug which needs to be fixed?
Can you open an issue with a reproduction (or a PR with a failing unit test)?
a
I have the impression that it might be. I’ll run a couple of tests to be sure and open an issue.
Can you please confirm that there is no way to fix this through a plugin and additional rules?
f
parametrize
is handled in the core Pans rules.
as is the rules to find transitive dependencies and apply the excludes. https://github.com/pantsbuild/pants/blob/4d96bccba3078497697337e67c09d4b77fa53067/src/python/pants/engine/internals/graph.py#L820 is the relevant code.
plugins can hook into
TransitivelyExcludeDependenciesRequest
to add their own excludes apparently
or maybe just a bug fix to the linked function to add the parametrized fields to the address used to look up which targets to exclude
whoever takes on this issue might want to look into that
a
I have the impression that it's not easily manageable by plugins only...