Skip to content

Fix aliases injected via use - #3

Merged
JesseHerrick merged 2 commits into
open-source-releasefrom
fix-aliases-through-use
Apr 9, 2026
Merged

Fix aliases injected via use#3
JesseHerrick merged 2 commits into
open-source-releasefrom
fix-aliases-through-use

Conversation

@JesseHerrick

@JesseHerrick JesseHerrick commented Apr 8, 2026

Copy link
Copy Markdown
Member

Note

Medium Risk
Touches core Elixir LSP resolution paths (definition/hover/completion/rename/references) by expanding alias resolution using cached __using__ parsing; mistakes could cause widespread mis-resolutions or performance regressions on large projects.

Overview
Fixes module resolution when a consumer relies on aliases injected by use macros.

parseUsingBody/parseHelperQuoteBlock now extract alias declarations (including as: and multi-alias forms) from __using__/helper quote do blocks and store them in the usingCacheEntry. The server merges these use-injected aliases (including transitive use chains) into the in-scope alias map for definition/hover/completion/actions and ensures rename logic still treats only file-local as: aliases as renames.

Adds unit tests covering alias extraction from __using__ and go-to-definition/hover resolution through a use-injected alias.

Reviewed by Cursor Bugbot for commit 3c11912. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 76e88df. Configure here.

Comment thread internal/lsp/elixir.go
Comment thread internal/lsp/server.go Outdated
@JesseHerrick
JesseHerrick merged commit e90899a into open-source-release Apr 9, 2026
4 checks passed
@JesseHerrick
JesseHerrick deleted the fix-aliases-through-use branch April 9, 2026 05:57
remotecom pushed a commit that referenced this pull request Apr 9, 2026
Apparently GitHub just lets you merge a PR into a PR that has already
been merged rather than automatically updating the base. This adds back
the merged PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant