Skip to content

fix(hooks): wipe TS project emit on branch checkout - #308

Merged
patroza merged 1 commit into
fork/changesfrom
t3code/tsgo-checkout-emit-wipe
Aug 4, 2026
Merged

fix(hooks): wipe TS project emit on branch checkout#308
patroza merged 1 commit into
fork/changesfrom
t3code/tsgo-checkout-emit-wipe

Conversation

@patroza

@patroza patroza commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Why

Composite/incremental TypeScript artifacts under apps/*/dist, packages/*/dist, and *.tsbuildinfo are gitignored and can outlive a branch switch. That is the same failure class as scanner#2166 (foreign emit → phantom or stale check results).

What

.githooks/post-checkout clears those artifacts on every branch/worktree checkout before seed-copy and pnpm install. Documented in .githooks/README.md as a temporary upstream workaround.

How

Flag 1 only; existing worktree seed + pnpm reconciliation unchanged. Typecheck remains package tsgo --noEmit / composite build as before — this only prevents foreign dist from surviving a tree switch.

Remarks

  • Remove when tsgo/tsc incremental invalidation is reliable
  • Aligns with configurator + effect-app/libs + scanner checkout wipes

@patroza
patroza force-pushed the t3code/tsgo-checkout-emit-wipe branch from 32531ca to 08c911c Compare August 4, 2026 11:50
@patroza
patroza marked this pull request as ready for review August 4, 2026 11:51
Drop apps/*/dist, packages/*/dist, and *.tsbuildinfo on every branch or
worktree checkout so composite/incremental artifacts never outlive the
source tree. Same workaround as macs-holding/scanner#2166 until upstream
tsgo/tsc invalidation is solid.
@patroza
patroza force-pushed the t3code/tsgo-checkout-emit-wipe branch from 08c911c to 0773c8d Compare August 4, 2026 11:51
@patroza
patroza merged commit a167af1 into fork/changes Aug 4, 2026
4 of 8 checks passed
patroza added a commit that referenced this pull request Aug 4, 2026
Drop apps/*/dist, packages/*/dist, and *.tsbuildinfo on every branch or
worktree checkout so composite/incremental artifacts never outlive the
source tree. Same workaround as macs-holding/scanner#2166 until upstream
tsgo/tsc invalidation is solid.

Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
patroza added a commit that referenced this pull request Aug 4, 2026
Drop apps/*/dist, packages/*/dist, and *.tsbuildinfo on every branch or
worktree checkout so composite/incremental artifacts never outlive the
source tree. Same workaround as macs-holding/scanner#2166 until upstream
tsgo/tsc invalidation is solid.

Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
patroza added a commit that referenced this pull request Aug 5, 2026
Drop apps/*/dist, packages/*/dist, and *.tsbuildinfo on every branch or
worktree checkout so composite/incremental artifacts never outlive the
source tree. Same workaround as macs-holding/scanner#2166 until upstream
tsgo/tsc invalidation is solid.

Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
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