Skip to content

Commit ebf3e53

Browse files
committed
Add -no-verify-emitted-module-interface
1 parent b71c1d4 commit ebf3e53

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

.github/workflows/compatibility_tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ jobs:
3636
- name: Swift version
3737
run: swift --version
3838
- name: Run tests against Apple's AttributeGraph on macOS via SwiftPM
39-
env:
40-
OPENGRAPH_LIBRARY_EVOLUTION: 0
4139
run: |
4240
swift test \
4341
--build-path .build-compatibility-test-debug

.github/workflows/macos.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ jobs:
3535
- name: Swift version
3636
run: swift --version
3737
- name: Build and run tests in debug mode with coverage
38-
env:
39-
OPENGRAPH_LIBRARY_EVOLUTION: 0
4038
run: |
4139
swift test \
4240
-c debug \
@@ -47,8 +45,6 @@ jobs:
4745
.build-test-debug/debug/OpenGraphPackageTests.xctest/Contents/MacOS/OpenGraphPackageTests \
4846
> coverage.txt
4947
- name: Build and run tests in release mode
50-
env:
51-
OPENGRAPH_LIBRARY_EVOLUTION: 0
5248
run: |
5349
swift test \
5450
-c release \

Package.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ let libraryEvolutionCondition = envEnable("OPENGRAPH_LIBRARY_EVOLUTION")
119119
#endif
120120

121121
if libraryEvolutionCondition {
122-
// NOTE: -enable-library-evolution is not supported on `swift build` yet.
123-
sharedSwiftSettings.append(.unsafeFlags(["-enable-library-evolution"]))
122+
// NOTE: -enable-library-evolution will cause module verify failure for `swift build`.
123+
// Either set OPENGRAPH_LIBRARY_EVOLUTION=0 or add `-Xswiftc -no-verify-emitted-module-interface` after `swift build`
124+
sharedSwiftSettings.append(.unsafeFlags(["-enable-library-evolution", "-no-verify-emitted-module-interface"]))
124125
}
125126

126127
// MARK: - Targets
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ filepath() {
55
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
66
}
77

8-
OG_ROOT="$(dirname $(dirname $(filepath $0)))"
8+
OPENGRAPH_ROOT="$(dirname $(dirname $(filepath $0)))"
99

10-
cd $OG_ROOT
10+
cd $OPENGRAPH_ROOT
1111

12-
swift build -Xswiftc -emit-module-interface -Xswiftc -enable-library-evolution
12+
swift build -Xswiftc -emit-module-interface -Xswiftc -enable-library-evolution -Xswiftc -no-verify-emitted-module-interface

0 commit comments

Comments
 (0)