Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package keyword to list of declaration categories #232

Merged
merged 1 commit into from
Jul 6, 2023

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 !

@@ -2681,6 +2681,7 @@ _You can enable the following settings in Xcode by running [this script](resourc
* `// 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
3 checks passed
@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
2 participants