-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate auto imports for core callables (#1861)
Closes #1860 Currently, we have a separate code path for generating completions for core callables. This code path just hard-codes the callables to not include any auto-generated imports. This may have been necessary at some point, but it no longer is and it is preventing us from generating the correct auto-imports for `QIR.Runtime`. We now have a function that generates completions from a package and is aware of if imports are needed or not, so I just went ahead and used that instead of special casing `Core`. This PR: - Uses the standard completion codepath to generate completions for `Core` - Adds the ability to unit test completions with the real stdlib, not just the fake stdlib - Adds tests to ensure auto-imports are generated for items that are not already in scope (e.g. `QIR.Runtime.*`) and are _not_ generated for items already in scope (e.g. `Length`).
- Loading branch information
Showing
11 changed files
with
195 additions
and
109 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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.