-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Regression: Mix Kotlin and Java classes in multi-module projects breaks dev mode with Gradle #27005
Comments
/cc @evanchooly, @geoand, @glefloch, @quarkusio/devtools |
Still happens on 2.12.0.Final upgrading Kotlin to 1.7.10 |
@evanchooly could you have a look at that one? There is a reproducer in the description. |
Any news about this ? This thing doesn't allow us to upgrade our Quarkus. We tested 2.13.0.Final. |
Sadly, no dice. I can confirm this still happens on HEAD as of today. |
Thank you for your test. |
Describe the bug
When using a multi-module project and mixing Kotlin and Java classes on /src/main/java and /src/test/java at the same time dev mode doesn't detect any class.
Actually the reproducer that I added shows that no JAX-RS endpoints are detected but this reproducer you can also create @startup classes and hooks and it will be ignored by Quarkus Dev Mode.
Expected behavior
All Java and Kotlin classes must be detected and running. Endpoints should be detected, swagger working and live deployment running.
Actual behavior
JAX-RS Endpoints are not detected.
ApplicationScoped classes are not detected.
@startup events are not trigged or classes with this annotations are not detected.
In general seems like the main package does not exist. Only the lib package.
How to Reproduce?
[](url
reproducer-kotlin-mix.zip
)
Go to app folder and run the project. Then enter go to the browser and you will see that there is no endpoints. And dev mode endpoints also doesn't show.
As additional step you can create a class to monitor lifecycle following : https://quarkus.io/guides/lifecycle and you will see that no messages will appear.
If you run the project on production build or test build it will work as expected.
If you remove any java/kotlin classes to let only Kotlin or Java classes on the project it will work as expected.
Output of
uname -a
orver
Ubuntu && Arch Linux reproduced
Output of
java -version
17 and 11
GraalVM version (if different from Java)
Quarkus version or git rev
2.11.1 ( happends since 2.7.X )
Build tool (ie. output of
mvnw --version
orgradlew --version
)gradlew 7.3.3
Additional information
The app submodule has the depenency
If you remove it the project will crash with :
Do not check this. The textFixtures is just to demonstrate how we use quarkus if you remove the dependencies and fix the compiling errors on the tests the behavior will be the same as mentioned on the description.
This is another reason why we think that quarkusDev is not loading main(src, test) project classes.
The text was updated successfully, but these errors were encountered: