Environment
- Biome 2.5.6 (via Ultracite 7.10.0)
- macOS (Apple Silicon), pnpm monorepo (~40 packages)
Summary
With project rules enabled (noImportCycles, noPrivateImports), a gitignored directory containing a large, heavily self-referential generated .d.ts (a Prisma 7 client, ~9 MB across 70 files) crashes the workspace scanner on macOS:
thread 'biome::workspace_worker_5' (1612049) has overflowed its stack
fatal runtime error: stack overflow, aborting
With larger worker stacks (RUST_MIN_STACK=16777216) it doesn't crash but the scan runs for ~30 minutes instead. The same repo checks in ~5 seconds once the directory is excluded from the scanner.
The force-ignore inconsistency
Attempting to exclude the folder from the scanner via files.includes:
| form |
result |
"!!packages/database/generated" |
scanner still descends — crash persists (reproduced 2/2) |
"!!packages/database/generated/**" |
works — 0/2 crashes, full check drops to seconds (2/2) |
experimentalScannerIgnores: ["generated"] (deprecated) |
also works |
This contradicts two pieces of current guidance:
- The
files.includes docs state the suffix-less folder form suffices since 2.2.0 ("ignoring folders doesn't require the trailing /**").
- The
useBiomeIgnoreFolder lint rule flags the working /** form and its fix rewrites it to the suffix-less form — which does not prune the scanner, silently reintroducing the crash.
So on 2.5.6 the only combination that both works and passes lint is !!folder/** plus a biome-ignore lint/suspicious/useBiomeIgnoreFolder suppression.
Possibly related observation
vcs.useIgnoreFile: true correctly excludes gitignored files as check targets, but the module-graph scanner still indexes them (that's how the gitignored generated client got scanned at all). If that asymmetry is intended, a docs note on the scanner's relationship to VCS ignores would help — it's surprising that a fully gitignored directory can dominate check time.
Repro sketch
- pnpm monorepo,
biome.jsonc extending a preset with vcs.useIgnoreFile: true; enable noImportCycles + noPrivateImports.
prisma generate a large schema into a gitignored packages/*/generated folder (Prisma 7 client output; ~9 MB of mutually-referential types reproduces reliably).
biome check . on macOS → worker stack overflow.
- Add
"!!path/to/generated" to files.includes → still crashes.
- Change to
"!!path/to/generated/**" → resolves.
Environment
Summary
With project rules enabled (
noImportCycles,noPrivateImports), a gitignored directory containing a large, heavily self-referential generated.d.ts(a Prisma 7 client, ~9 MB across 70 files) crashes the workspace scanner on macOS:With larger worker stacks (
RUST_MIN_STACK=16777216) it doesn't crash but the scan runs for ~30 minutes instead. The same repo checks in ~5 seconds once the directory is excluded from the scanner.The force-ignore inconsistency
Attempting to exclude the folder from the scanner via
files.includes:"!!packages/database/generated""!!packages/database/generated/**"experimentalScannerIgnores: ["generated"](deprecated)This contradicts two pieces of current guidance:
files.includesdocs state the suffix-less folder form suffices since 2.2.0 ("ignoring folders doesn't require the trailing /**").useBiomeIgnoreFolderlint rule flags the working/**form and its fix rewrites it to the suffix-less form — which does not prune the scanner, silently reintroducing the crash.So on 2.5.6 the only combination that both works and passes lint is
!!folder/**plus abiome-ignore lint/suspicious/useBiomeIgnoreFoldersuppression.Possibly related observation
vcs.useIgnoreFile: truecorrectly excludes gitignored files as check targets, but the module-graph scanner still indexes them (that's how the gitignored generated client got scanned at all). If that asymmetry is intended, a docs note on the scanner's relationship to VCS ignores would help — it's surprising that a fully gitignored directory can dominate check time.Repro sketch
biome.jsoncextending a preset withvcs.useIgnoreFile: true; enablenoImportCycles+noPrivateImports.prisma generatea large schema into a gitignoredpackages/*/generatedfolder (Prisma 7 client output; ~9 MB of mutually-referential types reproduces reliably).biome check .on macOS → worker stack overflow."!!path/to/generated"tofiles.includes→ still crashes."!!path/to/generated/**"→ resolves.