You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Running pants generate-lockfiles when a jvm_artifact contains a jvm_exclude that only specifies a group will fail with a "Failed to parse [group-name]" message from Coursier. This is contrary to the documentation for jvm_exclude which states "jvm_exclude: Exclude the given artifact and group, or all artifacts from the given group."
Thanks for filing an issue with a reproducer and sorry for the trouble!
I did an initial triage to check priority/regression: it looks like this behaviour has existed since 2.18.0.dev0 (PANTS_VERSION=2.18.0.dev0 pants generate-lockfiles), which seems to be the first release that had this jvm_exclude#19128, so not a regression.
@NGustafson is this something you might have a chance at trying to fix? @alonsodomin is something you can provide hints or guidance about?
@huonw Thanks for checking! Yes I'd like to try fixing this.
It seems like Coursier supports group-only excludes if you set the artifact to *. Something like --exclude 'org.slf4j:*'. But this Pants syntax causes a different error jvm_exclude(group="org.slf4j", artifact="*"), so I'm going to try getting that to work first.
sorry for the trouble, it's true that initial implementation was wrong. This should be easy to fix, the point in which the exclusion is transformed into a coordinate string is in here:
Describe the bug
Running
pants generate-lockfiles
when ajvm_artifact
contains ajvm_exclude
that only specifies a group will fail with a "Failed to parse [group-name]" message from Coursier. This is contrary to the documentation forjvm_exclude
which states "jvm_exclude
: Exclude the givenartifact
andgroup
, or all artifacts from the givengroup
."Pants version
2.20.0rc2
OS
MacOS
Additional info
Example Repo https://github.com/NGustafson/pants-examples/blob/main/3rdparty/jvm/BUILD
This repo has a single jvm_artifact with nothing else configured. Attempting to run
pants generate-lockfiles
will cause this error:The text was updated successfully, but these errors were encountered: