{"record":{"id":"1ea7ab8f19ba74f7","repo":"rust-lang/cargo","slug":"checksum-for-could-not-be-calculated-but-a-c","errorCode":null,"errorMessage":"checksum for `{}` could not be calculated, but a checksum is listed in the existing lock file\n\nthis could be indicative of a few possible situations:\n\n    * the source `{}` supports checksums,\n      but was replaced with one that doesn't\n    * the lock file is corrupt\n\nunable to verify that `{0}` is the same as when the lockfile was generated\n","messagePattern":"checksum for `(.+?)` could not be calculated, but a checksum is listed in the existing lock file\n\nthis could be indicative of a few possible situations:\n\n    \\* the source `(.+?)` supports checksums,\n      but was replaced with one that doesn't\n    \\* the lock file is corrupt\n\nunable to verify that `(.+?)` is the same as when the lockfile was generated\n","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/resolver/resolve.rs","lineNumber":259,"sourceCode":"\nthis could be indicative of a few possible situations:\n\n    * the source `{}` did not previously support checksums,\n      but was replaced with one that does\n    * newer Cargo implementations know how to checksum this source, but this\n      older implementation does not\n    * the lock file is corrupt\n\",\n                        id,\n                        id.source_id()\n                    )\n\n                // If our checksum hasn't been calculated, then it could mean\n                // that future Cargo figured out how to checksum something or\n                // more realistically we were overridden with a source that does\n                // not have checksums.\n                } else if mine.is_none() {\n                    anyhow::bail!(\n                        \"\\\nchecksum for `{}` could not be calculated, but a checksum is listed in \\\nthe existing lock file\n\nthis could be indicative of a few possible situations:\n\n    * the source `{}` supports checksums,\n      but was replaced with one that doesn't\n    * the lock file is corrupt\n\nunable to verify that `{0}` is the same as when the lockfile was generated\n\",\n                        id,\n                        id.source_id()\n                    )\n\n                // If the checksums aren't equal, and neither is None, then they\n                // must both be Some, in which case the checksum now differs.","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/rust-lang/cargo/blob/eb98b54bc9f3c74519f43d066cb3fd02ebc88df0/src/resolver/resolve.rs#L241-L277","documentation":"Error \"checksum for `{}` could not be calculated, but a checksum is listed in the existing lock file\n\nthis could be indicative of a few possible situations:\n\n    * the source `{}` supports checksums,\n      but was replaced with one that doesn't\n    * the lock file is corrupt\n\nunable to verify that `{0}` is the same as when the lockfile was generated\n\" thrown in rust-lang/cargo.","triggerScenarios":"Thrown at src/resolver/resolve.rs:259 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":"eb98b54bc9f3c74519f43d066cb3fd02ebc88df0","analyzedAt":"2026-08-11T17:42:36.556Z","contentChangedAt":"2026-08-11T17:42:36.556Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}