forked from bazelbuild/rules_scala
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable building scala versions in the same bazel invocation #1
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 tasks
all phases are equal DefaultInfo is returned by a default_info phase Other external providers are passed by their respective phases
* override providers- failing test * override providers- passing test * docs
Hrm ... still learning. bazel's standard |
…ild#949) * Init * Pass bazel test //test/... with single _adjust_resources_path * adjust_resources_path returns string instead of tuple * remove prefix handling from ScalacProcessor.copyResources * Remove unused method * Remove resourceStripPrefix from CompileOptions * Remove special path handling from ScalacProcessor because it is done in rule_impls.bzl * Fix macro visibility * Remove print * Formatting * Add comments * more test cases * lint * Rebase on master * extract resources.bzl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Work in progres on supporting multiple versions of scala within the same bazel command.
It uses toolchains to wrap up all the version-dependent stuff but doesn't use toolchain/platform resolution. I haven't been able to come up with any way of using transitions to get the desired impact.
So I added optional
toolchain
andprovider
attributes in a few places. If they aren't used, the normal toolchain resolution is used and the user can select the desired version by registering the desired toolchain.If you don't want a default version, you just don't register a toolchain and you'll get an error for any scala target that doesn't provide a toolchain.
It feels like this will migrate fairly easily to more advanced toolchain resolution when that surfaces in
bazel
.There's a bunch of stuff to be completed/cleaned up/made more general. So at this point, a WIP.