Skip to content

Errors propagate to workspace on parent folder #5041

@oscarfv

Description

@oscarfv

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

When a workspace is in a folder inside another workspace, errors/warnings/etc are shown on the enclosing workspace.

Steps to reproduce

$ flutter create project
$ cd project
$ flutter create subproject
M-x lsp-workspace-folders-add path/to/project
M-x lsp-workspace-folders-add path/to/project/subproject

Visit project/lib/main.dart
Visit project/subproject/lib/main.dart
Write some garbage in that buffer.

M-x lsp-treemacs-error-list

subproject is shown as having errors.
But project also shows the errors of subproject.

The problem also affects breadcrumbs (try the recipe but creating subproject in project/lib and see project/lib/main.dart marked as having errors.)

Expected behavior

The diagnostics of subproject are not added to project.

Which Language Server did you use?

The problem seems unrelated to the language server used. I've observed the problem with a flutter project inside another project that uses a different language server.

OS

Linux

Error callstack

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions