The GitHub Actions job "CI" on grails-core.git/spike/grails-beans-dsl has 
succeeded.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
4cf0a7ab11f7068fbb624c2ba7079edec0beaa2b / Scott Murphy Heiberg 
<[email protected]>
Add a generic annotate(...) qualifier to the beans DSL

The four named qualifiers (conditionalOnMissingBean/primary/lazy/scope)
were a hand-picked shortlist, not parity with what a hand-written
@Bean method can carry. A normal Spring @AutoConfiguration class can
put any @Conditional* (built-in or a custom Condition), @Order,
@DependsOn, or any other single-valued annotation directly on an
individual @Bean method - that's standard practice, not something
confined to the whole class.

.annotate(AnnotationType[, attr: value, ...]) closes that gap
generically: an annotation class literal plus optional Groovy
named-argument attributes, turned into an AnnotationNode with those
members set. Unlike the other four qualifiers it's repeatable, so
several different annotations can be chained onto one bean
(.annotate(Order, value: 1).annotate(ConditionalOnWebApplication)).
Attaching the same annotation type twice - whether via two annotate()
calls or an annotate() colliding with one of the named qualifiers
(.primary().annotate(Primary)) - is now a compile error rather than
silently emitting a duplicate annotation, via a shared
addAnnotationIfAbsent() check all five qualifiers route through.

Also confirmed and pinned with a test: parameter-level annotations
(e.g. @Qualifier on a closure parameter) already carry through to the
generated method for free, since the DSL reuses the closure's own
Parameter AST nodes directly - no new syntax needed for that part.

Docs updated to describe .annotate(...) and drop the now-resolved
"only four qualifiers" limitation, replacing it with the one that
remains: attribute values must be compile-time constants, so a nested
annotation as an attribute value isn't supported.

Report URL: https://github.com/apache/grails-core/actions/runs/29853524949

With regards,
GitHub Actions via GitBox

Reply via email to