-
Notifications
You must be signed in to change notification settings - Fork 281
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
Add scala_test_jvm_flags
to toolchain
#804
Changes from 3 commits
e19f7e3
1c3b6ed
647989a
214de3c
863a394
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
load("//scala:scala_toolchain.bzl", "scala_toolchain") | ||
load("//scala:scala.bzl", "scala_test") | ||
|
||
scala_toolchain( | ||
name = "failing_toolchain_impl", | ||
# This will fail because 1M isn't enough | ||
scala_test_jvm_flags = ["-Xmx1M"], | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
scala_toolchain( | ||
name = "passing_toolchain_impl", | ||
# This will pass because 1G is enough | ||
scala_test_jvm_flags = ["-Xmx1G"], | ||
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_test( | ||
name = "empty_test", | ||
srcs = ["Empty.scala"], | ||
) | ||
|
||
scala_test( | ||
name = "empty_overriding_test", | ||
srcs = ["Empty.scala"], | ||
# This overrides the option passed in on the toolchain, and should BUILD, even if | ||
# the `failing_scala_toolchain` is used. | ||
jvm_flags = ["-Xmx1G"], | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package test_expect_failure.scala_test_jvm_flags | ||
|
||
class Empty | ||
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. shouldn't this be some kind of no-op test or something? 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. 👍 I'll expand this out into a trivial test. 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. Fixed. |
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.
why don't we need
_expand_location
here?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.
It wasn't wrapped before, so I left it unwrapped, but thinking about this more, we probably want
final_jvm_flags
itself wrapped. That wayscala_test_jvm_flags
andjvm_flags
behave the same.