bazel-contrib / bazel-contrib/rules_scala
Support deploy environments (deploy_env)
- Dominant language
- Starlark
- Stars
- 384
- Forks
- 292
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 46
Description
(subsumes #560, expands on bazelbuild/bazel#1402)
Bazel has an internal feature called `deploy_env` for java_binaries, which allows performing classpath subtractions for specified targets (see a comment by Ulf [here](https://github.com/bazelbuild/bazel/issues/1402#issuecomment-226440001)).
We tested this feature (by cherrypicking the commit to expose it in java_binary) and it is suitable for our needs for specifying different deployment targets having different dependencies (something we can't use `neverlink` for).
As other people seemed to find it useful as well, I would like to propose adding support for this for scala_binaries. The classpath subtraction can be done in skylark using the code we already wrote, to support deployment scenarios explained in #560.
WDYT?
cc @ittaiz
Contributor guide
Research direction
Start by reviewing the existing Skylark classpath-subtraction code and the deployment scenarios described in #560, then compare them with Bazel's internal deploy_env behavior for java_binaries. Done means scala_binaries support deployment targets with different dependencies without relying on neverlink; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100