mockolo: 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

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 7
  • Comments: 15 (1 by maintainers)

Commits related to this issue

Most upvoted comments

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 have same issue with Xcode 13.3. Mockolo was installed by Mint.

uber/mockolo@1.7.0

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.

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 think this is an issue caused by brew and not the source code, can we open a ticket there and close this one?

Yes it fails on 1.7.0

Tested on CI (code magic) and local Mac

What version of Mockolo is installed by Homebrew? I am wondering if 1.7.0 also causes an error.

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.