Repository navigation
Complete the constructors of extensible variants #9085
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
Open
cknitt
wants to merge
10
commits into
master
Choose a base branch
from
fix-9073-extensible-variant-completion
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,405
−44
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e751edb
Complete the constructors of extensible variants
cknitt 5639dff
Match extension constructors by type and name them by module path
cknitt f2fd425
Name extension constructors relative to where completion runs
cknitt a62bfe5
Qualify extension constructors of namespaced modules by source path
cknitt e6a28af
Offer extensions in scope at the cursor and from interface modules
cknitt 52ee62d
Qualify extensions of nested interface modules and complete their pay…
cknitt b03db7b
Type extension payloads in their own file and match qualified constru…
cknitt d56bea1
Look up unqualified extension payloads in the scope at the cursor
cknitt fb97e50
Keep a catch-all when expanding or switching on an open type
cknitt 347aa66
Resolve an open's extension constructor only through its module
cknitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For code actions inside a nested module, this wrapper restores
completion_scopebefore extension constructors are collected:Xform.extract_type_from_exprcallsprocess_completableat lines 14–17, but callsType_utils.extract_typeafterward at lines 31–36. Consequently, an “Exhaustive switch” or “Expand catch-all” action insidemodule Subuses an empty scope path and insertsSub.Flagfor an extension declared inSub, where that qualification is not accessible. Constructors declared after the action position are also no longer filtered. Extend the scope lifetime through the code action's type extraction, or pass the context explicitly. This is fresh evidence from the code-action consumer, rather than the completion paths covered by the earlier fixes.Useful? React with 👍 / 👎.