Uploaded image for project: 'Swift'
  1. Swift
  2. SR-7893

Compiler error when building for Swift 4.2 in Xcode 10 beta

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: None
    • Labels:
      None
    • Environment:

      Swift 4.2
      Xcode 10 beta
      macOS 10.13.4

      Description

      I've ported one of my projects to Swift 4.2 and compilation is failing with an abort trap 6. It works fine in Swift 4.1.5 mode.

      The project is here: https://github.com/schibsted/layout/tree/swift-4.2-support

      Crash log:

      <unknown>:0: error: fatal error encountered while reading from module 'Layout'; please file a bug report with your project and the crash log
      
      *** DESERIALIZATION FAILURE (please include this section in any bug report) ***
      result is ambiguous
      0  swift                    0x000000010a55dc5a PrintStackTraceSignalHandler(void*) + 42
      1  swift                    0x000000010a55d066 SignalHandler(int) + 966
      2  libsystem_platform.dylib 0x00007fff6d255f5a _sigtramp + 26
      3  libsystem_platform.dylib 0x0000000115e1d2c4 _sigtramp + 2830922628
      4  libsystem_c.dylib        0x00007fff6cff31ae abort + 127
      5  swift                    0x0000000107a0399b swift::ModuleFile::fatal(llvm::Error) + 1915
      6  swift                    0x0000000107a3b4d2 swift::SILDeserializer::readGlobalVar(llvm::StringRef) + 1890
      7  swift                    0x0000000107ae5f9a swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 234
      8  swift                    0x0000000106838dbe performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 34750
      9  swift                    0x000000010682d10f swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7839
      10 swift                    0x00000001067d6c48 main + 13144
      11 libdyld.dylib            0x00007fff6cf47015 start + 1
      12 libdyld.dylib            0x0000000000000071 start + 2467008605
      Stack dump:
      0.	Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -merge-modules -emit-module /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Shared~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutError+LayoutNode~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/ReloadManager~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Layout+XML~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UIScrollView+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Utilities~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutNode+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/TitleTextAttributes~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutDelegate~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UITableView+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutConsole~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/XMLParser~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/StringUtils~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutError~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UIFont+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UIStackView+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutViewController~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutNode+XML~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Expression~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutLoader~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutLoading~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UIViewController+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Layout+Testing~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/CALayer+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutBacked~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Sprinter~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UIView+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/UICollectionView+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/RuntimeType~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutExpression~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Properties~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/ExpressionParser~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutManaged~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/XMLNode+Layout~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/AnyExpression~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Files~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/LayoutNode~partial.swiftmodule /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/RuntimeTypes~partial.swiftmodule -parse-as-library -sil-merge-partial-modules -disable-diagnostic-passes -disable-sil-perf-optzns -target x86_64-apple-ios9.0-simulator -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.0.sdk -I /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Products/Debug-iphonesimulator -F /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Products/Debug-iphonesimulator -enable-testing -g -import-underlying-module -module-cache-path /Users/nick/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -profile-generate -profile-coverage-mapping -swift-version 4.2 -enforce-exclusivity=checked -Onone -D DEBUG -disable-swift3-objc-inference -serialize-debugging-options -Xcc -working-directory -Xcc /Users/nick/Schibsted/layout -Xcc -I/Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Layout-generated-files.hmap -Xcc -I/Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Layout-own-target-headers.hmap -Xcc -I/Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Layout-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Layout-project-headers.hmap -Xcc -I/Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/DerivedSources/x86_64 -Xcc -I/Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -ivfsoverlay -Xcc /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/unextended-module-overlay.yaml -emit-module-doc-path /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Layout.swiftdoc -emit-objc-header-path /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Layout-Swift.h -module-name Layout -o /Users/nick/Library/Developer/Xcode/DerivedData/Layout-bkkuetfvrqecnlcbceyhmnzzuoon/Build/Intermediates.noindex/Layout.build/Debug-iphonesimulator/Layout.build/Objects-normal/x86_64/Layout.swiftmodule 
      1.	While deserializing SIL global "UIEdgeInsetsZero"
      error: Abort trap: 6
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nicklockwood Nick Lockwood
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: