-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CodeCompletion] Avoid suggesting duplicated module names #31892
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
[CodeCompletion] Avoid suggesting duplicated module names #31892
Conversation
@swift-ci Please smoke test |
@swift-ci Please test Windows |
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.
LGTM!
let _: #^TYPE_GLOBAL^# | ||
// TYPE_GLOBAL: Begin completions | ||
// TYPE_GLOBAL-NOT: OverlayTest[#Module#] | ||
// TYPE_GLOBAL-DAG: Decl[Module]/None: OverlayTest[#Module#]; |
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.
I think the -NOT above and below means this -DAG can't be reordered past them, but its not a problem if swift-ide-test is sorting the results and this is already the right order.
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.
Yeah, I think you are right. Also, swift-idea-test
doesn't sort the results (but is stable). Do you know a better way to check this? Is possible, I want to avoid 2 FileCheck
invocations for these checks.
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.
Outputting to a file and running file check for the negative and positive checks separately is all I can think of, sorry 🙁
in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical. Maintain a set of seen module names to avoid suggesting duplicated names. rdar://problem/63370253
269a0cf
to
af27e8f
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test macOS |
Windows test succeeded: https://ci-external.swift.org/view/Pull%20Request/job/swift-PR-windows/3192/console |
in global completion result. Overly modules have the same name as the shadowed modules. We should not list both names because they are identical.
Maintain a set of seen module names to avoid suggesting duplicated names.
rdar://problem/63370253