Repository navigation
fix(server): start --dry-run writes nothing and previews --name - #23
Conversation
In a folder without lucee.json, 'server start --dry-run' saved a default lucee.json into the project (LuceeServerConfig.loadConfig persists the default), and the preview showed the folder name although --name was given (the name is only applied by the real start). loadConfig gains a persistDefault flag (the existing signatures keep persisting); the start handler passes !dryRun, and the dry-run preview applies --name as startServerInternal does. Upstream: cybersonic#139 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Peter Amiri <peter@alurium.com>
Unit Tests (ubuntu-latest, Java 21) 63 files 63 suites 2m 34s ⏱️ Results for commit 5b79b81. ♻️ This comment has been updated with latest results. |
Integration Tests (ubuntu-latest, Java 21)78 tests 78 ✅ 2m 5s ⏱️ Results for commit 5b79b81. ♻️ This comment has been updated with latest results. |
|
rev1-r3 review @ b2ff003: APPROVE (final) RED before, reproduced. I copied the updated End to end: JDK 21 jars, isolated
With an existing
|
…-no-write Signed-off-by: Peter Amiri <peter@alurium.com> # Conflicts: # CHANGELOG.md # FORK.md
|
rev1-r3 review @ 5b79b81: APPROVE (final) This head is a two-parent merge of the approved b2ff003 and
PR CI on this head: 8 pass (Build ×3, Unit ×3, Integration ×2); APT smoke skipped. mergeStateStatus is CLEAN. Ready to merge. |
Upstream issue: cybersonic#139
What
In a folder without
lucee.json,lucli server start --dry-run:lucee.jsoninto the project, becauseLuceeServerConfig.loadConfig()persists the default config when the file is missing;--name, which only the real start applies (LuceeServerManager.startServerInternal).How
LuceeServerConfig.loadConfig(projectDir, configFileName, boolean persistDefault). The existing one- and two-arg signatures delegate withtrue, so every other caller is unchanged.ServerCommandHandlerstart: loads withpersistDefault = !dryRun.--name(trimmed, non-empty) to the in-memory config, asstartServerInternaldoes.Tests
ServerCommandHandlerTest:serverStartDryRun_withoutLuceeJson_writesNothing: a preview is still printed, and nolucee.jsonis created.serverStartDryRun_previewShowsTheNameOverride: the preview shows"name" : "foo", andlucee.jsonis unchanged.wheels@ 8942048 (updated test file only, separate worktree): exactly these 2 failed; the other 17 passed (1 skipped).mvn testgave 771 tests, 0 failures, 0 errors, 6 skipped. BATS not run locally; please rely on CI.index.cfm;server start --name=foo --port=63301 --dry-run): the preview shows"name" : "foo"and"port" : 63301, and the folder still holds onlyindex.cfm. v0.6.2.2 showed"name" : "<folder>"and left alucee.json.Fork bookkeeping
CHANGELOG
## Unreleasedentry; FORK.md "Next queue" row 11.Upstream
The same change goes to
cybersonic/LuCLIas acherry-pick -xonto upstreammain(without FORK.md) once this is reviewed.🤖 Generated with Claude Code