swift-openapi-generator icon indicating copy to clipboard operation
swift-openapi-generator copied to clipboard

Use the same .swift-format in the repo and in the generated code

Open czechboy0 opened this issue 2 years ago • 5 comments

We use swift-format both for formatting the generator code, and the generated code. However, the configuration is duplicated in both places, we should have one source of truth for it instead.

czechboy0 avatar May 25 '23 11:05 czechboy0

I've opened a PR for this. Please have a look.

denil-ct avatar Jun 18 '23 19:06 denil-ct

Well, this is good timing: https://github.com/apple/swift-package-manager/pull/6067

Unfortunately, it's only supported in Swift 5.9, so I propose we punt this issue until later, and adopt it when we bump the minimum tools version to 5.9.

czechboy0 avatar Jun 19 '23 10:06 czechboy0

Sounds good to me. So sometime in the fall when Xcode 15 comes out of beta I assume?

denil-ct avatar Jun 19 '23 10:06 denil-ct

To be determined, but marking as blocked for now. You can close your other PR for now, but we'll definitely appreciate the contribution when Swift OpenAPI Generator requires Swift tools version 5.9!

czechboy0 avatar Jun 19 '23 10:06 czechboy0

Filed #75 to properly relate the two.

czechboy0 avatar Jun 19 '23 10:06 czechboy0

@czechboy0 if #75 is 1.0, can't this be under the same milestone as well?

denil-ct avatar Sep 02 '23 17:09 denil-ct

@denil-ct the milestone doesn't mean when it'll land, it means which release it's blocking. It's likely this will land around the same time as #75, the milestone just means this wouldn't be considered a 1.0 blocker.

czechboy0 avatar Sep 02 '23 17:09 czechboy0

We don't use swift-format as a library anymore, so this is obsolete.

czechboy0 avatar Oct 27 '23 05:10 czechboy0