Skip to content

🐛 Biome 2.5.3 module resolver panic with types recommended domain #10885

Description

@jakeleventhal

Environment information

Details
CLI:
  Version:                      2.5.3
  Color support:                false

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_DISTRIBUTION:                npm
  BIOME_LOG_PATH:                    unset
  BIOME_LOG_PREFIX_NAME:             unset
  BIOME_LOG_LEVEL:                   unset
  BIOME_LOG_KIND:                    unset
  BIOME_CONFIG_PATH:                 unset
  BIOME_THREADS:                     unset
  BIOME_WATCHER_KIND:                unset
  BIOME_WATCHER_POLLING_INTERVAL:    unset
  NO_COLOR:                     1
  TERM:                         dumb
  JS_RUNTIME_VERSION:           v24.3.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         bun/1.3.14

Biome Configuration:
  Status:                       Loaded successfully.
  Path:                         biome.json
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  false
  HTML full support enabled:    unset

Workspace:
  Open Documents:               0

What happened?

Biome 2.5.3 prints an internal panic while checking a small workspace repo that enables the project and types recommended domains. The same repo checks cleanly with Biome 2.5.2.

Minimal reproduction repo:

https://github.com/jakeleventhal/biome-253-module-resolver-panic-repro

Steps:

git clone https://github.com/jakeleventhal/biome-253-module-resolver-panic-repro.git
cd biome-253-module-resolver-panic-repro
bun install
bun check

Actual Biome 2.5.3 output:

$ biome check . --error-on-warnings
Biome encountered an unexpected error

Source Location: crates/biome_module_graph/src/js_module_info/module_resolver.rs:500:33
Thread Name: biome::workspace_worker_3
Message: index out of bounds: the len is 7 but the index is 11
Stack Trace: Re-run with `RUST_BACKTRACE=1` to capture the stack trace

packages/seller-utilities/trpc/src/trpc/routers/integrations/googleDrive/_router.ts internalError/panic  INTERNAL

  × processing panicked: index out of bounds: the len is 7 but the index is 11

Checked 13 files in 45ms. No fixes applied.

exit=0

The command prints an internal panic and checks only 13 of 14 files, but exits with status 0.

Control command with Biome 2.5.2:

bunx --bun @biomejs/biome@2.5.2 check . --error-on-warnings

Control output:

Checked 14 files in 35ms. No fixes applied.

exit=0

The reduced trigger appears to be the typed procedure/router graph in packages/seller-utilities/trpc/src/trpc/routers/integrations/googleDrive/_router.ts with this config:

{
  "linter": {
    "domains": {
      "project": "recommended",
      "types": "recommended"
    },
    "rules": {
      "correctness": {
        "noUndeclaredDependencies": "on"
      }
    }
  }
}

This may be related to #10884 because the source location is the same, but this report includes a public minimal repro and does not require noFloatingPromises or noMisusedPromises directly.

Expected result

Biome should not panic while checking the repo.

For this reproduction, Biome 2.5.3 should behave like 2.5.2: check all 14 files cleanly. If Biome encounters an internal error, the command should not silently exit with status 0 after skipping a file.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-Type-InferenceArea: type inferenceS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions