-
Notifications
You must be signed in to change notification settings - Fork 276
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
#1301
Merged
ahoppen
merged 68 commits into
swiftlang:release/6.0
from
ahoppen:6.0/merge-main-2024-05-14
May 15, 2024
Merged
Merge main
into release/6.0
#1301
ahoppen
merged 68 commits into
swiftlang:release/6.0
from
ahoppen:6.0/merge-main-2024-05-14
May 15, 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
Implements an initial background index when the project is opened. The following will be implemented in follow-up PRs: - Resolving package dependencies - Preparing dependent modules - Watching for file updates
… different unit files
Windows has `ProcessResult.ExitStatus.abnormal` instead of ` `ProcessResult.ExitStatus.signalled`
…ildSystem` has build settings for Previously, `SwiftPMBuildSystem` would report `.unhandled` as the file handling capability for `Package.swift`. In single workspace-folder setups, this was not an issue because we would always default to using the build system of the first/only workspace folder, which was the only `SwiftPMBuildSystem` and then returned compiler arguments despite saying that it couldn’t handle `Package.swift`. This, however, breaks if you have a setup with multi workspace folders, where we can’t rely on the first workspace folder being able to provide build settings for the package manifest. To fix this, report `.handled` file handling capability for all files that `SwiftPMBuildSystem` can compute build settings for. Fixes swiftlang#1210 rdar://127351614
`ModulesGraph.init` was changed by swiftlang/swift-package-manager#7530 to accept `packages` as a way to avoid having to recompute the full list of packages by walking roots.
Merge the XCTests and swift-testing tests defined in extensions into their parent TestItems. This is done as another pass after the TestScanner visitors have walked the tree. Fixes swiftlang#1218
Sort the list of test items prioritizing those defined in the originating type definition over those in extensions.
…actor-with-swift-testing
Return `fileHandlingCapability.handled` for all files that `SwiftPMBuildSystem` has build settings for
Implement initial background indexing of a project
I forgot to push these changes before merging the original PR.
…nstead of a public extension
…hange Adopt SwiftPM ModulesGraph initializer API adjustment
Addresses a few minor comments and the following major ones: - Add test cases for the syntax refactorings - Don’t report code actions for refactorings that don’t actually modify the source - Instead of just looking at the parent of the token of the selected range, walk up the syntax tree to find the syntax node to refactor. This makes the refactorings available in a lot more locations.
…eclaration’s trivia This meant that if there were two newlines before the declaration, the documentation would be separated to the declaration by one newline and if the declaration was at the start of a line, the declaration would be on the same line as the doc comment, effectively making the documentation part of a comment.
…not on a new line
Instead of asking for build settings of a file, the build system manager asks for the targets of a file and then asks for the build settings of that file in a specific target. This has two advantages: - We know about targets and can prepare the targets for background indexing - Once we support build systems in which a single file can be part of multiple targets, we can have a centralized place that picks preferred targets for a file, eg. based on user configuration
Fix PR comments to bug report issue template
Details from swiftlang#1271 > Amazon Linux 2 and CentOS 7 have a glibc that doesn’t support `posix_spawn_file_actions_addchdir_np` and thus `TSCBasic.Process` can’t launch a process on these platforms with the working directory set. We currently fall back to launching the index tasks without a working directory on these platforms, which I think is fine because SwiftPM gives us compiler arguments with absolute paths. But we should figure something out. > > Using `Foundation.Process` is not an option because it runs `chdir` on the current process for Posix platforms, which is racy if there are multiple subprocesses being spawned simultaneously. On Windows `TSCBasic.Processs` uses `Foundation.Process` and `Foundation.Process` properly set the working directory of the subprocesses on Windows, so Windows is not a problem. rdar://127797048
Introduce a notion of `ConfiguredTargets` into the build system
…ments Address my own review comments to swiftlang#1179
Fall back to launching subprocesses without a working directory
Index clang files
…6-mode Make the `SourceKitLSP` module build in Swift 6 mode
This simplifies the implementation.
This fixes a bug where `indexTaskDidFinish` would also get called when a task is cancelled to be rescheduled.
…lback This follows the general paradigm that callbacks shouldn’t carry much state and instead only notify an observer that state has changed, which the observer can then poll.
…an be executed before SourceKit-LSP is initialized
…o be executed in any order
This makes it a lot easier to work on background indexing because you can easily see how background indexing is making progress. Resolves swiftlang#1257 rdar://127474057
…>=5.11)` Fixes a build failure when building SourceKit-LSP using Xcode 15.4.
This allows me to test background indexing more easily locally as it matures. It is still experimental and may contain bugs. Fixes swiftlang#1256 rdar://127474761
The fact that they are coming from a service named `sourcekitd` should be an implentation detail of SourceKit-LSP and shouldn’t be exposed to users. Use the generic `SourceKit` term, which is vague about which SourceKit the diagnostics are coming from.
Add a work done progress that shows the index progress
Guard `@retroactive` for `CommandConfiguration` behind `#if compiler(>=5.11)`
…exing-command-line-flag Add a command-line option to enable background indexing
Change compiler’s diagnostic provider name to `SourceKit`
This reverts commit ed61630.
This reverts commit c5699fb.
swiftlang/swift-package-manager#7562 @swift-ci Please test |
bnbarham
approved these changes
May 15, 2024
@swift-ci Please test macOS |
swiftlang/swift-package-manager#7562 @swift-ci Please test macOS |
swiftlang/swift-package-manager#7562 @swift-ci Please test Linux |
ahoppen
changed the title
Merge
Merge May 15, 2024
main
into release/6.0
🚥 swift-package-manager#7562main
into release/6.0
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 into
release/6.0
:fileHandlingCapability.handled
for all files thatSwiftPMBuildSystem
has build settings for #1232ConfiguredTargets
into the build system #1249Diagnose
module build in Swift 6 mode #1293SourceKitLSP
module build in Swift 6 mode #1292