Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Biome encountered an unexpected error (semantic_model/scope.rs:115:33) #2659

Closed
1 task done
johnowennixon opened this issue Apr 30, 2024 · 2 comments · Fixed by #2664
Closed
1 task done

Biome encountered an unexpected error (semantic_model/scope.rs:115:33) #2659

johnowennixon opened this issue Apr 30, 2024 · 2 comments · Fixed by #2664
Assignees
Labels
A-Analyzer Area: analyzer L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@johnowennixon
Copy link

Environment information

CLI:
  Version:                      1.7.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.12.2"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.5.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 true

Linter:
  Recommended:                  true
  All:                          false
  Rules:                        complexity/noBannedTypes = "error"
                                complexity/noForEach = "off"
                                complexity/noUselessRename = "off"
                                complexity/useArrowFunction = "off"
                                complexity/useLiteralKeys = "off"
                                complexity/useOptionalChain = "off"
                                complexity/useRegexLiterals = "off"
                                correctness/noUnnecessaryContinue = "off"
                                correctness/noUnusedImports = "error"
                                correctness/noUnusedVariables = "error"
                                correctness/noVoidTypeReturn = "off"
                                performance/noDelete = "off"
                                style/noNamespace = "error"
                                style/noNegationElse = "error"
                                style/noParameterAssign = "off"
                                style/noParameterProperties = "error"
                                style/noShoutyConstants = "error"
                                style/noUselessElse = "off"
                                style/useBlockStatements = "error"
                                style/useCollapsedElseIf = "error"
                                style/useConsistentArrayType = {"level":"error","options":{"syntax":"generic"}}
                                style/useFilenamingConvention = {"level":"error","options":{"requireAscii":true,"filenameCases":["kebab-case"]}}
                                style/useForOf = "error"
                                style/useImportType = "error"
                                style/useNamingConvention = "off"
                                style/useNodeAssertStrict = "error"
                                style/useNodejsImportProtocol = "error"
                                style/useShorthandAssign = "error"
                                style/useSingleCaseStatement = "off"
                                style/useTemplate = "off"
                                suspicious/noEmptyBlockStatements = "off"
                                suspicious/noExplicitAny = "off"
                                suspicious/noImplicitAnyLet = "error"
                                suspicious/useAwait = "off"

Workspace:
  Open Documents:               0

Rule name

Unknown

Playground link

https://biomejs.dev/playground/?lineWidth=120&indentStyle=space&lintRules=all&code=ZQB4AHAAbwByAHQAIAB0AHkAcABlACAAUgBlAGMAdQByAHMAaQB2AGUAUABhAHIAdABpAGEAbAA8AFQAPgAgAD0AIAB7AAoAIAAgAFsAUAAgAGkAbgAgAGsAZQB5AG8AZgAgAFQAXQA%2FADoAIABUAFsAUABdACAAZQB4AHQAZQBuAGQAcwAgAEEAcgByAGEAeQA8AGkAbgBmAGUAcgAgAFUAPgAKACAAIAAgACAAPwAgAEEAcgByAGEAeQA8AFIAZQBjAHUAcgBzAGkAdgBlAFAAYQByAHQAaQBhAGwAPABVAD4APgAKACAAIAAgACAAOgAgAFQAWwBQAF0AIABlAHgAdABlAG4AZABzACAAbwBiAGoAZQBjAHQACgAgACAAIAAgACAAIAA%2FACAAUgBlAGMAdQByAHMAaQB2AGUAUABhAHIAdABpAGEAbAA8AFQAWwBQAF0APgAKACAAIAAgACAAIAAgADoAIABUAFsAUABdAAoAfQAKAA%3D%3D

Expected result

This was linting cleanly using biome 1.7.1. It is a regression in biome 1.7.2. Now I get:

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:

Source Location: crates/biome_js_semantic/src/semantic_model/scope.rs:115:33
Thread Name: biome::worker_0
Message: no entry found for key

types.ts internalError/panic  INTERNAL  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  ✖ processing panicked: no entry found for key
  
  ⚠ This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ShawnCockburn
Copy link

ShawnCockburn commented Apr 30, 2024

@johnowennixon I encountered the same issue and resoved it by pinning to a specific version (1.7.1 last working as of posting this comment) as set out in the GH action docs https://github.com/marketplace/actions/setup-biome#specific-version

If you're just running locally set your biome cli version to the one listed above.

Hope this helps in lieu of a fix.

@Sec-ant Sec-ant added S-Help-wanted Status: you're familiar with the code base and want to help the project L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug A-Analyzer Area: analyzer labels Apr 30, 2024
@Conaclos Conaclos self-assigned this May 1, 2024
@Conaclos
Copy link
Member

Conaclos commented May 1, 2024

Temporary workaround: disabling the rule noRedeclare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Analyzer Area: analyzer L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants