diff --git a/Package.swift b/Package.swift index 61688d6b..d65d8eb1 100644 --- a/Package.swift +++ b/Package.swift @@ -3,7 +3,7 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2021 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2021 - 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 @@ -53,6 +53,9 @@ var defines: [String] = [ ] var _settings: [SwiftSetting] = defines.map { .define($0) } +_settings += [ + .enableUpcomingFeature("MemberImportVisibility"), +] struct CustomTarget { enum Kind { diff --git a/Sources/BitCollections/BitArray/BitArray+BitwiseOperations.swift b/Sources/BitCollections/BitArray/BitArray+BitwiseOperations.swift index 2db5d961..8d43be7f 100644 --- a/Sources/BitCollections/BitArray/BitArray+BitwiseOperations.swift +++ b/Sources/BitCollections/BitArray/BitArray+BitwiseOperations.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2021 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2021 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + #if false // FIXME: Bitwise operators disabled for now. I have two concerns: // 1. We need to support bitwise operations over slices of bit arrays, not just diff --git a/Sources/BitCollections/BitArray/BitArray+Codable.swift b/Sources/BitCollections/BitArray/BitArray+Codable.swift index 18c765ed..bc4b9626 100644 --- a/Sources/BitCollections/BitArray/BitArray+Codable.swift +++ b/Sources/BitCollections/BitArray/BitArray+Codable.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2022 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2022 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitArray: Codable { /// Encodes this bit array into the given encoder. /// diff --git a/Sources/BitCollections/BitArray/BitArray+Initializers.swift b/Sources/BitCollections/BitArray/BitArray+Initializers.swift index 4bf604b4..7d80dd4f 100644 --- a/Sources/BitCollections/BitArray/BitArray+Initializers.swift +++ b/Sources/BitCollections/BitArray/BitArray+Initializers.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2021 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2021 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitArray { /// Initialize a bit array from a bit set. /// diff --git a/Sources/BitCollections/BitArray/BitArray+RandomBits.swift b/Sources/BitCollections/BitArray/BitArray+RandomBits.swift index f59ef36a..53bfd40d 100644 --- a/Sources/BitCollections/BitArray/BitArray+RandomBits.swift +++ b/Sources/BitCollections/BitArray/BitArray+RandomBits.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2022 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2022 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitArray { /// Create and return a new bit array consisting of `count` random bits, /// using the system random number generator. diff --git a/Sources/BitCollections/BitArray/BitArray+Testing.swift b/Sources/BitCollections/BitArray/BitArray+Testing.swift index bf0bcbf5..ce5ecd0d 100644 --- a/Sources/BitCollections/BitArray/BitArray+Testing.swift +++ b/Sources/BitCollections/BitArray/BitArray+Testing.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2021 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2021 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitArray { @_spi(Testing) public var _capacity: Int { diff --git a/Sources/BitCollections/BitSet/BitSet+BidirectionalCollection.swift b/Sources/BitCollections/BitSet/BitSet+BidirectionalCollection.swift index 30a57cce..59cc3366 100644 --- a/Sources/BitCollections/BitSet/BitSet+BidirectionalCollection.swift +++ b/Sources/BitCollections/BitSet/BitSet+BidirectionalCollection.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2021 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2021 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitSet: Sequence { /// The type representing the bit set's elements. /// Bit sets are collections of nonnegative integers. diff --git a/Sources/BitCollections/BitSet/BitSet+Random.swift b/Sources/BitCollections/BitSet/BitSet+Random.swift index 5e797792..d4758367 100644 --- a/Sources/BitCollections/BitSet/BitSet+Random.swift +++ b/Sources/BitCollections/BitSet/BitSet+Random.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2022 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2022 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitSet { public static func random(upTo limit: Int) -> BitSet { var rng = SystemRandomNumberGenerator() diff --git a/Sources/BitCollections/BitSet/BitSet+SetAlgebra basics.swift b/Sources/BitCollections/BitSet/BitSet+SetAlgebra basics.swift index a7a0f344..0190a38f 100644 --- a/Sources/BitCollections/BitSet/BitSet+SetAlgebra basics.swift +++ b/Sources/BitCollections/BitSet/BitSet+SetAlgebra basics.swift @@ -2,13 +2,15 @@ // // This source file is part of the Swift Collections open source project // -// Copyright (c) 2021 - 2024 Apple Inc. and the Swift project authors +// Copyright (c) 2021 - 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 // //===----------------------------------------------------------------------===// +import InternalCollectionsUtilities + extension BitSet { /// Returns a Boolean value that indicates whether the given element exists /// in the set.