pantsbuild / pants

The Pants Build System
https://www.pantsbuild.org
Apache License 2.0
3.33k stars 638 forks source link

Transitive exclude (`!!`) dependencies are incorrect when using `parametrize` #21443

Open pasqualesalza opened 1 month ago

pasqualesalza commented 1 month ago

Describe the bug
I could experience inconsistency when using parametrize in a target with explicit dependencies when specifying, for instance, multiple resolves in a resolve field. Pants correctly applies the @resolve= prefix to all the explicit dependencies, except when the address is a transitive exclusion (!!). In that case, it fails and asks to explicitly declare the resolve in the addresses.

Pants version
2.22.0

OS
MacOS

Additional info
For everyone's convenience, I created a small repo to verify such issues: https://github.com/pasqualesalza/pants-exclude-parametrize

benjyw commented 1 month ago

Thanks for the easy reproduction. Looks like you have a workaround, but it's not very satisfying...