Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including a header file that forwards to another lib results in incorrect 'Unused file' warning #1501

Open
rlipscombe opened this issue Mar 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rlipscombe
Copy link

rlipscombe commented Mar 7, 2024

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
@rlipscombe rlipscombe added the bug Something isn't working label Mar 7, 2024
@rlipscombe
Copy link
Author

Oh, great. It's started working properly now. No changes to the code, afaict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant