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

[7.4.0] Support for using the java rules from @rules_java #23591

Merged
merged 14 commits into from
Sep 11, 2024

Conversation

hvadehra
Copy link
Member

@hvadehra hvadehra commented Sep 11, 2024

Minimal set of cherrypicks to backport support for using the Starlark java rules from @rules_java.

hvadehra and others added 13 commits September 10, 2024 11:26
…es out of `@builtins`

PiperOrigin-RevId: 670950553
Change-Id: I88e301178e66f106d14ceab5cee4018cf04a8c43
(cherry picked from commit dc216aa)
…ing the `java_toolchain` and `java_package_configuration` rules out of `@builtins`

PiperOrigin-RevId: 670983691
Change-Id: I31002c25ba1c112394d59cc64a10b6092081a616
(cherry picked from commit c51a158)
…pi` to make it easier to use the Starlark Android rules in Bazel 7.4+.

PiperOrigin-RevId: 670945599
Change-Id: I7aeb2c67ad3c0f17b56f4a972ec87659bd157f99
(cherry picked from commit 384e381)
PiperOrigin-RevId: 577839580
Change-Id: I07e143bff16e7ff18d0426b8cf073ca90b97bc6a
(cherry picked from commit 48374df)
PiperOrigin-RevId: 574416239
Change-Id: Ib00dd6d034d4437e9c55682a26306106fdf41034

(cherry picked from commit 98e1b30)
…test` targets

Using `java_common.merge()` to include the generated extension registry outputs causes us to lose `compilation_info`. So we retain a reference before merge, create the right provider instance if needed and pass it to `to_java_binary_info`.

PiperOrigin-RevId: 580169649
Change-Id: Ifd06ddc1f833cc35a4a96308aa88710773f427c4
(cherry picked from commit 2052c63)
If set, it overrides the `BootClassPathInfo` used for compilation, instead of using the default from the `java_toolchain`.

PiperOrigin-RevId: 583461301
Change-Id: I7d66034824769552957ec89f37e6048581f0b1a8

(cherry picked from commit ca84e54)
PiperOrigin-RevId: 587033579
Change-Id: I31b3022e94fce8115909e80c6c2a6b34363c42b3

(cherry picked from commit a54816a)
RELNOTES: JavaInfo.compilation_info.javac_options now returns a depset. Use tokenize_javacopts from @rules_java to get the options as a correctly ordered list.
PiperOrigin-RevId: 586606843
Change-Id: If0c7cea372e5811a170dace1018375ec3fe8ab37
(cherry picked from commit fc7117e)
… -> Starlark migration.

PiperOrigin-RevId: 646472593
Change-Id: I3b1eb620f97ad016a929d676cbbd66a43752c3d8

(cherry picked from commit 0473f8b)
…n Starlark migration.

PiperOrigin-RevId: 646473580
Change-Id: I7136b1e7398fd5159548c0862eeeada94b9b6388

(cherry picked from commit 37b8626)
PiperOrigin-RevId: 651728693
Change-Id: I56936b5dee8b604208b0756b0aba46e2cfcec1b9

(cherry picked from commit cb1d8bc)
Even though this is "deprecated", it made little sense to restrict this
paramter in "label" but allow it for "label_list" and
"label_keyed_string_dict", especially when it is necessary for many
rules to be migrated to Starlark.

PiperOrigin-RevId: 644729148
Change-Id: Ia4e2ea158b4a0f36074ec58cbfdc4e389d738ab2
(cherry picked from commit 9fc25dc)
@hvadehra hvadehra marked this pull request as ready for review September 11, 2024 08:38
@hvadehra hvadehra requested a review from a team as a code owner September 11, 2024 08:38
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules team-Rules-Java Issues for Java rules team-Rules-ObjC Issues for Objective-C maintainers labels Sep 11, 2024
@hvadehra hvadehra removed team-Configurability platforms, toolchains, cquery, select(), config transitions team-Rules-CPP Issues for C++ rules team-Rules-ObjC Issues for Objective-C maintainers labels Sep 11, 2024
@hvadehra hvadehra added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Sep 11, 2024
@meteorcloudy
Copy link
Member

@hvadehra Nice, can you write something in the PR description about this change and how it could be enabled? We should put this in the 7.4 release notes.

@meteorcloudy meteorcloudy added this pull request to the merge queue Sep 11, 2024
Merged via the queue into release-7.4.0 with commit 9e3fa2a Sep 11, 2024
53 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 11, 2024
@hvadehra
Copy link
Member Author

can you write something in the PR description about this change and how it could be enabled? We should put this in the 7.4 release notes.

Will do, as soon as we have a rules_java release with the rules.

@hvadehra hvadehra deleted the hvd-7.4.0-rulesjava branch September 12, 2024 12:40
copybara-service bot pushed a commit to bazelbuild/rules_java that referenced this pull request Sep 12, 2024
…ined locally

Using the rules requires a bazel version that contains all the changes in bazelbuild/bazel#23591

PiperOrigin-RevId: 673847088
Change-Id: Iaaf824fbae4dced297baa6a336b2e7b8b6c3ccb5
copybara-service bot pushed a commit to bazelbuild/rules_java that referenced this pull request Sep 23, 2024
*** Reason for rollback ***

The rules aren't ready to be used with any Bazel version other than HEAD. Unblocks bazelbuild/bazel#23649

*** Original change description ***

Switch `rules_java` rule macro redirects from `native.*` to those defined locally

Using the rules requires a bazel version that contains all the changes in bazelbuild/bazel#23591

PiperOrigin-RevId: 677675846
Change-Id: Ibfd5d59e1dbfa04b0f0d5117493662d06f40f557
hvadehra added a commit that referenced this pull request Sep 26, 2024
Co-authored-by: Googler <[email protected]>
Co-authored-by: Googler <[email protected]>
Co-authored-by: Googler <[email protected]>
Co-authored-by: Googler <[email protected]>
copybara-service bot pushed a commit to bazelbuild/rules_java that referenced this pull request Oct 2, 2024
*** Reason for rollback ***

Rollforward of https://github.com/rules_java/bazel/commit/70970af9590a49b310312b2d01e85ac4fb72fff7, Bazel 7.3.2 is released and the rules are usable

*** Original change description ***

Partial rollback of commit 70970af.

*** Reason for rollback ***

The rules aren't ready to be used with any Bazel version other than HEAD. Unblocks bazelbuild/bazel#23649

*** Original change description ***

Switch `rules_java` rule macro redirects from `native.*` to those defined locally

Using the rules requires a bazel version that contains all the changes in bazelbuild/bazel#23591

PiperOrigin-RevId: 681344593
Change-Id: Idea53aea2a0569ff6e345edd6a1d1b44722117bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants