jdaugherty opened a new pull request, #16059:
URL: https://github.com/apache/grails-core/pull/16059

   Addresses the outstanding review feedback on the Grails 7 command 
compatibility layer.
   
   Build placement. The Grails 7 fixture needs Java 17 - the minimum for a 
Grails 7 app, so the binary matches what a real Grails 7 plugin is built with - 
but expressing that as a Gradle toolchain put an unprovisionable JDK 
requirement into the core build's task graph. Nothing in the repo provisions a 
17 (no foojay resolver, no toolchainManagement, no 
org.gradle.java.installations.*), and because the fixture jar was an 
implementation dependency, `./gradlew build -PskipTests` reached it - so the 
build failed on the JDK the project documents in .sdkmanrc and in the 
reproducible-build container. CI only passed because the runner images happen 
to ship a 17 that Gradle auto-detects.
   
   The three projects now live in a new top-level end-to-end build, so the root 
build no longer reaches them. Each half declares its JDK in its own .sdkmanrc 
instead of a toolchain, and a dedicated workflow provisions both, reading the 
versions out of those files.
   
   Resolution goes through published artifacts rather than project 
substitution, which is what makes these tests end-to-end: they consume 
grails-core the way an application does, through real poms and module metadata. 
The repository is the same build/local-maven that grails-forge points its 
generated applications at, populated by 
publishAllPublicationsToTestCaseMavenRepoRepository in both the root and 
grails-gradle builds. settings.gradle scopes it with exclusiveContent so a 
remote snapshot cannot quietly satisfy an org.apache.grails request and leave 
the suite testing something other than the working tree.
   
   That also disposes of the CLI companion problem rather than working around 
it. grails-core-cli is a secondary capability of :grails-core, not a project, 
so composite substitution cannot express it and hits a capability self-conflict 
- but it is a first-class published module whose metadata CliPublishingSupport 
already rewrites for external consumers, so resolving from the repository gets 
it for free.
   
   The Grails 7 fixture stays outside all of this as a standalone build under 
its own JDK, consumed as a prebuilt jar.
   
   Trait-derived command names. Every legacy command in the tree overrode 
getName()/getDescription(), so the trait's default derivation - what 
create-command generated on Grails 7, and therefore what most published Grails 
7 commands rely on for their registration key - had no coverage. Adds a third 
precompiled command declaring neither getter.
   
   Factory resource failures are no longer silent. loadFactoryDeclarations 
dropped a malformed resource with no log line at any level, and it backs modern 
grails-cli.factories discovery, so one bad file lost every one of a plugin's 
Grails 8 commands and providers. It now warns with the resource URL and cause, 
keeping the per-resource isolation.
   
   skipBootstrap resolution is covered. The lookup moves into a static helper 
so the adapter-target case - where reading the flag off the adapter instead of 
its target would let BootStrap run during dbm-update - is guarded by a test.
   
   Also drops a duplicated fixture version pin in the integration spec and 
corrects comments describing the fixture as an included composite build.
   
   ## Description
   <!-- Describe your change and the problem it solves. Link to the related 
issue(s) if they exist. -->
   
   ## Contributor Checklist
   
   Please review the following checklist before submitting your pull request. 
Pull requests that do not meet these requirements may be closed without review.
   
   ### Issue and Scope
   
   - [ ] This PR is linked to an existing issue that has been **acknowledged or 
approved** by the project team. If no approved issue exists, please give 
background on why this change is necessary.  Tickets are preferred for release 
change log history.
   - [ ] This PR addresses the **complete scope** of the linked issue. Partial 
implementations or unfinished work should not be submitted for review.
   - [ ] This PR contains a **single, focused change**. Unrelated changes 
should be submitted as separate pull requests.
   - [ ] This PR targets the **correct branch** for the type of change:
       - **Patch release branches** (e.g., `7.0.x`): Bug fixes only. No new 
features or API changes.
       - **Minor release branches** (e.g., `7.1.x`): New features are welcome, 
but breaking existing APIs must be avoided.
       - **Major release branches** (e.g., `8.0.x`): Reserved for major 
changes. Breaking API changes are permitted.
   
   ### Code Quality
   
   - [ ] I have **added or updated tests** that cover the changes introduced in 
this PR. All code contributions are expected to include appropriate test 
coverage.
   - [ ] I have verified that all existing tests pass by running `./gradlew 
build --rerun-tasks`.
   - [ ] My code follows the project's **code style** guidelines. I have run 
`./gradlew codeStyle` and resolved any violations. See [Code 
Style](../CONTRIBUTING.md#code-style) for details.
   - [ ] This PR does **not** include mass reformatting, style-only changes, or 
large-scale refactoring unless it was **explicitly approved** in the linked 
issue. Unsolicited reformatting will not be accepted.
   - [ ] If generative AI tooling was used in preparing this contribution, a 
quality model was used to ensure contributions are **consistent with the 
project's quality standards**.
   
   ### Licensing and Attribution
   
   - [ ] All contributed code is provided under the [Apache License 
2.0](https://www.apache.org/licenses/LICENSE-2.0), and new source files include 
the appropriate **Apache license header**.
   - [ ] I have the necessary rights to submit this contribution and confirm it 
is my own original work (see [Legal 
Notice](../CONTRIBUTING.md#i-want-to-contribute)).
   - [ ] If generative AI tooling was used in preparing this contribution, I 
have followed the [Apache Software Foundation's policy on generative 
tooling](https://www.apache.org/legal/generative-tooling.html) and have 
properly attributed its use.
   
   ### Documentation
   
   - [ ] If this PR introduces user-facing changes, I have included or updated 
the relevant documentation.
   - [ ] If this PR adds a new feature, I have updated the **What's New** 
section of the Grails Guide.
   - [ ] If this PR introduces breaking changes or changes that require user 
action during an upgrade, I have updated the **Upgrade Notes** for the 
corresponding version in the Grails Guide.
   - [ ] The PR description clearly explains **what** was changed and **why**.
   
   ---
   
   > **First-time contributors:** Please read our [Contributing 
Guide](../CONTRIBUTING.md) before submitting.
   > Pull requests that appear to be auto-generated, incomplete, or unrelated 
to an approved issue may be
   > closed to help maintainers focus on reviewed and planned work. We 
appreciate your understanding.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to