Skip to content

Merge main into release/6.0 #1482

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

Merged
merged 40 commits into from
Jun 20, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jun 18, 2024

Merge the following PRs into release/6.0:

ahoppen and others added 30 commits June 7, 2024 08:49
…unsafe)`

Since the `Atomic*` types can not be marked as `Sendable` (because they aren’t C structs), we can change the variables to constants and can remove `nonisolated(unsafe)`.
…talParse`

Fixes an error found by thread sanitizer
We were dispatching the notification to `messageHandlingQueue`, which then didn’t do anything with it. That’s not necessary.
…ency module fails to prepare

rdar://128683404
…ental-parse-tests

Use a `ThreadSafeBox` for the `reusedNodes` variable in `testIncrementalParse`
…-with-build-error-in-low-level-module

Add test to check that we get semantic functionality even if a dependency module fails to prepare
Return after handling a `CancelRequestNotification`
…an’t handle modules for the target and host properly

This fixes a test failure in Xcode 15.4.
…ugin-test

Skip `testLibraryUsedByExecutableTargetAndPackagePlugin` if SwiftPM can’t handle modules for the target and host properly
- Rename methods to highlight that we’re talking about generated interfaces here, not `.swiftinterface` files
- Don’t open the generated interface in `documentManager`. Opening documents in `documentManager` should only be done by the `textDocument/didOpen` notification from the LSP client. Otherwise we might indefinitely keep the document in the document manager
- After getting the generated interface from sourcekitd, close the document in sourcekitd again. We don’t provide semantic functionality in the generated interface yet, so we can’t interact with the generated interface path. Before, we left it open in sourcekitd indefinitely.
- A couple of code simplifications.

Fixes swiftlang#878
rdar://116705653
…l requirement, jump to the requirement

rdar://129412482
This avoids us from showing a work done progress for short-lived index tasks that take less than a second.

Fixes swiftlang#1298
rdar://128071328
…rement

When performing jump-to-definition on a method implementing a protocol requirement, jump to the requirement
Android: use the right setpriority() signature for Bionic
In some Swift 6 toolchains, the diagnostic about missing protocol requirements is emitted on the protocol in the inheritance clause instead of the conforming type. Relax a few assertions in the tests.
Also change a few log levels and make all log messages consistently start with an uppercase letter.
Add a document to describe which log level to use
…ment-positions-in-tests

Relax assertions about diagnostics from missing protocol requirements
…provements

A couple of improvements for generated interfaces
Enum case rename is fixed by changes in sourcekitd. We can remove our workaround for the issue and add test cases that test the rename behavior.

Fixes swiftlang#1228
rdar://127646036
Change all variables that are `Atomic*` types to not be `nonisolated(unsafe)`
Debounce the creation of work done progress for indexing and package reloading
Change methods that were only public for testing purposes to be `@_spi(Testing)`
The key issue here was that we were looking at the symbol occurrence that had the `overrideOf` role and were using this symbol occurrence to also check that it’s a child of one of the receiver types. But if the protocol requirement is satisfied in an extension, we have an implicit symbol occurrence at the location where the protocol requirement is stated but the real declaration’s occurrence is inside the extension. The fix here is to just extract the USR from the `overrideOf` relation and then do another index lookup to find the symbol’s definition.

rdar://129412428
…ic “Preparing targets”

The old implementation of inspecting the `InProgressPrepareForEditorTask` has a few race conditions including the fact that we would start the preparation task before the `inProgressPrepareForEditorTask` was set.

Instead, keep track of the purpose for each preparation task. This ends up simplifying the code as well.
If calls from `Debouncer` were scheduled every 0.5s but the debounce duration was 1s, we would always schedule the pending task and schedule a new one, never actually committing one. Debounce at most the debounce duration from the initially scheduled call.
These should help us figure out the root cause of rdar://129698768 if we hit it again.
ahoppen added 8 commits June 12, 2024 14:43
Rewrite how “Preparing current file” is differentiated from the generic “Preparing targets”
Adjust test cases for fixed enum case rename
…atisfied-in-extension

Show protocol requirements satisfied in extensions in jump-to-definition
…hain does not mark overridable function declarations as dynamic

This test requires swiftlang/swift#74080 and should be skipped if the host toolchain does not have that change.
…test

Skip `testJumpToSatisfiedProtocolRequirementInExtension` if the toolchain does not mark overridable function declarations as dynamic
@ahoppen ahoppen requested a review from bnbarham June 18, 2024 00:25
@ahoppen ahoppen requested a review from benlangmuir as a code owner June 18, 2024 00:25
@ahoppen
Copy link
Member Author

ahoppen commented Jun 18, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jun 18, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Jun 18, 2024

@ahoppen
Copy link
Member Author

ahoppen commented Jun 20, 2024

swiftlang/swift#74534
swiftlang/swift-syntax#2691

@swift-ci Please test Windows

@ahoppen ahoppen merged commit c557f16 into swiftlang:release/6.0 Jun 20, 2024
3 checks passed
@ahoppen ahoppen deleted the 6.0/merge-main-2024-06-17 branch June 20, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants