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

RouteDslKt.class is missing in 4.0.0 #2813

Closed
giger85 opened this issue Dec 12, 2022 · 7 comments · Fixed by #2825
Closed

RouteDslKt.class is missing in 4.0.0 #2813

giger85 opened this issue Dec 12, 2022 · 7 comments · Fixed by #2825
Labels
Milestone

Comments

@giger85
Copy link
Contributor

giger85 commented Dec 12, 2022

Describe the bug
My application use RouteDsl.kt to define gateway routes.
If I bump version of spring cloud from 3.1.4 to 4.0.0.RC1 ~ RC3, then compilation of route configuration fail.

Sample
Please see the below that result of extracting class files in 3.1.4 and 4.0.0-RC3 jar

3.1.4

> ls -al org/springframework/cloud/gateway/route/builder
...
PredicateSpec.class
RouteDslKt.class
RouteLocatorBuilder$Builder.class
...

4.0.0-RC3

  • RouteDslKt.class is missing in jar.
> ls -al org/springframework/cloud/gateway/route/builder
...
PredicateSpec.class
RouteLocatorBuilder$Builder.class
...
@giger85 giger85 changed the title RouteDslKt.class is missing 4.0.0-RC{n} jar RouteDslKt.class is missing 4.0.0-RC3 jar Dec 12, 2022
@giger85
Copy link
Contributor Author

giger85 commented Dec 14, 2022

In 4.0.0-RC3, the current value of jvmTarget is 1.8

<jvmTarget>1.8</jvmTarget>

In my opinion, the above value should be 17 since this project requires minimum java 17.
I will try to check this issue continuously.

updated

I will investigate below commit

@martinvisser
Copy link

Kotlin supports up to JDK 18 nowadays, so I'm pretty sure the commit you mention should be revisited indeed. Currently it blocks us from upgrading to this new version, because our project uses JDK 17 as baseline, just like Spring Boot 3 does.

@cwatzl
Copy link

cwatzl commented Dec 22, 2022

Issue persists in 4.0.0 and therefore Spring Cloud 2022.0.0. We can't upgrade to Spring Boot 3 because of this, because Boot 3 is incompatible with Cloud 2021.0.x :-(

@cwatzl
Copy link

cwatzl commented Dec 22, 2022

Maybe @spencergibb (author of dbd998d) can provide some insight?

@giger85
Copy link
Contributor Author

giger85 commented Dec 28, 2022

@spencergibb
I created #2825 PR to resolve this issue.
Please review code changes.

@spencergibb spencergibb changed the title RouteDslKt.class is missing 4.0.0-RC3 jar RouteDslKt.class is missing in 4.0.0 Jan 11, 2023
@spencergibb spencergibb added this to the 4.0.1 milestone Jan 11, 2023
@SimenRokaas
Copy link

SimenRokaas commented Aug 7, 2023

Hi, when updating from spring-cloud 2021.0.7 (with spring-cloud-gateway 3.1.7) to 2021.0.8 (scg 3.1.8) it seems RouteDslKt is gone as well. Maybe something related to this issue? Can't find anything in the release notes about any change for this class (https://github.com/spring-cloud/spring-cloud-release/wiki/Spring-Cloud-2021.0-Release-Notes). Any clues? @giger85 @spencergibb

(I cannot upgrade yet to Java 17 so cannot use 4.x yet)

EDIT: Created a new issue for this - #3018

@giger85
Copy link
Contributor Author

giger85 commented Aug 10, 2023

@SimenRokaas
Hi, I will try to find workaround at 3.1.x version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants