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

Upgrade to Eclipse 2021-09 #277

Closed
philwebb opened this issue Jun 16, 2021 · 9 comments
Closed

Upgrade to Eclipse 2021-09 #277

philwebb opened this issue Jun 16, 2021 · 9 comments
Assignees
Milestone

Comments

@philwebb
Copy link
Contributor

No description provided.

@quaff
Copy link

quaff commented Sep 13, 2021

Eager for this, It block me using spring-javaformat.

@wilkinsona wilkinsona changed the title Upgrade to Eclipse 2021-06 Upgrade to Eclipse 2021-09 Sep 21, 2021
@wilkinsona
Copy link
Contributor

wilkinsona commented Sep 21, 2021

Let's just jump straight to 2021-09 which has built-in support for Java 17.

@wilkinsona
Copy link
Contributor

As part of this, we need to revisit the fix for #262 as the System.getProperty call is now done in a lambda rather than an anonymous insert class.

@wilkinsona wilkinsona self-assigned this Sep 21, 2021
@wilkinsona
Copy link
Contributor

I have a local build that works with 2021-09. Unfortunately, 2021-09 contains a regression that causes 4 erroneous compilation failures in Spring Boot's buildpack platform module due to a method reference referring to an overloaded method. We may just have to live with those for now. Alternatively, changing the method references to lambda expressions appeases JDT's compiler.

@wilkinsona
Copy link
Contributor

wilkinsona commented Sep 24, 2021

This upgrade is going to be problematic. The version of Eclipse JDT in 2021-09 has Java 11 class files (class file version 55) so projects with a Java 8 baseline will have to jump through some hoops to continue to use newer versions of the formatter. I'm not sure how it'll work at all in Maven, and in Gradle it would require us to rely on Toolchain support and Java 8 CI would require a Java 11 VM to be available as well.

@wilkinsona wilkinsona reopened this Sep 24, 2021
@wilkinsona
Copy link
Contributor

2021-09 makes some changes to the wrapping of annotation attributes. The following two diffs are from running format against Spring Boot's main branch:

-@SpringBootTest(properties = "spring.main.web-application-type=reactive", classes = {
-               WebTestClientSpringBootTestIntegrationTests.TestConfiguration.class, ExampleWebFluxApplication.class })
+@SpringBootTest(properties = "spring.main.web-application-type=reactive",
+               classes = { WebTestClientSpringBootTestIntegrationTests.TestConfiguration.class,
+                               ExampleWebFluxApplication.class })
-@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = { "spring.jersey.type=filter",
-               "server.servlet.context-path=/app", "server.servlet.register-default-servlet=true" })
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
+               properties = { "spring.jersey.type=filter", "server.servlet.context-path=/app",
+                               "server.servlet.register-default-servlet=true" })

@wilkinsona
Copy link
Contributor

I was mistaken above. Java 17 support isn't built into 2021-09, but is available as an add-on from the Marketplace. The add-on requires 2021-09.

JDT in 2021-06 has Java 8-level class files so it avoids some of the complications of 2021-09, but doesn't give us access to Java 17 support.

@wilkinsona
Copy link
Contributor

A version built against 2021-06 seems to work fine in 2021-09 so that seems like a better short-term bet. I've opened #286 for that. I think we should revert the 2021-09 upgrade for now.

wilkinsona added a commit that referenced this issue Sep 24, 2021
@philwebb
Copy link
Contributor Author

I attempted to force a bytecode downgrade using cglib. It didn't go well. I think we'll need to branch the code and have a java 11 specific release.

philwebb added a commit that referenced this issue Oct 7, 2021
@philwebb philwebb modified the milestones: 0.0.x, 0.0.30 Oct 7, 2021
philwebb added a commit that referenced this issue Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants