Skip to content

Conversation

@Duhemm
Copy link
Contributor

@Duhemm Duhemm commented May 16, 2022

Description

Previously, scala_import rules would have no OutputGroupInfo, and
therefore would not expose their source jars. Java's counterpart,
java_import, does expose the source jars via an entry named
_source_jars in OutputGroupInfo.

This patch adds an OutputGroupInfo provider to scala_import rules
containing the source jars in an entry named _source_jars.

The source jars of a scala_import rule can now be requested by
passing --output_groups=+_source_jars to Bazel.

Motivation

Querying Bazel for the source jars can be useful in a variety of situations, like IDE integration for instance.

@Duhemm Duhemm requested review from liucijus and simuons as code owners May 16, 2022 10:02
Previously, `scala_import` rules would have no `OutputGroupInfo`, and
therefore would not expose their source jars. Java's counterpart,
`java_import`, does expose the source jars via an entry named
`_source_jars` in `OutputGroupInfo`.

This patch adds an `OutputGroupInfo` provider to `scala_import` rules
containing the source jars in an entry named `_source_jars`.

The source jars of a `scala_import` rule can now be requested by
passing `--output_groups=+_source_jars` to Bazel.
@Duhemm Duhemm force-pushed the scala-import-output-group-info branch from e3354ba to 5dc18fb Compare May 16, 2022 10:22
Copy link
Collaborator

@liucijus liucijus left a comment

Choose a reason for hiding this comment

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

Thanks, @Duhemm!

@simuons simuons merged commit 4ba3780 into bazel-contrib:master May 17, 2022
@Duhemm Duhemm deleted the scala-import-output-group-info branch May 17, 2022 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants