uber / mockolo

Efficient Mock Generator for Swift
Apache License 2.0
804 stars 85 forks source link

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

Closed kabirkhaan closed 1 year ago

kabirkhaan commented 1 year ago

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. https://github.com/uber/mockolo/blob/2b425df144b0a1e61bf2202d481637741b2b3270/Package.swift#L18

ENVIRONMENT

How the Mockolo is integated in project?

Other Context

sidepelican commented 1 year ago

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. https://github.com/uber/mockolo/blob/2b425df144b0a1e61bf2202d481637741b2b3270/.github/workflows/release.yml#L16

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.) https://github.com/uber/mockolo/blob/2b425df144b0a1e61bf2202d481637741b2b3270/install-script.sh#L72