bazel-contrib / bazel-contrib/rules_scala
scrooge_scala_library: Remove `scala` field on provider and instead return jars in JavaInfo provider
- Dominant language
- Starlark
- Stars
- 384
- Forks
- 292
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 46
Description
In order to support the IntelliJ Bazel plugin, #562 returns an [old style provider](https://github.com/beala-stripe/rules_scala/blob/57661fa1ebbdc1359147d573e0ba4306dc6b9b98/twitter_scrooge/twitter_scrooge.bzl#L302-L308) from `scrooge_scala_library`. This is to work around an issue where a `JavaInfo` provider cannot have multiple output jars, so we return a scala provider instead (see PR #562 for an in depth description of the issue and workaround).
Setting multiple output jars on an `JavaInfo` will be addressed by [this fix](https://github.com/bazelbuild/bazel/commit/4ff32da2f79f36fbb1e608830835a31f39772b8a), which is expected to [arrive in 0.17.0](https://groups.google.com/d/msg/bazel-sig-jvm/THl2DRqyYW0/Za5_xZscBgAJ). Once this lands, it will allow us to set multiple output jars by merging multiple `JavaInfo`s and we can then get rid of the `scala` field and set the output jars on `JavaInfo` instead.
Contributor guide
Research direction
Start with scrooge_scala_library in twitter_scrooge/twitter_scrooge.bzl, especially the provider implementation linked in the issue, and read PR #562 for the existing workaround. Check the referenced Bazel JavaInfo change and confirm the supported version before replacing the old scala field with output jars on JavaInfo; done means the workaround is removed and the provider exposes the jars through JavaInfo.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100