Skip to content

GRAILS-6584 - Allow reuse of a specified set of domain class constraints in command class constraints#22

Closed
dmurat wants to merge 1 commit intoapache:1.3.xfrom
dmurat:0008-constraintsReuseInCommands
Closed

GRAILS-6584 - Allow reuse of a specified set of domain class constraints in command class constraints#22
dmurat wants to merge 1 commit intoapache:1.3.xfrom
dmurat:0008-constraintsReuseInCommands

Conversation

@dmurat
Copy link
Copy Markdown
Contributor

@dmurat dmurat commented Nov 7, 2010

@graemerocher
Copy link
Copy Markdown
Contributor

Thanks!

jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jan 7, 2025
Issue 21: Grails apps will not deploy to Glassfish 4+
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jan 9, 2025
…plugin to v1.12.2 (apache#22)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Jan 15, 2025
to be consistent with other GORM projects.
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Apr 14, 2025
…ootstrap-5.x

Update dependency org.grails:grails-bootstrap to v5.0.0.M2
jdaugherty pushed a commit to jdaugherty/grails-core that referenced this pull request Apr 19, 2025
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
jdaugherty pushed a commit that referenced this pull request Apr 22, 2025
* chore(deps): update grails/github-actions/post-release to v2

* chore(release): update workflow configurations
jdaugherty pushed a commit that referenced this pull request May 1, 2025
…keleton/client/elliptic-6.5.4

Bump elliptic from 6.4.1 to 6.5.4 in /skeleton/client
jdaugherty pushed a commit that referenced this pull request May 1, 2025
…keleton/client/browserslist-4.16.6

Bump browserslist from 4.8.0 to 4.16.6 in /skeleton/client
jdaugherty pushed a commit that referenced this pull request May 1, 2025
jdaugherty pushed a commit that referenced this pull request May 1, 2025
jdaugherty pushed a commit that referenced this pull request May 1, 2025
jdaugherty pushed a commit that referenced this pull request May 1, 2025
jdaugherty pushed a commit that referenced this pull request May 1, 2025
…eton/client/babel/helpers-7.26.10

Bump @babel/helpers from 7.7.4 to 7.26.10 in /react/skeleton/client
jamesfredley pushed a commit to jamesfredley/grails-core that referenced this pull request Jul 13, 2025
* Update dependency org.grails:grails-gradle-plugin to v5.2.4

* Update GrailsGradlePluginSpec.groovy

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Puneet Behl <behlp@objectcomputing.com>
jamesfredley added a commit that referenced this pull request May 2, 2026
…-SNAPSHOT

Re-audit against Groovy 5.0.6-SNAPSHOT build #22 (2026-05-01 17:12 UTC,
20260501.171245-22) which now contains the GROOVY-11968 fix
(commit 46402fb29a on GROOVY_5_0_X branch, 2026-04-27; resolved 2026-05-01,
fix versions 6.0.0-alpha-1 and 5.0.6).

