krzysztofzablocki / Sourcery

Meta-programming for Swift, stop writing boilerplate code.
http://merowing.info
MIT License
7.58k stars 605 forks source link

Disabled Optimization During Generated Code Verification #1300

Closed art-divin closed 3 months ago

art-divin commented 3 months ago

Context

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.