Skip to content

Commit cfe066e

Browse files
committed
Merge branch 'main' into tbkka-lifetime-dependency
2 parents 9ba7a57 + 0b95df8 commit cfe066e

File tree

410 files changed

+26873
-1972
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

410 files changed

+26873
-1972
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
# Contributing to Swift Evolution
1+
# Welcome to the Swift community!
22

3-
<https://www.swift.org/code-of-conduct/>
3+
Contributions to Swift are welcomed and encouraged! Please see the [Contributing to Swift guide](https://www.swift.org/contributing/) and check out the [structure of the community](https://www.swift.org/community/#community-structure).
44

5-
Pull requests that make minor editorial and administrative changes to this repository are always welcome, including fixing typos and grammar mistakes, repairing links, and maintaining document and repository metadata.
5+
To be a truly great community, Swift needs to welcome developers from all walks of life, with different backgrounds, and with a wide range of experience. A diverse and friendly community will have more great ideas, more unique perspectives, and produce more great code. We will work diligently to make the Swift community welcoming to everyone.
66

7-
Pull requests that add new proposals must follow the [Swift evolution process](process.md), including the proposal having first been pitched on the [evolution forums](https://forums.swift.org/c/evolution/pitches/5).
7+
To give clarity of what is expected of our members, Swift has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the [Code of Conduct](https://www.swift.org/code-of-conduct/).
88

9-
Pull requests that make substantive changes to existing proposals should only be made with the permission of the proposal authors. Substantive changes to a proposal in the Accepted or Rejected states are discouraged and require the approval of the appropriate evolution workgroup. Substantive changes to a proposal in the Active Review state require the approval of the appropriate evolution workgroup and should be advertised in the review thread.
9+
## Contributing to Swift Evolution
1010

11-
Pull requests that add or substantively change vision documents require the approval of the appropriate evolution workgroup.
11+
This repository is not your standard codebase. It houses Swift evolution proposals and related process documents, mostly composed of markdown and text files. Pull requests that make minor editorial and administrative changes are always welcome, including fixing typos and grammar mistakes, repairing links, and maintaining document and repository metadata. Other pull requests must follow the [Swift evolution process](process.md):
1212

13-
Pull requests that substantively change the documented evolution process require the approval of the Core Team.
13+
- New proposals and substantive changes to existing proposals should be [pitched on the evolution forums](https://forums.swift.org/c/evolution/pitches/5) before a PR is opened here.
14+
- Substantive changes to existing proposals require the permission of the proposal authors.
15+
- Substantive changes to existing proposals require the approval of the appropriate evolution workgroup if the proposal is in an Active Review, Accepted, or Rejected state.
16+
- New vision documents and substantive changes to existing vision documents require the approval of the appropriate evolution workgroup.
17+
- Substantive changes to the evolution process require the approval of the Core Team.
18+
- Conversations about the substance of a proposal should be held in an appropriate forums thread rather than in PR comments. This centralizes the discussion and allows more of the community to participate.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ This repository tracks the ongoing evolution of the Swift programming language,
66

77
## Goals and Release Notes
88

9-
* [Swift project focus areas in 2023](https://forums.swift.org/t/swift-project-focus-areas-in-2023/61522)
10-
* [On the road to Swift 6](https://forums.swift.org/t/on-the-road-to-swift-6/32862)
9+
* [Swift Language focus areas heading into 2025](https://forums.swift.org/t/swift-language-focus-areas-heading-into-2025/76611)
1110
* [CHANGELOG](https://github.com/apple/swift/blob/main/CHANGELOG.md)
1211

1312
| Version | Announced | Released |
1413
| :-------- | :----------------------------------------------------------------------- | :----------------------------------------------------------- |
15-
| Swift 5.10 | [2023-08-23](https://forums.swift.org/t/swift-5-10-release-process/66911) |
14+
| Swift 6.1 | [2024-10-17](https://forums.swift.org/t/swift-6-1-release-process/75442) |
15+
| Swift 6.0 | [2024-02-22](https://forums.swift.org/t/swift-6-0-release-process/70220) | [2024-09-17](https://www.swift.org/blog/announcing-swift-6/) |
16+
| Swift 5.10 | [2023-08-23](https://forums.swift.org/t/swift-5-10-release-process/66911) | [2024-03-05](https://www.swift.org/blog/swift-5.10-released/) |
1617
| Swift 5.9 | [2023-03-06](https://forums.swift.org/t/swift-5-9-release-process/63557) | [2023-09-18](https://www.swift.org/blog/swift-5.9-released/) |
1718
| Swift 5.8 | [2022-11-19](https://forums.swift.org/t/swift-5-8-release-process/61540) | [2023-03-30](https://www.swift.org/blog/swift-5.8-released/) |
1819
| Swift 5.7 | [2022-03-29](https://forums.swift.org/t/swift-5-7-release-process/56316) | [2022-09-12](https://www.swift.org/blog/swift-5.7-released/) |

commonly_proposed.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is a list of changes to the Swift language that are frequently proposed but
44

55
Additionally, proposals for out-of-scope changes will not be scheduled for review. The [readme file](README.md) identifies a list of priorities for the next major release of Swift, and the [dashboard](https://www.swift.org/swift-evolution/) includes a list of changes that have been rejected after a formal review.
66

7-
Several of the discussions below refer to "C family" languages. This is intended to mean the extended family of languages that resemble C at a syntactic level, such as C++, C#, Objective-C, Java, and Javascript. Swift embraces its C heritage. Where it deviates from other languages in the family, it does so because the feature was thought actively harmful (such as the pre/post-increment `++`) or to reduce needless clutter (such as `;` or parentheses in `if` statements).
7+
Several of the discussions below refer to "C family" languages. This is intended to mean the extended family of languages that resemble C at a syntactic level, such as C++, C#, Objective-C, Java, and JavaScript. Swift embraces its C heritage. Where it deviates from other languages in the family, it does so because the feature was thought actively harmful (such as the pre/post-increment `++`) or to reduce needless clutter (such as `;` or parentheses in `if` statements).
88

99
## Basic Syntax and Operators
1010

@@ -29,7 +29,7 @@ Several of the discussions below refer to "C family" languages. This is intended
2929
* [Change closure literal syntax](https://forums.swift.org/t/streamlining-closures/487/3): Closure syntax in Swift has been carefully debated internally, and aspects of the design have strong motivations. It is unlikely that we'll find something better, and any proposals to change it should have a very detailed understanding of the Swift grammar.
3030
* [Use pattern-matching in `if let` instead of optional-unwrapping](https://forums.swift.org/t/obsoleting-if-let/1301/4): We actually tried this and got a lot of negative feedback, for several reasons: (1) Most developers don't think about things in "pattern matching" terms, they think about "destructuring". (2) The vastly most common use case for `if let` is actually for optional matching, and this change made the common case more awkward. (3) This change increases the learning curve of Swift, changing pattern matching from being a concept that can be learned late to something that must be confronted early. (4) The current design of `if case` unifies "pattern matching" around the `case` keyword. (5) If a developer unfamiliar with `if case` runs into one in some code, they can successfully search for it in a search engine or Stack Overflow.
3131
* [Remove or deprecate the force-unwrap operator `!`](https://forums.swift.org/t/moving-toward-deprecating-force-unwrap-from-swift/43455/82): Force-unwrap and force-try are legitimately useful parts of the language, and not just for source stability reasons. Therefore, proposals to deprecate or remove the force-unwrap operator (or `try!`), even in a mode enabled via compiler flag, will not be considered by the core team. Whether the Swift compiler should gain a more general "linting" capability to guide coding style remains a possible topic of discussion.
32-
* [Replace the `do`/`try`/`repeat` keywords with C++-style syntax](https://forums.swift.org/t/use-standard-syntax-instead-of-do-and-repeat/791/2): Swift's error handling approach is carefully designed to make it obvious to maintainers of code when a call can "throw" an error. It is intentionally designed to be syntactically similar in some ways, but different in other key ways, to exception handling in other languages. Its design is a careful balance that favors maintainers of code that uses errors, to make sure someone reading the code understands what can throw. Before proposing a change to this system, please read the [Error Handling Rationale and Proposal](https://github.com/apple/swift/blob/master/docs/ErrorHandlingRationale.rst) in full to understand why the current design is the way it is, and be ready to explain why your changes would be worth unbalancing this design.
32+
* [Replace the `do`/`try`/`repeat` keywords with C++-style syntax](https://forums.swift.org/t/use-standard-syntax-instead-of-do-and-repeat/791/2): Swift's error handling approach is carefully designed to make it obvious to maintainers of code when a call can "throw" an error. It is intentionally designed to be syntactically similar in some ways, but different in other key ways, to exception handling in other languages. Its design is a careful balance that favors maintainers of code that uses errors, to make sure someone reading the code understands what can throw. Before proposing a change to this system, please read the [Error Handling Rationale and Proposal](https://github.com/swiftlang/swift/blob/main/docs/ErrorHandlingRationale.md) in full to understand why the current design is the way it is, and be ready to explain why your changes would be worth unbalancing this design.
3333

3434
## Miscellaneous
3535

process.md

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ Swift is a powerful and intuitive programming language that is designed to make
55
## Scope
66

77
The Swift evolution process covers all design changes, no matter how small, to the Swift language, its standard library, and the core tools necessary to build Swift programs. This includes additions, removals, and changes to:
8+
89
- the features of the Swift language,
910
- the public interface of the Swift standard library,
10-
- the configuration of the Swift compiler, and
11-
- the core tools of the Swift package ecosystem, including the configuration of the [Swift package manager](https://www.swift.org/package-manager/) and the design of its manifest files.
11+
- the configuration of the Swift compiler,
12+
- the core tools of the Swift package ecosystem, including the configuration of
13+
the [Swift package manager](https://www.swift.org/package-manager/) and the
14+
design of its manifest files, and
15+
- the public interfaces of the following libraries:
16+
- [Swift Testing](https://github.com/swiftlang/swift-testing)
17+
- [XCTest](https://github.com/swiftlang/swift-corelibs-xctest)
1218

1319
The design of other tools, such as IDEs, debuggers, and documentation generators, is not covered by the evolution process. The Core Team may create workgroups to guide and make recommendations about the development of these tools, but the output of those workgroups is not reviewed.
1420

@@ -31,9 +37,12 @@ There is a natural tension between these two goals. Open evolution processes are
3137

3238
The [Core Team](https://www.swift.org/community/#core-team) is responsible for the strategic direction of Swift. The Core Team creates workgroups focused on specific parts of the project. When the Core Team gives a workgroup authority over part of the evolution of the project, that workgroup is called an evolution workgroup. Evolution workgroups manage the evolution process for proposals under their authority, working together with other workgroups as needed.
3339

34-
Currently, there is only one evolution workgroup:
40+
Currently, there are three evolution workgroups:
3541

36-
* The [Language Steering Group][language-steering-group] has authority over the evolution of the Swift language and its standard library.
42+
* The [Language Steering Group][language-steering-group] has authority over the evolution of the Swift language, its standard library, and any language configuration features of the Swift package manager.
43+
* The [Platform Steering Group][platform-steering-group] has authority over the evolution of all other features of the Swift package manager and its manifest files.
44+
* The [Testing Workgroup][testing-workgroup] has authority over the evolution of
45+
the Swift Testing and Corelibs XCTest projects.
3746

3847
The Core Team manages (or delegates) the evolution process for proposals outside these areas. The Core Team also retains the power to override the evolution decisions of workgroups when necessary.
3948

@@ -93,9 +102,12 @@ Please state explicitly whether you believe that the proposal should be accepted
93102

94103
1. **Develop the proposal and implementation**
95104

96-
1. Expand the rough sketch into a formal proposal using the [proposal template](proposal-templates/0000-swift-template.md).
97-
1. In the [swift-evolution repository][swift-evolution-repo], open a [draft pull request][draft-pr] that adds your proposal to the [proposals directory](/proposals).
98-
1. Anounce the pull request on the forums and edit the root post to link out to the pull request.
105+
1. Expand the rough sketch into a formal proposal using the
106+
[relevant proposal template](#proposal-templates).
107+
1. In the [swift-evolution repository][swift-evolution-repo], open a
108+
[draft pull request][draft-pr] that adds your proposal to the appropriate
109+
[proposal directory](#proposal-locations).
110+
1. Announce the pull request on the forums and edit the root post to link out to the pull request.
99111
1. Refine the formal proposal in the open as you receive further feedback on the forums or the pull request.
100112
A ripe proposal is expected to address commentary from present and past
101113
discussions of the idea.
@@ -111,13 +123,13 @@ Please state explicitly whether you believe that the proposal should be accepted
111123
Proposals that can ship as part of the [Standard Library Preview package][preview-package]
112124
should be paired with a pull request against the [swift-evolution-staging repository][swift-evolution-staging].
113125
All other proposals should be paired with an implementation pull request
114-
against the [main Swift repository](https://github.com/apple/swift).
126+
against the [main Swift repository](https://github.com/swiftlang/swift).
115127

116128
The preview package can accept new types, new protocols, and extensions to
117129
existing types and protocols that can be implemented without access to
118130
standard library internals or other non-public features.
119131
For more information about the kinds of changes that can be implemented in
120-
the preview package, see [SE-0264](https://github.com/apple/swift-evolution/blob/main/proposals/0264-stdlib-preview-package.md).
132+
the preview package, see [SE-0264](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0264-stdlib-preview-package.md).
121133

122134
1. **Request a review**
123135

@@ -128,6 +140,28 @@ Please state explicitly whether you believe that the proposal should be accepted
128140
129141
[draft-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests
130142

143+
### Proposal templates
144+
145+
When writing a formal proposal document, start with the most relevant template
146+
given the primary subject of the proposal:
147+
148+
- Use the [Swift template][swift-template] for proposals concerning the Swift
149+
language, compiler, or standard library.
150+
- Use the [Swift Package Manager template][swiftpm-template] for proposals
151+
related to SwiftPM, including the design of its package manifest files and
152+
command-line tools.
153+
- Use the [Swift Testing template][swift-testing-template] for proposals focused
154+
on Swift Testing features or public interfaces.
155+
156+
### Proposal locations
157+
158+
When opening a pull request to add a new proposal to the
159+
[swift-evolution repository][swift-evolution-repo], place proposals which use
160+
the [Swift][swift-template] or [Swift Package Manager][swiftpm-template]
161+
templates in the top-level [proposals](/proposals) directory. Place proposals
162+
which use the newer [Swift Testing template][swift-testing-template] in the
163+
[proposals/testing](/proposals/testing) subdirectory.
164+
131165
## Review process
132166

133167
The review process for a particular proposal begins when a member of
@@ -162,13 +196,13 @@ flowchart LR
162196
%% <https://mermaid-js.github.io/>
163197
164198
%% Nodes:
165-
1{{"Awaiting\nreview"}}
166-
2{{"Scheduled\nfor review"}}
167-
3{"Active\nreview"}
168-
4["Returned\nfor revision"]
199+
1{{"Awaiting<br/>review"}}
200+
2{{"Scheduled<br>for review"}}
201+
3{"Active<br/>review"}
202+
4["Returned<br/>for revision"]
169203
5(["Withdrawn"])
170204
6(["Rejected"])
171-
7_8["Accepted\n(with revisions)"]
205+
7_8["Accepted<br/>(with revisions)"]
172206
9[["Previewing"]]
173207
10(["Implemented"])
174208
@@ -205,12 +239,17 @@ A given proposal can be in one of several states:
205239
If the proposal's implementation spans multiple version numbers,
206240
write the version number for which the implementation will be complete.
207241

208-
[swift-evolution-repo]: https://github.com/apple/swift-evolution "Swift evolution repository"
209-
[swift-evolution-staging]: https://github.com/apple/swift-evolution-staging "Swift evolution staging repository"
242+
[swift-evolution-repo]: https://github.com/swiftlang/swift-evolution "Swift evolution repository"
243+
[swift-evolution-staging]: https://github.com/swiftlang/swift-evolution-staging "Swift evolution staging repository"
210244
[proposal-reviews]: https://forums.swift.org/c/evolution/proposal-reviews "'Proposal reviews' category of the Swift forums"
211-
[status-page]: https://apple.github.io/swift-evolution/
245+
[status-page]: https://www.swift.org/swift-evolution
212246
[preview-package]: https://github.com/apple/swift-standard-library-preview/
213247
[language-steering-group]: https://www.swift.org/language-steering-group
248+
[platform-steering-group]: https://www.swift.org/platform-steering-group
249+
[testing-workgroup]: https://www.swift.org/testing-workgroup "Testing Workgroup page on Swift.org"
250+
[swift-template]: proposal-templates/0000-swift-template.md "Swift proposal template"
251+
[swiftpm-template]: proposal-templates/0000-swiftpm-template.md "Swift Package Manager proposal template"
252+
[swift-testing-template]: proposal-templates/0000-swift-testing-template.md "Swift Testing proposal template"
214253

215254
## Review announcement
216255

@@ -250,7 +289,7 @@ answer in your review:
250289

251290
More information about the Swift evolution process is available at
252291

253-
> <https://github.com/apple/swift-evolution/blob/main/process.md>
292+
> <https://github.com/swiftlang/swift-evolution/blob/main/process.md>
254293
255294
Thank you,
256295

0 commit comments

Comments
 (0)