-
Notifications
You must be signed in to change notification settings - Fork 272
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
Merge main
into release/6.0
#1438
Merged
ahoppen
merged 21 commits into
swiftlang:release/6.0
from
ahoppen:6.0/merge-main-2024-06-06
Jun 6, 2024
Merged
Merge main
into release/6.0
#1438
ahoppen
merged 21 commits into
swiftlang:release/6.0
from
ahoppen:6.0/merge-main-2024-06-06
Jun 6, 2024
Conversation
This file contains 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
Backticks in TestItem IDs should be sanitized. Use the new TokenSyntax.identifier when building up the TestItem IDs.
Mostly just removing outdated information, merging files and pointing to the new tools page from swiftlang/swift-org-website#679 with instructions on how to set up editors.
…est-ids Filter backticks in TestItem IDs
Improve markdown files
Instead of logging to `stderr`, write log messages to files in `.sourcekit-lsp/logs/sourcekit-lsp-<pid>.<log index>.log`. This allows us to retrieve the log messages from `sourcekit-lsp diagnose`. Fixes swiftlang#1286 rdar://127138318
…nose bundle This allows VS Code to provide a command in the command palette that gathers sourcekit-lsp diagnostics alongside some VS Code Swift extension diagnostics.
The comment on `LocalConnection` assumed that all mutable state was guarded by `queue` but `state` and `handler` actually weren’t. This was found by the thread sanitizer.
…-path Allow specification of where `sourcekit-lsp diagnose` writes its diagnose bundle
Write log messages to files on non-Darwin platforms
Turns out that sourcekitd test hooks were a bad idea because of the following comment that I wrote: ``` `testHooks` are only considered when an instance is being created. If a sourcekitd instance at the given path already exists, its test hooks will be used. ``` During test execution in Xcode, we generate a bunch of `SourceKitServer` instances in the same process that all call `DynamicallyLoadedSourceKitD.getOrCreate`. Now, if `testDontReturnEmptyDiagnosticsIfDiagnosticRequestIsCancelled` is not the first test being executed in the process (which usually it is not), the test hooks in it won’t get used. Switch back to using the preparation hooks, essentially reverting swiftlang#1412 and keeping the following snippet to fix the underlying issue ```swift // Poll until the `CancelRequestNotification` has been propagated to the request handling. for _ in 0..<Int(defaultTimeout * 100) { if Task.isCancelled { break } usleep(10_000) } ```
…condition Fix a race condition in `LocalConnection`
…’ve made meaningful progress Especially when we didn’t have a redrawing progress indicator, we would spam the output with out making progress that was visible to the user because the overall progress just shows a percentage without any decimal digits. To fix this, only report progress when we’ve made at least 1% of progress in log collection.
Only report log collection progress in `sourcekit-lsp diagnose` if we’ve made meaningful progress
Remove sourcekitd test hooks
We used C atomics but these were allocated as Swift variables. Even thought they were atomic, concurrent accesses to them could violate Swift’s exclusivity laws, raising thread sanitizer errors. Allocate the C atomics using malloc to fix this problem. rdar://129170128
Heap allocate our atomics
@swift-ci Please test |
bnbarham
approved these changes
Jun 6, 2024
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.
Merge the following PRs to
release/6.0
:sourcekit-lsp diagnose
writes its diagnose bundle #1428LocalConnection
#1431sourcekit-lsp diagnose
if we’ve made meaningful progress #1432