SwiftGen: New version fails to generate sources but exists with code 0

Version: SwiftGen v5.2.0 (Stencil v0.9.0, StencilSwiftKit v2.3.0, SwiftGenKit v2.1.1)

I wasted a good 20 minutes trying to figure out why my build on Travis was failing. Turns out the latest SwiftGen stopped generating sources, but I didn’t see this locally because the old sources worked, and new ones weren’t being generated, despite the build phase not failing:

Error: You need to choose EITHER a named template OR a template path. Found name 'structured-swift3' and path ''

This is my script:

swiftgen fonts "$FRAMEWORK_DIR/../app/resources/fonts" --output "$OUTPUT_DIR/Fonts.swift" -t swift3
swiftgen colors "$FRAMEWORK_DIR/resources/Colors.clr" --output "$OUTPUT_DIR/Colors.swift" -t swift3
swiftgen strings "$FRAMEWORK_DIR/en.lproj/Localizable.strings" --output "$OUTPUT_DIR/Strings.swift" -t structured-swift3
swiftgen xcassets "$FRAMEWORK_DIR/Assets.xcassets" --output "$OUTPUT_DIR/Images.swift" -t swift3 --param noAllValues

I still don’t really know why this broke, but either way this error should make swiftgen fail instead of continuing silently.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 25 (7 by maintainers)

Most upvoted comments

@AliSoftware maybe I will at some point or for another project. Right now I just want to get this to work again, as this minor version bump has completely broken our project…