Skip to content

fix(cli): wheels new scaffolded apps fail to boot#2096

Merged
bpamiri merged 1 commit into
developfrom
peter/fix-wheels-new-boot
Apr 14, 2026
Merged

fix(cli): wheels new scaffolded apps fail to boot#2096
bpamiri merged 1 commit into
developfrom
peter/fix-wheels-new-boot

Conversation

@bpamiri
Copy link
Copy Markdown
Collaborator

@bpamiri bpamiri commented Apr 14, 2026

Summary

  • Root cause: wheels new template was missing 14 stub files that the framework hard-includes at boot (app/global/functions.cfm, app/views/helpers.cfm, and 12 app/events/*.cfm handlers). The first missing file crashes onApplicationStart before application.wo is set, then onError cascades into the misleading "key [WO] doesn't exist".
  • Adds all required stub files to cli/lucli/templates/app/ matching the main repo's conventions
  • Hardens installWheelsFramework to abort scaffolding (with cleanup) when no framework source is found, instead of silently creating a broken app
  • Adds resolveFrameworkSource() with three fallback paths: WHEELS_FRAMEWORK_PATH env var → project root walk-up → module root walk-up
  • Adds regression test (NewCommandTemplateSpec.cfc) asserting every required stub file is present

Test plan

  • Scaffold + boot from clean /tmp directory → app renders "Welcome to testapp", no errors
  • Framework-missing path (detached module install) → clear red error, lists search paths, cleans up partial scaffold
  • WHEELS_FRAMEWORK_PATH env var override → scaffolding succeeds
  • CI passes

🤖 Generated with Claude Code

The `wheels new` template was missing 14 files that the framework
hard-includes at startup: app/global/functions.cfm (Global.cfc:3404),
app/views/helpers.cfm (Controller.cfc:140), and 12 event handlers
under app/events/ (onapplicationstart.cfc:360, EventMethods.cfc).

Without these, onApplicationStart threw before setting application.wo,
and the cascading onError failure surfaced only "key [WO] doesn't
exist" — hiding the real root cause.

Also hardens installWheelsFramework to abort scaffolding (with a clear
error and cleanup) when no framework source is found, instead of
silently creating a broken app. Adds resolveFrameworkSource() with
three fallback paths: WHEELS_FRAMEWORK_PATH env var, project root
walk-up, and module root walk-up.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant