Skip to content

TSCBasic: mark Path-conforming types Sendable #361

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 1 commit into from
Nov 3, 2022
Merged
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: 4 additions & 4 deletions Sources/TSCBasic/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import var Foundation.NSLocalizedDescriptionKey
/// normalization, because it is normally the responsibility of the shell and
/// not the program being invoked (e.g. when invoking `cd ~`, it is the shell
/// that evaluates the tilde; the `cd` command receives an absolute path).
public struct AbsolutePath: Hashable {
public struct AbsolutePath: Hashable, Sendable {
/// Check if the given name is a valid individual path component.
///
/// This only checks with regard to the semantics enforced by `AbsolutePath`
Expand Down Expand Up @@ -231,7 +231,7 @@ public struct AbsolutePath: Hashable {
/// This string manipulation may change the meaning of a path if any of the
/// path components are symbolic links on disk. However, the file system is
/// never accessed in any way when initializing a RelativePath.
public struct RelativePath: Hashable {
public struct RelativePath: Hashable, Sendable {
/// Private implementation details, shared with the AbsolutePath struct.
fileprivate let _impl: PathImpl

Expand Down Expand Up @@ -462,7 +462,7 @@ extension Path {
}

#if os(Windows)
private struct WindowsPath: Path {
private struct WindowsPath: Path, Sendable {
let string: String

// NOTE: this is *NOT* a root path. It is a drive-relative path that needs
Expand Down Expand Up @@ -611,7 +611,7 @@ private struct WindowsPath: Path {
}
}
#else
private struct UNIXPath: Path {
private struct UNIXPath: Path, Sendable {
let string: String

static let root = Self(string: "/")
Expand Down