Skip to content

fix(cli): close 0.0.0-dev version display gap on installed Wheels apps#2348

Merged
bpamiri merged 2 commits intodevelopfrom
claude/pedantic-cori-bae999
Apr 28, 2026
Merged

fix(cli): close 0.0.0-dev version display gap on installed Wheels apps#2348
bpamiri merged 2 commits intodevelopfrom
claude/pedantic-cori-bae999

Conversation

@bpamiri
Copy link
Copy Markdown
Collaborator

@bpamiri bpamiri commented Apr 28, 2026

Summary

Two compounding bugs caused the dev toolbar / /wheels/info to report Wheels Version: 0.0.0-dev on installed (brew/chocolatey) apps even though every release artifact already carries the precise SNAPSHOT build version. Both are fixed here. Closes #2326.

Bug 1 — wheels-module tarball never substitutes module.json

release.yml's Build Wheels Module Tarball step tars cli/lucli/ directly with no version substitution, while wheels-core / wheels-base (which run through prepare-*.sh) get @build.version@ properly replaced. As a result every wheels-module-*.tar.gz on the GitHub releases page ships with module.json carrying the hardcoded "version": "4.0.0" — even though the tag itself is v4.0.0-SNAPSHOT+1625. Verified against the published 1624 and 1625 tarballs.