GROOVY-11968 ("SC: trait static field access generates invalid bytecode under
indy=false (GROOVY-11907 follow-up)") is the explicit upstream follow-up that
the previous re-CompileDynamic commit (0804a4f) was waiting on. The fix
ensures StaticTypesCallSiteWriter.makeSiteEntry() initializes the
$getCallSiteArray() prologue and cached-array local slot for any
DYNAMIC_RESOLUTION sub-expression in a statically compiled method.

Verified locally on Groovy 5.0.6-SNAPSHOT build #22:

  ./gradlew :grails-test-examples-app2:integrationTest \
      -PgrailsIndy=false --rerun-tasks

Both ErrorsControllerSpec and NotFoundHandlerSpec PASSED. The original
VerifyError ("get long/double overflows locals" at ContainerGebSpec class
init) no longer reproduces with @CompileStatic restored.

Audit re-verification of remaining indy=false workarounds:

- ContainerGebConfiguration interface->trait: STILL NEEDED. Re-tested by
  reverting trait to interface; InheritedConfigSpec and
  ChildPreferenceInheritedConfigSpec fail with
  IncompatibleClassChangeError "$getCallSiteArray() must be
  InterfaceMethodref constant". This is a distinct bug from GROOVY-11968
  (Methodref-vs-InterfaceMethodref constant pool issue, not callsite
  array initialization). Comment updated to clarify the distinction.

- VariableScopeVisitor NPE guard in AstUtils.processVariableScopes:
  STILL NEEDED. Re-tested by removing the try/catch;
  :grails-datamapping-tck:compileGroovy fails with the same
  "BUG! exception in phase 'canonicalization' ... unexpected
  NullPointerException" on DataServiceRoutingProductDataService.groovy
  reported in the prior audit. Re-verified note added to the comment.

- boot4-disabled-integration-test-config.gradle apply on 5 test apps:
  STILL NEEDED. Re-tested by re-enabling app1 integrationTest under
  indy=false; ForwardingSpec, InterceptorFunctionalSpec,
  AdvancedDataBindingSpec, ChainingToNamespacedControllersFunctionalSpec
  still fail with MissingPropertyException via
  TagLibraryInvoker$Trait$Helper.propertyMissing on declared action
  parameters. Distinct callsite-dispatch regression not addressed by
  GROOVY-11968.

Net change: one workaround removed (ContainerSupport @CompileDynamic ->
@CompileStatic), two comment refinements documenting the re-audit.

Assisted-by: claude-code:claude-opus-4-7
jamesfredley added a commit that referenced this pull request May 3, 2026
…23

The 'instanceof' smart-cast bug tracked as GROOVY-11983 (fix committed
2026-05-03 to GROOVY_5_0_X as 65d16eb4, port from master af95d66d) lands
in 5.0.6-SNAPSHOT build #23 (5.0.6-20260503.065745-23). Two workarounds
that the audit on 2026-04-27 had attributed to that smart-cast misfire
are no longer required against build #23:

1. PersistentEntityCodec.OneToManyDecoder/OneToManyEncoder
   ManyToMany.isAssignableFrom(property.getClass()) reverts to
   property instanceof ManyToMany. Verified against build #23 with:
   ./gradlew :grails-data-mongodb-core:test --tests 'org.grails.datastore.gorm.mongo.SimpleHasManySpec' --tests 'org.grails.datastore.gorm.mongo.CircularOneToManySpec' --tests 'org.grails.datastore.gorm.mongo.ListOneToManyOrderingSpec' --tests 'org.grails.datastore.gorm.mongo.EmbeddedListWithCustomTypeSpec' --tests 'org.grails.datastore.gorm.mongo.BrokenManyToManyAssociationSpec' --tests 'org.grails.datastore.gorm.mongo.OneToManyWithInheritanceSpec' --tests 'org.grails.datastore.gorm.mongo.CircularBidirectionalOneToManySpec'
   BUILD SUCCESSFUL.

2. DefaultHalViewHelper instanceof cascade order is reverted from
   ToOne-first / ToMany-second back to the original ToMany-first /
   ToOne-second. The 'reorder ToOne before ToMany to avoid Groovy 5
   flow-typing narrowing conflict' from 153e14c was the same
   smart-cast misfire. Verified against build #23 with:
   ./gradlew :grails-views-gson:test
   BUILD SUCCESSFUL (all view rendering specs pass).

Net result: 14 lines of workaround comments and 4 lines of swapped
condition order removed. Three of the eight original Groovy 5
workarounds in this PR have now been retired by upstream Groovy fixes
(GROOVY-11907 in 5.0.5, GROOVY-11968 in 5.0.6 build #22,
GROOVY-11983 in 5.0.6 build #23).

Assisted-by: claude-code:claude-opus-4.6
jamesfredley added a commit that referenced this pull request May 3, 2026
Two unrelated reverts pulled out of the Groovy 5 audit set in response
to jdaugherty PR feedback:

1. Restore SUCCESS / FAILURE constant references across 9 scaffolding
   command files (CreateScaffoldControllerCommand, CreateScaffoldServiceCommand,
   GenerateAllCommand, GenerateAsyncControllerCommand, GenerateControllerCommand,
   GenerateScaffoldAllCommand, GenerateServiceCommand, GenerateViewsCommand,
   InstallTemplatesCommand). The earlier inline-to-true/false rewrite (commit
   d2441fb) had been driven by the GROOVY-11907 trait-static-fields
   bytecode bug, which is fixed in 5.0.5 and (with GROOVY-11968 follow-up)
   in 5.0.6 build #22. The CommandLineHelper trait still defines the
   constants, so the references resolve cleanly. ./gradlew :grails-scaffolding:test
   passes against 5.0.6-SNAPSHOT build #23.

2. Revert the unrelated 'defaultMessage ?: codes[0]' tweak in ValidationTagLib.
   It was a behavioural change (prefer i18n defaultMessage over the raw
   error code) bundled into the Groovy 5 sweep but is not Groovy-version
   conditional. Per jdaugherty review, it should be a separate PR.

Assisted-by: claude-code:claude-opus-4.6
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants