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).
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