SwiftTemplate uses swift compiler to verify generated code.
Verification does not generate binary for use, rather, a successful result of the generation is all what matters for all use cases of Sourcery executable.
For code verification, we want to use -c release to not make compiler generate additional "debug code" metadata, but we definitely do not want to use optimization during this compilation process.
Context
SwiftTemplate uses
swift
compiler to verify generated code. Verification does not generatebinary
for use, rather, a successful result of the generation is all what matters for all use cases ofSourcery
executable.For code verification, we want to use
-c release
to not make compiler generate additional "debug code" metadata, but we definitely do not want to use optimization during this compilation process.