The GitHub Actions job "Groovy Snapshot Canary Build" on 
grails-core.git/feat/beans-dsl-diagnostics-8.0.x has succeeded.
Run started by GitHub user codeconsole (triggered by codeconsole).

Head commit for run:
c8756534f2d20587b77a4fc830c9c6b809edd566 / Scott Murphy Heiberg 
<[email protected]>
Decide the static-compilation mode per body, not per class

The reachable set was computed once per anonymous class from the outer chain's
class-level annotation and then shared by every body the walk visited. Groovy's
type checker reads @CompileStatic and @CompileDynamic off the METHOD of an inner
class whatever the enclosing classes say, so that answer was wrong both ways,
each measured:

  @CompileStatic host, @CompileDynamic method   compiled clean, then failed with
                                                NoSuchFieldError at runtime
  dynamic host, @CompileStatic method           refused to compile, though it
                                                runs and returns hello

The second is the worse of the two by this PR's own principle. A method now
carries its own answer, read through the same isTypeCheckingSkipped the class
level uses. Field initializers and object-initializer statements keep the
class's, there being nowhere to annotate them. The walk itself moved into
walkBody so each body can be given its own set.

Also says why isTypeCheckingSkipped matches the constant with endsWith rather
than equals - a folded member yields the bare enum name, but a qualified
spelling is still this mode and no other constant ends that way - and carries
the per-method rule into the javadoc and the guide, which said only "on a
statically compiled host".

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

With regards,
GitHub Actions via GitBox

Reply via email to