Skip to content
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

Support explicit dependencies with scala_artifact #19187

Merged

Conversation

alonsodomin
Copy link
Contributor

@alonsodomin alonsodomin commented May 29, 2023

In #19128 we added support for a scala_artifact target implemented as a target generator that would emit jvm_artifact targets based on the Scala version for their resolve field.

This solution works fine with dependency inference as the target generator will be ignored by the AllJvmArtifactTargets implementation. However it introduces a bug when the end user decides to provide an explicit dependency between a scala_source target and a scala_artifact one.

This PR prevents scala_artifacts to be matched by the JvmArtifactFieldSet and provides with an implementation of ClasspathEntryRequest that helps resolve the transitive dependency that exists between the target generator and the actual jvm_artifact target.

[ci skip-build-wheels]
[ci skip-rust]

@alonsodomin alonsodomin added backend: JVM JVM backend-related issues category:bugfix Bug fixes for released features labels May 29, 2023
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alonsodomin alonsodomin merged commit 8d0a4ce into pantsbuild:main May 29, 2023
24 checks passed
alonsodomin added a commit that referenced this pull request May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: JVM JVM backend-related issues category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants