uber / mockolo

Efficient Mock Generator for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Xcode14.2 Fatal error: The operation couldn’t be completed. (SwiftSyntaxParser.ParserError error 1.)

kabirkhaan opened this issue · comments

After updating Mockolo version 1.8.1, we are facing a folloiwing issue.

MockoloFramework/SourceParser.swift:105: Fatal error: The operation couldn’t be completed. (SwiftSyntaxParser.ParserError error 1.)

Till Mocolo version 1.7.1 every things works fine.

Seems like it related swift-syntax version.

dependencies.append(.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("0.50700.1")))

ENVIRONMENT

  • ARM64 M1

How the Mockolo is integated in project?

Other Context

  • We tried it with 1.8.0 it's also not working, aslo figure out that mockolo Version file is not update with which is fixed in v1.8.1
  • Fetching the 1.8.1 via MINT works
commented

This was also reproduced in my environment.

The cause of this issue is the steps of building mockolo.tar.gz.
This tar file is build by GitHub Actions.

run: ./install-script.sh -s . -t mockolo -d . -o mockolo.tar.gz

In /install-script.sh, it copies libISSP in Xcode ToolChain. This is wrong now. It should be used the libISSP resolved by SwiftPM (it will be placed in the .build/release folder.)

cp "$(xcode-select -p)"/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/lib_InternalSwiftSyntaxParser.dylib .