简体   繁体   中英

Xcode crashes when adding a Swift package

When adding a swift package to a repo adding the package causes a crash. Have you seen such a failure? What did you do?

Here is the stack trace:

    PlugIn Identifier:       libSwiftPM.dylib
    PlugIn Version:          ??? (17700)
    
    Date/Time:             2021-04-17 14:02:53.780 +0100
    OS Version:            macOS 11.3 (20E5231a)
    Report Version:        12
    Bridge OS Version:     5.3 (18P54555a)
    Anonymous UUID:        E0A63D54-3439-6D85-7A26-1B18A623DBA6
    
    Sleep/Wake UUID:       48028EAA-522A-4F9B-A1DB-08E369AB0C6B
    
    Time Awake Since Boot: 94000 seconds
    Time Since Wake:       44000 seconds
    
    System Integrity Protection: enabled
    
    Crashed Thread:        13  Dispatch queue: -[IDEExecutionEnvironment initWithWorkspaceArena:] (QOS: UNSPECIFIED)
    
    Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
    Exception Codes:       0x0000000000000001, 0x0000000000000000
    Exception Note:        EXC_CORPSE_NOTIFY
    
    Termination Signal:    Illegal instruction: 4
    Termination Reason:    Namespace SIGNAL, Code 0x4
    Terminating Process:   exc handler [49193]
    
    Application Specific Information:
    ProductBuildVersion: 12D4e
    Workspace/Workspace.swift:1161: Fatal error: 'try!' expression unexpectedly raised an error: TSCBasic.GraphError.unexpectedCycle
     

In my case it was because I had the package before and I deleted it, but it's still in Derived Data. Clearing Derived data in /Users/<USER>/Library/Developer/Xcode/DerivedData/ , then adding the swift package again fixes it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM