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

erlang_ls: Look for lib includes in extra_deps #7300

Merged

Conversation

the-mikedavis
Copy link
Member

Proposed Changes

This fixes ErlangLS include lookups for include_lib attributes like

-include_lib("khepri/lib/include.hrl").

when running erlang_ls and building with Bazel.

khepri ends up in the extra_deps directory as a symlink after running bazel run //tools:symlink_deps_for_erlang_ls, so this change picks up that khepri directory as a lib for include_libs.

This fixes some spurious diagnostics from erlang_ls running on #7206.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

This fixes ErlangLS include lookups for `include_lib` attributes like

```erl
-include_lib("khepri/lib/include.hrl").
```

when running erlang_ls and building with Bazel.

`khepri` ends up in the `extra_deps` directory as a symlink after
running `bazel run //tools:symlink_deps_for_erlang_ls`, so this change
picks up that `khepri` directory as a lib for `include_lib`s.
@pjk25 pjk25 merged commit 58aa1b0 into rabbitmq:main Feb 15, 2023
michaelklishin added a commit that referenced this pull request Feb 15, 2023
erlang_ls: Look for lib includes in extra_deps (backport #7300)
@the-mikedavis the-mikedavis deleted the md--bazel/erlang-ls/include-extra_deps branch February 15, 2023 13:17
pjk25 added a commit that referenced this pull request Feb 15, 2023
erlang_ls: Look for lib includes in extra_deps (backport #7300) (backport #7302)
the-mikedavis added a commit that referenced this pull request Feb 15, 2023
erlang_ls: Look for lib includes in extra_deps (backport #7300) (backport #7302) (backport #7308)
michaelklishin added a commit that referenced this pull request Feb 15, 2023
erlang_ls: Look for lib includes in extra_deps (backport #7300) (backport #7302) (backport #7308) (backport #7310)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants