Skip to content

feat: ship sqlite-jdbc + framework source to fix fresh-install cliffs - #11

Closed
bpamiri wants to merge 2 commits into
masterfrom
claude/ship-sqlite-jdbc
Closed

feat: ship sqlite-jdbc + framework source to fix fresh-install cliffs#11
bpamiri wants to merge 2 commits into
masterfrom
claude/ship-sqlite-jdbc

Conversation

@bpamiri

@bpamiri bpamiri commented Apr 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the two onboarding cliffs that fresh-VM testing surfaced:

  1. Missing SQLite JDBC driver — Lucee 7's BundleProvider can't fetch org.xerial.sqlite-jdbc from update.lucee.org, so the documented zero-config SQLite datasource fails on first wheels migrate latest. Symptom: migrations exit 0 but db/development.sqlite stays 0 bytes; every controller action that touches a model returns Wheels.DataSourceNotFound.

  2. Missing framework sourcewheels new emits an app that depends on vendor/wheels/, but Homebrew installs only ship the CLI module. Without a companion wheels-core resource, scaffolded apps can't boot at all.

What changed

  • New wheels_core resource pulls the framework-source zip from the matching wheels release.
  • New sqlite_jdbc resource pulls sqlite-jdbc-3.49.1.0.jar from Maven Central with a pinned SHA.
  • Wrapper script seeds the JAR into every ~/.wheels/express/<version>/lib/ext/ directory on first run (idempotent — skipped once present).
  • Auto-update workflow already updated upstream (chore: update to LuCLI 0.3.7, module  #3) to recompute and rotate the wheels_core SHA per release; the PLACEHOLDER_CORE_SHA sentinel will be replaced on the next auto-update tick.
  • assert_predicate test additions confirm both new resources land at the expected paths after install.

Verification

  • brew audit --strict wheels-dev/wheels/wheels — clean
  • brew fetch --retry wheels-dev/wheels/wheels — all four resource URLs resolve
  • Mirrors the chocolatey-wheels fix that already shipped (PRs wheels-dev/chocolatey-wheels#14, ci: use AUTO_MERGE_PAT for git push + PR create/merge #15)
  • Fresh-VM onboarding tested via tools/test-onboarding.sh in wheels-dev/wheels — phase 4 (migration cliff) passes with the JAR shimmed in

Test plan

  • After merge, the next auto-update PR will rotate PLACEHOLDER_CORE_SHA to the real value
  • First brew install wheels after rollout boots the scaffolded app without BundleException
  • wheels migrate latest produces a non-empty db/development.sqlite file

🤖 Generated with Claude Code

bpamiri added 2 commits April 24, 2026 13:26
Adds a second Homebrew resource (wheels_core) that pulls the Wheels
framework-source zip from each GitHub release and stages it into
share/wheels/framework/. The wrapper script syncs it into
~/.wheels/modules/wheels/vendor/wheels/ on version change, mirroring
how wheels-module is already propagated.

This unblocks the new-user Homebrew onboarding path: previously
`brew install wheels` landed only the CLI, so `wheels new myapp`
dead-ended at "Could not locate the Wheels framework source" — the
first command of the Getting Started tutorial.

Extends the auto-update workflow to fetch and substitute the
wheels-core sha256 the same way wheels-module is handled. wheels-core
is now required on every release (snapshots included); see
wheels-dev/wheels PR 2294 for the release-workflow change that
started publishing it.

Blocked on: wheels-dev/wheels PR 2294 merging and the next snapshot
release cutting with the wheels-core-*.zip asset. Until then this
formula has a PLACEHOLDER_CORE_SHA sentinel that auto-update will
replace on its first nightly run after those prereqs land.
Bundles the SQLite JDBC driver (org.xerial.sqlite-jdbc 3.49.1.0) with
the bottle and seeds it into Lucee Express's lib/ext/ on each wrapper
invocation so the default zero-config SQLite datasource works on first
use.

Without this, fresh `brew install wheels` users hit a hard cliff at
the very first `wheels migrate latest`: the command exits 0 with
"Migration latest completed." in green, but no schema is actually
created. The root cause is in the runtime — Lucee 7's BundleProvider
tries to resolve `org.xerial.sqlite-jdbc` from update.lucee.org at
runtime, which (a) does not host the bundle and (b) currently fails
its S3-listing fallback on a malformed entry. Until upstream Lucee
makes the bundle available, the cleanest fix is to ship the JAR
locally and put it on the classpath.

Why this is safe:

- The JAR is downloaded from Maven Central with a verified sha256
  (5c8609d2ca341deb8c6f71778974b5ba4995c7d32d7c7c89d9392a3e72c39291)
- Verified to be a real OSGi bundle:
  Bundle-SymbolicName: org.xerial.sqlite-jdbc;singleton:=true
  Bundle-Version: 3.49.1.0
- The wrapper's seeding step is idempotent — it only copies into
  lib/ext if no sqlite-jdbc*.jar is already there, so users who
  already manually installed a different version aren't disturbed.
- The seed loop walks ~/.wheels/express/*/lib/ext/, so users with
  multiple Lucee Express versions all get covered.

Companion to the in-flight wheels-side PRs that close the rest of
the cliff:
  wheels#2304 — strips bundleName hint from new-app sqlite datasource
                template (the prereq for classpath fallback to work)
  wheels#2307 — fixes `migrateToLatest` command name (was sending
                migrateTo with no version, which silently no-ops)
  wheels#2308 — local fresh-install harness for verifying the cliff
                stays closed

With all of these merged, the tutorial works end-to-end on a fresh
macOS Homebrew install.
@bpamiri

bpamiri commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #5 and #8 which landed the same SQLite JDBC + framework-source bundling on master via different branches. Closing to avoid confusion.

@bpamiri bpamiri closed this Apr 26, 2026
@bpamiri
bpamiri deleted the claude/ship-sqlite-jdbc branch April 26, 2026 13:35
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