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

Fixed two bugs with alias calculation #726

Merged
merged 1 commit into from
May 3, 2024
Merged

Fixed two bugs with alias calculation #726

merged 1 commit into from
May 3, 2024

Conversation

scohen
Copy link
Collaborator

@scohen scohen commented May 3, 2024

My prior PR gave aliases ranges, and determined that an alias start at the end of its range. This meant that all the aliases inside a curly-brace defined alias wouldn't be added to the alias mappings until after the closing curly, which meant the aliases indexer wouldn't get the correct module names for them.

The second bug was always there. We look for the first item in the alias segments in the aliases mapping, and return error if it's not there. However, in a multiple alias, you can do alias Foo.{Bar.Baz}. In that instance, Baz, is the last thing in the segment list, and it wouldn't be found.

My prior PR gave aliases ranges, and determined that an alias start at
the end of its range. This meant that all the aliases inside a
curly-brace defined alias wouldn't be added to the alias mappings
until after the closing curly, which meant the aliases indexer
wouldn't get the correct module names for them.

The second bug was always there. We look for the first item in the
alias segments in the aliases mapping, and return error if it's not
there. However, in a multiple alias, you can do alias
Foo.{Bar.Baz}. In that instance, Baz, is the last thing in the segment
list, and it wouldn't be found.
@scohen scohen merged commit 0234cbc into main May 3, 2024
9 checks passed
@scohen scohen deleted the fix-multi-alias branch May 3, 2024 17:26
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.

2 participants