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
Clarify ValidationErrorBuildItem/ArtifactResultBuildItem/EmptyBuildItem #27427
Conversation
@yrodiere I think I've already done all the bullets from the description, but the one about to update the javadocs of ArtifactResultBuildItem because I was not sure what else to describe there. |
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 taking care of this!
It looks good to me, except for a little something in the documentation, see below.
but the one about to update the javadocs of ArtifactResultBuildItem because I was not sure what else to describe there
I don't know either, to be honest. It looks fine to me as it is. That item in the to-do list was referring to the discussion between @stuartwdouglas and @mkouba. Unless they chime in to tell us what kind of improvement they wanted in this javadoc, I'd leave it alone.
f67c3ef
to
2398681
Compare
I've just updated the section you mentioned. Let me know if it looks better now. |
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.
Ah, but... I didn't mean we should remove all the documentation your added, just that one specific change! The sections about ValidationErrorBuildItem
/ArtifactResultBuildItem
were great...
I hope you can still find your commit in git reflog
?
This comment has been minimized.
This comment has been minimized.
87d097d
to
b58cb65
Compare
ah ok! I've recovered it back :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
b58cb65
to
317b3e1
Compare
@@ -85,14 +85,15 @@ AdditionalBeanBuildItem registerRestLinksProviderProducer() { | |||
} | |||
|
|||
@BuildStep | |||
@Produce(EmptyBuildItem.class) | |||
@Produce(ArtifactResultBuildItem.class) |
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 could not use the ValidationErrorBuildItem here because it was causing cycle detected issues. Using ArtifactResultBuildItem did work here.
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.
LGTM, thanks!
317b3e1
to
aa376ff
Compare
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.
Looks good.
aa376ff
to
0876202
Compare
This comment has been minimized.
This comment has been minimized.
Failing Jobs - Building 0876202
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 18 #- Failing: integration-tests/micrometer-prometheus
📦 integration-tests/micrometer-prometheus✖
|
The failing test is unrelated; merging. Thanks! |
@Sgitario I won't backport this because Kogito released a version with the EmptyBuildItem: kiegroup/kogito-runtimes@587672e . Any chance you could prepare a commit for kogito-runtimes that they could include in the next version? And backport if they can. |
To clarify, the commit needs to replace |
In next versions of Quarkus, it won't allow using `@Produce(EmptyBuildItem.class)` (an exception will be thrown). More information about this change can be found here: quarkusio/quarkus#27427 Moreover, for the use case you were using `@Produce(EmptyBuildItem.class)`, validations, we should use `ValidationErrorBuildItem`. I didn't do it because it would require adding the dependency `quarkus-arc-deployment`, so I replaced it with `@Produce(ArtifactResultBuildItem.class)` which is guaranteed that the build step will be executed.
|
Thanks @Sgitario ! |
In next versions of Quarkus, it won't allow using `@Produce(EmptyBuildItem.class)` (an exception will be thrown). More information about this change can be found here: quarkusio/quarkus#27427 Moreover, for the use case you were using `@Produce(EmptyBuildItem.class)`, validations, we should use `ValidationErrorBuildItem`. I didn't do it because it would require adding the dependency `quarkus-arc-deployment`, so I replaced it with `@Produce(ArtifactResultBuildItem.class)` which is guaranteed that the build step will be executed. Note that the `process-svg` addon won't validate the check anymore as it was not expected (according to Christiano)
* Replace EmptyBuildItem with ArtifactResultBuildItem In next versions of Quarkus, it won't allow using `@Produce(EmptyBuildItem.class)` (an exception will be thrown). More information about this change can be found here: quarkusio/quarkus#27427 Moreover, for the use case you were using `@Produce(EmptyBuildItem.class)`, validations, we should use `ValidationErrorBuildItem`. I didn't do it because it would require adding the dependency `quarkus-arc-deployment`, so I replaced it with `@Produce(ArtifactResultBuildItem.class)` which is guaranteed that the build step will be executed. Note that the `process-svg` addon won't validate the check anymore as it was not expected (according to Christiano) * Remove messaging required capabilities Co-authored-by: Cristiano Nicolai <570894+cristianonicolai@users.noreply.github.com>
Fix #27314
ValidationErrorBuildItem
wherever we currently use@Produce(EmptyBuildItem.class)
in Quarkus core@Produce(EmptyBuildItem.class)
@Produce(EmptyBuildItem.class)
(or maybe more generally when it consumes/produces an abstract class, since that simply cannot work?)ArtifactBuildItem
ArtifactBuildItem
and explain when it's used.ValidationErrorBuildItem
and explain when it's used; include a link to https://quarkus.io/guides/cdi-integration#use-case-i-need-to-validate-the-deployment .ArtifactBuildItem
/ValidationErrorBuildItem