File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed
Sources/OpenGraph/Runtime Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 36
36
- name : Swift version
37
37
run : swift --version
38
38
- name : Run tests against Apple's AttributeGraph on macOS via SwiftPM
39
+ env :
40
+ OPENGRAPH_LIBRARY_EVOLUTION : 0
39
41
run : |
40
42
swift test \
41
43
--build-path .build-compatibility-test-debug
Original file line number Diff line number Diff line change 35
35
- name : Swift version
36
36
run : swift --version
37
37
- name : Build and run tests in debug mode with coverage
38
+ env :
39
+ OPENGRAPH_LIBRARY_EVOLUTION : 0
38
40
run : |
39
41
swift test \
40
42
-c debug \
45
47
.build-test-debug/debug/OpenGraphPackageTests.xctest/Contents/MacOS/OpenGraphPackageTests \
46
48
> coverage.txt
47
49
- name : Build and run tests in release mode
50
+ env :
51
+ OPENGRAPH_LIBRARY_EVOLUTION : 0
48
52
run : |
49
53
swift test \
50
54
-c release \
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ var sharedCSettings: [CSetting] = [
34
34
35
35
var sharedSwiftSettings : [ SwiftSetting ] = [
36
36
. enableUpcomingFeature( " InternalImportsByDefault " ) ,
37
+ . enableExperimentalFeature( " Extern " ) ,
37
38
. swiftLanguageMode( . v5) ,
38
- . unsafeFlags( [ " -enable-library-evolution " ] ) ,
39
39
]
40
40
41
41
// MARK: [env] OPENGRAPH_SWIFT_TOOLCHAIN_PATH
@@ -119,6 +119,7 @@ let libraryEvolutionCondition = envEnable("OPENGRAPH_LIBRARY_EVOLUTION")
119
119
#endif
120
120
121
121
if libraryEvolutionCondition {
122
+ // NOTE: -enable-library-evolution is not supported on `swift build` yet.
122
123
sharedSwiftSettings. append ( . unsafeFlags( [ " -enable-library-evolution " ] ) )
123
124
}
124
125
Original file line number Diff line number Diff line change @@ -75,15 +75,15 @@ extension UnsafeTuple {
75
75
76
76
// MARK: - UnsafeMutableTuple
77
77
78
- @_silgen_name ( " swift_slowAlloc " )
79
- private func slowAlloc( _ size: Int , _ alignMask: Int ) -> UnsafeMutableRawPointer
80
-
81
- @_silgen_name ( " swift_slowDealloc " )
82
- private func slowDealloc( _ ptr: UnsafeMutableRawPointer , _ size: Int , _ alignMask: Int )
83
-
84
78
extension UnsafeMutableTuple {
85
79
public init ( with tupleType: TupleType ) {
86
- self . init ( type: tupleType, value: slowAlloc ( tupleType. size, - 1 ) )
80
+ self . init (
81
+ type: tupleType,
82
+ value: UnsafeMutableRawPointer . allocate (
83
+ byteCount: tupleType. size,
84
+ alignment: - 1
85
+ )
86
+ )
87
87
}
88
88
89
89
public func initialize< T> ( at index: Int , to element: T ) {
@@ -104,7 +104,7 @@ extension UnsafeMutableTuple {
104
104
if initialized {
105
105
deinitialize ( )
106
106
}
107
- slowDealloc ( value, - 1 , - 1 )
107
+ value. deallocate ( )
108
108
}
109
109
110
110
public var count : Int { type. count }
You can’t perform that action at this time.
0 commit comments