๐ Panic `internal error: entered unreachable code` in `lint/correctness/use_exhaustive_dependencies.rs`
Closed this issue ยท 3 comments
qarmin commented
Environment information
CLI:
Version: 1.9.4
Color support: true
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_LOG_PATH: unset
BIOME_LOG_PREFIX_NAME: unset
BIOME_CONFIG_PATH: unset
NO_COLOR: unset
TERM: "xterm-256color"
JS_RUNTIME_VERSION: unset
JS_RUNTIME_NAME: unset
NODE_PACKAGE_MANAGER: unset
Biome Configuration:
Status: unset
Workspace:
Open Documents: 0
What happened?
timeout -v 150 biome lint TEST___FILE.ts
crashes with
Source Location: crates/biome_js_analyze/src/lint/correctness/use_exhaustive_dependencies.rs:610:13
Thread Name: biome::worker_1
Message: internal error: entered unreachable code
File - compressed.zip
Expected result
No crash
Code of Conduct
- I agree to follow Biome's Code of Conduct
arendjr commented
Thanks so much for the detailed reports! It may take us a bit to get back to all of them, but rest assured they're on our radar!
dyc3 commented
In this case, Biome is failing to detect that Point
is imported, so this may be a bug in the semantic model. Specifically this line is returning false:
dyc3 commented
In the sample, this line is getting parsed as JS_BOGUS_STATEMENT
, and not JS_IMPORT
:
import type {Point} from '.geomet';
The reason is that this becomes bogus is because this is typescript syntax in a js file. Removing type
fixes the crash, as well as renaming it to a .ts
file.