Skip to content

Conversation

@calda
Copy link
Member

@calda calda commented Jul 4, 2023

Summary

Swift 5.9 adds support for package-level declarations (SE-0386). We should mention this in the rule discussing how to organize declarations.

Should we merge this now or wait until Swift 5.9 is released? Either seems ok to me

@bachand
Copy link
Contributor

bachand commented Jul 6, 2023

Should we merge this now or wait until Swift 5.9 is released? Either seems ok to me

I am fine merging this now since the proposal is accepted. Since the feature is additive in Swift 5.9, having his rule in the style guide now won't be problematic for anyone IMHO.

Copy link
Contributor

@bachand bachand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to update the SwiftFormat rule or has that already been done? Thanks @calda !

* `// MARK: Lifecycle` for `init` and `deinit` methods.
* `// MARK: Open` for `open` properties and methods.
* `// MARK: Public` for `public` properties and methods.
* `// MARK: Package` for `package` properties and methods.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ordering makes sense to me, based on this description from the proposal.
Screenshot 2023-07-06 at 1 41 43 PM

@calda
Copy link
Member Author

calda commented Jul 6, 2023

@bachand I updated the SwiftFormat rule in nicklockwood/SwiftFormat#1479

@calda calda merged commit ec0acb8 into master Jul 6, 2023
@calda calda deleted the cal--package-keyword branch July 6, 2023 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants