erlang_ls
erlang_ls copied to clipboard
Including a header file that forwards to another lib results in incorrect 'Unused file' warning
Describe the bug
Given -include("errors.hrl").
, which contains -include_lib("other/include/errors.hrl").
, none of the definitions in the included file are recognised as in scope.
This leads to an incorrect "Unused file: errors.hrl" (sometimes at the -module
attribute, rather than at the -include
, but I couldn't get a small-enough repro for that).
To Reproduce
See https://github.com/rlipscombe/erlang_ls_1501_parent and https://github.com/rlipscombe/erlang_ls_1501_child, 'erlang_ls_1501' tag.
Expected behavior
No warning.
Actual behavior
You get a spurious warning, as described.
Context
-
erlang_ls
version (tag/sha): 0.50.0 - Editor used: VS Code Version: 1.87.0 (Universal) Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2
- LSP client used: erlang-ls.erlang-ls v0.0.42