{"record":{"id":"c369039467069038","repo":"biomejs/biome","slug":"absolute-path-must-be-correctly-parsed","errorCode":null,"errorMessage":"Absolute path must be correctly parsed","messagePattern":"Absolute path must be correctly parsed","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/biome_fs/src/fs/os.rs","lineNumber":205,"sourceCode":"    fn from_rayon<'a>(scope: &'a Scope<'scope>) -> &'a Self {\n        // SAFETY: transmuting from Scope to OsTraversalScope is safe since\n        // OsTraversalScope has the `repr(transparent)` attribute that\n        // guarantees its layout is the same as Scope\n        unsafe { mem::transmute(scope) }\n    }\n}\n\nimpl<'scope> TraversalScope<'scope> for OsTraversalScope<'scope> {\n    fn evaluate(&self, ctx: &'scope dyn TraversalContext, path: Utf8PathBuf) {\n        // Path must be absolute in order to properly normalize them before matching against globs.\n        //\n        // FIXME: This code should be moved to the `traverse_inputs` function in `biome_cli/src/traverse.rs`.\n        // Unfortunately moving this code to the `traverse_inputs` function makes many tests fail.\n        // The issue is coming from some bugs in our test infra.\n        // See https://github.com/biomejs/biome/pull/5017\n        let path = match std::path::Path::new(&path).absolutize() {\n            Ok(std::borrow::Cow::Owned(absolutized)) => Utf8PathBuf::from_path_buf(absolutized)\n                .expect(\"Absolute path must be correctly parsed\"),\n            _ => path,\n        };\n        let file_type = match path.metadata() {\n            Ok(meta) => meta.file_type(),\n            Err(err) => {\n                ctx.push_diagnostic(IoError::from(err).with_file_path(path.to_string()));\n                return;\n            }\n        };\n        handle_any_file(&self.scope, ctx, path, file_type, None);\n    }\n\n    fn handle(&self, context: &'scope dyn TraversalContext, path: Utf8PathBuf) {\n        self.scope.spawn(move |_| {\n            context.handle_path(BiomePath::new(path));\n        });\n    }\n}","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/biomejs/biome/blob/405dedb0ff65dd29927faf587f6542e3c29db248/crates/biome_fs/src/fs/os.rs#L187-L223","documentation":"Error \"Absolute path must be correctly parsed\" thrown in biomejs/biome.","triggerScenarios":"Thrown at crates/biome_fs/src/fs/os.rs:205 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the path is absolute and well-formed before canonicalization.","This indicates an internal invariant failure; report it with the offending path if reachable from user input."],"exampleFix":"assert!(path.is_absolute()); let parsed = Utf8PathBuf::from_path_buf(path).map_err(|_| ...)?;","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"405dedb0ff65dd29927faf587f6542e3c29db248","analyzedAt":"2026-08-20T00:25:09.682Z","contentChangedAt":"2026-08-20T00:25:09.682Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}