Skip to content

Commit 2487752

Browse files
committed
Migrate (somewhat) to Swift 5.0
I am unable to perform automatic migration using Xcode 10.2, since my macbook doesn't support that version of Xcode, so I installed Swift 5.0 toolchain and performed all the steps manually.
1 parent e751607 commit 2487752

5 files changed

Lines changed: 7 additions & 11 deletions

File tree

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2
1+
5.0

BitByteData.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Pod::Spec.new do |s|
2020
s.tvos.deployment_target = "9.0"
2121
s.watchos.deployment_target = "2.0"
2222

23-
s.swift_version = "4.2"
23+
s.swift_version = "5.0"
2424

2525
s.source_files = "Sources/*.swift"
2626

BitByteData.xcodeproj/project.pbxproj

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@
334334
);
335335
PRODUCT_BUNDLE_IDENTIFIER = me.tsolomko.BitByteDataBenchmarks;
336336
PRODUCT_NAME = "$(TARGET_NAME)";
337-
SWIFT_VERSION = 4.2;
338337
};
339338
name = Debug;
340339
};
@@ -352,7 +351,6 @@
352351
);
353352
PRODUCT_BUNDLE_IDENTIFIER = me.tsolomko.BitByteDataBenchmarks;
354353
PRODUCT_NAME = "$(TARGET_NAME)";
355-
SWIFT_VERSION = 4.2;
356354
};
357355
name = Release;
358356
};
@@ -396,6 +394,7 @@
396394
SDKROOT = macosx;
397395
SUPPORTED_PLATFORMS = "macosx watchsimulator iphonesimulator appletvsimulator watchos appletvos iphoneos";
398396
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
397+
SWIFT_VERSION = 5.0;
399398
TVOS_DEPLOYMENT_TARGET = 9.0;
400399
VERSIONING_SYSTEM = "apple-generic";
401400
WATCHOS_DEPLOYMENT_TARGET = 2.0;
@@ -440,6 +439,7 @@
440439
SDKROOT = macosx;
441440
SUPPORTED_PLATFORMS = "macosx watchsimulator iphonesimulator appletvsimulator watchos appletvos iphoneos";
442441
SWIFT_COMPILATION_MODE = wholemodule;
442+
SWIFT_VERSION = 5.0;
443443
TVOS_DEPLOYMENT_TARGET = 9.0;
444444
VERSIONING_SYSTEM = "apple-generic";
445445
WATCHOS_DEPLOYMENT_TARGET = 2.0;
@@ -466,7 +466,6 @@
466466
PRODUCT_BUNDLE_IDENTIFIER = me.tsolomko.BitByteData;
467467
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
468468
SKIP_INSTALL = YES;
469-
SWIFT_VERSION = 4.2;
470469
VERSION_INFO_PREFIX = "";
471470
};
472471
name = Debug;
@@ -491,7 +490,6 @@
491490
PRODUCT_BUNDLE_IDENTIFIER = me.tsolomko.BitByteData;
492491
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
493492
SKIP_INSTALL = YES;
494-
SWIFT_VERSION = 4.2;
495493
VERSION_INFO_PREFIX = "";
496494
};
497495
name = Release;
@@ -510,7 +508,6 @@
510508
);
511509
PRODUCT_BUNDLE_IDENTIFIER = me.tsolomko.TestBitByteData;
512510
PRODUCT_NAME = "$(TARGET_NAME)";
513-
SWIFT_VERSION = 4.2;
514511
};
515512
name = Debug;
516513
};
@@ -528,7 +525,6 @@
528525
);
529526
PRODUCT_BUNDLE_IDENTIFIER = me.tsolomko.TestBitByteData;
530527
PRODUCT_NAME = "$(TARGET_NAME)";
531-
SWIFT_VERSION = 4.2;
532528
};
533529
name = Release;
534530
};

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:5.0
22
import PackageDescription
33

44
let package = Package(
@@ -13,5 +13,5 @@ let package = Package(
1313
.testTarget(name: "BitByteDataTests", dependencies: ["BitByteData"]),
1414
.testTarget(name: "BitByteDataBenchmarks", dependencies: ["BitByteData"])
1515
],
16-
swiftLanguageVersions: [4]
16+
swiftLanguageVersions: [.v5]
1717
)

benchmarks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def action_run(args):
198198
elif args.use_413:
199199
swift_command = ["xcrun", "-toolchain", "org.swift.41320180727a"]
200200
elif args.use_5:
201-
swift_command = ["xcrun", "-toolchain", "org.swift.5020190310a"]
201+
swift_command = ["xcrun", "-toolchain", "org.swift.5020190325a"]
202202
swift_command.append("swift")
203203
command = swift_command + ["test", "-c", "release", "--filter", args.filter]
204204
# macOS version of 'swift test' outputs to stderr instead of stdout.

0 commit comments

Comments
 (0)