Yuki Aki (freddi) Software Engineer at Developer Experience team, Mobile Experience dept - Joined LINE Fukuoka (2019) - Joined LINE (2022) - OSS Contributor - International Speaker - ὑ 2 Cats (Haruko and Tom)
Compiler Bug class Test { static func test() { return [0, 1, 2].compactMap { _ in @SomeWrapper var value: Bool? = false if value != nil { return false } return value ?? false } } } Xcode 13 with Swift 5.6 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Compiler Bug class Test { static func test() { return [0, 1, 2].compactMap { _ in @SomeWrapper var value: Bool? = false if value != nil { return false } return value ?? false } } } Xcode 13 with Swift 5.6 Xcode 14 Beta with Swift 5.7 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Deploy to AppStore Connect Project Generation for iOS16 XcodeGen OSS Tools problem With Xcode14 Beta fastlane "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Compiler Bug class Test { static func test() { return [0, 1, 2].compactMap { _ in @SomeWrapper var value: Bool? = false if value != nil { return false } return value ?? false } } } Xcode 14 Beta with Swift 5.7 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Report Items Code • Minimum code to reproduce • DO NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
Report Items Code • Minimum code to reproduce • DO NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
Remove Code’s Context class Test { static func test() { … viewModel.fetchMessage() dataStore.compactMap { _ in @UserDefault var flag: Bool? = false if flag != nil { return false } return flag ?? false } } } Reduce Business Logic
Report Items Code • Minimum code to reproduce • DO NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
Report Items Code • Minimum code to reproduce • DO NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
Report Items Code • Minimum code to reproduce • DO NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
Xcode 14 Beta with Swift 5.7 Crash Compiler error: compile command failed due to signal 4 (use -v to see invocation) Please submit a bug report (https://swift.org/contributing/#reporting-bugs) .… Stack dump: 0. Program arguments: "/Applications/Xcode-14 beta.app/… 1. Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file … 4. While evaluating request TypeCheckFunctionBodyRequest … 5. While type-checking statement at [testtest.swift:30:22 - line:39:3] … return [0, 1, 2].compactMap { _ in … Compiler crash with stack trace "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Log (Stack Trace) error: compile command failed due to signal 4 (use -v to see invocation) Please submit a bug report (https://swift.org/contributing/#reporting-bugs) .… Stack dump: 0. Program arguments: "/Applications/Xcode-14 beta.app/… 1. Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2) 2. Compiling with the current language version 3. While evaluating request TypeCheckSourceFileRequest(source_file "testtest.swift") 4. While evaluating request TypeCheckFunctionBodyRequest … 5. While type-checking statement at [testtest.swift:30:22 - line:39:3] RangeText="{ return [0, 1, 2].compactMap { _ in … "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Report Items Code • Minimum code to reproduce • DO NOT include private information Environment • Xcode version • swift --version Log • Stack trace • Error log • Expected behavior
Process for Fixing Bugs Feedback Github Issue Change feedback status Pull Request opened Pull Request Reply to feedback 2 ~ 3 Later Xcode version Investigation Fix Release Report
Motivation to XcodeGen - Good impact to other engineers if fixed - Easy and fast to check new features of Xcode 14 - Our team has 2 Core Committers (@giginet, @freddi-kit)
Bundled Tools of Xcode for Deployment Xcode 14 Application Loader + iTMSTransporter fastlane(pilot) "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0 REMOVED
Problems - No-investigation for the issue - Intended changes of Xcode 14 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
- No-investigation for the issue Catch it as our team task! - Intended changes of Xcode 14 Interact with Apple in Feedback (and Intended changes) Solution "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Impact of issue - All iOS engineer in the world cannot deploy with Xcode 14 "Twemoji" by Copyright 2022 Twitter, Inc and other contributors is licensed under CC-BY 4.0
Achievements and Future - Contribution to World-wide problems - XcodeGen, fastlane, Swift Compiler … - LINE with Xcode 14.0 now released - 12.16.0 ~ - Next: Take ownership of More difficult World-wide problems - Swift Compiler, Build System etc…