That hardcoded value is then read by BaseModule.version() at runtime and fed into FrameworkInstaller.rewriteVersionPlaceholder as the cliVersion fallback (added in #2343 / #2333), so on installs whose vendor/wheels/box.json went through that fallback path, the framework version is the imprecise 4.0.0 instead of 4.0.0-SNAPSHOT+1625.

Fix: change cli/lucli/module.json to use "version": "@build.version@" (matching every other manifest in the repo), and add the same find + sed substitution every other build step already does, in the Build Wheels Module Tarball step before tar/zip. Uses an env: block to satisfy the workflow-injection lint and avoid inlining the version into shell commands.

Bug 2 — runtime fallback only recognizes the monorepo's box.json

When vendor/wheels/box.json's @build.version@ leaks through scaffold-time substitution (user's CLI is pre-#2343, or any other gap in the install pipeline), Global.cfc:$readFrameworkVersion's fallback walks two levels up looking for the wheels-dev/wheels monorepo's box.json — and only synthesizes <rootversion>-dev when slug=="wheels" or name=="Wheels.fw". An installed app's app-root box.json comes from wheels-base-template (slug=wheels-base-template), which carries the precise framework SNAPSHOT version stamped at release time — but the fallback rejects it because the monorepo signal is absent. Fall-through returns the bare 0.0.0-dev sentinel.

Fix: extend the fallback so when the monorepo signal is missing and the parent's box.json self-identifies as wheels-base-template (slug or name match), use its version verbatim — no -dev suffix, since that version is the actual installed framework version, not an upcoming dev build. The monorepo signal still wins when both could match; both signals are ignored if their version is itself the unreplaced placeholder.

Source identified Returned version
Real box.json version <box.version>
Placeholder + monorepo (Wheels.fw) <rootversion>-dev
Placeholder + base template (wheels-base-template) <rootversion> (verbatim)
Placeholder + neither signal 0.0.0-dev (sentinel, unchanged)

Test plan

  • Framework suitebash tools/test-local.sh → 3333 passed (no regressions). Three new specs in frameworkVersionSpec.cfc:
    • uses wheels-base-template's version verbatim when the framework's own box.json placeholder slipped through (#2326)
    • ignores wheels-base-template when its own version is also the unreplaced placeholder (#2326)
    • prefers the monorepo signal over the base-template signal when both could match (#2326)
  • CLI suitebash tools/test-cli-local.sh → 452 pass, 3 fail. Three failures are pre-existing DoctorSpec issues (#2260), unrelated to this PR.
  • Release.yml dry-run — copied cli/lucli/ to a tmpdir and ran the same find + sed locally with MODULE_VERSION=4.0.0-SNAPSHOT+9999. module.json picks up the version; no false positives in any other file.
  • Reviewer: when this lands and a new release is cut, verify wheels-module-*.tar.gz on the GitHub release page contains the precise SNAPSHOT version in module.json — that's the proof the build pipeline is fixed.

🤖 Generated with Claude Code

bpamiri and others added 2 commits April 27, 2026 20:51
…le gap

Build, install, and ship a Lucee CFML extension that packages the xerial
sqlite-jdbc OSGi bundle so Lucee 7 can resolve `org.sqlite.JDBC` for
`wheels new` SQLite-by-default datasources without manual JAR drops.

This addresses fresh-VM onboarding finding F8 — the SQLite class-load
cliff that blocks every fresh `wheels migrate latest` because Lucee 7
ships drivers for MySQL/MSSQL/PostgreSQL/HSQLDB but not SQLite.

What's in tools/lucee-extensions/sqlite/:

- src/build.properties + src/SQLite.cfc + src/sqlite-jdbc-3.49.1.0.jar
  (vendored from Maven Central) — extension source.
- build.sh produces dist/org.xerial.sqlite-jdbc-3.49.1.0.lex (~14 MB).
  Mirrors the layout/manifest of lucee/extension-jdbc-postgresql and
  lucee/extension-jdbc-duckdb but uses bash+zip instead of Ant.
- install.sh drops the patched bundle straight into a Lucee server's
  lucee-server/bundles/ directory — deterministic on Lucee 7 and the
  recommended path until the deploy/ auto-install quirk is solved.
- README documents three install paths (bundle/.lex/admin UI), the
  upstream upgrade plan, and the OSGi manifest patch.

The non-obvious fix: xerial's JAR is a valid OSGi bundle, but it
declares `Require-Capability: osgi.ee;version=1.8` (exact match in some
resolvers). Felix on Java 21 cannot satisfy that, so the bundle is
silently rejected. build.sh patches the JAR's MANIFEST.MF to
`(version>=1.8)` (matching PostgreSQL's filter) and drops the
`;singleton:=true` directive on Bundle-SymbolicName. Original JAR in
src/ is untouched — the patch is applied during build.

Verified end-to-end on macOS arm64 + Lucee 7.0.0.395:

  BEFORE install.sh: dbtest -> FAIL "org.xerial.sqlite-jdbc not available locally"
  AFTER  install.sh: dbtest -> OK datasource=sqliteapp result=1
  AFTER  install.sh: wheels migrate latest creates tables in db/development.sqlite

Follow-ups (separate PRs):
1. Wire `wheels new` (or first `wheels start`) to auto-run install.sh
   against the freshly-created server so SQLite-by-default works
   zero-config on fresh VMs.
2. Debug Lucee 7's deploy/ -> failed-to-deploy/ silent quarantine so
   the canonical deploy/ install path works without falling back to
   the bundle drop.
3. File upstream PR as lucee/extension-jdbc-sqlite once stable so the
   Lucee community gets it via the standard update server, and a
   separate issue with xerial/sqlite-jdbc to relax their OSGi
   Require-Capability filter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two compounding bugs caused the dev toolbar / /wheels/info to report
"Wheels Version: 0.0.0-dev" on installed (brew/chocolatey) apps even
though every release artifact already carries the precise SNAPSHOT
build version. Both are fixed here.

## Bug 1 — wheels-module tarball never substitutes module.json

release.yml's "Build Wheels Module Tarball" step tars cli/lucli/
directly with no version substitution, while wheels-core/wheels-base
(which run through prepare-*.sh) get @build.version@ properly replaced.
As a result every wheels-module-*.tar.gz on the GitHub releases page
ships with module.json's hardcoded "version": "4.0.0" — even though
the tag itself is "v4.0.0-SNAPSHOT+1625".

That hardcoded value is then read by BaseModule.version() at runtime
and fed into FrameworkInstaller.rewriteVersionPlaceholder as the
cliVersion fallback (added in #2343 / #2333), so on installs whose
vendor/wheels/box.json went through that fallback path, the framework
"version" is the imprecise "4.0.0" instead of the build's
"4.0.0-SNAPSHOT+1625".

Fix: change cli/lucli/module.json to use "version": "@build.version@"
(matching every other manifest in the repo), and add the same find +
sed substitution release.yml's other build steps already do, in the
"Build Wheels Module Tarball" step before tar/zip. Uses an env: block
to satisfy our workflow injection lint and avoids inlining the version
into shell commands.

## Bug 2 — runtime fallback only recognizes the monorepo's box.json

When vendor/wheels/box.json's @build.version@ leaks through scaffold-
time substitution (e.g. user's CLI is pre-#2343, or any other gap in
the install pipeline), Global.cfc:$readFrameworkVersion's fallback
walks two levels up looking for the wheels-dev/wheels monorepo's
box.json — and only synthesizes "<rootversion>-dev" when slug=="wheels"
or name=="Wheels.fw". An installed app's app-root box.json comes from
wheels-base-template (slug=wheels-base-template), which carries the
precise framework SNAPSHOT version stamped at release time — but the
fallback rejects it because the monorepo signal is absent. Fall-through
returns the bare "0.0.0-dev" sentinel.

Fix: extend the fallback so when the monorepo signal is missing AND
the parent's box.json self-identifies as wheels-base-template (slug or
name match), use its version verbatim (no -dev suffix — that version is
the actual installed framework version, not an upcoming dev build).
The monorepo signal still wins when both could match; both signals are
ignored if their version is itself the unreplaced placeholder.

Three new specs in frameworkVersionSpec.cfc cover the new path,
including the precedence ordering and the placeholder guard. Existing
specs (including the regression for #2291) still pass.

## Verification

- Framework suite: 3333 passed (no regressions).
- CLI suite: 452 pass, 3 fail — pre-existing DoctorSpec issues (#2260),
  unrelated.
- Local dry-run of the release.yml sed substitution: cli/lucli/module.json
  picks up MODULE_VERSION, no other false positives in cli/lucli/.

Closes #2326.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Homepage still shows 0.0.0-dev in new apps (issue persists after fix)

1 participant