// RUN: %empty-directory(%t.tmp) // mkdir %t.tmp/module-cache && mkdir %t.tmp/dummy.sdk // RUN: %api-digester -diagnose-sdk -module Swift -o %t.tmp/changes.txt -module-cache-path %t.tmp/module-cache -sdk %t.tmp/dummy.sdk -abi -avoid-location -v // RUN: %clang -E -P -x c %S/stability-stdlib-abi-without-asserts.test -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected // RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed -E -e '/^\s*$/d' -e 's/ in _[0-9A-F]{32}/ in #UNSTABLE ID#/g' | sort > %t.tmp/changes.txt.tmp // RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected %t.tmp/changes.txt.tmp // *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment below.) // Welcome, Build Wrangler! // // This file lists APIs that have recently changed in a way that potentially // indicates an ABI- or source-breaking problem. // // A failure in this test indicates that there is a potential breaking change in // the Standard Library. If you observe a failure outside of a PR test, please // reach out to the Standard Library team directly to make sure this gets // resolved quickly! If your own PR fails in this test, you probably have an // ABI- or source-breaking change in your commits. Please go and fix it. // // Please DO NOT DISABLE THIS TEST. In addition to ignoring the current set of // ABI breaks, XFAILing this test also silences any future ABI breaks that may // land on this branch, which simply generates extra work for the next person // that picks up the mess. // // Instead of disabling this test, you'll need to extend the list of expected // changes at the bottom. (You'll also need to do this if your own PR triggers // false positives, or if you have special permission to break things.) You can // find a diff of what needs to be added in the output of the failed test run. // The order of lines doesn't matter, and you can also include comments to refer // to any bugs you filed. // // Thank you for your help ensuring the stdlib remains compatible with its past! // -- Your friendly stdlib engineers // REQUIRES: swift_stdlib_no_asserts // *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.) // https://github.com/apple/swift/issues/55803 // We currently only have a baseline for Intel CPUs on macOS. // REQUIRES: OS=macosx && CPU=x86_64 // The digester can incorrectly register a generic signature change when // declarations are shuffled. rdar://problem/46618883 // UNSUPPORTED: swift_evolve // *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.) Func _prespecialize() is a new API without @available attribute Func _stdlib_isOSVersionAtLeastOrVariantVersionAtLeast(_:_:_:_:_:_:) is a new API without @available attribute Func _diagnoseUnavailableCodeReached() is a new API without @available attribute // These functions are not actually added to the ABI, but they had been a part of // the ABI exposed by the runtime library, so this is not breakage. // They are now referenced by @_extern(c) declarations in the standard library, but // api-digester cannot match them with the baseline symbols in the baseline runtime // library, which were not exposed by the baseline stdlib module. Func _swift_retainCount(_:) is a new API without @available attribute Func _swift_unownedRetainCount(_:) is a new API without @available attribute Func _swift_weakRetainCount(_:) is a new API without @available attribute Struct AnyHashable has added a conformance to an existing protocol _HasCustomAnyHashableRepresentation Class AnyKeyPath has added a conformance to an existing protocol CustomDebugStringConvertible Class KeyPath has added a conformance to an existing protocol CustomDebugStringConvertible Class PartialKeyPath has added a conformance to an existing protocol CustomDebugStringConvertible Class ReferenceWritableKeyPath has added a conformance to an existing protocol CustomDebugStringConvertible Class WritableKeyPath has added a conformance to an existing protocol CustomDebugStringConvertible Protocol CodingKey has added inherited protocol Sendable Protocol CodingKey has generic signature change from to Protocol Error has added inherited protocol Sendable Protocol Error has generic signature change from to Constructor _SmallString.init(taggedCocoa:) has mangled name changing from 'Swift._SmallString.init(taggedCocoa: Swift.AnyObject) -> Swift._SmallString' to 'Swift._SmallString.init(taggedCocoa: Swift.AnyObject) -> Swift.Optional' Constructor _SmallString.init(taggedCocoa:) has return type change from Swift._SmallString to Swift._SmallString? Enum Never has added a conformance to an existing protocol Decodable Enum Never has added a conformance to an existing protocol Encodable Enum Never has added a conformance to an existing protocol Identifiable // These functions haven't actually changed ABI, but are using @_silgen_name tricks to maintain the old ABI while moving to typed throws. Func AnyBidirectionalCollection.map(_:) has been renamed to Func __rethrows_map(_:) Func AnyBidirectionalCollection.map(_:) has mangled name changing from 'Swift.AnyBidirectionalCollection.map((A) throws -> A1) throws -> Swift.Array' to 'Swift.AnyBidirectionalCollection.__rethrows_map((A) throws -> A1) throws -> Swift.Array' Func AnyBidirectionalCollection.map(_:) is now without @rethrows Func AnyCollection.map(_:) has been renamed to Func __rethrows_map(_:) Func AnyCollection.map(_:) has mangled name changing from 'Swift.AnyCollection.map((A) throws -> A1) throws -> Swift.Array' to 'Swift.AnyCollection.__rethrows_map((A) throws -> A1) throws -> Swift.Array' Func AnyCollection.map(_:) is now without @rethrows Func AnyRandomAccessCollection.map(_:) has been renamed to Func __rethrows_map(_:) Func AnyRandomAccessCollection.map(_:) has mangled name changing from 'Swift.AnyRandomAccessCollection.map((A) throws -> A1) throws -> Swift.Array' to 'Swift.AnyRandomAccessCollection.__rethrows_map((A) throws -> A1) throws -> Swift.Array' Func AnyRandomAccessCollection.map(_:) is now without @rethrows Func AnySequence.map(_:) has been renamed to Func __rethrows_map(_:) Func AnySequence.map(_:) has mangled name changing from 'Swift.AnySequence.map((A) throws -> A1) throws -> Swift.Array' to 'Swift.AnySequence.__rethrows_map((A) throws -> A1) throws -> Swift.Array' Func AnySequence.map(_:) is now without @rethrows Func Sequence.map(_:) has been renamed to Func __rethrows_map(_:) Func Sequence.map(_:) has mangled name changing from '(extension in Swift):Swift.Sequence.map((A.Element) throws -> A1) throws -> Swift.Array' to '(extension in Swift):Swift.Sequence.__rethrows_map((A.Element) throws -> A1) throws -> Swift.Array' Func Sequence.map(_:) is now without @rethrows Func Collection.map(_:) has been renamed to Func __rethrows_map(_:) Func Collection.map(_:) has mangled name changing from '(extension in Swift):Swift.Collection.map((A.Element) throws -> A1) throws -> Swift.Array' to '(extension in Swift):Swift.Collection.__rethrows_map((A.Element) throws -> A1) throws -> Swift.Array' Func Collection.map(_:) is now without @rethrows Constructor Result.init(__abi_catching:) is a new API without @available attribute Constructor Result.init(catching:) has been removed Func Result.get() has been renamed to Func __abi_get() Func Result.get() has mangled name changing from 'Swift.Result.get() throws -> A' to 'Swift.Result.__abi_get() throws -> A' Func withUnsafePointer(to:_:) has been renamed to Func __abi_withUnsafePointer(to:_:) Func withUnsafePointer(to:_:) has mangled name changing from 'Swift.withUnsafePointer(to: A, _: (Swift.UnsafePointer) throws -> B) throws -> B' to 'Swift.__abi_withUnsafePointer(to: A, _: (Swift.UnsafePointer) throws -> B) throws -> B' Func withUnsafePointer(to:_:) is now without @rethrows Func withoutActuallyEscaping(_:do:) has been renamed to Func __abi_withoutActuallyEscaping(_:do:) Func withoutActuallyEscaping(_:do:) has mangled name changing from 'Swift.withoutActuallyEscaping(_: A, do: (A) throws -> B) throws -> B' to 'Swift.__abi_withoutActuallyEscaping(_: A, do: (A) throws -> B) throws -> B' Func withoutActuallyEscaping(_:do:) is now without @rethrows Func _openExistential(_:do:) has been renamed to Func __abi_openExistential(_:do:) Func _openExistential(_:do:) has mangled name changing from 'Swift._openExistential(_: A, do: (B) throws -> C) throws -> C' to 'Swift.__abi_openExistential(_: A, do: (B) throws -> C) throws -> C' Func _openExistential(_:do:) is now without @rethrows // These haven't actually been removed; they are simply marked unavailable. // This seems to be a false positive in the ABI checker. This is not an ABI // break because the symbols are still present, and is not a source break // because FixedWidthInteger still has these operations. Func SignedInteger.&+(_:_:) has been removed Func SignedInteger.&-(_:_:) has been removed // The GenericSignatureBuilder would produce redundant same-type requirements in the minimized signature; these are now gone. Protocol Collection has generic signature change from to Protocol StringProtocol has generic signature change from to // These haven't actually been removed; they were replaced with @_alwaysEmitIntoClient // alternatives. The old silgen-name entry point was preserved under an alternative // source-level name. This causes a false positive with the ABI checker. // The symbols are still present at the ABI level. The symbols are also still present // at the source level. The association between them is simply no longer straightforward. Func UnsafeBufferPointer.withMemoryRebound(to:_:) has been removed Func UnsafeMutableBufferPointer.withMemoryRebound(to:_:) has been removed Func UnsafeMutablePointer.withMemoryRebound(to:capacity:_:) has been removed Func UnsafePointer.withMemoryRebound(to:capacity:_:) has been removed Func _AnySequenceBox._map(_:) is now without @rethrows Func _BidirectionalCollectionBox._map(_:) is now without @rethrows Func _CollectionBox._map(_:) is now without @rethrows Func _RandomAccessCollectionBox._map(_:) is now without @rethrows Func _SequenceBox._map(_:) is now without @rethrows Func UnsafeMutableRawBufferPointer.storeBytes(of:toByteOffset:as:) has been removed Func UnsafeMutableRawPointer.storeBytes(of:toByteOffset:as:) has been removed Func UnsafeMutableBufferPointer.assign(repeating:) has been removed Func UnsafeMutableBufferPointer.update(repeating:) is a new API without @available attribute Func UnsafeMutablePointer.assign(from:count:) has been removed Func UnsafeMutablePointer.update(from:count:) is a new API without @available attribute Func UnsafeMutablePointer.assign(repeating:count:) has been removed Func UnsafeMutablePointer.update(repeating:count:) is a new API without @available attribute Func UnsafeMutablePointer.moveAssign(from:count:) has been removed Func UnsafeMutablePointer.moveUpdate(from:count:) is a new API without @available attribute // These haven't actually been removed; they were renamed at the source level while // retaining their old mangled name. The source break was accepted as part of se-0370. Func UnsafeMutableBufferPointer.initialize(from:) has mangled name changing from 'Swift.UnsafeMutableBufferPointer.initialize(from: A1) -> (A1.Iterator, Swift.Int)' to 'Swift.UnsafeMutableBufferPointer.initialize(from: A1) -> (unwritten: A1.Iterator, index: Swift.Int)' Func UnsafeMutableBufferPointer.initialize(from:) has return type change from (τ_1_0.Iterator, Swift.Int) to (unwritten: τ_1_0.Iterator, index: Swift.Int) // This hasn't actually been removed; it was renamed at the source level while // retaining its old mangled/silgen name. The old source-level name is preserved // as an @_alwaysEmitIntoClient function. The source break was accepted as part of se-0405. Constructor String.init(validatingCString:) is a new API without @available attribute Constructor String.init(validatingUTF8:) has been removed // These haven't actually been removed; they are simply marked unavailable. // This seems to be a false positive in the ABI checker. This is not an ABI // break because the symbols are still present. Var _StringGuts._isContiguousUTF16 has been removed Var _StringGuts.startUTF16 has been removed Func _persistCString(_:) has been removed // These functions have not been renamed, they are pre-specialized versions and purely additive. // These seem to be false positives in the ABI checker. The original symbols are still present. Func Array._createNewBuffer(bufferIsUnique:minimumCapacity:growForAppend:) has been renamed to Func __specialize_class__createNewBuffer(bufferIsUnique:minimumCapacity:growForAppend:) Func Array._createNewBuffer(bufferIsUnique:minimumCapacity:growForAppend:) has mangled name changing from 'Swift.Array._createNewBuffer(bufferIsUnique: Swift.Bool, minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> ()' to 'Swift.Array.__specialize_class__createNewBuffer(bufferIsUnique: Swift.Bool, minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> ()' Func ContiguousArray._createNewBuffer(bufferIsUnique:minimumCapacity:growForAppend:) has been renamed to Func __specialize_class__createNewBuffer(bufferIsUnique:minimumCapacity:growForAppend:) Func ContiguousArray._createNewBuffer(bufferIsUnique:minimumCapacity:growForAppend:) has mangled name changing from 'Swift.ContiguousArray._createNewBuffer(bufferIsUnique: Swift.Bool, minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> ()' to 'Swift.ContiguousArray.__specialize_class__createNewBuffer(bufferIsUnique: Swift.Bool, minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> ()' Func ContiguousArray._reserveCapacityImpl(minimumCapacity:growForAppend:) has been renamed to Func __specialize_class__reserveCapacityImpl(minimumCapacity:growForAppend:) Func ContiguousArray._reserveCapacityImpl(minimumCapacity:growForAppend:) has mangled name changing from 'Swift.ContiguousArray._reserveCapacityImpl(minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> ()' to 'Swift.ContiguousArray.__specialize_class__reserveCapacityImpl(minimumCapacity: Swift.Int, growForAppend: Swift.Bool) -> ()' // This hasn't actually been changed, but it seems the ABI checker gives a false positive here and detects // it as a removal with the addition of the RangeSet subscripts Subscript MutableCollection.subscript(_:) has been removed Protocol SIMD has added inherited protocol _BitwiseCopyable Protocol SIMDScalar has added inherited protocol _BitwiseCopyable Protocol SIMDScalar has generic signature change from to Protocol SIMDStorage has added inherited protocol _BitwiseCopyable Protocol SIMDStorage has generic signature change from to Protocol _Pointer has added inherited protocol _BitwiseCopyable Protocol _Pointer has generic signature change from to Protocol FixedWidthInteger has added inherited protocol _BitwiseCopyable Protocol FixedWidthInteger has generic signature change from to // *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)