-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
@DisabledInAotMode
does not work in native image
#31705
Comments
I did re-run using the
|
I'm not sure if this is related, but I did have a test that was annotated with I changed it to use
|
Hello 👋 , It might be related, I have the exact problem even without Native, just for AOT code for standard JVM (which is the same, but then it's not purely native related 😇). The stack trace is:
The complete project is available on GitLab. |
This comment was marked as outdated.
This comment was marked as outdated.
@davinkevin That's a separate problem. |
@wilkinsona but it was working in 3.1.x 🤔. I did not change the code, just the dependency |
I suspect it wasn't fully working in 3.1.x. Spring Framework 6.0 would log failures during AOT processing of tests and they would only become apparent when the tests were run. This was changed in Framework 6.1 to fail fast during AOT processing with |
I assume your comment is intended for @davinkevin? In my case, I am using |
|
Looking at the
This was a WARN log message in 3.1 and is now failing the build in 3.2 and this is what @wilkinsona is referring to. The problem here is that |
But it is not working here. In boot 3.1.x, |
In 3.1.x, AOT processing for that class failed, which was logged, and then the process moved on. Native image then found In 3.2.x, AOT processing for that class fails, which breaks the build. The native image never sees the |
Ahhh ok - so what you're saying is that |
Nevermind my previous comment @mhalbritter - I wrote it before you adjusted your previous comment, which is much more clear. |
@DisabledInAotMode
does not work in native image
Hello 👋, I see the issue is now closed (good 👍), but I feel my case won't be covered from the commit code I've read. Is there any solution:
ATM, I have this stack trace:
And I feel adding @DisabledInAotMode will reduce the number of test run and potentially doesn't mean anything for my case. Finally, should I open an new issue @wilkinsona? |
Following spring-projects/spring-framework#31705 (comment) and spring-projects/spring-boot#32195, there is an incompatibility with AOTProcess of tests. For this reason we remove the native plugin.
@davinkevin Running test with AOT is supported, but not for unsupported use cases like I am not sure a new issue is needed (unless you have found another broken use case with AOT tests) but spring-projects/spring-boot#32195 title is indeed confusing, I have dropped this comment on Spring Boot side to clarify. |
I have an application that runs
./mvnw clean verify -PnativeTest
. It has been running fine on Spring Boot 3.1.5. Today I upgraded it to 3.2.0 and that same test is now failing. This is my current environment:The application can be found at https://github.com/edeandrea/summit-lab-spring-music. The PR that is failing is at edeandrea/summit-lab-spring-music#15.
This is the error I'm getting:
This is an abridged log (the whole thing can be seen on https://github.com/edeandrea/summit-lab-spring-music/actions/runs/7007454530/job/19061577893?pr=15):
The text was updated successfully, but these errors were encountered: