-
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
[Extension Proposal] Enforcer extension #41443
Comments
/cc @aloubyansky (extension-proposal), @gsmet (extension-proposal), @maxandersen (extension-proposal) |
How would that work as an extension? |
@aloubyansky I thought of introducing a |
This is a kind of static config validation. Ideally this kind of validation should be performed before the augmentation process starts. |
Right, I haven't yet checked if it might need some changes in core to allow that, but I agree |
We have a few other validation checks in this category that are performed in build steps. |
I think it may justify some changes in core. |
I think that would make sense. |
What problem is this new extension going to solve? |
@geoand one use case is that extensions could specify the minimum Quarkus version they require to function (because they use an APi introduced from that version onwards). This would hopefully avoid CNFE and method signature errors during the application's build time |
That makes perfect sense, but is an extension the proper way to do this, or would the changes in the core that Alexey mentions suffice? |
I am not sure yet what changes in core would need to be done to support this. My initial idea was so that extensions would produce BuildItems for the environment they would require and we'd consume them and fail the build if there is a mismatch |
My feeling is that we could support this functionality without an extension, as it would essentially be static information that does not have to interact with the rest of the build - just prevent it if need be :) |
Like others I'm not following how this would be useful as independent extension or are you assuming core will depend on it? |
Because an extension would (in theory) not require changes in core and would work when an extension depending on it is included in an app using any existing Quarkus version |
@gastaldi do i remember correctly that you mentioned there was a "min Quarkus version" field in extension metadata already? Could you please link to an example? Thanks. |
@aloubyansky sorry I wasn't clear, I meant that we have the |
ok, so the question is how extensions would declare their Quarkus version compatibility compatibility requirements. |
Definitely +1 |
How about we introduce a Default would be |
A version range would be a natural first step. BTW, don't we have the next Quarkus major version as the upper limit when displaying extensions on code.quarkus or even in the registry? I don't think we want to default to |
Maybe use streams instead (no patch version). In theory we shouldn't introduce API changes in patch releases, but who knows :) |
@gastaldi streams does not exist on quarkus extension level its a platform level thing. And there are multiple platforms with possible different versions ranges. @aloubyansky using build with quarkus core as the fallback default if nothing else seems fine to me? or are you saying default should be the major/minor of built-with-quarkus-core, ie. if build with 3.10.2 we default to [3.10,] to say 3.10 and future ? that could work. |
Yes, I was thinking of quarkus-core major.minor as a start. |
+1, that's what I meant when I said to use streams |
Closing as the requires-quarkus-core seems to suffice for now |
Description
The idea of this extension is analogous to the Maven Enforcer Plugin: introduce Build Items to control certain environmental constraints such as Quarkus version, JDK version, and OS family along with many more built-in rules and user created rules.
Also a potential solution for #37169
Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).
Repository name
quarkus-enforcer
Short description
Control certain environmental constraints and fail the build if they don't match
Repository Homepage URL
https://docs.quarkiverse.io/<REPOSITORY_NAME>/dev/
Repository Topics
Team Members
Additional context
No response
The text was updated successfully, but these errors were encountered: