mockolo
mockolo copied to clipboard
[CI / Bitrise] Unable to generate mocks in CI [add better logging in mockolo for failure debugging!]
Hi!
I was trying out mockolo in my project and installed the latest version 1.6.2 from brew (brew install mockolo)
Using the following command in commandline results in below error
command below mockolo --sourcedirs /Users/vagrant/git/project/Core --destination /Users/vagrant/git/project/GeneratedMock.swift
Error below MockoloFramework/SourceParser.swift:101: Fatal error: The operation couldn’t be completed. (SwiftSyntax.ParserError error 1.)
Specs bitrise xcode 13.1 stack, however I am not sure if xcode version is needed for this issue? cause in my pipeline, I just checkout and run the above script!
let me know how to debug this further!
I do understand that the above SwiftSyntax.ParserError error 1.
does not convey any actionable data, however I would suggest to add an error wrapper in mockolo to provide more information on what went wrong, how we can fix it rather than just saying MockoloFramework/SourceParser.swift:101: Fatal error: The operation couldn’t be completed. (SwiftSyntax.ParserError error 1.)
In the meantime, I downgraded to 1.5.0 since that was the last release binary provided in the github by mockolo and it works fine!
Still I do want to move to 1.6.x or 1.7.x too, so will keep this ticket open till we added better logging for failure
Please check out https://github.com/uber/mockolo/releases/tag/1.6.3
Thank you so much for your reply @EspressoCup , much appreciated!
I moved to 1.6.3 and still see the same issue 🙇
MockoloFramework/SourceParser.swift:101: Fatal error: The operation couldn’t be completed. (SwiftSyntax.ParserError error 1.)
using the binary from the release file for ease of replication, rather than brew
@shreyanshp Does this problem still occur?