Skip to content

Conversation

@andrewbranch
Copy link
Member

Fixes #45030

Fixes two separate crashes—one was a simple overlooked case for skipping symbol property names, but the other was caused by a weird symbol merge that I think might be wrong/undesirable—I was expecting to see an alias in the exports of a module symbol, but instead got a merged resolved module symbol—see the comment below the second fourslash test.

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jul 15, 2021
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Why can't you include the weird merge? Is it because it doesn't have a usable name?

@andrewbranch
Copy link
Member Author

Why can't you include the weird merge? Is it because it doesn't have a usable name?

Yes. I can include the weird merge, but it would either have bad performance characteristics or require a new/updated checker API to give me the keys along with the symbols when getting all exports and properties of a module, and would require some refactoring to store those in the cache and use them as lookups appropriately. That might be the way forward, but I wanted to get @weswigham’s opinion on whether this merge is valid/expected first.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

I vote to merge this to fix the crash if it's urgent; otherwise wait a few days to get @weswigham's read on whether the merge is expected and/or easy enough to fix.

@andrewbranch
Copy link
Member Author

I’ll wait until tomorrow.

@weswigham
Copy link
Member

It's an odd merge, but intentional - if we didn't merge (and we used to not) the interface augmentation would override the base member, rather than merge with it (which is unintuitive and undesirable).

@andrewbranch
Copy link
Member Author

@weswigham but why replace the export alias symbol altogether? Could the alias not merge with the module augmentation, rather than the alias’s target (an external module)?

@andrewbranch
Copy link
Member Author

Going to merge and file a bug for the missing case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

autocomplete stop working and vscode.typescript.features has crash

4 participants