-
-
Notifications
You must be signed in to change notification settings - Fork 286
Make more use of the toolchain #399
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,6 +9,9 @@ toolchain_type( | |
| scala_toolchain( | ||
| name = 'default_toolchain_impl', | ||
| scalacopts = [], | ||
| library = "//external:io_bazel_rules_scala/dependency/scala/scala_library", | ||
| compiler = "//external:io_bazel_rules_scala/dependency/scala/scala_compiler", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you using //external: dependencies instead of @io_bazel_rules_scala//dependency/scala/scala_compiler?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make a more minimal change. Before toolchains, we only had bind as a tool that downstream repos could set these values and there are many interchangeable versions that work. |
||
| reflect = "//external:io_bazel_rules_scala/dependency/scala/scala_reflect", | ||
| visibility = ["//visibility:public"] | ||
| ) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,18 @@ | ||
| def _scala_toolchain_impl(ctx): | ||
| toolchain = platform_common.ToolchainInfo( | ||
| scalacopts = ctx.attr.scalacopts, | ||
| library = ctx.attr.library, | ||
| compiler = ctx.attr.compiler, | ||
| reflect = ctx.attr.reflect, | ||
| ) | ||
| return [toolchain] | ||
|
|
||
| scala_toolchain = rule( | ||
| _scala_toolchain_impl, | ||
| attrs = { | ||
| 'scalacopts': attr.string_list(), | ||
| 'library': attr.label(allow_files=True), | ||
| 'compiler': attr.label(allow_files=True), | ||
| 'reflect': attr.label(allow_files=True), | ||
| } | ||
| ) | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,8 +45,6 @@ def _rule_impl(ctx): | |
| "@io_bazel_rules_scala//specs2:specs2", | ||
| "@scala//:scala-xml", | ||
| "@scala//:scala-parser-combinators", | ||
| "@scala//:scala-library", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @chaoren does this mandate changes in the plugin? So that it will take these dependencies from the toolchain? |
||
| "@scala//:scala-reflect", | ||
| # From specs2/specs2_junit.bzl:specs2_junit_dependencies() | ||
| "@io_bazel_rules_scala_org_specs2_specs2_junit_2_11//jar:jar", | ||
| ], | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure this is the way to go? If I understand it correctly this still requires me to change the scala.bzl#scala_repositories method to download 2.12.