{"record":{"id":"8bf4b7ba005f701b","repo":"gleam-lang/gleam","slug":"non-utf8-path","errorCode":null,"errorMessage":"Non Utf8 Path","messagePattern":"Non Utf8 Path","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"compiler-core/src/paths.rs","lineNumber":185,"sourceCode":"pub fn global_hexpm_legacy_credentials_path() -> Utf8PathBuf {\n    global_hexpm_cache().join(\"credentials\")\n}\n\nfn global_hexpm_cache() -> Utf8PathBuf {\n    default_global_gleam_cache().join(\"hex\").join(\"hexpm\")\n}\n\nfn global_packages_cache() -> Utf8PathBuf {\n    global_hexpm_cache().join(\"packages\")\n}\n\npub fn default_global_gleam_cache() -> Utf8PathBuf {\n    Utf8PathBuf::from_path_buf(\n        dirs_next::cache_dir()\n            .expect(\"Failed to determine user cache directory\")\n            .join(\"gleam\"),\n    )\n    .expect(\"Non Utf8 Path\")\n}\n\npub fn unnest(within: &Utf8Path) -> Utf8PathBuf {\n    let mut path = Utf8PathBuf::new();\n    for _ in within {\n        path = path.join(\"..\");\n    }\n    path\n}\n\n#[test]\nfn paths() {\n    assert!(default_global_gleam_cache().ends_with(\"gleam\"));\n\n    assert!(global_packages_cache().ends_with(\"hex/hexpm/packages\"));\n\n    assert!(\n        global_package_cache_package_tarball(&Base16Checksum(vec![0, 0, 0, 0]))","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/gleam-lang/gleam/blob/7e623aa83da3776faee50ca4ab9a6c40124acd95/compiler-core/src/paths.rs#L167-L203","documentation":"Error \"Non Utf8 Path\" thrown in gleam-lang/gleam.","triggerScenarios":"Thrown at compiler-core/src/paths.rs:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7e623aa83da3776faee50ca4ab9a6c40124acd95","analyzedAt":"2026-08-17T00:07:02.091Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}