Skip to content

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Dec 9, 2019

Partially fixes: #2811 (Gradle support will be part of #6035)

@geoand
Copy link
Contributor Author

geoand commented Dec 9, 2019

I tested this and it worked great on a generated project. I also updated the Kotlin integration test to reflect the test case it's supposed to solve.

Feedback more than welcome :)

@geoand
Copy link
Contributor Author

geoand commented Dec 9, 2019

@ia3andy this doesn't fix your Java 11 issue with Kotlin, but it should make it a lot easier for you or anyone else to implement it. Did you ever open an issue for that?

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

I added a suggestion and a question.

@geoand
Copy link
Contributor Author

geoand commented Dec 9, 2019

@gsmet I updated per your suggestion and added an answer to your question

<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-compiler</artifactId>
<version>${kotlin.version}</version>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need kotlin-compiler-embeddable? AFAICS, it's used only in kotlin/deployment/pom.xml. Which also raises a question why it is in the runtime BOM instead of the deployment one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catches, thanks!
I think we can remove embeddable. I'll also check and see if moving it to the deployment BOM works.

Copy link
Contributor Author

@geoand geoand Dec 9, 2019

Choose a reason for hiding this comment

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

Actually, are you sure it should in the deployment BOM? I don't see any other non-quarkus artifacts there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the embeddable dependency

Copy link
Member

Choose a reason for hiding this comment

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

Actually, are you sure it should in the deployment BOM? I don't see any other non-quarkus artifacts there

The runtime BOM is for runtime dependencies. It is also imported directly by user applications to align application runtime dependencies with the Quarkus platform's runtime dependencies.
Theoretically, if the artifact is only a deployment dependency then it belongs to the deployment BOM. One caveat in the current implementation (and afaict in the to be implemented classloading model) if there are difference versions of the artifact in the runtime CP and the deployment CP then the runtime one will end up being used during the augmentation.
In this given case, however, I'd probably put it in the deployment BOM. If you are not comfortable doing that then don't :) Could be a separate issue.
The BOMs should probably go through a thorough review.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, the properties. I think the properties should move to the root pom.xml so that they can be shared across all the subprojects including the tests. Some tests define/duplicate those versions, which is not a good thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aloubyansky makes sense!

@gsmet I think that what @aloubyansky proposes should be handled in a dedicated issue, WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

I fully agree about having the properties in their own pom. I suggested that a while ago.

Not entirely sure it will work to have them in the root pom, depends if all the pom requiring them has it as parent. Otherwise, it can be a specific pom.

I agree it should be done in a separate issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks both of you for your input!

Copy link
Member

Choose a reason for hiding this comment

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

Not entirely sure it will work to have them in the root pom, depends if all the pom requiring them has it as parent. Otherwise, it can be a specific pom.

Either way that properties pom will have to be a parent pom for every subproject. Which is what the root pom is supposed to be, otherwise the hierarchy for the project is going to break which effectively means independent projects.

@gastaldi
Copy link
Contributor

gastaldi commented Dec 9, 2019

Looks good. Haven't fully tested yet, but does it work in Gradle?

@geoand
Copy link
Contributor Author

geoand commented Dec 9, 2019

Looks good. Haven't fully tested yet, but does it work in Gradle?

Nope, it will require a lot of work to get it working in Gradle as well. That is because in Gradle we can't just read the configuration, we'll need to read the Kotlin Gradle plugin data. It should definitely be done when all the other Gradle improvements things are in place.

@geoand
Copy link
Contributor Author

geoand commented Dec 9, 2019

@gastaldi would you be interested in doing a follow up for Gradle as some point?

@gastaldi
Copy link
Contributor

gastaldi commented Dec 9, 2019

I created #6035 And referenced it in #5101

@geoand
Copy link
Contributor Author

geoand commented Dec 9, 2019

I created #6035 And referenced it in #5101

Excellent!

@geoand geoand added this to the 1.1.0 milestone Dec 9, 2019
@geoand geoand merged commit 0e82e21 into quarkusio:master Dec 9, 2019
@geoand geoand deleted the kotlin-devmode branch December 9, 2019 10:46
@gsmet gsmet removed the backport? label Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recompilation kotlin sources in dev mode should use compiler plugins

4 participants