jamesfredley commented on PR #16011:
URL: https://github.com/apache/grails-core/pull/16011#issuecomment-5048908946
## Latest push summary (`1d8edac99e`)
Addressed remaining review/proof gaps and the Code Style CI failure.
### 1. Removed legacy named-task scan
- Deleted `loadLegacyCommandNamesFromRuntimeClasspath` and the
configuration-time `runtimeClasspath` scan for
`grails.dev.commands.ApplicationCommand`
- Legacy application commands no longer invent flaky named Gradle tasks
- They stay available via `runCommand` / shell adapter once
`grails-core-cli-legacy` is provisioned
- TestKit now asserts `LEGACY_COMMAND_TASK_PRESENT=false` and
`RUN_COMMAND_TASK_PRESENT=true`
- Docs updated to show the `runCommand` path
### 2. Real Grails 7 / Groovy 4 precompiled fixture
- New standalone project: `grails-test-examples/legacy-g7-command-plugin`
- Compiles against published `grails-core:7.0.10` / Groovy `4.0.30`
- Manifest stamps: `Grails-Compile-Version: 7.0.10`,
`Groovy-Compile-Version: 4.0.30`
- Built via `GradleBuild` (not monorepo `includeBuild`) so monorepo BOM/JVM
substitution cannot rewrite the fixture
- Wired into `grails-test-examples/legacy-commands`
- Integration test proves:
- Adapter targets `legacy.g7.commands.HelloG7PrecompiledCommand`
- Class loads from the G7 fixture jar
- Command executes and writes `G7-RAN`
- `LegacyCommandCompatibilityIntegrationSpec`: **5/5 green** locally,
including the new G7 feature
### 3. Dual flags (already on tip before this note)
| Flag | Default | Scope |
|---|---|---|
| `cliAutoProvision` | on | modern CLI tier + companions |
| `legacyCommandSupport` | on | only `grails-core-cli-legacy` |
Legacy provisions only when **both** are true.
### 4. Code style CI fix
- Single-quoted SLF4J templates
- Dropped unnecessary `?.` on non-null loop variables
- Empty catch variable renamed to `ignored` (EmptyCatchBlock)
- Local: `:grails-core-cli-legacy:codenarcMain` + `:grails-core:codenarcCli`
green with `ignoreFailures=false`
### Still open for reviewer preference
- Default-on vs default-off + detect/warn policy for `legacyCommandSupport`
(product call currently remains default-on; flip is one convention change if
decided)
- Remaining script/YAML packaging pollution tracked in #16035
--
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]