-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Fix split MongoDB Panache packages #18803
Fix split MongoDB Panache packages #18803
Conversation
@gsmet the current impl remove the split packages on the runtime and deployment packages. To remove the split packages on the io.quarkus.mongodb.panache and io.quarkus.mongodb.panache.reactive packages, I need to duplicate the annotations (easy, already done) and to move some interfaces. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will create a breaking change on a lot of code as I would need to move the PanacheQuery interface that almost all user of the extension use ! Is it worth it ?
Well, that's not a question of "is it worth it?" but more a question of "can we do without it?". Split packages come with all sorts of problem so we really need to avoid them.
I think it's good enough if people have one version to move from one class to the other.
We need to add a paragraph in the migration guide about these changes.
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid star imports.
This is the issue, they will not have one version to move from a class to the other, they will need to do it immediatly as I need to move some interfaces so I cannot duplicate them as I did for the annotations. |
Why can't you keep the original interfaces and have the old one extending the new one? That's how we do things when moving interfaces around. |
I was thinking something similar today. It should work. I'll try this tomorrow |
404db88
to
c07020a
Compare
@gsmet it's the other way around, the new interfaces need to extends the old one to make old code compile. I still need to:
|
9d4ccc5
to
e0ffb54
Compare
e0ffb54
to
2201393
Compare
@gsmet I finished the PR, this has been a little more complicated than expected because of the usage of the MongoEntity annotation. Maybe @FroMage or @evanchooly can also have a look as it's a pretty huge PR. Now there is still a bunch of packages inside mongodb-panache-common that are not child of the io.quarkus.mongodb.panache.common package. There is currently no issue with them so I'll move them inside the common package on a followup PR to have a cleaner package hierarchy. I'll write something in the upgrade page when the PR will be merged. |
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building 2201393
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 Windows #📦 extensions/panache/mongodb-panache/deployment✖
|
Overall it looks fine to me. Largely just a package move and concomitant code support changes. I'm curious why old-extending-new didn't work as that would be how I would've done it, too. But otherwise looks like a fairly mechanical rearrangement to me. |
@evanchooly the other way around didn't compile in Kotlin:
|
Failing Jobs - Building 2201393
Full information is available in the Build summary check run. Test Failures⚙️ JVM Tests - JDK 11 Windows #📦 extensions/panache/mongodb-panache/deployment✖
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's make progress on this.
I will backport it as I want 2.2 to be clean on this side so we need to push it to 2.1 first.
@loicmathieu can you add your classes there: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-2.1#panache-split-packages ? Thanks! |
@gsmet I'll do it tomorrow. |
@gsmet I updated the wiki page. |
Related to #18732
Will fix these warnings: