Skip to content

Scanner ignores: !!folder force-ignore doesn't prune the module-graph scanner (but !!folder/** does) — contradicts docs and useBiomeIgnoreFolder #11308

Description

@Jamie-Ellis

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:

  1. The files.includes docs state the suffix-less folder form suffices since 2.2.0 ("ignoring folders doesn't require the trailing /**").
  2. 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

  1. pnpm monorepo, biome.jsonc extending a preset with vcs.useIgnoreFile: true; enable noImportCycles + noPrivateImports.
  2. prisma generate a large schema into a gitignored packages/*/generated folder (Prisma 7 client output; ~9 MB of mutually-referential types reproduces reliably).
  3. biome check . on macOS → worker stack overflow.
  4. Add "!!path/to/generated" to files.includes → still crashes.
  5. Change to "!!path/to/generated/**" → resolves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-Needs reproStatus: needs a reproduction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions