Skip to content

Remove all available 9999 now that 10.15, iOS 13, etc are public. #25230

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

Closed
Closed
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
12 changes: 6 additions & 6 deletions stdlib/public/Darwin/Compression/Compression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
@_exported import Compression

/// Compression algorithms, wraps the C API constants.
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum Algorithm: CaseIterable, RawRepresentable {

/// LZFSE
Expand Down Expand Up @@ -51,7 +51,7 @@ public enum Algorithm: CaseIterable, RawRepresentable {
}

/// Compression filter direction of operation, compress/decompress
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum FilterOperation: RawRepresentable {

/// Compress raw data to a compressed payload
Expand All @@ -77,7 +77,7 @@ public enum FilterOperation: RawRepresentable {
}

/// Compression errors
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public enum FilterError: Error {

/// Filter failed to initialize,
Expand All @@ -90,7 +90,7 @@ public enum FilterError: Error {
case invalidData
}

@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension compression_stream {

/// Initialize a compression_stream struct
Expand All @@ -112,7 +112,7 @@ extension compression_stream {
}
}

@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public class OutputFilter {
private var _stream: compression_stream
private var _buf: UnsafeMutablePointer<UInt8>
Expand Down Expand Up @@ -226,7 +226,7 @@ public class OutputFilter {

}

@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public class InputFilter<D: DataProtocol> {

// Internal buffer to read bytes from a DataProtocol implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@_exported import Foundation // Clang module

// CollectionDifference<ChangeElement>.Change is conditionally bridged to NSOrderedCollectionChange
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference.Change : _ObjectiveCBridgeable {
@_semantics("convertToObjectiveC")
public func _bridgeToObjectiveC() -> NSOrderedCollectionChange {
Expand Down Expand Up @@ -66,7 +66,7 @@ extension CollectionDifference.Change : _ObjectiveCBridgeable {
}

// CollectionDifference<ChangeElement> is conditionally bridged to NSOrderedCollectionDifference
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference : _ObjectiveCBridgeable {
@_semantics("convertToObjectiveC")
public func _bridgeToObjectiveC() -> NSOrderedCollectionDifference {
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/Darwin/Foundation/NSRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ extension Range where Bound == String.Index {
_ range: NSRange, _genericIn string: __shared S
) {
// Corresponding stdlib version
guard #available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *) else {
guard #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) else {
fatalError()
}
let u = string.utf16
Expand All @@ -195,7 +195,7 @@ extension Range where Bound == String.Index {
public init?(_ range: NSRange, in string: __shared String) {
self.init(range, _genericIn: string)
}
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public init?<S: StringProtocol>(_ range: NSRange, in string: __shared S) {
self.init(range, _genericIn: string)
}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Darwin/Network/NWConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public final class NWConnection : CustomDebugStringConvertible {
/// Retrieve the maximum datagram size that can be sent
/// on the connection. Any datagrams sent should be less
/// than or equal to this size.
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public var maximumDatagramSize: Int {
get {
return Int(nw_connection_get_maximum_datagram_size(self.nw))
Expand Down
42 changes: 41 additions & 1 deletion stdlib/public/core/CollectionDifference.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/// A collection of insertions and removals that describe the difference
/// between two ordered collection states.
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public struct CollectionDifference<ChangeElement> {
/// A single change to a collection.
@frozen
Expand Down Expand Up @@ -222,7 +222,11 @@ public struct CollectionDifference<ChangeElement> {
/// }
/// }
/// ```
<<<<<<< HEAD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably wasn't intended to be committed. There are a few of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I’m reworking some of this anyway to minimize the churn.

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference: Collection {
public typealias Element = Change

Expand Down Expand Up @@ -270,7 +274,11 @@ extension CollectionDifference: Collection {
}
}

<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference.Index: Equatable {
@inlinable
public static func == (
Expand All @@ -281,7 +289,11 @@ extension CollectionDifference.Index: Equatable {
}
}

<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference.Index: Comparable {
@inlinable
public static func < (
Expand All @@ -292,14 +304,19 @@ extension CollectionDifference.Index: Comparable {
}
}

<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference.Index: Hashable {
@inlinable
public func hash(into hasher: inout Hasher) {
hasher.combine(_offset)
}
}

<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
extension CollectionDifference.Change: Equatable where ChangeElement: Equatable {}

Expand All @@ -313,6 +330,21 @@ extension CollectionDifference.Change: Hashable where ChangeElement: Hashable {}
extension CollectionDifference: Hashable where ChangeElement: Hashable {}

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference.Change: Equatable where ChangeElement: Equatable {}

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference: Equatable where ChangeElement: Equatable {}

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference.Change: Hashable where ChangeElement: Hashable {}

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference: Hashable where ChangeElement: Hashable {}

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference where ChangeElement: Hashable {
/// Returns a new collection difference with associations between individual
/// elements that have been removed and inserted only once.
Expand Down Expand Up @@ -369,7 +401,11 @@ extension CollectionDifference where ChangeElement: Hashable {
}
}

<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference.Change: Codable where ChangeElement: Codable {
private enum _CodingKeys: String, CodingKey {
case offset
Expand Down Expand Up @@ -406,5 +442,9 @@ extension CollectionDifference.Change: Codable where ChangeElement: Codable {
}
}

<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
extension CollectionDifference: Codable where ChangeElement: Codable {}
14 changes: 13 additions & 1 deletion stdlib/public/core/Diffing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// MARK: Diff application to RangeReplaceableCollection

@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CollectionDifference {
fileprivate func _fastEnumeratedApply(
_ consume: (Change) -> Void
Expand Down Expand Up @@ -64,7 +64,11 @@ extension RangeReplaceableCollection {
///
/// - Complexity: O(*n* + *c*), where *n* is `self.count` and *c* is the
/// number of changes contained by the parameter.
<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
public func applying(_ difference: CollectionDifference<Element>) -> Self? {
var result = Self()
var enumeratedRemoves = 0
Expand Down Expand Up @@ -130,7 +134,11 @@ extension BidirectionalCollection {
/// - Complexity: Worst case performance is O(*n* * *m*), where *n* is the
/// count of this collection and *m* is `other.count`. You can expect
/// faster execution when the collections share many common elements.
<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
public func difference<C: BidirectionalCollection>(
from other: C,
by areEquivalent: (C.Element, Element) -> Bool
Expand All @@ -157,7 +165,11 @@ extension BidirectionalCollection where Element : Equatable {
/// count of this collection and *m* is `other.count`. You can expect
/// faster execution when the collections share many common elements, or
/// if `Element` conforms to `Hashable`.
<<<<<<< HEAD
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
=======
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
>>>>>>> Replace 9999 availability in stdlib
public func difference<C: BidirectionalCollection>(
from other: C
) -> CollectionDifference<Element> where C.Element == Self.Element {
Expand Down
6 changes: 3 additions & 3 deletions stdlib/public/core/MathFunctions.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import SwiftShims
/// ElementaryFunctions and FloatingPoint.
///
/// [elfn]: http://en.wikipedia.org/wiki/Elementary_function
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol ElementaryFunctions {

%for func in ElementaryFunctions:
Expand Down Expand Up @@ -125,7 +125,7 @@ extension ${Self}: ElementaryFunctions {
% end
%end

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension SIMD where Scalar: ElementaryFunctions {
% for func in ElementaryFunctions:

Expand Down Expand Up @@ -168,6 +168,6 @@ extension SIMD where Scalar: ElementaryFunctions {
}

%for n in [2,3,4,8,16,32,64]:
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension SIMD${n}: ElementaryFunctions where Scalar: ElementaryFunctions { }
%end
2 changes: 1 addition & 1 deletion stdlib/public/core/StringIndexConversions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ extension String.Index {
/// `sourcePosition` must be a valid index of at least one of the views
/// of `target`.
/// - target: The string referenced by the resulting index.
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public init?<S: StringProtocol>(
_ sourcePosition: String.Index, within target: S
) {
Expand Down
6 changes: 3 additions & 3 deletions stdlib/public/core/UnicodeScalar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ extension Unicode.Scalar.UTF16View : RandomAccessCollection {
}

extension Unicode.Scalar {
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@frozen
public struct UTF8View {
@inlinable
Expand All @@ -446,12 +446,12 @@ extension Unicode.Scalar {
internal var value: Unicode.Scalar
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@inlinable
public var utf8: UTF8View { return UTF8View(value: self) }
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Unicode.Scalar.UTF8View : RandomAccessCollection {
public typealias Indices = Range<Int>

Expand Down
12 changes: 6 additions & 6 deletions test/Interpreter/Inputs/dynamic_replacement_opaque1.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ extension Int: P {

}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
func bar(_ x: Int) -> some P {
return x
}

struct Container {
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
func bar(_ x: Int) -> some P {
return x
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
var computedProperty : some P {
get {
return 2
Expand All @@ -30,7 +30,7 @@ struct Container {
}
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
subscript(_ x: Int) -> some P {
get {
return 2
Expand All @@ -49,12 +49,12 @@ extension Int : Q {}

public protocol Assoc {
associatedtype A = Int
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
func act() -> A
}

struct Test : Assoc {
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
func act() -> some Q {
return 1
}
Expand Down
10 changes: 5 additions & 5 deletions test/Interpreter/Inputs/dynamic_replacement_opaque2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ struct Pair : P {
}
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@_dynamicReplacement(for:bar(_:))
func _replacement_bar(y x: Int) -> some P {
return Pair()
}

extension Container {
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@_dynamicReplacement(for:bar(_:))
func _replacement_bar(y x: Int) -> some P {
return Pair()
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@_dynamicReplacement(for: computedProperty)
var _replacement_computedProperty : some P {
get {
Expand All @@ -32,7 +32,7 @@ extension Container {
}
}

@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@_dynamicReplacement(for: subscript(_:))
subscript(y x: Int) -> some P {
get {
Expand All @@ -45,7 +45,7 @@ extension Container {
}

extension Test {
@available(macOS 9999, iOS 9999, tvOS 9999, watchOS 9999, *)
@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
@_dynamicReplacement(for: act)
func act_r() -> some Q {
return NewType()
Expand Down
Loading