Skip to content

Superseded by existing upstream PR #30#1

Closed
Vudexx wants to merge 4 commits into
mainfrom
fix/pglite-default-generation
Closed

Superseded by existing upstream PR #30#1
Vudexx wants to merge 4 commits into
mainfrom
fix/pglite-default-generation

Conversation

@Vudexx

@Vudexx Vudexx commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Closed without upstream submission because seveibar/pgstrap already has an active claimed pull request (seveibar#30) implementing the same bounty issue.

@Vudexx Vudexx changed the title Use PGlite by default for type generation Superseded by existing upstream PR #30 Jun 21, 2026
@Vudexx Vudexx closed this Jun 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 029dbe0852

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/generate.ts
migrationsDir = migrationsDir ?? path.join(dbDir, "migrations")

if (pglite) {
if (shouldUsePglite(pglite)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore PGlite state when generation fails

When pglite is omitted, this now sends normal generate() calls into the PGlite branch, but that branch mutates process.env.DATABASE_URL and opens a TCP server and only restores/closes them after both zg.generate and dumpTree succeed. In a programmatic caller or test runner that catches a generation error, such as a schema dump failure, the process is left pointed at the transient PGlite URL with the server still listening, so later DB work can hit the wrong database or the process can hang; wrap the PGlite work in try/finally before making it the default.

Useful? React with 👍 / 👎.

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