Skip to content

🐛 Panic Malformed list, node expected but found token... in biome_rowan/src/ast/mod.rs #7101

@omasakun

Description

@omasakun

Environment information

CLI:
  Version:                      2.1.3
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v22.15.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         pnpm/10.13.1

Biome Configuration:
  Status:                       Not set
  Path:                         unset

Workspace:
  Open Documents:               0

What happened?

  1. Create a typescript file index.ts
export class Foo {
  constructor(private a: number, private b: number) {}
}
  1. Run npx @biomejs/[email protected] lint --fix --unsafe

Result:

Biome encountered an unexpected error

This is a bug in Biome, not an error in your code, and we would appreciate it if you could report it to https://github.com/biomejs/biome/issues/ along with the following information to help us fixing the issue.

When opening the issue, please provide a minimal reproduction, or identify and share the file/code that triggers it. Without a way to reproduce the error, the error can't be fixed:

Source Location: /__w/biome/biome/crates/biome_rowan/src/ast/mod.rs:662:41
Thread Name: biome::workspace_worker_2
Message: Malformed list, node expected but found token [email protected] "," [] [Whitespace(" ")] instead. You must add missing markers for missing elements.

index.ts internalError/panic  INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ processing panicked: Malformed list, node expected but found token [email protected] "," [] [Whitespace(" ")] instead. You must add missing markers for missing elements.
  
  ⚠ This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.
  

Checked 1 file in 6ms. No fixes applied.

Playground: https://biomejs.dev/playground/?analyzerFixMode=safeAndUnsafeFixes&code=ZQB4AHAAbwByAHQAIABjAGwAYQBzAHMAIABGAG8AbwAgAHsACgAgACAAYwBvAG4AcwB0AHIAdQBjAHQAbwByACgAcAByAGkAdgBhAHQAZQAgAGEAOgAgAG4AdQBtAGIAZQByACwAIABwAHIAaQB2AGEAdABlACAAYgA6ACAAbgB1AG0AYgBlAHIAKQAgAHsAfQAKAH0A

Expected result

It should not throw an error.

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    L-JavaScriptLanguage: JavaScript and super languagesS-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