Refactor / clean-up SKOptions handling#20
Merged
rockbruno merged 4 commits intospotify:mainfrom Jul 20, 2025
Merged
Conversation
84b7604 to
838effa
Compare
d2afdbd to
6520b68
Compare
6520b68 to
e9fe825
Compare
rockbruno
commented
Jul 20, 2025
|
|
||
| // We currently use a single-threaded setup for simplicity, | ||
| // but we can eventually reply asynchronously if we find a need for it. | ||
| private let lock: OSAllocatedUnfairLock<Void> = .init() | ||
| // FIXME: Can't put state into the lock for now because of recursiveness in the registration. | ||
| nonisolated(unsafe) private var state: State = State() |
Member
Author
There was a problem hiding this comment.
Locking should be unnecessary due to thread safety on sourcekit-lsp's side: https://github.com/swiftlang/sourcekit-lsp/blob/d18aba71ce3c539ec1474470228ab7fea9b66105/Sources/LanguageServerProtocolJSONRPC/JSONRPCConnection.swift#L55-L59
Will only be necessary on our end if we start running things asynchronously.
Contributor
|
I tested this on my end, it seems to work good! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another shot at cleaning up and improving the performance of some of the logic involving parsing compiler args, as the current logic was marked for refactoring and was doing a little bit of everything, which made it mostly untestable.