-
Notifications
You must be signed in to change notification settings - Fork 581
Don't insert a duplicate export in the "Apply All" autocorrect in LSP #9818
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
base: neil-dedub-apply-all
Are you sure you want to change the base?
Conversation
jez
left a comment
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.
same comments as before.
| if (exportsAutocorrect.has_value()) { | ||
| allEdits.insert(allEdits.end(), make_move_iterator(exportsAutocorrect->edits.begin()), | ||
| make_move_iterator(exportsAutocorrect->edits.end())); | ||
| } |
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.
ditto earlier comment about moving as much of this as possible to resolve.
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.
If you wouldn't mind taking a pass over removing the std:: from this file I would appreciate it.
| std::optional<core::AutocorrectSuggestion> PackageDB::aggregateMissingExportsForFile(const core::GlobalState &gs, | ||
| const core::FileRef fref) { |
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.
ooc, maybe I'm missing it, but with the import side, there was aggregateMissingImports and aggregateMissingImportsForFile. Why is there not a corresponding symmetry for exports?
a1cf8a0 to
ef0e398
Compare
#9738 but for exports. The approach is similar, except that it uses
symbolReferencesByFilemap added in #9654.Depends on #9738
Review commit-by-commit.
Motivation
Improve autocorrects.
Test plan
See included automated tests.