Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2024 Apple Inc. and the Swift project authors
// Copyright (c) 2024-2025 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -9,7 +9,7 @@
import Foundation

/// A target that can have a documentation task in the build graph
protocol DocumentationBuildGraphTarget {
protocol DocumentationBuildGraphTarget: SendableMetatype {
typealias ID = String
/// The unique identifier of this target
var id: ID { get }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2025 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See https://swift.org/LICENSE.txt for license information
See https://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

// In Swift 6.2, metatypes are no longer sendable by default (SE-0470).
// Instead a type needs to conform to `SendableMetatype` to indicate that its metatype is sendable.
//
// However, `SendableMetatype` doesn't exist before Swift 6.1 so we define an internal alias to `Any` here.
// This means that conformances to `SendableMetatype` has no effect before 6.2 indicates metatype sendability in 6.2 onwards.
//
// Note: Adding a protocol requirement to a _public_ API is a breaking change.

#if compiler(<6.2)
typealias SendableMetatype = Any
#endif
2 changes: 1 addition & 1 deletion bin/check-source
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

function replace_acceptable_years() {
# this needs to replace all acceptable forms with 'YEARS'
sed -e 's/20[12][78901234]-20[12][8901234]/YEARS/' -e 's/20[12][8901234]/YEARS/'
sed -e 's/20[12][789012345]-20[12][89012345]/YEARS/' -e 's/20[12][89012345]/YEARS/'
}

printf "=> Checking for unacceptable language… "
Expand Down