outfoxx / swiftpoet

Kotlin and Java API for generating .swift source files.
Apache License 2.0
277 stars 26 forks source link

Move CodeWriter's import collection step into a factory method. #89

Closed dnkoutso closed 7 months ago

dnkoutso commented 7 months ago

Inspired by https://github.com/square/kotlinpoet/pull/1353

dnkoutso commented 7 months ago

There's existing tests confirming all is good?

@oldergod yes!

kdubb commented 7 months ago

Looks good. Aside from enforcing the close, is this fixing anything or preparing for something? Just curious.

dnkoutso commented 7 months ago

Looks good. Aside from enforcing the close, is this fixing anything or preparing for something? Just curious.

At first I had thought it removes the need to write files twice...so I was driven by the motivation to reduce that, however it seems that was not the case prior to this change either...

I think its more of an API cleanup and I can ask the KotlinPoet folks on further explanation of their change.

I guess I did the work thinking I was going to improve things further ................... lol

dnkoutso commented 7 months ago

I guess the real fix that ended up having here is calling close