Skip to content
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 JacocoInstrumenter compilation with JDK 13+ #1402

Merged
merged 1 commit into from
Jun 8, 2022

Conversation

dmivankov
Copy link
Contributor

Description

Fix JacocoInstrumenter compilation with JDK 13+

Following
bazelbuild/bazel#10214
bazelbuild/bazel@0216ee5

FileSystems.newFileSystem becomes ambiguous on 2nd parameter when it is null.
So adding explicit type annotation.

https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystems.html

Tested via bazel build @io_bazel_rules_scala//src/java/io/bazel/rulesscala/coverage/instrumenter:instrumenter

Motivation

Being able to run coverage with JDK 17

@simuons simuons self-requested a review June 6, 2022 19:29
Copy link
Collaborator

@simuons simuons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dmivankov,

I don't think that test failure is related to your changes. Could you please close and reopen pr to trigger build again?

@dmivankov dmivankov closed this Jun 6, 2022
@dmivankov dmivankov reopened this Jun 6, 2022
Following
bazelbuild/bazel#10214
bazelbuild/bazel@0216ee5

FileSystems.newFileSystem becomes ambiguous on 2nd parameter when it is null.
So adding explicit type annotation.

https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystems.html
@dmivankov
Copy link
Contributor Author

Close-open didn't retrigger the build, so tried to rebase. Still fails the same way without a lot of error logs, so not clear if specific to this PR or to the test system.

@simuons
Copy link
Collaborator

simuons commented Jun 6, 2022

Yes I see. Though it complains on different test:
was //test/coverage_specs2_with_junit:test-specs2-with-junit FAILED in 8.2s
now //test:JunitJavaSeparateTarget_test_runner FAILED in 7.4s

We will investigate why it happens.

@liucijus liucijus merged commit a64d5cd into bazelbuild:master Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants