Skip to content

Conversation

@srdo
Copy link
Contributor

@srdo srdo commented Apr 18, 2025

WIP: This PR still uses a Gradle 8.14 RC, and Spotbugs 4.9.4 has not
released yet, so testing it requires a local build.

Upgrade Scala to 2.13.16, in order to get a Java 24-compatible ASM
version.

Upgrade Gradle to 8.14, which is the first Java 24 compatible version.

Upgrade spotbugs to 4.9.4. This is the minimum version that's both Java
24 compatible, and not affected by
spotbugs/spotbugs#3320

Since the new spotbugs version introduces some extra checks, this commit
excludes those warnings, without looking at whether they are real issues
or false positives.

Addressing those warnings is left as future work, since the code is no
worse now than before the issues were highlighted.

@github-actions github-actions bot added triage PRs from the community dependencies Pull requests that update a dependency file build Gradle build or GitHub Actions labels Apr 18, 2025
@srdo srdo changed the title WIP: Build with Java 24 WIP: Test with Java 24 Apr 18, 2025
@srdo srdo changed the title WIP: Test with Java 24 WIP: Test against Java 24 Apr 18, 2025
@srdo srdo marked this pull request as draft April 18, 2025 19:54
@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@srdo srdo force-pushed the java-24-build branch 2 times, most recently from 60bee39 to cac609d Compare April 26, 2025 12:08
@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@srdo
Copy link
Contributor Author

srdo commented Apr 30, 2025

Status: This passes tests locally. As Gradle 8.14 has released, the only remaining roadblock is that the currently-newest version of Spotbugs crashes the build. The underlying bug is fixed in the latest Spotbugs source, so once Spotbugs 4.9.4 is released (see spotbugs/spotbugs#3380 (comment)), this should be good to go.

@github-actions
Copy link

github-actions bot commented May 2, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@chia7712
Copy link
Member

@srdo could you please rebase code and fix the conflicts?

ijuma and others added 2 commits May 21, 2025 17:34
Upgrade Scala to 2.13.16, in order to get a Java 24-compatible ASM version.

Upgrade Gradle to 8.14, which is the first Java 24 compatible version.

Upgrade spotbugs to 4.9.4. This is the minimum version that's both
Java 24 compatible, and not affected by spotbugs/spotbugs#3320

Since the new spotbugs version introduces some extra checks, this commit
excludes those warnings, without looking at whether they are real issues
or false positives.

Fix gradle wrapper.

The download-the-wrapper bit was inserted before the CLASSPATH line
in the wrapper, because that referenced the jar. That line no longer
mentions the jar, because the wrapper is referenced via -jar instead of -cp
now.

This means the download was placed in the middle of a java invocation
command, breaking the script.

It's been moved to be before the call to exec. It seems fair to assume
that the script will only exec once, and that the exec call is going to
call the wrapper.
@srdo srdo force-pushed the java-24-build branch from cac609d to a82ddcb Compare May 21, 2025 15:37
@srdo
Copy link
Contributor Author

srdo commented May 21, 2025

@chia7712 Sure, rebased. But this won't be mergeable until the next Spotbugs release.

@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@chia7712
Copy link
Member

@srdo could you please use spotbug 4.9.4 to trigger CI again? Thanks

@srdo
Copy link
Contributor Author

srdo commented Jul 14, 2025

@chia7712 I would, but Spotbugs 4.9.4 has still not released. I'll update this PR as soon as they put out the new version.

@github-actions
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

@srdo
Copy link
Contributor Author

srdo commented Aug 2, 2025

@chia7712 I don't know how far off a new spotbugs release is, and I'd rather not keep blocking on that.

I was thinking we could cut this into 3 parts, where 2 can be merged immediately:

  • Upgrading Spotbugs to the latest version not affected by Handle polymorphic signatures when finding methods spotbugs/spotbugs#3311, which is a regression breaking the build on Java 23 and 24. The latest version that works on Java 23 is spotbugs version 4.9.1. I've done that upgrade in MINOR: Upgrade Spotbugs to 4.9.1 #20294. I think doing this makes sense, because it'll at least help flag some potential concurrency bugs that aren't caught by the current Spotbugs version.
  • Making CI run Java 24, but with spotbugs disabled. Since CI will run the build on 17 as well, there isn't really a strong need to run spotbugs on Java 24 right now, so skipping it for now seems better than continuing to block the Java 24 upgrade while waiting for spotbugs to do a new release. I'm going to do that in MINOR: Run CI with Java 24 #20295.
  • Once Spotbugs 4.9.4 releases, we can upgrade to that and let CI run spotbugs on Java 24 again. I can repurpose this PR to do that once 4.9.4 is released.

I think this is better than continuing to block everything, including being able to test against Java 24, on Spotbugs putting out a new release.

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions dependencies Pull requests that update a dependency file needs-attention triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants