Expose _source_jars output group in scala_import
#1394
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.
Description
Previously,
scala_importrules would have noOutputGroupInfo, andtherefore would not expose their source jars. Java's counterpart,
java_import, does expose the source jars via an entry named_source_jarsinOutputGroupInfo.This patch adds an
OutputGroupInfoprovider toscala_importrulescontaining the source jars in an entry named
_source_jars.The source jars of a
scala_importrule can now be requested bypassing
--output_groups=+_source_jarsto Bazel.Motivation
Querying Bazel for the source jars can be useful in a variety of situations, like IDE integration for instance.