Skip to content

Commit bbba1ba

Browse files
authored
Merge pull request #73 from cwakamo/modernize-projects-and-builds
Modernize the PlaygroundSupport and PlaygroundLogger projects and their builds.
2 parents dd0d8c8 + 296e773 commit bbba1ba

18 files changed

+126
-135
lines changed

Diff for: PlaygroundLogger/PlaygroundLogger.xcodeproj/project.pbxproj

+5-1
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@
813813
isa = PBXProject;
814814
attributes = {
815815
LastSwiftUpdateCheck = 1000;
816-
LastUpgradeCheck = 1130;
816+
LastUpgradeCheck = 1340;
817817
ORGANIZATIONNAME = "Apple Inc. and the Swift project authors";
818818
TargetAttributes = {
819819
5E2646261FB64876002DC6B6 = {
@@ -1153,6 +1153,7 @@
11531153
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
11541154
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
11551155
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1156+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
11561157
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
11571158
CLANG_WARN_STRICT_PROTOTYPES = YES;
11581159
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1208,6 +1209,7 @@
12081209
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
12091210
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
12101211
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1212+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
12111213
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
12121214
CLANG_WARN_STRICT_PROTOTYPES = YES;
12131215
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1236,6 +1238,7 @@
12361238
5E26463C1FB64876002DC6B6 /* Debug */ = {
12371239
isa = XCBuildConfiguration;
12381240
buildSettings = {
1241+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
12391242
CODE_SIGN_IDENTITY = "";
12401243
CODE_SIGN_STYLE = Automatic;
12411244
COMBINE_HIDPI_IMAGES = YES;
@@ -1258,6 +1261,7 @@
12581261
5E26463D1FB64876002DC6B6 /* Release */ = {
12591262
isa = XCBuildConfiguration;
12601263
buildSettings = {
1264+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
12611265
CODE_SIGN_IDENTITY = "";
12621266
CODE_SIGN_STYLE = Automatic;
12631267
COMBINE_HIDPI_IMAGES = YES;

Diff for: PlaygroundLogger/PlaygroundLogger.xcodeproj/xcshareddata/xcschemes/PlaygroundLogger (iOS).xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1130"
3+
LastUpgradeVersion = "1340"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Diff for: PlaygroundLogger/PlaygroundLogger.xcodeproj/xcshareddata/xcschemes/PlaygroundLogger (macOS).xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1130"
3+
LastUpgradeVersion = "1340"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Diff for: PlaygroundLogger/PlaygroundLogger.xcodeproj/xcshareddata/xcschemes/PlaygroundLogger (tvOS).xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1130"
3+
LastUpgradeVersion = "1340"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Diff for: PlaygroundLogger/PlaygroundLogger/CustomLoggable/SpriteKit/SpriteKitOpaqueLoggable.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import SpriteKit
1818
}
1919
}
2020

21-
fileprivate protocol SpriteKitOpaqueLoggable: class, OpaqueImageRepresentable, CustomOpaqueLoggable {}
21+
fileprivate protocol SpriteKitOpaqueLoggable: AnyObject, OpaqueImageRepresentable, CustomOpaqueLoggable {}
2222

2323
extension SpriteKitOpaqueLoggable {
2424
func encodeImage(into encoder: LogEncoder, withFormat format: LogEncoder.Format) throws {

Diff for: PlaygroundLogger/PlaygroundLoggerTests/LegacyPlaygroundLoggerTests.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ extension UInt64 {
894894

895895
init? (eightBytesStorage: BytesStorage) {
896896
if !eightBytesStorage.has(8) { return nil }
897-
var up_byte = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
897+
let up_byte = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
898898
defer { up_byte.deallocate() }
899899
for idx in 0..<8 {
900900
up_byte[idx] = eightBytesStorage.get()
@@ -958,7 +958,7 @@ extension Bool {
958958

959959
extension Float {
960960
init? (storage: BytesStorage) {
961-
var ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 4)
961+
let ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 4)
962962
defer { ubPtr.deallocate() }
963963
for idx in 0..<4 {
964964
ubPtr[idx] = storage.get()
@@ -973,7 +973,7 @@ extension Float {
973973

974974
extension Double {
975975
init? (storage: BytesStorage) {
976-
var ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
976+
let ubPtr = UnsafeMutablePointer<UInt8>.allocate(capacity: 8)
977977
defer { ubPtr.deallocate() }
978978
for idx in 0..<8 {
979979
ubPtr[idx] = storage.get()

Diff for: PlaygroundSupport/PlaygroundSupport.xcodeproj/project.pbxproj

+43-5
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@
814814
attributes = {
815815
LastSwiftMigration = 0800;
816816
LastSwiftUpdateCheck = 0730;
817-
LastUpgradeCheck = 0910;
817+
LastUpgradeCheck = 1340;
818818
ORGANIZATIONNAME = "Apple Inc.";
819819
TargetAttributes = {
820820
1DF4116118DCB596001CDFC7 = {
@@ -873,11 +873,11 @@
873873
};
874874
buildConfigurationList = 1D7FD51518BFE00400C718C6 /* Build configuration list for PBXProject "PlaygroundSupport" */;
875875
compatibilityVersion = "Xcode 3.2";
876-
developmentRegion = English;
876+
developmentRegion = en;
877877
hasScannedForEncodings = 0;
878878
knownRegions = (
879-
English,
880879
en,
880+
Base,
881881
);
882882
mainGroup = 1D7FD51118BFE00400C718C6;
883883
productRefGroup = 1D7FD51B18BFE00400C718C6 /* Products */;
@@ -1267,16 +1267,20 @@
12671267
isa = XCBuildConfiguration;
12681268
baseConfigurationReference = 5E6C2B461FE9DCD000DEE489 /* Debug.xcconfig */;
12691269
buildSettings = {
1270+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
12701271
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
12711272
CLANG_WARN_BOOL_CONVERSION = YES;
12721273
CLANG_WARN_COMMA = YES;
12731274
CLANG_WARN_CONSTANT_CONVERSION = YES;
1275+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
12741276
CLANG_WARN_EMPTY_BODY = YES;
12751277
CLANG_WARN_ENUM_CONVERSION = YES;
12761278
CLANG_WARN_INFINITE_RECURSION = YES;
12771279
CLANG_WARN_INT_CONVERSION = YES;
12781280
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1281+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
12791282
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1283+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
12801284
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
12811285
CLANG_WARN_STRICT_PROTOTYPES = YES;
12821286
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1291,24 +1295,28 @@
12911295
GCC_WARN_UNUSED_FUNCTION = YES;
12921296
GCC_WARN_UNUSED_VARIABLE = YES;
12931297
SWIFT_STDLIB = swiftCore;
1294-
SWIFT_VERSION = 4.2;
1298+
SWIFT_VERSION = 5.0;
12951299
};
12961300
name = Debug;
12971301
};
12981302
1D7FD52218BFE00400C718C6 /* Release */ = {
12991303
isa = XCBuildConfiguration;
13001304
baseConfigurationReference = 5E6C2B471FE9DCDD00DEE489 /* Release.xcconfig */;
13011305
buildSettings = {
1306+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
13021307
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
13031308
CLANG_WARN_BOOL_CONVERSION = YES;
13041309
CLANG_WARN_COMMA = YES;
13051310
CLANG_WARN_CONSTANT_CONVERSION = YES;
1311+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
13061312
CLANG_WARN_EMPTY_BODY = YES;
13071313
CLANG_WARN_ENUM_CONVERSION = YES;
13081314
CLANG_WARN_INFINITE_RECURSION = YES;
13091315
CLANG_WARN_INT_CONVERSION = YES;
13101316
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1317+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
13111318
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
1319+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
13121320
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
13131321
CLANG_WARN_STRICT_PROTOTYPES = YES;
13141322
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1325,14 +1333,16 @@
13251333
GCC_WARN_UNUSED_VARIABLE = YES;
13261334
SWIFT_SKIP_IMPLICIT_STDLIB_RUNPATH_SEARCH_PATH = YES;
13271335
SWIFT_STDLIB = swiftCore;
1328-
SWIFT_VERSION = 4.2;
1336+
SWIFT_VERSION = 5.0;
13291337
};
13301338
name = Release;
13311339
};
13321340
1DF4117618DCB596001CDFC7 /* Debug */ = {
13331341
isa = XCBuildConfiguration;
13341342
buildSettings = {
13351343
ALWAYS_SEARCH_USER_PATHS = NO;
1344+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1345+
CLANG_ENABLE_OBJC_WEAK = YES;
13361346
DYLIB_COMPATIBILITY_VERSION = 1;
13371347
DYLIB_CURRENT_VERSION = 1;
13381348
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1353,6 +1363,8 @@
13531363
isa = XCBuildConfiguration;
13541364
buildSettings = {
13551365
ALWAYS_SEARCH_USER_PATHS = NO;
1366+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1367+
CLANG_ENABLE_OBJC_WEAK = YES;
13561368
DYLIB_COMPATIBILITY_VERSION = 1;
13571369
DYLIB_CURRENT_VERSION = 1;
13581370
DYLIB_INSTALL_NAME_BASE = "@rpath";
@@ -1372,13 +1384,15 @@
13721384
5E36505B1B56D83400205D2D /* Debug */ = {
13731385
isa = XCBuildConfiguration;
13741386
buildSettings = {
1387+
CLANG_ENABLE_OBJC_WEAK = YES;
13751388
PRODUCT_NAME = "$(TARGET_NAME)";
13761389
};
13771390
name = Debug;
13781391
};
13791392
5E36505C1B56D83400205D2D /* Release */ = {
13801393
isa = XCBuildConfiguration;
13811394
buildSettings = {
1395+
CLANG_ENABLE_OBJC_WEAK = YES;
13821396
PRODUCT_NAME = "$(TARGET_NAME)";
13831397
};
13841398
name = Release;
@@ -1387,6 +1401,7 @@
13871401
isa = XCBuildConfiguration;
13881402
buildSettings = {
13891403
ALWAYS_SEARCH_USER_PATHS = NO;
1404+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
13901405
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
13911406
CLANG_CXX_LIBRARY = "libc++";
13921407
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1434,6 +1449,7 @@
14341449
isa = XCBuildConfiguration;
14351450
buildSettings = {
14361451
ALWAYS_SEARCH_USER_PATHS = NO;
1452+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
14371453
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14381454
CLANG_CXX_LIBRARY = "libc++";
14391455
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1475,27 +1491,31 @@
14751491
94182A0C1D25D5F5002CCB9E /* Debug */ = {
14761492
isa = XCBuildConfiguration;
14771493
buildSettings = {
1494+
CLANG_ENABLE_OBJC_WEAK = YES;
14781495
PRODUCT_NAME = "$(TARGET_NAME)";
14791496
};
14801497
name = Debug;
14811498
};
14821499
94182A0D1D25D5F5002CCB9E /* Release */ = {
14831500
isa = XCBuildConfiguration;
14841501
buildSettings = {
1502+
CLANG_ENABLE_OBJC_WEAK = YES;
14851503
PRODUCT_NAME = "$(TARGET_NAME)";
14861504
};
14871505
name = Release;
14881506
};
14891507
A80607191CCEAD2500E951C8 /* Debug */ = {
14901508
isa = XCBuildConfiguration;
14911509
buildSettings = {
1510+
CLANG_ENABLE_OBJC_WEAK = YES;
14921511
PRODUCT_NAME = "$(TARGET_NAME)";
14931512
};
14941513
name = Debug;
14951514
};
14961515
A806071A1CCEAD2500E951C8 /* Release */ = {
14971516
isa = XCBuildConfiguration;
14981517
buildSettings = {
1518+
CLANG_ENABLE_OBJC_WEAK = YES;
14991519
PRODUCT_NAME = "$(TARGET_NAME)";
15001520
};
15011521
name = Release;
@@ -1504,6 +1524,8 @@
15041524
isa = XCBuildConfiguration;
15051525
buildSettings = {
15061526
ALWAYS_SEARCH_USER_PATHS = NO;
1527+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1528+
CLANG_ENABLE_OBJC_WEAK = YES;
15071529
DEFINES_MODULE = YES;
15081530
DYLIB_COMPATIBILITY_VERSION = 1;
15091531
DYLIB_CURRENT_VERSION = 1;
@@ -1525,6 +1547,8 @@
15251547
isa = XCBuildConfiguration;
15261548
buildSettings = {
15271549
ALWAYS_SEARCH_USER_PATHS = NO;
1550+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
1551+
CLANG_ENABLE_OBJC_WEAK = YES;
15281552
DEFINES_MODULE = YES;
15291553
DYLIB_COMPATIBILITY_VERSION = 1;
15301554
DYLIB_CURRENT_VERSION = 1;
@@ -1546,6 +1570,7 @@
15461570
isa = XCBuildConfiguration;
15471571
buildSettings = {
15481572
ALWAYS_SEARCH_USER_PATHS = NO;
1573+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
15491574
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
15501575
CLANG_CXX_LIBRARY = "libc++";
15511576
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1594,6 +1619,7 @@
15941619
isa = XCBuildConfiguration;
15951620
buildSettings = {
15961621
ALWAYS_SEARCH_USER_PATHS = NO;
1622+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
15971623
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
15981624
CLANG_CXX_LIBRARY = "libc++";
15991625
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1637,6 +1663,7 @@
16371663
isa = XCBuildConfiguration;
16381664
buildSettings = {
16391665
ALWAYS_SEARCH_USER_PATHS = NO;
1666+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
16401667
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
16411668
CLANG_CXX_LIBRARY = "libc++";
16421669
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1685,6 +1712,7 @@
16851712
isa = XCBuildConfiguration;
16861713
buildSettings = {
16871714
ALWAYS_SEARCH_USER_PATHS = NO;
1715+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
16881716
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
16891717
CLANG_CXX_LIBRARY = "libc++";
16901718
CLANG_ENABLE_OBJC_ARC = YES;
@@ -1727,13 +1755,15 @@
17271755
A8318FCE1CF604540015809A /* Debug */ = {
17281756
isa = XCBuildConfiguration;
17291757
buildSettings = {
1758+
CLANG_ENABLE_OBJC_WEAK = YES;
17301759
PRODUCT_NAME = "$(TARGET_NAME)";
17311760
};
17321761
name = Debug;
17331762
};
17341763
A8318FCF1CF604540015809A /* Release */ = {
17351764
isa = XCBuildConfiguration;
17361765
buildSettings = {
1766+
CLANG_ENABLE_OBJC_WEAK = YES;
17371767
PRODUCT_NAME = "$(TARGET_NAME)";
17381768
};
17391769
name = Release;
@@ -1977,6 +2007,7 @@
19772007
isa = XCBuildConfiguration;
19782008
buildSettings = {
19792009
ALWAYS_SEARCH_USER_PATHS = NO;
2010+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
19802011
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
19812012
CLANG_CXX_LIBRARY = "libc++";
19822013
CLANG_ENABLE_OBJC_ARC = YES;
@@ -2024,6 +2055,7 @@
20242055
isa = XCBuildConfiguration;
20252056
buildSettings = {
20262057
ALWAYS_SEARCH_USER_PATHS = NO;
2058+
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
20272059
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
20282060
CLANG_CXX_LIBRARY = "libc++";
20292061
CLANG_ENABLE_OBJC_ARC = YES;
@@ -2302,41 +2334,47 @@
23022334
A8FC12DD1CF62B6B005BE06F /* Debug */ = {
23032335
isa = XCBuildConfiguration;
23042336
buildSettings = {
2337+
CLANG_ENABLE_OBJC_WEAK = YES;
23052338
PRODUCT_NAME = "$(TARGET_NAME)";
23062339
};
23072340
name = Debug;
23082341
};
23092342
A8FC12DE1CF62B6B005BE06F /* Release */ = {
23102343
isa = XCBuildConfiguration;
23112344
buildSettings = {
2345+
CLANG_ENABLE_OBJC_WEAK = YES;
23122346
PRODUCT_NAME = "$(TARGET_NAME)";
23132347
};
23142348
name = Release;
23152349
};
23162350
A8FC12E71CF62B99005BE06F /* Debug */ = {
23172351
isa = XCBuildConfiguration;
23182352
buildSettings = {
2353+
CLANG_ENABLE_OBJC_WEAK = YES;
23192354
PRODUCT_NAME = "$(TARGET_NAME)";
23202355
};
23212356
name = Debug;
23222357
};
23232358
A8FC12E81CF62B99005BE06F /* Release */ = {
23242359
isa = XCBuildConfiguration;
23252360
buildSettings = {
2361+
CLANG_ENABLE_OBJC_WEAK = YES;
23262362
PRODUCT_NAME = "$(TARGET_NAME)";
23272363
};
23282364
name = Release;
23292365
};
23302366
A8FC12F11CF62BA0005BE06F /* Debug */ = {
23312367
isa = XCBuildConfiguration;
23322368
buildSettings = {
2369+
CLANG_ENABLE_OBJC_WEAK = YES;
23332370
PRODUCT_NAME = "$(TARGET_NAME)";
23342371
};
23352372
name = Debug;
23362373
};
23372374
A8FC12F21CF62BA0005BE06F /* Release */ = {
23382375
isa = XCBuildConfiguration;
23392376
buildSettings = {
2377+
CLANG_ENABLE_OBJC_WEAK = YES;
23402378
PRODUCT_NAME = "$(TARGET_NAME)";
23412379
};
23422380
name = Release;

0 commit comments

Comments
 (0)