Repository navigation
Conversation
Deploying wasp-docs-on-main with
|
| Latest commit: |
3682a16
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fb72b037.wasp-docs-on-main.pages.dev |
| Branch Preview URL: | https://issue-4479-static-compile.wasp-docs-on-main.pages.dev |
@wasp/spec
@wasp/cli
@wasp/cli-darwin-arm64-unknown
@wasp/cli-linux-arm64-glibc
@wasp/cli-linux-x64-glibc
@wasp/cli-linux-x64-musl
commit: |
c282754 to
c7165d9
Compare
c7165d9 to
64f82f1
Compare
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — moving migration checks to CLI orchestration separates compilation from database availability while preserving development warnings.
Reviewed changes across compilation setup, standalone compilation, startup, and file watching.
- Static compilation: removes the database-check setup goal and step, exposing the existing check through
Wasp.Project. - CLI checks: standalone compilation and initial startup check migration state after compilation; startup retains database warnings for later diagnostic output.
- Recompilation: successful watcher compilations append migration warnings before reporting results.
Local tests could not run: mise tool installation timed out, and the offline Cabal fallback lacked cached Haskell dependencies.
gpt-6.1-sol | 𝕏
| -- project lock themselves should call 'compile' instead. | ||
| compileCommand :: Command ([CompileWarning], AS.AppSpec) | ||
| compileCommand = ProjectLock.acquireExclusive compile | ||
| compileCommand = ProjectLock.acquireExclusive $ do |
There was a problem hiding this comment.
This might look a big heavy, but it's to preserve the current behaviour. We drop this change in a later PR because it mostly always fails (wasp compile won't auto start the database): #5427
| FormatPrismaSchema -> formatPrismaSchema generatedAppDir | ||
| -- A production build is deployed elsewhere, so there is no local database | ||
| -- to check for pending migrations. | ||
| WarnIfDbNeedsMigration -> when (AS.isDevelopment spec) $ warnIfDbNeedsMigration spec generatedAppDir |
There was a problem hiding this comment.
Removes the migration check from the compile setup so compile can be "static".
04673c5 to
a9df193
Compare
a9df193 to
3682a16
Compare

Description
To avoid having to do the analysis twice (first we need it to find the database type to start the dev database and then the second time to use the app spec to start the app), I've moved the database check out of compilation and made the compilation "static" (@sodic we talked about this on the call).
The behaviour of
wasp compilecommand stays the same for now (removed the database check so it doesn't print can't find the database every time in #5427Some nice diagram from Claude:

Agreement
Type of change
Checklist
I tested my change in a Wasp app to verify that it works as intended.
🧪 Tests and apps:
examples/kitchen-sink/e2e-tests.waspc/data/Cli/templates, as needed.examples/, as needed.examples/tutorials) I updated the tutorial in the docs (and vice versa).📜 Documentation:
web/docs/.🆕 Changelog: (if change is more than just code/docs improvement)
waspc/ChangeLog.mdwith a user-friendly description of the change.web/docs/migration-guides/.versioninwaspc/waspc.cabalto reflect the changes I introduced.