// 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 Func Collection.removingSubranges(_:) has been removed Func Collection.subranges(of:) has been removed Func Collection.subranges(where:) has been removed Func MutableCollection.moveSubranges(_:to:) has been removed Func MutableCollection.removeSubranges(_:) has been removed Func RangeReplaceableCollection.removeSubranges(_:) has been removed 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 Struct DiscontiguousSlice has been removed Struct RangeSet has been removed Subscript Collection.subscript(_:) has been removed Subscript MutableCollection.subscript(_:) has been removed 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 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 Protocol SIMDScalar 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 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) // 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) -> ()' // *** DO NOT DISABLE OR XFAIL THIS TEST. *** (See comment above.)