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

Let native Turbine image find ct.sym with non-hermetic java_runtime #21610

Closed
wants to merge 2 commits into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Mar 7, 2024

Work towards #21604

@fmeum fmeum requested a review from hvadehra March 7, 2024 17:17
@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Mar 7, 2024
@fmeum
Copy link
Collaborator Author

fmeum commented Mar 7, 2024

CC @coeuvre

I haven't managed to write a test for this (it fails with a different error in Turbine), but verified that this fixes the reproducer.

not a supported release: OptionalInt[11]

Usage: turbine [options]

Options:
  --output
    The jar output file.
  --sources
    The sources to compile.
  --source_jars
    jar archives of sources to compile.
  --classpath
    The compilation classpath.
  --bootclasspath
    The compilation bootclasspath.
  --help
    Print this usage statement.
  @<filename>
    Read options and filenames from file.

Copy link
Member

@coeuvre coeuvre left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

@fmeum
Copy link
Collaborator Author

fmeum commented Mar 7, 2024

@bazel-io fork 7.2.0

@coeuvre
Copy link
Member

coeuvre commented Mar 8, 2024

@meteorcloudy can we also include this fix in 7.1.0? The risk should be pretty low.

@hvadehra
Copy link
Member

hvadehra commented Mar 8, 2024

It would be really nice to have a test, given how non-localized the involved interactions are (bazel, rules_java, java_tools, etc). Otherwise, LGTM to me as an isolated improvement1 (and we can always try adding a test in a followup).

Footnotes

  1. I don't think this is the correct resolution to https://github.com/bazelbuild/bazel/issues/21604 but I'll discuss more about that there.

Copy link
Member

@hvadehra hvadehra left a comment

Choose a reason for hiding this comment

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

Approving, @fmeum if adding a test is too problematic, please let me know and we can merge this anyways.

@hvadehra hvadehra added awaiting-user-response Awaiting a response from the author and removed awaiting-review PR is awaiting review from an assigned reviewer labels Mar 8, 2024
@meteorcloudy
Copy link
Member

@coeuvre We just cut rc2 for 7.1.0 and were hoping it would be the last rc. Maybe we can backport this change along with all other JDK 21 changes all together in 7.2.0?

@coeuvre
Copy link
Member

coeuvre commented Mar 8, 2024

SG!

@fmeum fmeum changed the title Let native Turbine image find ct.sym with local JDK Let native Turbine image find ct.sym with non-hermetic java_runtime Mar 8, 2024
@coeuvre
Copy link
Member

coeuvre commented Mar 8, 2024

I am going to import this PR now. @fmeum: feel free to add test in a separate PR.

@copybara-service copybara-service bot closed this in 061ddeb Mar 8, 2024
@fmeum fmeum deleted the 21604-local-ct-sym branch March 8, 2024 18:29
@fmeum
Copy link
Collaborator Author

fmeum commented Mar 8, 2024

@hvadehra I now understood that my attempts at testing this failed since local_java_repository does specify srcs and just wasn't affected by the bug. It looks like neither java_runtime(java_home = ...) nor local_java_runtime have any integration test coverage in Bazel, so I'm not sure whether and how to test this new behavior.

@coeuvre
Copy link
Member

coeuvre commented Mar 13, 2024

@bazel-io fork 7.1.1

bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Mar 13, 2024
Work towards bazelbuild#21604

Closes bazelbuild#21610.

PiperOrigin-RevId: 613912980
Change-Id: Ibc620120b783c990d08b84ea6cd8ae224333ed8a
github-merge-queue bot pushed a commit that referenced this pull request Mar 13, 2024
…a_runtime` (#21670)

Work towards #21604

Closes #21610.

Commit
061ddeb

PiperOrigin-RevId: 613912980
Change-Id: Ibc620120b783c990d08b84ea6cd8ae224333ed8a

Co-authored-by: Fabian Meumertzheim <[email protected]>
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 7.1.1 RC1. Please test out the release candidate and report any issues as soon as possible.
If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=7.1.1rc1. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-response Awaiting a response from the author team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants