Skip to content

[stdlib] Start adopting noncopyable generics in the stdlib (phase 1) #72125

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
wants to merge 19 commits into from

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Mar 6, 2024

This is a subset of #71688 that concentrates on the basics:

  • MemoryLayout
  • UnsafePointer
  • UnsafeMutablePointer
  • Optional
  • ExpressibleByNilLiteral

@lorentey lorentey added the swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review label Mar 6, 2024
@lorentey lorentey changed the title [stdlib] Start adopting noncopyable generics in the stdlib [stdlib] Start adopting noncopyable generics in the stdlib (phase 1) Mar 6, 2024
@Azoy
Copy link
Contributor

Azoy commented Mar 6, 2024

The _rawValue stored property on the typed pointers will need a @_preInverseGenerics.

@Azoy
Copy link
Contributor

Azoy commented Mar 6, 2024

@swift-ci please build toolchain macOS

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

Test failures are down to 656 now (from 793 in #71688) -- still way too much for comfort.

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

Symbol diffs as of 84983c6:

******************** TEST 'Swift(macosx-arm64) :: abi/macOS/arm64/stdlib.swift' FAILED ********************
Script:
--
: 'RUN: at line 1';   rm -rf "/Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/test-macosx-arm64/abi/macOS/arm64/Output/stdlib.swift.tmp" && mkdir -p "/Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/test-macosx-arm64/abi/macOS/arm64/Output/stdlib.swift.tmp"
: 'RUN: at line 2';   /Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/llvm-macosx-arm64/bin/llvm-nm -g --defined-only -f just-symbols /Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/lib/swift/macosx/arm64/libswiftCore.dylib > /Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/test-macosx-arm64/abi/macOS/arm64/Output/stdlib.swift.tmp/symbols
: 'RUN: at line 3';   /Applications/Xcode-MAS.app/Contents/Developer/usr/bin/python3 /Users/klorentey/Swift/swift/utils/swift-abi-symbol-checker.py /Users/klorentey/Swift/swift/test/abi/macOS/arm64/stdlib.swift /Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/test-macosx-arm64/abi/macOS/arm64/Output/stdlib.swift.tmp/symbols
: 'RUN: at line 4';   diff -u /Users/klorentey/Swift/swift/test/abi/macOS/arm64/../../Inputs/macOS/arm64/stdlib/baseline /Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/test-macosx-arm64/abi/macOS/arm64/Output/stdlib.swift.tmp/symbols
--
Exit Code: 1

Command Output (stdout):
--
--- /Users/klorentey/Swift/swift/test/abi/macOS/arm64/../../Inputs/macOS/arm64/stdlib/baseline	2024-02-12 15:12:09.505791523 -0800
+++ /Users/klorentey/Swift/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-arm64/test-macosx-arm64/abi/macOS/arm64/Output/stdlib.swift.tmp/symbols	2024-03-06 15:39:00.831432774 -0800
@@ -1045,45 +1045,43 @@
 _$sSOySOypXpcfC
 _$sSP10deallocateyyF
 _$sSP16_cVarArgEncodingSaySiGvg
-_$sSP16_cVarArgEncodingSaySiGvpMV
 _$sSP17withMemoryRebound2to8capacity_qd_0_qd__m_Siqd_0_SPyqd__GKXEtKr0_lF
 _$sSP25customPlaygroundQuickLooks01_bcD0Ovg
 _$sSP25customPlaygroundQuickLooks01_bcD0OvpMV
 _$sSP4_maxSPyxGvgZ
-_$sSP7pointeexvg
 _$sSP7pointeexvlu
-_$sSP7pointeexvpMV
+_$sSP7pointeexvr
 _$sSP9_rawValueBpvg
-_$sSP9_rawValueBpvpMV
-_$sSP9hashValueSivg
-_$sSP9hashValueSivpMV
 _$sSPMa
 _$sSPMn
+_$sSPsRiczrlE16_cVarArgEncodingSaySiGvpMV
+_$sSPsRiczrlE9_rawValueBpvpMV
+_$sSPsRiczrlE9hashValueSivg
+_$sSPsRiczrlE9hashValueSivpMV
 _$sSPss4Int8VRszlE8_asUInt8SPys0C0VGvg
 _$sSPss4Int8VRszlE8_asUInt8SPys0C0VGvpMV
 _$sSPss5UInt8VRszlE8_asCCharSPys4Int8VGvg
 _$sSPss5UInt8VRszlE8_asCCharSPys4Int8VGvpMV
 _$sSPySPyxGBpcfC
-_$sSPyxGSHsMc
-_$sSPyxGSHsWP
-_$sSPyxGSLsMc
-_$sSPyxGSLsWP
-_$sSPyxGSQsMc
-_$sSPyxGSQsWP
-_$sSPyxGSxsMc
-_$sSPyxGSxsWP
-_$sSPyxGs17CustomReflectablesMc
-_$sSPyxGs17CustomReflectablesWP
-_$sSPyxGs28CustomDebugStringConvertiblesMc
-_$sSPyxGs28CustomDebugStringConvertiblesWP
+_$sSPyxGSHsRiczrlMc
+_$sSPyxGSHsRiczrlWP
+_$sSPyxGSLsRiczrlMc
+_$sSPyxGSLsRiczrlWP
+_$sSPyxGSQsRiczrlMc
+_$sSPyxGSQsRiczrlWP
+_$sSPyxGSxsRiczrlMc
+_$sSPyxGSxsRiczrlWP
+_$sSPyxGs17CustomReflectablesRiczrlMc
+_$sSPyxGs17CustomReflectablesRiczrlWP
+_$sSPyxGs28CustomDebugStringConvertiblesRiczrlMc
+_$sSPyxGs28CustomDebugStringConvertiblesRiczrlWP
 _$sSPyxGs30_CustomPlaygroundQuickLookablesMc
 _$sSPyxGs30_CustomPlaygroundQuickLookablesWP
-_$sSPyxGs7CVarArgsMc
-_$sSPyxGs7CVarArgsWP
-_$sSPyxGs8_PointersMc
-_$sSPyxSicig
+_$sSPyxGs7CVarArgsRiczrlMc
+_$sSPyxGs7CVarArgsRiczrlWP
+_$sSPyxGs8_PointersRiczrlMc
 _$sSPyxSicilu
-_$sSPyxSicipMV
+_$sSPyxSicir
 _$sSQ2eeoiySbx_xtFZTj
 _$sSQ2eeoiySbx_xtFZTq
 _$sSQMp
@@ -3396,12 +3394,10 @@
 _$sSp10initialize4from5countySPyxG_SitF
 _$sSp10initialize4fromyqd___t7ElementQyd__RszSlRd__lF
 _$sSp10initialize9repeating5countyx_SitF
-_$sSp10moveAssign4from5countySpyxG_SitF
+_$sSp10moveUpdate4from5countySpyxG_SitF
 _$sSp12deinitialize5countSvSi_tF
 _$sSp12deinitializeSvyF
-_$sSp14moveInitialize4from5countySpyxG_SitF
 _$sSp16_cVarArgEncodingSaySiGvg
-_$sSp16_cVarArgEncodingSaySiGvpMV
 _$sSp17withMemoryRebound2to8capacity_qd_0_qd__m_Siqd_0_Spyqd__GKXEtKr0_lF
 _$sSp25customPlaygroundQuickLooks01_bcD0Ovg
 _$sSp25customPlaygroundQuickLooks01_bcD0OvpMV
@@ -3411,44 +3407,43 @@
 _$sSp6assign9repeating5countyx_SitF
 _$sSp7pointeexvM
 _$sSp7pointeexvau
-_$sSp7pointeexvg
 _$sSp7pointeexvlu
-_$sSp7pointeexvpMV
+_$sSp7pointeexvr
 _$sSp7pointeexvs
 _$sSp8allocate8capacitySpyxGSi_tFZ
 _$sSp8mutatingSpyxGSPyxG_tcfC
 _$sSp8mutatingSpyxGSgSPyxGSg_tcfC
 _$sSp9_rawValueBpvg
-_$sSp9_rawValueBpvpMV
-_$sSp9hashValueSivg
-_$sSp9hashValueSivpMV
 _$sSpMa
 _$sSpMn
+_$sSpsRiczrlE16_cVarArgEncodingSaySiGvpMV
+_$sSpsRiczrlE9_rawValueBpvpMV
+_$sSpsRiczrlE9hashValueSivg
+_$sSpsRiczrlE9hashValueSivpMV
 _$sSpySpyxGAAcfC
 _$sSpySpyxGBpcfC
 _$sSpySpyxGSgABcfC
-_$sSpyxGSHsMc
-_$sSpyxGSHsWP
-_$sSpyxGSLsMc
-_$sSpyxGSLsWP
-_$sSpyxGSQsMc
-_$sSpyxGSQsWP
-_$sSpyxGSxsMc
-_$sSpyxGSxsWP
-_$sSpyxGs17CustomReflectablesMc
-_$sSpyxGs17CustomReflectablesWP
-_$sSpyxGs28CustomDebugStringConvertiblesMc
-_$sSpyxGs28CustomDebugStringConvertiblesWP
+_$sSpyxGSHsRiczrlMc
+_$sSpyxGSHsRiczrlWP
+_$sSpyxGSLsRiczrlMc
+_$sSpyxGSLsRiczrlWP
+_$sSpyxGSQsRiczrlMc
+_$sSpyxGSQsRiczrlWP
+_$sSpyxGSxsRiczrlMc
+_$sSpyxGSxsRiczrlWP
+_$sSpyxGs17CustomReflectablesRiczrlMc
+_$sSpyxGs17CustomReflectablesRiczrlWP
+_$sSpyxGs28CustomDebugStringConvertiblesRiczrlMc
+_$sSpyxGs28CustomDebugStringConvertiblesRiczrlWP
 _$sSpyxGs30_CustomPlaygroundQuickLookablesMc
 _$sSpyxGs30_CustomPlaygroundQuickLookablesWP
-_$sSpyxGs7CVarArgsMc
-_$sSpyxGs7CVarArgsWP
-_$sSpyxGs8_PointersMc
+_$sSpyxGs7CVarArgsRiczrlMc
+_$sSpyxGs7CVarArgsRiczrlWP
+_$sSpyxGs8_PointersRiczrlMc
 _$sSpyxSiciM
 _$sSpyxSiciau
-_$sSpyxSicig
 _$sSpyxSicilu
-_$sSpyxSicipMV
+_$sSpyxSicir
 _$sSpyxSicis
 _$sSq10nilLiteralxSgyt_tcfC
 _$sSq12customMirrors0B0Vvg
@@ -8306,8 +8301,8 @@
 _$ss23CustomStringConvertibleP11descriptionSSvgTq
 _$ss23CustomStringConvertibleTL
 _$ss23ExpressibleByNilLiteralMp
-_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcfCTj
-_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcfCTq
+_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcRiczrlufCTj
+_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcRiczrlufCTq
 _$ss23ExpressibleByNilLiteralTL
 _$ss23LazyPrefixWhileSequenceV10_predicateySb7ElementQzcvg
 _$ss23LazyPrefixWhileSequenceV10_predicateySb7ElementQzcvpMV
@@ -13333,8 +13328,8 @@
 _$sxSgs17CustomReflectablesWP
 _$sxSgs21_ObjectiveCBridgeablesMc
 _$sxSgs21_ObjectiveCBridgeablesWP
-_$sxSgs23ExpressibleByNilLiteralsMc
-_$sxSgs23ExpressibleByNilLiteralsWP
+_$sxSgs23ExpressibleByNilLiteralsRiczrlMc
+_$sxSgs23ExpressibleByNilLiteralsRiczrlWP
 _$sxSgs28CustomDebugStringConvertiblesMc
 _$sxSgs28CustomDebugStringConvertiblesWP
 _$syXlN

--

********************

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

Ah actually most of them are the assert(false) in Evaluator::diagnoseCycle. Actual stats are better:

Testing Time: 1267.48s
  Unsupported        :   598
  Passed             : 16989
  Expectedly Failed  :    91
  Failed             :   105
  Unexpectedly Passed:     1

@lorentey lorentey force-pushed the noncopyable-core-primitives branch 2 times, most recently from 9866c15 to 90df4f7 Compare March 7, 2024 01:56
@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

Ok, we're down to this symbol diff:

-_$sSP16_cVarArgEncodingSaySiGvpMV ---> property descriptor for Swift.UnsafePointer._cVarArgEncoding : [Swift.Int]
-_$sSP7pointeexvg ---> Swift.UnsafePointer.pointee.getter : A
-_$sSP7pointeexvpMV ---> property descriptor for Swift.UnsafePointer.pointee : A
-_$sSP9_rawValueBpvpMV ---> property descriptor for Swift.UnsafePointer._rawValue : Builtin.RawPointer
-_$sSP9hashValueSivg ---> Swift.UnsafePointer.hashValue.getter : Swift.Int
-_$sSP9hashValueSivpMV ---> property descriptor for Swift.UnsafePointer.hashValue : Swift.Int
-_$sSPyxGs7CVarArgsMc ---> protocol conformance descriptor for Swift.UnsafePointer<A> : Swift.CVarArg in Swift
-_$sSPyxGs7CVarArgsWP ---> protocol witness table for Swift.UnsafePointer<A> : Swift.CVarArg in Swift
-_$sSPyxSicig ---> Swift.UnsafePointer.subscript.getter : (Swift.Int) -> A
-_$sSPyxSicipMV ---> property descriptor for Swift.UnsafePointer.subscript(Swift.Int) -> A
-_$sSp10moveAssign4from5countySpyxG_SitF ---> Swift.UnsafeMutablePointer.moveAssign(from: Swift.UnsafeMutablePointer<A>, count: Swift.Int) -> ()
-_$sSp14moveInitialize4from5countySpyxG_SitF ---> Swift.UnsafeMutablePointer.moveInitialize(from: Swift.UnsafeMutablePointer<A>, count: Swift.Int) -> ()
-_$sSp16_cVarArgEncodingSaySiGvpMV ---> property descriptor for Swift.UnsafeMutablePointer._cVarArgEncoding : [Swift.Int]
-_$sSp7pointeexvg ---> Swift.UnsafeMutablePointer.pointee.getter : A
-_$sSp7pointeexvpMV ---> property descriptor for Swift.UnsafeMutablePointer.pointee : A
-_$sSp9_rawValueBpvpMV ---> property descriptor for Swift.UnsafeMutablePointer._rawValue : Builtin.RawPointer
-_$sSp9hashValueSivg ---> Swift.UnsafeMutablePointer.hashValue.getter : Swift.Int
-_$sSp9hashValueSivpMV ---> property descriptor for Swift.UnsafeMutablePointer.hashValue : Swift.Int
-_$sSpyxGs7CVarArgsMc ---> protocol conformance descriptor for Swift.UnsafeMutablePointer<A> : Swift.CVarArg in Swift
-_$sSpyxGs7CVarArgsWP ---> protocol witness table for Swift.UnsafeMutablePointer<A> : Swift.CVarArg in Swift
-_$sSpyxSicig ---> Swift.UnsafeMutablePointer.subscript.getter : (Swift.Int) -> A
-_$sSpyxSicipMV ---> property descriptor for Swift.UnsafeMutablePointer.subscript(Swift.Int) -> A
-_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcfCTj ---> dispatch thunk of Swift.ExpressibleByNilLiteral.init(nilLiteral: ()) -> A
-_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcfCTq ---> method descriptor for Swift.ExpressibleByNilLiteral.init(nilLiteral: ()) -> A
+_$sSP7pointeexvr ---> Swift.UnsafePointer.pointee.read : A
+_$sSPsRiczrlE16_cVarArgEncodingSaySiGvpMV ---> property descriptor for (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>._cVarArgEncoding : [Swift.Int]
+_$sSPsRiczrlE9_rawValueBpvpMV ---> property descriptor for (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>._rawValue : Builtin.RawPointer
+_$sSPsRiczrlE9hashValueSivg ---> (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>.hashValue.getter : Swift.Int
+_$sSPsRiczrlE9hashValueSivpMV ---> property descriptor for (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>.hashValue : Swift.Int
+_$sSPyxGs7CVarArgsRiczrlMc ---> protocol conformance descriptor for < where A: ~Swift.Copyable> Swift.UnsafePointer<A> : Swift.CVarArg in Swift
+_$sSPyxGs7CVarArgsRiczrlWP ---> protocol witness table for < where A: ~Swift.Copyable> Swift.UnsafePointer<A> : Swift.CVarArg in Swift
+_$sSPyxSicir ---> Swift.UnsafePointer.subscript.read : (Swift.Int) -> A
+_$sSp10moveUpdate4from5countySpyxG_SitF ---> Swift.UnsafeMutablePointer.moveUpdate(from: Swift.UnsafeMutablePointer<A>, count: Swift.Int) -> ()
+_$sSp7pointeexvr ---> Swift.UnsafeMutablePointer.pointee.read : A
+_$sSpsRiczrlE16_cVarArgEncodingSaySiGvpMV ---> property descriptor for (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>._cVarArgEncoding : [Swift.Int]
+_$sSpsRiczrlE9_rawValueBpvpMV ---> property descriptor for (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>._rawValue : Builtin.RawPointer
+_$sSpsRiczrlE9hashValueSivg ---> (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>.hashValue.getter : Swift.Int
+_$sSpsRiczrlE9hashValueSivpMV ---> property descriptor for (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>.hashValue : Swift.Int
+_$sSpyxGs7CVarArgsRiczrlMc ---> protocol conformance descriptor for < where A: ~Swift.Copyable> Swift.UnsafeMutablePointer<A> : Swift.CVarArg in Swift
+_$sSpyxGs7CVarArgsRiczrlWP ---> protocol witness table for < where A: ~Swift.Copyable> Swift.UnsafeMutablePointer<A> : Swift.CVarArg in Swift
+_$sSpyxSicir ---> Swift.UnsafeMutablePointer.subscript.read : (Swift.Int) -> A
+_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcRiczrlufCTj ---> dispatch thunk of Swift.ExpressibleByNilLiteral.init< where A: ~Swift.Copyable>(nilLiteral: ()) -> A
+_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcRiczrlufCTq ---> method descriptor for Swift.ExpressibleByNilLiteral.init< where A: ~Swift.Copyable>(nilLiteral: ()) -> A

@airspeedswift
Copy link
Member

@swift-ci please build toolchain macOS

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

Remaining symbol mismatches:

-_$sSP16_cVarArgEncodingSaySiGvpMV ---> property descriptor for Swift.UnsafePointer._cVarArgEncoding : [Swift.Int]
-_$sSP9_rawValueBpvpMV ---> property descriptor for Swift.UnsafePointer._rawValue : Builtin.RawPointer
-_$sSP9hashValueSivpMV ---> property descriptor for Swift.UnsafePointer.hashValue : Swift.Int
-_$sSp16_cVarArgEncodingSaySiGvpMV ---> property descriptor for Swift.UnsafeMutablePointer._cVarArgEncoding : [Swift.Int]
-_$sSp9_rawValueBpvpMV ---> property descriptor for Swift.UnsafeMutablePointer._rawValue : Builtin.RawPointer
-_$sSp9hashValueSivpMV ---> property descriptor for Swift.UnsafeMutablePointer.hashValue : Swift.Int
-_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcfCTj ---> dispatch thunk of Swift.ExpressibleByNilLiteral.init(nilLiteral: ()) -> A
-_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcfCTq ---> method descriptor for Swift.ExpressibleByNilLiteral.init(nilLiteral: ()) -> A
+_$sSPsRiczrlE16_cVarArgEncodingSaySiGvpMV ---> property descriptor for (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>._cVarArgEncoding : [Swift.Int]
+_$sSPsRiczrlE9_rawValueBpvpMV ---> property descriptor for (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>._rawValue : Builtin.RawPointer
+_$sSPsRiczrlE9hashValueSivpMV ---> property descriptor for (extension in Swift):Swift.UnsafePointer< where A: ~Swift.Copyable>.hashValue : Swift.Int
+_$sSpsRiczrlE16_cVarArgEncodingSaySiGvpMV ---> property descriptor for (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>._cVarArgEncoding : [Swift.Int]
+_$sSpsRiczrlE9_rawValueBpvpMV ---> property descriptor for (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>._rawValue : Builtin.RawPointer
+_$sSpsRiczrlE9hashValueSivpMV ---> property descriptor for (extension in Swift):Swift.UnsafeMutablePointer< where A: ~Swift.Copyable>.hashValue : Swift.Int
+_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcRiczrlufCTj ---> dispatch thunk of Swift.ExpressibleByNilLiteral.init< where A: ~Swift.Copyable>(nilLiteral: ()) -> A
+_$ss23ExpressibleByNilLiteralP03nilD0xyt_tcRiczrlufCTq ---> method descriptor for Swift.ExpressibleByNilLiteral.init< where A: ~Swift.Copyable>(nilLiteral: ()) -> A

I think the solutions to these are beyond the stdlib. But this should get us to a somewhat workable state -- perhaps bootstrapping would work now. 🤔

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

@swift-ci please build toolchain macOS

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

Test failures are slightly down, but not by much. Lots of reflection, interpreter, C++ interop issues. (Also the gtest unit tests are failing with linker errors about the missing ExpressibleByNilLiteral method descriptor.)

Failed Tests (100):
  Swift(macosx-arm64) :: DebugInfo/variables-interpreter.swift
  Swift(macosx-arm64) :: Driver/options-apple.swift
  Swift(macosx-arm64) :: Driver/options.swift
  Swift(macosx-arm64) :: IDE/complete_generic_optional.swift
  Swift(macosx-arm64) :: IDE/complete_in_closures.swift
  Swift(macosx-arm64) :: IDE/complete_swift_key_path_optional_root.swift
  Swift(macosx-arm64) :: IDE/complete_unresolved_members.swift
  Swift(macosx-arm64) :: Interop/Cxx/class/inheritance/fields.swift
  Swift(macosx-arm64) :: Interop/Cxx/class/inheritance/subscripts.swift
  Swift(macosx-arm64) :: Interop/Cxx/foreign-reference/derived-field-getter-returns-owned-frt.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-inline-irgen.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-inline-silgen.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-inline.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-out-of-line.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/overlay/custom-collection.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/overlay/custom-convertible-to-collection.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-map.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-optional.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-set.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-string.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-unique-ptr.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-vector.swift
  Swift(macosx-arm64) :: Interpreter/SDK/GLKit_jit.swift
  Swift(macosx-arm64) :: Interpreter/SDK/autolinking.swift
  Swift(macosx-arm64) :: Interpreter/SDK/interpret_with_options.swift
  Swift(macosx-arm64) :: Interpreter/SDK/objc_protocol_lookup.swift
  Swift(macosx-arm64) :: Interpreter/SDK/objc_protocol_lookup_jit.swift
  Swift(macosx-arm64) :: Interpreter/availability_host_os.swift
  Swift(macosx-arm64) :: Interpreter/fractal.swift
  Swift(macosx-arm64) :: Interpreter/interpret_load_framework.swift
  Swift(macosx-arm64) :: Interpreter/lazy/deferred_type_errors.swift
  Swift(macosx-arm64) :: Interpreter/lazy/globals.swift
  Swift(macosx-arm64) :: Interpreter/lazy/linkage_promotion.swift
  Swift(macosx-arm64) :: Interpreter/mandelbrot.swift
  Swift(macosx-arm64) :: Interpreter/process_arguments.swift
  Swift(macosx-arm64) :: Interpreter/protocol_lookup_jit.swift
  Swift(macosx-arm64) :: Interpreter/return_from_main.swift
  Swift(macosx-arm64) :: Interpreter/shebang-direct.swift
  Swift(macosx-arm64) :: Interpreter/shebang-env.swift
  Swift(macosx-arm64) :: Interpreter/unused-type.swift
  Swift(macosx-arm64) :: Misc/serialized-diagnostics-interpret-mode.swift
  Swift(macosx-arm64) :: Python/python_lint.swift
  Swift(macosx-arm64) :: Reflection/typeref_lowering.swift
  Swift(macosx-arm64) :: RemoteAST/existentials.swift
  Swift(macosx-arm64) :: RemoteAST/extensions.swift
  Swift(macosx-arm64) :: RemoteAST/foreign_types.swift
  Swift(macosx-arm64) :: RemoteAST/member_offsets.swift
  Swift(macosx-arm64) :: RemoteAST/nominal_types.swift
  Swift(macosx-arm64) :: RemoteAST/parameterized_existentials.swift
  Swift(macosx-arm64) :: RemoteAST/structural_types.swift
  Swift(macosx-arm64) :: SILGen/borrow_from_load_expr.swift
  Swift(macosx-arm64) :: SILGen/closures.swift
  Swift(macosx-arm64) :: SILGen/opaque_values_cxx.swift
  Swift(macosx-arm64) :: SILOptimizer/access_marker_verify.swift
  Swift(macosx-arm64) :: SILOptimizer/generic_specialization_loops_detection_with_loops.swift
  Swift(macosx-arm64) :: SILOptimizer/lifetime_dependence_param_fail.swift
  Swift(macosx-arm64) :: Serialization/operator.swift
  Swift(macosx-arm64) :: SourceKit/DocSupport/doc_clang_module.swift
  Swift(macosx-arm64) :: abi/macOS/arm64/stdlib.swift
  Swift(macosx-arm64) :: abi/macOS/arm64/synchronization.swift
  Swift(macosx-arm64) :: stdlib/Reflection_jit.swift
  Swift-Unit :: AST/./SwiftASTTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: ClangImporter/./SwiftClangImporterTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: DependencyScan/./swiftScanTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: FrontendTool/./SwiftFrontendTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: IDE/./SwiftIDETests/failed_to_discover_tests_from_gtest
  Swift-Unit :: Parse/./SwiftParseTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: SIL/./SwiftSILTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: SILOptimizer/./SwiftSILOptimizerTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: Sema/./swiftSemaTests/failed_to_discover_tests_from_gtest
  Swift-Unit :: SourceKit/SwiftLang/./SourceKitSwiftLangTests/failed_to_discover_tests_from_gtest
  Swift-validation(macosx-arm64) :: BuildSystem/generate_xcode.test
  Swift-validation(macosx-arm64) :: Reflection/functions.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_254CaseNoPayloads.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_bulky.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic3.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic4.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic5.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic6.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic8.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_large.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_value.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_NoCase.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCaseIntPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCaseNoPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCasePointerPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCaseVoidPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseNoPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseOnePointerPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseOneStructPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseTwoPayloads.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_value.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Optional_Any.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Optional_Bool.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_nested_generic.swift
  Swift-validation(macosx-arm64) :: SILOptimizer/constant_folded_fp_operations.swift
  Swift-validation(macosx-arm64) :: SILOptimizer/rdar114699006.swift
  Swift-validation(macosx-arm64) :: SILOptimizer/static_enums_fuzzing.swift
  Swift-validation(macosx-arm64) :: execution/interpret-with-dependencies.swift


Testing Time: 1340.18s
  Unsupported      :   598
  Passed           : 17002
  Expectedly Failed:    89
  Failed           :   100

@lorentey lorentey force-pushed the noncopyable-core-primitives branch from b8bac2a to dac90fd Compare March 7, 2024 21:29
@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

With @DougGregor's fix from #72157, we've symbol parity with the mainline stdlib, and we're down to 55 test failures!

(Actually 54 if we ignore my local python_lint failure.)

Failed Tests (55):
  Swift(macosx-arm64) :: IDE/complete_generic_optional.swift
  Swift(macosx-arm64) :: IDE/complete_in_closures.swift
  Swift(macosx-arm64) :: IDE/complete_swift_key_path_optional_root.swift
  Swift(macosx-arm64) :: IDE/complete_unresolved_members.swift
  Swift(macosx-arm64) :: Interop/Cxx/class/inheritance/fields.swift
  Swift(macosx-arm64) :: Interop/Cxx/class/inheritance/subscripts.swift
  Swift(macosx-arm64) :: Interop/Cxx/foreign-reference/derived-field-getter-returns-owned-frt.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-inline-irgen.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-inline-silgen.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-inline.swift
  Swift(macosx-arm64) :: Interop/Cxx/operators/member-out-of-line.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/overlay/custom-collection.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/overlay/custom-convertible-to-collection.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-map.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-optional.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-set.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-string.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-unique-ptr.swift
  Swift(macosx-arm64) :: Interop/Cxx/stdlib/use-std-vector.swift
  Swift(macosx-arm64) :: Python/python_lint.swift
  Swift(macosx-arm64) :: Reflection/typeref_lowering.swift
  Swift(macosx-arm64) :: SILGen/borrow_from_load_expr.swift
  Swift(macosx-arm64) :: SILGen/closures.swift
  Swift(macosx-arm64) :: SILGen/opaque_values_cxx.swift
  Swift(macosx-arm64) :: SILOptimizer/access_marker_verify.swift
  Swift(macosx-arm64) :: SILOptimizer/generic_specialization_loops_detection_with_loops.swift
  Swift(macosx-arm64) :: SILOptimizer/lifetime_dependence_param_fail.swift
  Swift(macosx-arm64) :: SourceKit/DocSupport/doc_clang_module.swift
  Swift(macosx-arm64) :: abi/macOS/arm64/synchronization.swift
  Swift-validation(macosx-arm64) :: BuildSystem/generate_xcode.test
  Swift-validation(macosx-arm64) :: Reflection/functions.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_254CaseNoPayloads.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_bulky.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic3.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic4.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic5.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic6.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_generic8.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_large.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_MultiPayload_value.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_NoCase.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCaseIntPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCaseNoPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCasePointerPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_SingleCaseVoidPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseNoPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseOnePointerPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseOneStructPayload.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_TwoCaseTwoPayloads.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Enum_value.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Optional_Any.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_Optional_Bool.swift
  Swift-validation(macosx-arm64) :: Reflection/reflect_nested_generic.swift
  Swift-validation(macosx-arm64) :: SILOptimizer/rdar114699006.swift

The abi/macOS/arm64/synchronization.swift failure is interesting:

_$sSPyxG15Synchronization19AtomicRepresentableABMc was marked as 'Added', but it was not found in the just built library
_$sSPyxG15Synchronization19AtomicRepresentableABWP was marked as 'Added', but it was not found in the just built library
_$sSPyxG15Synchronization27AtomicOptionalRepresentableABMc was marked as 'Added', but it was not found in the just built library
_$sSPyxG15Synchronization27AtomicOptionalRepresentableABWP was marked as 'Added', but it was not found in the just built library
_$sSpyxG15Synchronization19AtomicRepresentableABMc was marked as 'Added', but it was not found in the just built library
_$sSpyxG15Synchronization19AtomicRepresentableABWP was marked as 'Added', but it was not found in the just built library
_$sSpyxG15Synchronization27AtomicOptionalRepresentableABMc was marked as 'Added', but it was not found in the just built library
_$sSpyxG15Synchronization27AtomicOptionalRepresentableABWP was marked as 'Added', but it was not found in the just built library

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

@swift-ci build toolchain macOS

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

@swift-ci test

@lorentey
Copy link
Member Author

lorentey commented Mar 7, 2024

The symbol mismatches in Synchronizaton are actually trivial -- the new U[M]P conformances are just mangled differently these days. (I was mystified by the test not complaining about unexpected new symbols, but that's just due to an early exit in the script. I'll fix that separately.)

@DougGregor
Copy link
Member

The reflection tests are fixed by #72163

@DougGregor
Copy link
Member

The C++ interop tests are fixed by #72165

@kavon
Copy link
Member

kavon commented Mar 8, 2024

@swift-ci test

@kavon
Copy link
Member

kavon commented Mar 8, 2024

@swift-ci build toolchain macOS

@lorentey
Copy link
Member Author

lorentey commented Mar 8, 2024

12 failures remaining!

Failed Tests (13):
  Swift(macosx-arm64) :: IDE/complete_generic_optional.swift
  Swift(macosx-arm64) :: IDE/complete_in_closures.swift
  Swift(macosx-arm64) :: IDE/complete_swift_key_path_optional_root.swift
  Swift(macosx-arm64) :: IDE/complete_unresolved_members.swift
  Swift(macosx-arm64) :: Python/python_lint.swift
  Swift(macosx-arm64) :: SILGen/borrow_from_load_expr.swift
  Swift(macosx-arm64) :: SILGen/closures.swift
  Swift(macosx-arm64) :: SILOptimizer/access_marker_verify.swift
  Swift(macosx-arm64) :: SILOptimizer/generic_specialization_loops_detection_with_loops.swift
  Swift(macosx-arm64) :: SILOptimizer/lifetime_dependence_param_fail.swift
  Swift(macosx-arm64) :: SourceKit/DocSupport/doc_clang_module.swift
  Swift-validation(macosx-arm64) :: BuildSystem/generate_xcode.test
  Swift-validation(macosx-arm64) :: SILOptimizer/rdar114699006.swift

build.log

@lorentey lorentey force-pushed the noncopyable-core-primitives branch from 7cfe707 to 7c45076 Compare March 8, 2024 17:56
@airspeedswift
Copy link
Member

@swift-ci build toolchain macOS

1 similar comment
@airspeedswift
Copy link
Member

@swift-ci build toolchain macOS

@lorentey lorentey force-pushed the noncopyable-core-primitives branch from 7c45076 to a00565e Compare March 11, 2024 21:22
[stdlib] MemoryLayout: Update Swift version numbers

[stdlib] MemoryLayout: Actually hide legacy ABI
… types

[stdlib] Pull back @_aeic on pointer → integer conversions

[stdlib] UnsafeMutablePointer.allocate: Fix thinko

[stdlib] Disable support for noncopyable pointees on some pointer operations

We have to temporarily pull back support for noncopyable pointees for UnsafeMutablePointer.initialize(to:), .moveInitialize, .moveUpdate, as the builtins they’re calling are no longer accepting such types.

These will return following a builtin audit.

[stdlib] Remove workarounds for certain builtins not supporting noncopyable use

swiftlang#71733 fixed this!

[stdlib] Update FIXME

[stdlib] UnsafePointer: Update Swift version numbers

[stdlib] UnsafePointer: Actually hide legacy ABI

[stdlib] Remove workaround for U[M]BP.withMemoryRebound
@lorentey lorentey force-pushed the noncopyable-core-primitives branch from a00565e to fb84071 Compare March 12, 2024 17:57
@lorentey
Copy link
Member Author

@swift-ci build toolchain macOS

@airspeedswift
Copy link
Member

@swift-ci please test

1 similar comment
@airspeedswift
Copy link
Member

@swift-ci please test

@airspeedswift
Copy link
Member

@swift-ci build toolchain macOS

@airspeedswift
Copy link
Member

@swift-ci build toolchain macOS

@airspeedswift
Copy link
Member

@swift-ci please test macOS platform

@lorentey
Copy link
Member Author

Closing. Work is ongoing over in #71688.

@lorentey lorentey closed this Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift evolution pending discussion Flag → feature: A feature that has a Swift evolution proposal currently in review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants