Skip to content

Workspace folders with trailing slash cause phantom diagnostics #1853

Open
@osiewicz

Description

@osiewicz

Summary

When LSP client provides workspace folders with trailing slash, ansible-language-server returns superfluous diagnostics; an user of Zed is seeing two subsequent publishDiagnostics messages for a file in where the first notification contains legitimate diagnostics and the second one has an empty list of diagnostics. This only started happening after Zed started adding trailing / to it's workspaceFolders field of initialize request. Removing the trailing slash from workspaceFolders field fixed the issue for us.

Related issue with a repro: zed-industries/zed#25390

Extension version

N/A

VS Code version

N/A

Ansible Version

N/A

OS / Environment

OS: macOS 15.3.1
Memory: 32 GiB
Architecture: aarch64

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions