From fca40c0e401706a005088eb834cb9e9cb1325f18 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Tue, 11 Jun 2024 18:38:32 +0100 Subject: [PATCH] Enable Swift 6 --- Whisky.xcodeproj/project.pbxproj | 30 +++++++++++++------ .../xcshareddata/xcschemes/Whisky.xcscheme | 2 +- .../xcshareddata/xcschemes/WhiskyCmd.xcscheme | 2 +- .../xcschemes/WhiskyThumbnail.xcscheme | 2 +- Whisky/AppDelegate.swift | 3 +- Whisky/Utils/Winetricks.swift | 2 +- Whisky/View Models/BottleVM.swift | 6 ++-- Whisky/Views/Bottle/BottleListEntry.swift | 3 +- Whisky/Views/Bottle/WinetricksView.swift | 6 +++- Whisky/Views/ContentView.swift | 2 +- Whisky/Views/FileOpenView.swift | 2 +- Whisky/Views/Setup/RosettaView.swift | 4 +-- .../Views/Setup/WhiskyWineDownloadView.swift | 10 +++++-- .../Views/Setup/WhiskyWineInstallView.swift | 2 +- Whisky/Views/WhiskyApp.swift | 4 +-- WhiskyCmd/Main.swift | 24 +++++++-------- WhiskyKit/Package.swift | 3 +- .../WhiskyKit/Extensions/URL+Extensions.swift | 2 +- .../Sources/WhiskyKit/PE/COFFFileHeader.swift | 2 +- WhiskyKit/Sources/WhiskyKit/PE/Magic.swift | 2 +- .../Sources/WhiskyKit/PE/OptionalHeader.swift | 2 +- .../WhiskyKit/PE/PortableExecutable.swift | 2 +- WhiskyKit/Sources/WhiskyKit/PE/Section.swift | 5 ++-- WhiskyKit/Sources/WhiskyKit/ShellLink.swift | 4 +-- WhiskyKit/Sources/WhiskyKit/Tar.swift | 2 +- .../Sources/WhiskyKit/Whisky/Bottle.swift | 4 ++- .../Sources/WhiskyKit/Whisky/BottleData.swift | 2 +- .../WhiskyKit/Whisky/BottleSettings.swift | 4 +-- .../Sources/WhiskyKit/Whisky/Program.swift | 4 ++- 29 files changed, 85 insertions(+), 57 deletions(-) diff --git a/Whisky.xcodeproj/project.pbxproj b/Whisky.xcodeproj/project.pbxproj index 0075057f2..b69cb40ba 100644 --- a/Whisky.xcodeproj/project.pbxproj +++ b/Whisky.xcodeproj/project.pbxproj @@ -475,7 +475,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1500; - LastUpgradeCheck = 1420; + LastUpgradeCheck = 1600; TargetAttributes = { 6E40495129CCA19C006E3F1B = { CreatedOnToolsVersion = 14.2; @@ -685,6 +685,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -748,6 +749,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -772,7 +774,6 @@ 6E40497829CCA19D006E3F1B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ARCHS = arm64; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -781,6 +782,7 @@ CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 40; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Whisky/Preview Content\""; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; @@ -803,14 +805,14 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_STRICT_CONCURRENCY = complete; + SWIFT_VERSION = 6.0; }; name = Debug; }; 6E40497929CCA19D006E3F1B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ARCHS = arm64; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; @@ -819,6 +821,7 @@ CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 40; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_ASSET_PATHS = "\"Whisky/Preview Content\""; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; @@ -842,7 +845,8 @@ PROVISIONING_PROFILE_SPECIFIER = ""; "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = Whisky; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_STRICT_CONCURRENCY = complete; + SWIFT_VERSION = 6.0; }; name = Release; }; @@ -853,6 +857,7 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; ENABLE_HARDENED_RUNTIME = YES; @@ -867,7 +872,8 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; - SWIFT_VERSION = 5.0; + SWIFT_STRICT_CONCURRENCY = complete; + SWIFT_VERSION = 6.0; }; name = Debug; }; @@ -878,6 +884,7 @@ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; ENABLE_HARDENED_RUNTIME = YES; @@ -891,7 +898,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; - SWIFT_VERSION = 5.0; + SWIFT_STRICT_CONCURRENCY = complete; + SWIFT_VERSION = 6.0; }; name = Release; }; @@ -903,6 +911,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 40; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; ENABLE_HARDENED_RUNTIME = YES; @@ -925,7 +934,8 @@ SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_STRICT_CONCURRENCY = complete; + SWIFT_VERSION = 6.0; }; name = Debug; }; @@ -937,6 +947,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application"; CODE_SIGN_STYLE = Manual; CURRENT_PROJECT_VERSION = 40; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=macosx*]" = 92S3SG4PTH; ENABLE_HARDENED_RUNTIME = YES; @@ -958,7 +969,8 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; + SWIFT_STRICT_CONCURRENCY = complete; + SWIFT_VERSION = 6.0; }; name = Release; }; diff --git a/Whisky.xcodeproj/xcshareddata/xcschemes/Whisky.xcscheme b/Whisky.xcodeproj/xcshareddata/xcschemes/Whisky.xcscheme index cd031525c..75d05b17a 100644 --- a/Whisky.xcodeproj/xcshareddata/xcschemes/Whisky.xcscheme +++ b/Whisky.xcodeproj/xcshareddata/xcschemes/Whisky.xcscheme @@ -1,6 +1,6 @@