{"record":{"id":"2f00c6280e5aea25","repo":"astral-sh/ruff","slug":"error","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/ty_project/src/db.rs","lineNumber":192,"sourceCode":"        //   cache and load the cache if it exists.\n        //   we may want to have a dedicated method for this?\n        // Important: For persistent caching it's essential that we can compute the\n        // cache key before loading the DB. Because of that, access to the `db` (other than system and vendored) is\n        // strictly forbidden before resolving the `program_settings`.\n\n        let merged_options = project_metadata.to_merged_options();\n\n        let (program_settings, program_settings_diagnostics) = strategy\n            .to_anyhow(merged_options.to_program_settings(db.system(), db.vendored(), strategy))?;\n\n        // This must be called before `from_metadata`, or the `SearchPath` root\n        // will take precedence over the `Project` root, resulting in\n        // all project files having HIGH durability.\n        project_metadata.try_add_project_root(&db);\n\n        let (settings, mut settings_diagnostics) = strategy\n            .map_err(merged_options.to_settings(&db, strategy), |error| {\n                anyhow::anyhow!(\"{}\", error.pretty(&db))\n            })?;\n        settings_diagnostics.extend(\n            program_settings_diagnostics\n                .into_iter()\n                .map(|diagnostic| diagnostic.into_diagnostic(&db)),\n        );\n\n        db.project = Some(Project::from_metadata(\n            &db,\n            project_metadata,\n            settings,\n            program_settings,\n            settings_diagnostics,\n        ));\n\n        Ok(db)\n    }\n","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/astral-sh/ruff/blob/15f3fe6b15a5f00172f34b0f542f8ea277f5a586/crates/ty_project/src/db.rs#L174-L210","documentation":"A generic anyhow wrapper around the error text produced while resolving a project's program settings (e.g. parsing ty.toml or the [tool.ty] table). The message body is the underlying error, so this record identifies where in ty_project::db the failure surfaced, not a specific cause of its own.","triggerScenarios":"Thrown at crates/ty_project/src/db.rs:192 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the wrapped error text to find the actual settings problem","Fix the offending ty.toml / pyproject.toml entry and re-run"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"15f3fe6b15a5f00172f34b0f542f8ea277f5a586","analyzedAt":"2026-09-05T10:32:37.492Z","contentChangedAt":"2026-09-05T10:32:37.492Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}