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

Use asm unshadowed and upgrade to 9.4 #806

Merged
merged 2 commits into from
Jan 14, 2024
Merged

Use asm unshadowed and upgrade to 9.4 #806

merged 2 commits into from
Jan 14, 2024

Conversation

JacksonBailey
Copy link
Contributor

Big heads up:

  1. I did not run many tests and I even saw a failure. Not sure if I had something setup wrong or what.
  2. The test I added here passes even when I had 9.2 in use so I know it's not working. That said, when pulling from maven local the snapshot version I no longer see the error on my project so I know this fixes it (but could cause other problems).

I will look into running the full suite (and even the quick suite) soon, but this is just something quick and dirty so show the proof of concept.

For what it is worth, here is my project where the fix is shown in use. It's not really anything to look at but if you'd like to clone it and try you can. The buildHealth task works with the snapshot build here but not with 1.14.1.

See #798

@autonomousapps autonomousapps added this to the next milestone Nov 15, 2022
@JacksonBailey
Copy link
Contributor Author

JacksonBailey commented Nov 15, 2022

Steps

  1. Add a test that fails with Java 19 toolchain and 9.2 shaded asm.
  2. (Maybe) Catch the exception and try to give a better error message. Something like "Got a class version error, asm may need to be updated from version X.Y to work with newer versions of Java, [link to asm changelog]"
  3. Actually use new version of asm 9.4 and publish shaded jar 😄 (will need assistance publishing when we get here)
  4. Use new version of shaded jar and verify the test from step 1 passes
  5. Publish new plugin version

@JacksonBailey JacksonBailey marked this pull request as draft November 15, 2022 19:27
@autonomousapps autonomousapps mentioned this pull request Nov 17, 2022
@autonomousapps
Copy link
Owner

#813

@JacksonBailey JacksonBailey marked this pull request as ready for review November 17, 2022 23:13
Comment on lines 29 to 32
GRADLE_7_5 | 18
GRADLE_7_5 | 19
GRADLE_7_6 | 18
GRADLE_7_6 | 19
Copy link
Contributor Author

@JacksonBailey JacksonBailey Nov 17, 2022

Choose a reason for hiding this comment

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

Questions

  1. Do you want this to use the gradleVersions() method like the other tests?
  2. Do you want me to query Adoptium API to try and get latest version of Java so it's easier to catch? It's gross but it might be useful. Not sure your opinion. Could just list out the ones we want to test (like 8, 11, 17, 19, ... then just add more as time goes on).
  3. If I do multiple versions of Java toolchain and gradle versions, do you want me to make it so it's all toolchains on one version of gradle then all versions of gradle with one version of toolchain? That way it's not n^2 and just 2n tests haha.

@JacksonBailey
Copy link
Contributor Author

I got a test failure finally so went ahead and rebased. Sure enough, it works now! Were you interested in the error message thing or the testing against more versions of gradle/java?

@autonomousapps
Copy link
Owner

@JacksonBailey thanks for your continued work on this! I haven't had a chance to review in depth yet, but I will.

@JacksonBailey
Copy link
Contributor Author

@autonomousapps no worries, take your time. Enjoy your Thanksgiving (if you're from the states). Glancing back over this now the change you made should fix the problem found in the issue. At the moment this is just a unit test to make sure it doesn't come back. Essentially your other PR bumping to 9.4 should fix everything, this is just the extra assurance.

@autonomousapps
Copy link
Owner

Wow you were not wrong with the "Comment out all but the last for speed" comment 😅

I've updated the tests since there have been some breaking changes in the test fixtures support API.

I also updated the spec matrix to reference more versions of Gradle. I'm currently running it only against Gradle 7.6.

I tried to run it against Gradle 8.3 and 8.5, but go some errors. I don't have the bandwidth now to address them, but if you feel like picking this up again I will try to move faster.

I will merge this when green (running against 7.6).

@autonomousapps autonomousapps merged commit 0d3159b into autonomousapps:main Jan 14, 2024
1 check passed
@JacksonBailey JacksonBailey deleted the java19fix branch January 15, 2024 21:00
@JacksonBailey
Copy link
Contributor Author

I don't have the bandwidth now to address [Gradle 8.3 and 8.5 errors], but if you feel like picking this up again I will try to move faster.

Don't beat yourself up at all, we appreciate your work. ❤️ I might take a peek, but no promises. At the moment I am more interested in getting Java 20 and Java 21 to work (I assume they don't, just responding because I saw this in my email) than getting more Gradle versions to work.

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

Successfully merging this pull request may close these issues.

2 participants