-
-
Notifications
You must be signed in to change notification settings - Fork 288
Fix dt_patches/dt_patch_test.sh for Scala 2.13.0
#1632
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
liucijus
merged 1 commit into
bazel-contrib:master
from
mbland:bzlmod-fix-dt-patches-for-scala-2.13.0
Oct 29, 2024
Merged
Fix dt_patches/dt_patch_test.sh for Scala 2.13.0
#1632
liucijus
merged 1 commit into
bazel-contrib:master
from
mbland:bzlmod-fix-dt-patches-for-scala-2.13.0
Oct 29, 2024
Conversation
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
mbland
added a commit
to mbland/rules_scala
that referenced
this pull request
Oct 23, 2024
Removes `//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter` as a `srcs` dependency for Scala 3. This broke `test/shell/test_semanticdb.sh` in bazel-contrib#1632: - https://buildkite.com/bazel/rules-scala-scala/builds/5107#0192baa8-d6f7-4851-b3f5-6093625cb9ea/124-497
mbland
added a commit
to mbland/rules_scala
that referenced
this pull request
Oct 23, 2024
Caught by `./test_lint.sh` in CI yet again!
7cb24cb to
ce6523a
Compare
|
Just rebased and updated this change now that #1611 has landed. |
|
Hi, @mbland, sorry but I made a conflict by merging other PRs. Could you please rebase this PR? Thanks. |
Updates targets broken under the Scala 2.13.0 test. Also removes the
redundant 2.12.1 test, and cleans the `test_dt_patches_user_srcjar` repo
before the `test_compiler_srcjar{,_nonhermetic}` tests. Part of bazel-contrib#1482.
This fix and the `.bazelversion` sync from bazel-contrib#1629 can land in either
order. Both are required for `dt_patches/dt_patch_test.sh` to be fully
functional.
---
The equivalent standalone command in `dt_patches/test_dt_patches`
produced the error:
```txt
$ bazel build //... --repo_env=SCALA_VERSION=2.13.0 //...
ERROR: .../rules_scala~/src/java/io/bazel/rulesscala/scalac/reporter/BUILD:5:13:
Building external/rules_scala~/src/java/io/bazel/rulesscala/scalac/reporter/libreporter.jar
(2 source files) [for tool] failed: (Exit 1): java failed:
error executing Javac command
(from target @@rules_scala~//src/java/io/bazel/rulesscala/scalac/reporter:reporter)
external/rules_java~~toolchains~remotejdk21_macos_aarch64/bin/java
'--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED'
'--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ...
(remaining 19 arguments skipped)
external/rules_scala~/src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter/
after_2_12_13_and_before_2_13_12/DepsTrackingReporter.java:85:
error: method does not override or implement a method from a supertype
@OverRide
^
external/rules_scala~/src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter/
after_2_12_13_and_before_2_13_12/DepsTrackingReporter.java:94:
error: cannot find symbol
((FilteringReporter) delegateReporter).doReport(pos, msg, severity);
^
symbol: method doReport(Position,String,Reporter.Severity)
location: interface FilteringReporter
external/rules_scala~/src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter/after_2_12_13_and_before_2_13_12/DepsTrackingReporter.java:99:
error: cannot find symbol
super.doReport(pos, msg, severity);
^
symbol: method doReport(Position,String,Reporter.Severity)
external/rules_scala~/src/java/io/bazel/rulesscala/scalac/reporter/after_2_12_13_and_before_2_13_12/ProtoReporter.java:49:
error: method does not override or implement a method from a supertype
@OverRide
^
external/rules_scala~/src/java/io/bazel/rulesscala/scalac/reporter/after_2_12_13_and_before_2_13_12/ProtoReporter.java:51:
error: cannot find symbol
super.doReport(pos, msg, severity);
^
symbol: method doReport(Position,String,Reporter.Severity)
Target //dummy:dummy failed to build
```
I had the thought that maybe 2.13.0 could use the same `srcs` as the
`before_2_12_13` targets. So I abused the `any` matcher to pick exactly
2.13.0 and assign it the same values as `before_2_12_13`. Now it works,
and `dt_patches/dt_patch_test.sh` fully passes.
---
Cleaning the `test_dt_patches_user_srcjar` repository helps ensure that
the `test_compiler_srcjar_nonhermetic` runs, in particular, don't fail
after the first run.
ce6523a to
af7e8f5
Compare
|
@simuons No worries. Rebased, tested, and pushed. (CI doesn't run |
simuons
approved these changes
Oct 28, 2024
liucijus
approved these changes
Oct 29, 2024
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.
Description
Updates targets broken under the Scala 2.13.0 test. Also removes the redundant 2.12.1 test, and cleans the
test_dt_patches_user_srcjarrepo before thetest_compiler_srcjar{,_nonhermetic}tests. Part of #1482.This fix and the
.bazelversionsync from #1629 can land in either order. Both are required fordt_patches/dt_patch_test.shto be fully functional.Motivation
The equivalent standalone command in
dt_patches/test_dt_patchesproduced the error:I had the thought that maybe 2.13.0 could use the same
srcsas thebefore_2_12_13targets. So I abused theanymatcher to pick exactly 2.13.0 and assign it the same values asbefore_2_12_13. Now it works, anddt_patches/dt_patch_test.shfully passes.Cleaning the
test_dt_patches_user_srcjarrepository helps ensure that thetest_compiler_srcjar_nonhermeticruns, in particular, don't fail after the first run.