-
Notifications
You must be signed in to change notification settings - Fork 278
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
fix: dangerous_test_thirdparty_version.sh #1434
Conversation
This test modifies `scala_repository` in `WORKSPACE` file to switch scala version for testing `bazel test //third_party/...`, However, this logic is implemented when scala_config(scala_version=...) was not yet available. - test implemented at the beginning of 2020 bazelbuild#971 - scala_version is implemented at the end of 2020 - c439ebf this commit changes the test to use `scala_version` to switch scala_version, that fix the test.
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.
Thanks a lot for looking into this @tanishiking!
I think we can drop tests for versions that are older than we have in repositories
👍 I'll update the script later :) edit: updated a908088 |
…rom dangerous_test_thirdparty_version.sh
Looks like the test failed for some network reason (maybe), re-run it may fix |
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.
Unfortunately overrides still need to be passed for non default Scala versions
"14a520328ea4ca7f423b30154a54d3df0a531a9c51f5e98eda272c9821bc5331" \ | ||
"fd896db4806875f538843ea24411e483ee4d0734710a108d0308ef108e83cf80" | ||
$runner test_scala_version "2.13.6" | ||
$runner test_scala_version "2.13.7" |
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.
Overrides are still needed for versions not defined in default Rules Scala repositories. scala_config
only selects repository by it's major version, so in case 2.13.7
, still 2.13.6
is used as defined in https://github.com/bazelbuild/rules_scala/blob/master/third_party/repositories/scala_2_13.bzl#L3. Unfortunately there is no good way to check the overridden version and report it to the user.
closing as stale, feel free to reopen |
Description
CONTRIBUTING.md
says we should run./dangerous_test_thirdparty_version.sh
if we change in third-party, but the script fails with the following error.dangerous_test_thirdparty_version.sh
modifiesscala_repository
inWORKSPACE
file to switch scala version for testingbazel test //third_party/...
,However, this logic is implemented when scala_config(scala_version=...) was not yet available.
this commit changes the test to use
scala_version
to switch scala_version, which fix the test.However, there're still some issues with this script
2.12.10
bazel test //third_party/...
running on CI (viatest_rules_scala.sh
))Maybe we should update scala_versions in this script, and run only some latest scala versions? Or, should we maintain this test script any longer?
Motivation
#1433
CONTRIBUTING.md
suggested runningdangerous_test_thirdparty_version.sh
when we changethird_party
code, and I found this test is broken.