typewriter icon indicating copy to clipboard operation
typewriter copied to clipboard

Customizable prefix when generating the iOS client

Open brototyp opened this issue 4 years ago • 0 comments

Hey lovely typewriter team,

I am actually not completely sure if this is a bug report or a feature request. I'll just write it as a feature request. Please feel free to correct me if this is something that should actually work.

My current situation

I am currently trying to use typewriter in an iOS project. Unfortunately there is a name collision.

  • In the Analytics/Segment iOS SDK there is a SEGContext class.
  • In our test plan there is a property (I hope that's how you call them) called context. When I use npx typewriter it generates a second SEGContext class.

Proposal

We could make the SEG prefix configurable in the typewriter.yml configuration file. In that case I could change the SEG prefix to e.g. SEGGenerated which would lead to a SEGGeneratedContext class to be generated an thus resolve the collision.

Alternatives

  • Instead of making the prefix configurable, we could also change the prefix for the generated files (e.g. to SEGG) to prevent collisions
  • I saw there already is some kind of mechanism to resolve collisions (some duplicate types have a number appended). Maybe there is a way to leverage this as well?

Looking forward to your feedback and ideas!

brototyp avatar Aug 24 '20 14:08 brototyp

I just saw this being closed as completed but can't find any more context. How did you decide to implement it?

brototyp avatar Sep 16 '22 11:09 brototyp