-
-
Notifications
You must be signed in to change notification settings - Fork 286
Add scalac_jvm_flags option to toolchain #803
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
Merged
johnynek
merged 5 commits into
bazel-contrib:master
from
beala-stripe:beala/add-jvm-args-option-to-toolchain
Aug 5, 2019
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a4e3a47
Add scalac_jvm_flags to scala_toolchain
beala-stripe 6805122
Add docs
beala-stripe 60c1ecc
Fix comment
beala-stripe c2a7783
Add enable_code_coverage_aspect to the docs
beala-stripe 4950f3e
Flags on target should override flags on toolchain.
beala-stripe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
load("//scala:scala_toolchain.bzl", "scala_toolchain") | ||
load("//scala:scala.bzl", "scala_library") | ||
|
||
scala_toolchain( | ||
name = "failing_toolchain_impl", | ||
# This will fail because 1M isn't enough | ||
scalac_jvm_flags = ["-Xmx1M"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
scala_toolchain( | ||
name = "passing_toolchain_impl", | ||
# This will pass because 1G is enough | ||
scalac_jvm_flags = ["-Xmx1G"], | ||
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.
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. Good catch. |
||
visibility = ["//visibility:public"], | ||
) | ||
|
||
toolchain( | ||
name = "failing_scala_toolchain", | ||
toolchain = "failing_toolchain_impl", | ||
toolchain_type = "@io_bazel_rules_scala//scala:toolchain_type", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
toolchain( | ||
name = "passing_scala_toolchain", | ||
toolchain = "passing_toolchain_impl", | ||
toolchain_type = "@io_bazel_rules_scala//scala:toolchain_type", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
scala_library( | ||
name = "empty_build", | ||
srcs = ["Empty.scala"], | ||
) | ||
|
||
scala_library( | ||
name = "empty_overriding_build", | ||
srcs = ["Empty.scala"], | ||
# This overrides the option passed in on the toolchain, and should BUILD, even if | ||
# the `failing_scala_toolchain` is used. | ||
scalac_jvm_flags = ["-Xmx1G"], | ||
) |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package test_expect_failure.scalac_jvm_opts | ||
|
||
class Empty |
This file contains hidden or 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
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.
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.
I think you can do a table in github flavored markdown https://help.github.com/en/articles/organizing-information-with-tables
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.
I tried converting this to MD, but it's not clear I got any readability wins. In order to insert newlines into cells, I needed to mix MD and HTML. I also cannot indent the HTML properly because a newline starts a new cell.