pub fn generate_diagnostics_from_cache(
parse_result: &dyn ParseResult,
versions: VersionData<'_>,
formatter: &dyn EcosystemFormatter,
uri: &Uri,
freshness: FreshnessSettings,
severities: DiagnosticSeverities,
now: PublishTime,
) -> Vec<Diagnostic>Expand description
Generates diagnostics using cached versions (no network calls).
Uses pre-fetched version information from the lifecycle’s parallel fetch. This avoids making additional network requests during diagnostic generation.
§Arguments
parse_result- Parsed dependencies from manifestversions- Latest (registry) and resolved (lock file) version maps, keyed by package nameformatter- Ecosystem-specific formatting and comparison logicuri- Document URI, used only to anchor the [Location] of any [DiagnosticRelatedInformation] entries attached to a collapsed fetch-failure diagnostic (#479/#480 S2) — every other diagnostic here is scoped to the document it’s published under implicitly and doesn’t need itfreshness- Whether to differentiate an “outdated” diagnostic still within the release cooldown window (severity is unaffected either way — see the “Newer version available” message below)severities- Configured severity for each diagnostic categorynow- The instant every publish age in this call is computed against. Taken as a parameter rather than read internally viaPublishTime::now()(issue #227 M4) so callers can pin an exact cooldown-boundary instant deterministically in tests, and so every dependency in one document is aged against the same instant.