-
Notifications
You must be signed in to change notification settings - Fork 307
Fix the issue of indexPrefixMap being unordered, which causes the IndexStoreDB path to be unpredictable. #2177
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: main
Are you sure you want to change the base?
Conversation
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.
Thanks, good fix. I have a small comment inline but otherwise looks good to me.
Sources/SourceKitLSP/Workspace.swift
Outdated
if $0.original.count != $1.original.count { | ||
return $0.original.count > $1.original.count | ||
} else { | ||
return $0.original < $1.original | ||
} |
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 assume that you want to sort by the string’s length to prefer more specific paths, right? Could you add a short comment explaining that?
Also, could you format your source code as described in https://github.com/swiftlang/sourcekit-lsp/blob/main/CONTRIBUTING.md#formatting?
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.
Done. Thanks for the suggestion!
…exStoreDB path to be unpredictable.
0ab1556
to
8ecd8f6
Compare
@swift-ci please test |
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.
Thanks!
@swift-ci Please test |
@swift-ci Please test Windows |
No description provided.