You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a simple swifttemplate that generates inline code for types implementing a custom protocol.
<%_ for type in types.all where type.implements["MyProtocol"] != nil { -%>
// sourcery:inline:auto:<%= type.name %>.MyTemplate
let someVar = "test"
// sourcery:end
<%_ } -%>
Everything is working fine and the code is generated inline as expected :
Now, I want to be able to parse the generated code to use it in another template so I add the forceParse option in my .sourcery.yml config file :
forceParse:
- MyTemplate
It works as expected and the generated is correctly parsed and available when using the other template but it also generates a MyTemplate.generated.swift file in my output folder with the following contents :
// Generated using Sourcery 2.2.4 — https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// sourcery:inline:auto:MyStruct.MyTemplate
letsomeVar="test"
// sourcery:end
// sourcery:inline:auto:MyStruct2.MyTemplate
letsomeVar="test"
// sourcery:end
// sourcery:inline:auto:MyStruct3.MyTemplate
letsomeVar="test"
// sourcery:end
Obviously the project doesn't compile anymore with it.
Is this file supposed to be generated as well or am I doing something wrong ? How can I get rid of it without deleting it manually after each generation ?
The text was updated successfully, but these errors were encountered:
Here is a simple
swifttemplate
that generates inline code for types implementing a custom protocol.Everything is working fine and the code is generated inline as expected :
Now, I want to be able to parse the generated code to use it in another template so I add the
forceParse
option in my.sourcery.yml
config file :It works as expected and the generated is correctly parsed and available when using the other template but it also generates a
MyTemplate.generated.swift
file in my output folder with the following contents :Obviously the project doesn't compile anymore with it.
Is this file supposed to be generated as well or am I doing something wrong ? How can I get rid of it without deleting it manually after each generation ?
The text was updated successfully, but these errors were encountered: