{"record":{"id":"fa96cbb013b12f51","repo":"astral-sh/ruff","slug":"required-version-required-version-does-not-mat","errorCode":null,"errorMessage":"Required version `{required_version}` does not match the running version `{RUFF_PKG_VERSION}`","messagePattern":"Required version `(.+?)` does not match the running version `(.+?)`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/ruff_workspace/src/options.rs","lineNumber":613,"sourceCode":"    /// For example, `TC001`, `TC002`, and `TC003` can move more imports into `TYPE_CHECKING` blocks\n    /// if `__future__` annotations are enabled.\n    ///\n    #[option(\n        default = \"false\",\n        value_type = \"bool\",\n        example = r#\"\n            # Enable `from __future__ import annotations` imports\n            future-annotations = true\n        \"#\n    )]\n    pub future_annotations: Option<bool>,\n}\n\npub(crate) fn validate_required_version(required_version: &RequiredVersion) -> anyhow::Result<()> {\n    let ruff_pkg_version = pep440_rs::Version::from_str(RUFF_PKG_VERSION)\n        .expect(\"RUFF_PKG_VERSION is not a valid PEP 440 version specifier\");\n    if !required_version.contains(&ruff_pkg_version) {\n        return Err(anyhow::anyhow!(\n            \"Required version `{required_version}` does not match the running version \\\n            `{RUFF_PKG_VERSION}`\"\n        ));\n    }\n    Ok(())\n}\n\n/// Newtype wrapper for [`LintCommonOptions`] that allows customizing the JSON schema and omitting the fields from the [`OptionsMetadata`].\n#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize)]\n#[serde(transparent)]\npub struct DeprecatedTopLevelLintOptions(pub(crate) LintCommonOptions);\n\nimpl<'de> Deserialize<'de> for DeprecatedTopLevelLintOptions {\n    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n    where\n        D: Deserializer<'de>,\n    {\n        // Temporarily disable span information because the flattened values don't retain spans.","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/astral-sh/ruff/blob/672bb4edf04c84f8b0753346359daee4057158f2/crates/ruff_workspace/src/options.rs#L595-L631","documentation":"Error \"Required version `{required_version}` does not match the running version `{RUFF_PKG_VERSION}`\" thrown in astral-sh/ruff.","triggerScenarios":"Thrown at crates/ruff_workspace/src/options.rs:613 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":"672bb4edf04c84f8b0753346359daee4057158f2","analyzedAt":"2026-08-16T08:54:05.464Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}