Skip to content

[IDE/CodeCompletion] Register the request evaluator. #26365

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

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

dcci
Copy link
Member

@dcci dcci commented Jul 26, 2019

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@dcci dcci requested a review from nkcsgexi July 26, 2019 00:34
@dcci
Copy link
Member Author

dcci commented Jul 26, 2019

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8751854300dfbeb57ab36d421d77e648a4cbbdb3

@@ -194,6 +194,10 @@ doCodeCompletion(SourceFile &SF, StringRef EnteredCode, unsigned *BufferID,
CodeCompletionCallbacksFactory *CompletionCallbacksFactory) {
// Temporarily disable printing the diagnostics.
ASTContext &Ctx = SF.getASTContext();

// Register the request evaluator.
registerIDERequestFunctions(Ctx.evaluator);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you only want to do this once when the ASTContext is being set up, not every time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool, I'll change that, thanks!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 8751854300dfbeb57ab36d421d77e648a4cbbdb3

@nkcsgexi
Copy link
Contributor

Notice we usually call registerIDERequestFunctions after CompilerInstance::setup(Invocation) and call it only once in an ASTContext's life cycle. Actually, an assertion will be hit if we call it twice.

@dcci dcci force-pushed the reqeval-integratedrepl branch from 8751854 to d23c123 Compare August 2, 2019 22:57
@dcci dcci force-pushed the reqeval-integratedrepl branch from d23c123 to d441798 Compare August 2, 2019 22:58
@dcci
Copy link
Member Author

dcci commented Aug 2, 2019

@swift-ci test

@swift-ci
Copy link
Contributor

swift-ci commented Aug 2, 2019

Build failed
Swift Test Linux Platform
Git Sha - 8751854300dfbeb57ab36d421d77e648a4cbbdb3

@swift-ci
Copy link
Contributor

swift-ci commented Aug 2, 2019

Build failed
Swift Test OS X Platform
Git Sha - 8751854300dfbeb57ab36d421d77e648a4cbbdb3

@dcci dcci merged commit ca9deda into swiftlang:master Aug 5, 2019
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.

4 participants