Skip to content

Branches should be ignored when #170

@stephanlachnit

Description

@stephanlachnit

Describe the bug

Code branches are checked even though they should never be executed since there is a subdir_done() call before. This is better understood with the reproducer below

To Reproduce

A simple meson project with a build option build_gui that is a combo with none, qt5 and qt6. If build_gui is none, then the subdir is skipped. Otherwise, this option is used to import the corresponding Qt module. See screenshot.

The LSP gives a warning about Unkown module 'none', which obviously can't be true since that case is excluded.

Expected behavior

The LSP should recognize that the branch with none as options is never executed in the file.

Screenshots/Screencasts

Screenshot From 2025-01-07 14-34-03

System info

  • OS: Linux (Flatpak)
  • Editor: Zed v0.167.2 via Flathub with zed-meson v0.2.0
  • Version: latest GitHub release (v4.3.7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions