Allright, with the homebrew swift fix PR up, we should be able to release this version soon:
After those PRs are done, some general housekeeping:
documents being deprecated in favour of documentAny chance we can include https://github.com/SwiftGen/SwiftGen/pull/709 as well? I'm afraid that it might take a while for 6.3.0 to land as we want to include more complicated features (e.g. stringsdict support)
Haven't had the time to really review/test that one, will keep you updated.
Alternatively in case 709 doesn't make it in time we could always do a 6.2.2 with just that fix (a performance improvement can be considered a bugfix and thus eligible for patch version). But indeed would be better to be able to directly ship it with 6.2.1 馃憤
Brew changes:
diff --git a/swiftgen.rb b/swiftgen.rb
index a7ddc49..ef6fac5 100644
--- a/swiftgen.rb
+++ b/swiftgen.rb
@@ -29,6 +29,7 @@ class Swiftgen < Formula
"Tests/Fixtures/Resources/Colors/colors.xml" => "colors.xml",
"Tests/Fixtures/Resources/CoreData/Model.xcdatamodeld" => "Model.xcdatamodeld",
"Tests/Fixtures/Resources/Fonts" => "Fonts",
+ "Tests/Fixtures/Resources/JSON" => "JSON",
"Tests/Fixtures/Resources/IB-iOS" => "IB-iOS",
"Tests/Fixtures/Resources/Plist/good" => "Plist",
"Tests/Fixtures/Resources/Strings/Localizable.strings" => "Localizable.strings",
@@ -38,6 +39,7 @@ class Swiftgen < Formula
"Tests/Fixtures/Generated/CoreData/swift5/defaults.swift" => "coredata.swift",
"Tests/Fixtures/Generated/Fonts/swift5/defaults.swift" => "fonts.swift",
"Tests/Fixtures/Generated/IB-iOS/scenes-swift5/all.swift" => "ib-scenes.swift",
+ "Tests/Fixtures/Generated/JSON/runtime-swift5/all.swift" => "json.swift",
"Tests/Fixtures/Generated/Plist/runtime-swift5/all.swift" => "plists.swift",
"Tests/Fixtures/Generated/Strings/structured-swift5/localizable.swift" => "strings.swift",
"Tests/Fixtures/Generated/XCAssets/swift5/all.swift" => "xcassets.swift",
@@ -68,6 +70,10 @@ class Swiftgen < Formula
"#{fixtures}/IB-iOS").strip,
(fixtures/"ib-scenes.swift").read.strip, "swiftgen run ib failed"
+ assert_equal shell_output("#{bin}/swiftgen run json --templatePath " \
+ "#{pkgshare/"templates/json/runtime-swift5.stencil"} #{fixtures}/JSON").strip,
+ (fixtures/"json.swift").read.strip, "swiftgen run json failed"
+
assert_equal shell_output("#{bin}/swiftgen run plist --templatePath " \
"#{pkgshare/"templates/plist/runtime-swift5.stencil"} #{fixtures}/Plist").strip,
(fixtures/"plists.swift").read.strip, "swiftgen run plist failed"
@@ -83,8 +89,7 @@ class Swiftgen < Formula
(fixtures/"xcassets.swift").read.strip, "swiftgen run xcassets failed"
assert_equal shell_output("#{bin}/swiftgen run yaml --templatePath " \
- "#{pkgshare/"templates/yaml/inline-swift5.stencil"} --filter '.(json|ya?ml)$' " \
- "#{fixtures}/YAML").strip,
+ "#{pkgshare/"templates/yaml/inline-swift5.stencil"} #{fixtures}/YAML").strip,
(fixtures/"yaml.swift").read.strip, "swiftgen run yaml failed"
end
end
Appreciate the fixes :-) #730 just cost me a whole afternoon of head scratching. Found this after eventually working out brew swiftgen was the culprit :-(
We discussed adding a devel section to the Brew formula (https://www.rubydoc.info/github/Homebrew/brew/Formula#devel-class_method), but apparently it is considered deprecated: https://discourse.brew.sh/t/why-is-devel-block-deprecated/8011/2.
Therefore, I propose changing the head definition to point to the develop branch. Right now it points to the stable branch, but there's no difference between stable and the latest release (and there should never be).