Skip to content
This repository has been archived by the owner on Sep 6, 2018. It is now read-only.

Remove old stuff #11

Closed
djbe opened this issue Jan 16, 2017 · 8 comments
Closed

Remove old stuff #11

djbe opened this issue Jan 16, 2017 · 8 comments

Comments

@djbe
Copy link
Member

djbe commented Jan 16, 2017

Refs SwiftGen/SwiftGen#244

  • colors:
    • default: rename to swift2
    • swift3: no changes
    • rawvalues: delete, deprecated by default
  • fonts:
    • default: rename to swift2
    • swift3: no changes
  • images:
    • default: delete, deprecated by dot-syntax
    • dot-syntax-swift3: rename to swift3
    • dot-syntax: rename to swift2
    • swift3: delete, deprecated by dot-syntax
    • all-values: add the all values option to templates using a --param
  • storyboards:
    • default: rename to swift2
    • swift3: no changes
    • osx-default: rename to macOS-swift2
    • osx-swift3: rename to macOS-swift3
    • lowercase: check if these are still needed with module parsing introduced in 4.2
    • uppercase: check if these are still needed with module parsing introduced in 4.2
    • osx-lowercase: check if these are still needed with module parsing introduced in 4.2
  • strings:
    • default: rename to flat-swift2
    • dot-syntax-swift3: rename to structured-swift3
    • dot-syntax: rename to structured-swift2
    • genstrings: no idea
    • no-comments-swift3: add as --param option to other templates
    • structured: delete, deprecated by dot-syntax
    • swift3: rename to flat-swift3
@djbe
Copy link
Member Author

djbe commented Feb 19, 2017

To avoid this rename dance in the future, each template will explicitly name the swift version it's for.

@AliSoftware
Copy link
Collaborator

Should we also remove the logic of falling back to a default name in the CLI (in Commander's config)?

Or should we keep it falling back to -t default, even if we won't embed any template named "default.stencil in SwiftGen itself, so that people could still use a default template in their Application Support directory?

@djbe
Copy link
Member Author

djbe commented Feb 19, 2017

As this will be for 5.0 and thus a breaking change, I'd say remove the default behaviour. Because once swift 4 is made the default, people will expect that to be the default, and we might not be able to quickly release a version that supports that.

@AliSoftware AliSoftware modified the milestone: SwiftGen 5.0 (breaking) Feb 19, 2017
@djbe
Copy link
Member Author

djbe commented Apr 17, 2017

While documenting the templates, I was wondering what the use case is for the colors-rawvalue template? It's not like it adds much, the default template already provides an rgbaValue property.

@AliSoftware
Copy link
Collaborator

It's historical, was the first template for colors (before someone pointed out that it wouldn't allow multiple color names having same value). We might as well remove it indeed as it doesn't add any real value

@djbe
Copy link
Member Author

djbe commented May 12, 2017

As we've decided to keep the flat strings template, I think it'd be better if we have structured-swift2/3 and flat-swift2/3 templates. Structured in this case being the current dot-syntax templates. I've already applied this in the PR if you want to check it out.

@AliSoftware
Copy link
Collaborator

Side note: maybe we should start a MigrationGuide.md, and enrich it on every PR removing old stuff. Like for this PR we could have a paragraph "old name / new name" for the templates so that people know what to replace their -t parameter with. Or do that doc in the Wiki, but don't forget to update it every time a breaking PR is merged.

@djbe
Copy link
Member Author

djbe commented May 12, 2017

Had the same thought. Will see about making one for this to get started.

@djbe djbe closed this as completed in #47 May 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants