Support explicit dependencies with scala_artifact #19187
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #19128 we added support for a
scala_artifact
target implemented as a target generator that would emitjvm_artifact
targets based on the Scala version for theirresolve
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 ascala_source
target and ascala_artifact
one.This PR prevents
scala_artifact
s to be matched by theJvmArtifactFieldSet
and provides with an implementation ofClasspathEntryRequest
that helps resolve the transitive dependency that exists between the target generator and the actualjvm_artifact
target.[ci skip-build-wheels]
[ci skip-rust]