New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jvm_exclude with Group Only Fails Parsing by Coursier #20794
Comments
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 ( @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. |
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: pants/src/python/pants/jvm/target_types.py Line 308 in b7b0e9c
|
Fixes #20794 Update `to_coord_str` method to append `*` to the artifact coordinate string when a `jvm_exclude` artifact is `None`. --------- Co-authored-by: Nicholas Gustafson <nicholas.gustafson@rakuten.com>
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: