Skip to content

Commit 30e82c0

Browse files
committed
ci: don't disable prebuilt swiftsyntax on macOS, it works there
1 parent 252b7d5 commit 30e82c0

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

Samples/JavaDependencySampleApp/ci-validate.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@
33
set -e
44
set -x
55

6+
# WORKAROUND: prebuilts broken on Swift 6.2.1 and Linux and tests using macros https://github.com/swiftlang/swift-java/issues/418
7+
if [[ "$(uname)" == "Darwin" ]]; then
8+
DISABLE_EXPERIMENTAL_PREBUILTS=''
9+
else
10+
DISABLE_EXPERIMENTAL_PREBUILTS='--disable-experimental-prebuilts'
11+
fi
12+
613
# invoke resolve as part of a build run
714
swift build \
8-
--disable-experimental-prebuilts \
15+
$DISABLE_EXPERIMENTAL_PREBUILTS \
916
--disable-sandbox
1017

1118
# explicitly invoke resolve without explicit path or dependency
1219
# the dependencies should be uses from the --swift-module
1320

1421
# FIXME: until prebuilt swift-syntax isn't broken on 6.2 anymore: https://github.com/swiftlang/swift-java/issues/418
1522
swift run \
16-
--disable-experimental-prebuilts \
23+
$DISABLE_EXPERIMENTAL_PREBUILTS \
1724
swift-java resolve \
1825
Sources/JavaCommonsCSV/swift-java.config \
1926
--swift-module JavaCommonsCSV \

Samples/JavaKitSampleApp/ci-validate.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
set -e
44
set -x
55

6-
swift build \
7-
--disable-experimental-prebuilts # FIXME: until prebuilt swift-syntax isn't broken on 6.2 anymore: https://github.com/swiftlang/swift-java/issues/418
6+
# WORKAROUND: prebuilts broken on Swift 6.2.1 and Linux and tests using macros https://github.com/swiftlang/swift-java/issues/418
7+
if [[ "$(uname)" == "Darwin" ]]; then
8+
DISABLE_EXPERIMENTAL_PREBUILTS=''
9+
else
10+
DISABLE_EXPERIMENTAL_PREBUILTS='--disable-experimental-prebuilts'
11+
fi
12+
13+
swift build $DISABLE_EXPERIMENTAL_PREBUILTS
814

915
"$JAVA_HOME/bin/java" \
1016
-cp .build/plugins/outputs/javakitsampleapp/JavaKitExample/destination/JavaCompilerPlugin/Java \

Samples/JavaProbablyPrime/ci-validate.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
set -e
44
set -x
55

6-
# FIXME: until prebuilt swift-syntax isn't broken on 6.2 anymore: https://github.com/swiftlang/swift-java/issues/418
6+
# WORKAROUND: prebuilts broken on Swift 6.2.1 and Linux and tests using macros https://github.com/swiftlang/swift-java/issues/418
7+
if [[ "$(uname)" == "Darwin" ]]; then
8+
DISABLE_EXPERIMENTAL_PREBUILTS=''
9+
else
10+
DISABLE_EXPERIMENTAL_PREBUILTS='--disable-experimental-prebuilts'
11+
fi
12+
713
swift run \
8-
--disable-experimental-prebuilts \
14+
$DISABLE_EXPERIMENTAL_PREBUILTS \
915
JavaProbablyPrime 1337

Samples/SwiftJavaExtractJNISampleApp/ci-validate.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
set -x
44
set -e
55

6+
# WORKAROUND: prebuilts broken on Swift 6.2.1 and Linux and tests using macros https://github.com/swiftlang/swift-java/issues/418
7+
if [[ "$(uname)" == "Darwin" ]]; then
8+
DISABLE_EXPERIMENTAL_PREBUILTS=''
9+
else
10+
DISABLE_EXPERIMENTAL_PREBUILTS='--disable-experimental-prebuilts'
11+
fi
12+
613
if [[ "$(uname)" == "Darwin" && -n "$GITHUB_ACTION" ]]; then
714
# WORKAROUND: GitHub Actions on macOS issue with downloading gradle wrapper
815
# We seem to be hitting a problem when the swiftpm plugin, needs to execute gradle wrapper in a new gradle_user_home.
@@ -33,7 +40,7 @@ if [[ "$(uname)" == "Darwin" && -n "$GITHUB_ACTION" ]]; then
3340
fi
3441

3542
# FIXME: disable prebuilts until prebuilt swift-syntax isn't broken on 6.2 anymore: https://github.com/swiftlang/swift-java/issues/418
36-
swift build --disable-experimental-prebuilts --disable-sandbox
43+
swift build $DISABLE_EXPERIMENTAL_PREBUILTS --disable-sandbox
3744

3845
./gradlew run
3946
./gradlew test

0 commit comments

Comments
 (0)