mockolo
mockolo copied to clipboard
xcode 13.3 - fatal error - SwiftSyntax.ParserError 1
MockoloFramework/SourceParser.swift:103: Fatal error: The operation couldn’t be completed. (SwiftSyntax.ParserError error 1.)
I do receive that error after updating my Xcode to 13.3. I was working previously on 13.2.1
same issue with brew installation (1.7.0).
It's probably linked to the swift 5.6 compatibility (cf. Package.swift line 9)
var mockoloFrameworkTargetDependencies: [Target.Dependency] = [
// .product(name: "SwiftSyntax", package: "SwiftSyntax"),
]
I rebuild it from source code (option 4 in the installation doc) and removed this line in the Package.swift and solved the issue.
What version of Mockolo is installed by Homebrew?
I am wondering if 1.7.0
also causes an error.
Yes it fails on 1.7.0
Tested on CI (code magic) and local Mac
I have version 1.7.0
and have same issue with Xcode 13.3
Hello,
Any news with this issue, I'm pretty sure my quick fix is not the proper way to fix it. I didn't check what was the purpose of this array of dependencies.
Cheers.
I have same issue with Xcode 13.3. Mockolo was installed by Mint.
uber/[email protected]
Below is the build log.
/Applications/Xcode.app/Contents/Developer/usr/bin/make generate-mocks-with-mockolo
mint run mockolo --sourcedirs ./{APPNAME}/ -d ./{APPNAME}/Helper/Mock/MockResults.swift -i {APPNAME} --mock-final --enable-args-history
Start...
["Process input mock files..."]
["Took", 5.900859832763672e-05]
["Process source files and generate an annotated/protocol map..."]
MockoloFramework/SourceParser.swift:103: Fatal error: The operation couldn’t be completed. (SwiftSyntax.ParserError error 1.)
I have same issue with Xcode 13.3. I'm using Mockolo v1.7.0 installed by Homebrew.
1.7.0 works on 13.3 when installed using MINT
Ran into the same issue. Worked if I cloned it and ran it locally. Reinstalling and building from source fixed it for me.
brew reinstall --build-from-source mockolo
I think this is an issue caused by brew and not the source code, can we open a ticket there and close this one?
Is there a link to the brew ticket?
Is there a link to the brew ticket?
Feel free to make another, or even better make a PR to the brew formula
For anyone who installs mockolo
by Mint or Homebrew:
This happened by missing lib_InternalSwiftSyntaxParser.dylib
come along with the mockolo
released binary.
We need to fix how Mint and Homebrew install these files.
My workaround:
Step 1: Download tar.gz
binary zipped file from https://github.com/uber/mockolo/releases/tag/1.7.1
Step 2: Extract, and copy all the files in the extracted folder into the current installed folder.
For Mint:
~/.mint/packages/github.com_uber_mockolo/build/<your_installed_version>/
For Homebrew:
/opt/homebrew/Cellar/mockolo/<your_installed_version>/bin
I think this error had already been fixed since 1.8.0
.
ref.
- brew side
- https://github.com/Homebrew/homebrew-core/pull/116229
- mint side
- https://github.com/yonaskolb/Mint/pull/248
- https://github.com/yonaskolb/Mint/pull/253
please try updating mockolo to the latest (1.8.1
) by running brew upgrade mockolo
/ mint install uber/[email protected]
.
Issues around lib_InternalSwiftSyntaxParser.dylib
are soleved at version 2.0.0