Skip to content

Add two Sendable annotations to enable building SourceKit-LSP in Swift 6 mode #7553

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 2 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Sources/PackageLoading/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@ private func isAndroid() -> Bool {
(try? localFileSystem.isFile(AbsolutePath(validating: "/system/bin/toybox"))) ?? false
}

public enum Platform: Equatable {
public enum Platform: Equatable, Sendable {
case android
case darwin
case linux(LinuxFlavor)
case windows

/// Recognized flavors of linux.
public enum LinuxFlavor: Equatable {
public enum LinuxFlavor: Equatable, Sendable {
case debian
case fedora
}
}

extension Platform {
// This is not just a computed property because the ToolchainRegistryTests
// change the value.
public static var current: Platform? = {
public static let current: Platform? = {
#if os(Windows)
return .windows
#else
Expand Down
2 changes: 1 addition & 1 deletion Sources/PackageLoading/TargetSourcesBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ public struct TargetSourcesBuilder {
}

/// Describes a rule for including a source or resource file in a target.
public struct FileRuleDescription {
public struct FileRuleDescription: Sendable {
/// A rule semantically describes a file/directory in a target.
///
/// It is up to the build system to translate a rule into a build command.
Expand Down