Skip to content

LSP: include document version when publishing diagnostics #478

Description

@avifenesh

Audit Finding (API Design, Medium)

Location: crates/agnix-lsp/src/backend.rs:191

When files are closed or skipped, the server publishes empty diagnostics with version: None. Per LSP spec, publishing without a version can cause stale diagnostics to persist in clients that cache by version.

Fix: Track document versions in the document cache and pass them to publish_diagnostics.

Found by /audit-project

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions