Panache: Deprecate Parameters in favour of Map.of#52583
Panache: Deprecate Parameters in favour of Map.of#52583FroMage merged 1 commit intoquarkusio:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
🙈 The PR is closed and the preview is expired. |
loicmathieu
left a comment
There was a problem hiding this comment.
Please deprecate for real all methods and not only via doclet
...he/hibernate-orm-panache/runtime/src/main/java/io/quarkus/hibernate/orm/panache/Panache.java
Show resolved
Hide resolved
...te-orm-panache/runtime/src/main/java/io/quarkus/hibernate/orm/panache/PanacheEntityBase.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
gsmet
left a comment
There was a problem hiding this comment.
BTW, deprecating is fine with me but shouldn't you make it work even though it's deprecated? At least if it's not requiring an enormous amount of effort?
Make it work where? This never stopped working. I don't even intend to remove it. |
|
The linked issue mentions that it didn't work |
There's confusion here. The user tried to use it in the Panache Next API, and given that the API accepts In order to "fix" this, I'd have to add the deprecated method just to catch that some user is trying an API that never existing based on the previous versions of Panache which are not compatible in the first place. I mean, I could, but that's a quite huge stretch to expect such safe-guards. It's a different API entirely. I think it's reasonable to make the type (which is visible from Panache Next) and methods (from Panache 1) deprecated, because users would notice that they should not be using that type. Even though it does impact Panache 1 users for no especially good reason (I don't see the value in removing this type or these methods, especially for an API that will end up deprecated entirely). |
This comment has been minimized.
This comment has been minimized.
|
Fair, but couldn't we detect that and print a better error message? |
|
We could detect this with scanning source code, or bytecode, or an APT processor… none of which sound like the right way to fix this kind of user error. |
|
But don't you think that users will assume that thr use of |
|
They could, but the minute they try, it's big red and deprecated… You really think I should add either the deprecated methods, or some bytecode sniffer, to stop the build when someone writes bogus code? I don't mean to imply it'd be crazy, I'm just surprised people would suggest this, so it's giving me pause to think. I plan to remove and rewrite more methods from |
|
My point is that Panache Next is barely out and people already tried to use class in question and didn't understand why it didn't work. |
This comment has been minimized.
This comment has been minimized.
|
This will also need a rebase onto |
21d952e to
3415a04
Compare
Status for workflow
|
Status for workflow
|
|
I think we can start with this, and reconsider if people complain. |
Well that's 1h of my time I'll never get back.