{"id":"2de7bd13e4a932b5","repo":"rust-lang/cargo","slug":"found-an-override-with-a-non-locked-list","errorCode":null,"errorMessage":"found an override with a non-locked list","messagePattern":"found an override with a non-locked list","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/workspace/registry.rs","lineNumber":795,"sourceCode":"                    return Err(anyhow::anyhow!(\"found patches and a path override\"));\n                }\n                let mut n = 0;\n                let mut to_warn = None;\n                let callback = &mut |summary| {\n                    n += 1;\n                    match summary {\n                        IndexSummary::Candidate(summary)\n                        | IndexSummary::Yanked(summary)\n                        | IndexSummary::Offline(summary)\n                        | IndexSummary::Unsupported(summary, _)\n                        | IndexSummary::Invalid(summary) => {\n                            to_warn = Some(summary);\n                        }\n                    }\n                };\n                query_with_context(&*source, dep, kind, callback).await?;\n                if n > 1 {\n                    return Err(anyhow::anyhow!(\"found an override with a non-locked list\"));\n                }\n                if let Some(to_warn) = to_warn {\n                    self.warn_bad_override(&override_summary, &to_warn)?;\n                }\n                let override_summary = self.lock(override_summary);\n                f(IndexSummary::Candidate(override_summary));\n            }\n        }\n\n        Ok(())\n    }\n\n    fn describe_source(&self, id: SourceId) -> String {\n        match self.sources.borrow().get(id) {\n            Some(src) => src.describe(),\n            None => id.to_string(),\n        }\n    }","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/rust-lang/cargo/blob/0e07a155371a6ce88ae53a2c00df940280c09a67/src/workspace/registry.rs#L777-L813","documentation":"Error \"found an override with a non-locked list\" thrown in rust-lang/cargo.","triggerScenarios":"Thrown at src/workspace/registry.rs:795 when the library encounters an invalid state.","commonSituations":"Occurs when a directory/registry override is used together with a lock file that does not lock the override source. Avoid combining `paths` overrides with locked resolution, or update the lock file accordingly.","solutions":["Commit/update Cargo.lock so the lock file exists before using an override.","Remove the override if a locked dependency list is not available."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"0e07a155371a6ce88ae53a2c00df940280c09a67","analyzedAt":"2026-08-06T01:46:58.334Z","schemaVersion":2}