Closed mol-ideals closed 6 months ago
Thank you very much for reporting @mol-ideals 👍🏻
Will be fixed for 2.1.9 release.
Hello @mol-ideals ,
it seems like you are using an older version of Sourcery. Since a couple of versions - specifically, since 2.0.3 release, generated code:
any
(mostly thanks to @paul1893 's work ❤️)loadDataReturnValue
is named loadDataAnyPublisherStringErrorReturnValue
and indeed, return value is (any Publisher<String, Error>)!
Feel free to try using a later version of Sourcery and re-open this issue, in case the issue would persist.
@art-divin That's very strange. I was using 2.1.8 to reproduce it. At least I think so.
The title says it's generated via 2.1.8. For clarity I've tried reinstalling sorcery but it didn't change anything
If 2.1.8 generates a different output for you the only theory I have is that somehow my older version is still alive.. but I can't see anywhere. I installed sorcery via Homebrew if it matters
@mol-ideals ,
there's nothing strange in particular, but it seems like the stencil
file which is used in your setup is from an older version of Sourcery. Please check that one file, and update it. The newer version of this file is located under Templates/AutoMockable.stencil
in the distributed release archive.
Thank you @art-divin It worked!
// Given
// Generated code:
This line
var loadDataReturnValue: any Publisher<String, Error>!
doesn't compile. The type needs to be placed inside the round brackets. This does compile -var loadDataReturnValue: (any Publisher<String, Error>)!