-
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
Introduce quarkus.package.decompiler config #37445
Conversation
geoand
commented
Dec 1, 2023
•
edited
Loading
edited
- Fixes Rename the Vineflower properties ? #37332
Seems like anything Gradle related is failing... I have no idea why |
core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java
Outdated
Show resolved
Hide resolved
core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/JarResultBuildStep.java
Outdated
Show resolved
Hide resolved
@@ -249,9 +250,18 @@ public static BuiltInType fromString(String value) { | |||
|
|||
/** | |||
* Vineflower Decompiler configuration | |||
* | |||
* @Deprecated use {@code quarkus.package.decompiler} instead |
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.
Maybe add a note after which version it will be removed?
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.
I don't know when it will be removed :)
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.
For sure, but I usually add a hint like "will be removed at some point after Quarkus 3.10" or something like that. To define the "transition period". So that the next one who reads the javadoc can actually remove it. Because otherwise it may stay there forever...
This comment has been minimized.
This comment has been minimized.
* @Deprecated use {@code quarkus.package.decompiler} instead | ||
*/ | ||
@ConfigItem | ||
@Deprecated(forRemoval = true) |
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.
Not entirely sure this will work at the group level. We should make it work if it doesn't I suppose.
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.
You mean in the generated docs or something else?
This comment has been minimized.
This comment has been minimized.
The Gradle failures look odd. I haven't seen them anywhere else. |
Yeah, I really don't know what to make of them... |
I'll have a look once we have the new report posted. |
Thanks for the help! I'll run them locally tomorrow and let you know if I can't figure it out. |
This comment has been minimized.
This comment has been minimized.
My guess is that it's related to something that is not properly handled by our config framework. But I don't see anything odd here. Maybe @radcortez will have some insights. |
Probably this is caused by this: Line 31 in 44b76fa
This To move forward, either we implement the missing features in |
I don't understand however what in this PR triggers the problem |
I'm currently looking at changing this config, possibly to make it independent of packaging altogether, as part of reworking native image. I'm not sure what this would mean for this PR though. |
@ConfigGroup | ||
public static class VineFlowerConfig { | ||
public static class DecompilerConfig { | ||
/** | ||
* An advanced option that will decompile generated and transformed bytecode into the 'decompiled' directory. | ||
* This is only taken into account when fast-jar is used. | ||
*/ | ||
@ConfigItem(defaultValue = "false") | ||
public boolean enabled; | ||
|
||
/** | ||
* The version of Vineflower to use | ||
*/ | ||
@ConfigItem(defaultValue = "1.9.3") | ||
public String version; | ||
@ConfigDocDefault("false") | ||
public Optional<Boolean> enabled; | ||
|
||
/** | ||
* The directory into which to save the Vineflower tool if it doesn't exist | ||
*/ | ||
@ConfigItem(defaultValue = "${user.home}/.quarkus") | ||
public String jarDirectory; | ||
@ConfigItem | ||
@ConfigDocDefault("${user.home}/.quarkus") | ||
public Optional<String> jarDirectory; |
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.
It seems like this whole configuration should be separate from packaging. For example if we produce multiple artifacts with different packaging configurations, we'd still only produce one set of decompiled sources, right?
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.
Yeah, I'm not against that.
@ConfigItem(defaultValue = "1.9.3") | ||
public String version; | ||
@ConfigDocDefault("false") | ||
public Optional<Boolean> enabled; |
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.
Are these being made into optionals solely to accommodate the fact that the configuration moved? If so, I think we can/should probably brainstorm a better solution, otherwise these kinds of things are going to accumulate and cause problems.
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.
Correct. I'm definitely open to looking for a better solution
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.
A possible solution is to use relocate functions: https://smallrye.io/smallrye-config/3.4.4/extensions/relocate/
I suspect the new quarkus/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigInstantiator.java Lines 105 to 110 in f10a208
|
*/ | ||
@ConfigItem(defaultValue = "1.9.3") | ||
public String version; | ||
@ConfigDocDefault("false") |
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.
Adding @ConfigItem
should fix #37445 (comment)
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.
Thanks for spotting,what a dumb mistake on my part!
Let me try it out and see how it goes
This is meant to be used instead of quarkus.package.vineflower. Furthermore, this removes the configurable version property which was never being used. Closes: quarkusio#37332
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
Well... I guess I'll make a note to address the problems later then. I probably should have "requested changes" so it's my fault I think. |
I think the proposed changes were pretty much orthogonal to this. Furthermore, the two different configurations are only meant to last a couple versions and then the old will go away |
Sorry for misunderstanding how severe you thought the impact was :( |
No worries, it's my fault. I have to get over my aversion to "Request Changes". It just seems so unkind :-) |
I totally know how you feel, I rarely use it :) |