Gergely Fábián
Gergely Fábián
I could fix scalafmt by changing phase_scalafmt (is there anything exposed so that I wouldn't have to do that?): ```starlark ctx.actions.run( arguments = ["--jvm_flag=-Dfile.encoding=UTF-8", "--jvm_flag=-Djava.security.manager=allow", _format_args(ctx, src, file)], executable =...
For coverage, changed phase_coverage to: ```starlark ctx.actions.run( mnemonic = "JacocoInstrumenter", inputs = [input_jar], outputs = [output_jar], executable = ctx.attr._code_coverage_instrumentation_worker.files_to_run, execution_requirements = {"supports-workers": "1"}, arguments = ["--jvm_flag=-Djava.security.manager=allow", args], ) ```
Uploaded my temporary fixes here: https://github.com/bazelbuild/rules_scala/compare/master...gergelyfabian:rules_scala:jdk_21?expand=1
One more thing that will need to get fixed I guess, when running coverage: ``` java.io.IOException: Error while analyzing com/.../.../DummyClazz.class.uninstrumented. at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:163) at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:134) at com.google.testing.coverage.JacocoCoverageRunner.analyzeStructure(JacocoCoverageRunner.java:187) at com.google.testing.coverage.JacocoCoverageRunner.create(JacocoCoverageRunner.java:129) at com.google.testing.coverage.JacocoCoverageRunner$2.run(JacocoCoverageRunner.java:568)...
Found the following related issue: https://github.com/bazelbuild/rules_java/issues/141 It seems may need to retry this after upgrading to Bazel 7.
As looking at https://github.com/bazelbuild/rules_java/issues/141, I think I'll try to make some changes for rules_scala to make it compatible (at least for my project) with Bazel 7.0 rc2, and then recheck...
Here is the PR with fixes for Bazel 7.0.0rc2: https://github.com/bazelbuild/rules_scala/pull/1524
Upgrading to Bazel 7.0 does not fix the basic issues with JDK 21, but obviously it's better that we can use an official remotejdk_21. Instructions I used to set up...
Regarding SecurityManager... Could we rewrite code that uses SecurityManager in rules_scala to something else (I'm not an expert here) or our only option is reenabling it? On a different note,...
Is there a reason for reopening?