Multiple paths#213
Conversation
|
You're on fire! 👍 |
Podfile
Outdated
|
|
||
| target 'swiftgen' do | ||
| pod 'Commander', '~> 0.5.0' | ||
| pod 'Commander', :git => 'https://github.com/kylef/Commander.git' |
| Option<String>("segueEnumName", "StoryboardSegue", flag: "g", | ||
| description: "The name of the enum to generate for Segues"), | ||
| Options<String>("import", [], count: 0, | ||
| VariadicOption<String>("import", [], |
There was a problem hiding this comment.
🤔 I guess that means that #175 wasn't actually working as described in the CHANGELOG entry until now… (« Multiple imports can be added by repeating this flag. ») and that actually fixes it then?
There was a problem hiding this comment.
Yeah, you can imagine how I felt when I tried the release 😱
I'd completely misinterpreted the purpose of Options<> which needs a count for the number of arguments it should expect. This fixes that issue 😅
There was a problem hiding this comment.
Yeah I know that @plivesey had the same misunderstanding of this Options<…>(count: ) stuff in Commander (and so did I when we talked about it)… not very intuitive ^^
|
My thoughts on your questions in your original comment: Images
Seems good to me. But be sure to make it as a separate key in the That logic of adding an extra level should be done at the template level imho, with the ColorsColors being generated by a file entirely written manually (as opposed to other commands relying on parsing directories and Xcode/IB files), I'm not sure a lot of people have multiple colours input files 🤔 But since we'd probably already have the logic for the Images, it's probably worth doing the same logic for Colors indeed. StringsAs you said, name spacing Strings is probably worth being in its own separate PR to handle |
|
|
Another thing that would be nice to add in this PR would be to generate an error in case the path(s) given to |
|
I'd actually put that in a separate PR, coming up! |
|
Tried a rebase this time. Also tried it with #206 but that just gave me headaches 😐 |
|
Is this really done and ready to merge now? (I mean, for what I've reviewed in GitHub it seems OK to me, but given that the original comment of this PR still has unchecked boxes I don't want to merge on your behalf if you planned to add more to this PR or will do them in separate PRs. But if you're good, I'll let you the pleasure of hitting the Merge button 👍 |
|
No, I want to at least also do the images one, to fix #207. Just leave it for a minor release.
The rest will have to go in other PRs.
…Sent from my iPhone
On 29 Nov 2016, at 21:22, AliSoftware ***@***.***> wrote:
Is this really done and ready to merge now? (I mean, for what I've reviewed in GitHub it seems OK to me, but given that the original comment of this PR still has unchecked boxes I don't want to merge on your behalf if you planned to add more to this PR or will do them in separate PRs.
But if you're good, I'll let you the pleasure of hitting the Merge button 👍
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Ok. I just added the WIP label to mark it as unfinished, feel free to remove once ready 👍 |
|
Right, so images was a bit more annoying than expected. Both images and strings The current templates contains code that depends on unreleased Stencil code (stencilproject/Stencil#77), but compiles without issues for now. Multiple catalogs' entries will for now appear under one enum. Once we have the new Stencil, we can expect it to automatically work, and will just need an updated output file. |
|
Does that mean that we should wait for the new version of Stencil containing stencilproject/Stencil#77 to be out to release a version of SwiftGen with this #213 PR? As otherwise we would do breaking changes twice (one with the images template containing the extra level even if there's only one assets catalog, then later the one removing it)? |
|
I'm happy to make a Stencil 0.8 (or maybe 1.0-rc.1 🤔) release soon to support this if needed. |
|
Yeah, I suggest waiting until we can merge a PR supporting the latest Stencil. |
|
👍 |
Add missing entry for multiple paths PR #213
Add missing entry for multiple paths PR #213
Covers issues:
Aditionaly relates to:
swiftgen stringsto use a directory as input #32 strings directory inputLocalizable.stringsas input (tableNameparameter) #39 localisable table nameI've now hit a wall in the easy implementation bit:
Image(named: "...")does not care in which catalog something is, and name collisions (I assume) generate warnings. But it might be interesting for the user to know which catalog he/she is accessing. We could just add another folder level, but this would depend on Images: dot syntax #206). We'd only add an extra level if there are multiple catalogs.tableName(see Support other names thanLocalizable.stringsas input (tableNameparameter) #39 and Allowswiftgen stringsto use a directory as input #32). Postponed to later PRWe could just leave some of these open for later, especially the strings one because it first needs more work to support
tableNames.