Repository navigation
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes across all eight files, comparing the extracted modules and their callers against the parent branch.
- Shared lifecycle: Moves managed PostgreSQL startup, reuse, readiness, cleanup, and database URL detection into
Db.DevDbwithout changing their behavior. - Shared options: Moves
DbStartOptionsand its parser intoDb.StartOptions, updating command callers, parser tests, and Cabal module registration. - Standalone command: Keeps
Start.Dbfocused on the foreground command and preserves custom-database errors and environment-variable precedence through the shared detector.
Validation: checked callers and existing parser/lifecycle tests. Local ./run test:cli was blocked before compilation by the missing Hackage index: Error: [Cabal-7107], unknown package: with-utf8 (dependency of waspc). Linux x86_64/aarch64 builds and formatting checks had passed in CI; Haskell test jobs were still pending when inspected.
gpt-6.1-sol | 𝕏
505cede to
9d4ad5f
Compare
Deploying wasp-docs-on-main with
|
| Latest commit: |
07b1635
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3e4a88be.wasp-docs-on-main.pages.dev |
| Branch Preview URL: | https://issue-4479-db-extraction.wasp-docs-on-main.pages.dev |
| import qualified Wasp.Project.Db.Dev.Postgres as Dev.Postgres | ||
| import Wasp.Util.Docker (DockerImageName, DockerVolumeMountPath) | ||
|
|
||
| data DatabaseStartPolicy = StartNewDatabase | StartOrReuseDatabase |
There was a problem hiding this comment.
Moved unchanged from Start.Db. Docker helpers stay in Db.Docker.
| import Wasp.Db.Postgres (defaultPostgresPort) | ||
| import Wasp.Util.Docker (DockerImageName, DockerVolumeMountPath) | ||
|
|
||
| data DbStartOptions = DbStartOptions |
There was a problem hiding this comment.
Type and parser moved unchanged from Start.Db.
| InWaspProject waspProjectDir <- require | ||
| WaspSpecAvailable <- require | ||
| appSpec <- analyze waspProjectDir | ||
| throwIfCustomDbAlreadyInUse :: AS.AppSpec -> Command () |
There was a problem hiding this comment.
Same DATABASE_URL checks and errors, now using findDatabaseUrlSource.
9d4ad5f to
b0b469f
Compare
@wasp.sh/spec
@wasp.sh/wasp-cli
@wasp.sh/wasp-cli-darwin-arm64-unknown
@wasp.sh/wasp-cli-darwin-x64-unknown
@wasp.sh/wasp-cli-linux-arm64-glibc
@wasp.sh/wasp-cli-linux-x64-glibc
@wasp.sh/wasp-cli-linux-x64-musl
commit: |
52c9bb2 to
7ad5ad1
Compare
3e7a627 to
c98e54c
Compare
7ad5ad1 to
d18ce0c
Compare
d18ce0c to
89d3925
Compare
# Conflicts: # waspc/cli/src/Wasp/Cli/Command/Start/Db.hs
278cf99 to
b7d1445
Compare

Description
Refactor PR that moves dev DB code into a separate module
DevDb. No need to review this one.Agreement
wasp start#4914 (comment)Type of change
Checklist
I tested my change in a Wasp app to verify that it works as intended.
🧪 Tests and apps:
I added unit tests for my change.
Existing tests cover this extraction. Lifecycle and parser definitions are moved unchanged from the parent PR.
(if you fixed a bug) I added a regression test for the bug I fixed.
(if you added/updated a feature) I added/updated e2e tests in
examples/kitchen-sink/e2e-tests.(if you added/updated a feature) I updated the starter templates in
waspc/data/Cli/templates, as needed.(if you added/updated a feature) I updated the example apps in
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.