Skip to content

Commit a430073

Browse files
authored
---
yaml --- r: 348826 b: refs/heads/master c: cb3f9e6 h: refs/heads/master
1 parent 189a424 commit a430073

File tree

1,516 files changed

+48798
-35670
lines changed

Some content is hidden

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

1,516 files changed

+48798
-35670
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d7e977bf68e95201f4c1a11493f650a2c5339f06
2+
refs/heads/master: cb3f9e6e845a672c95c139e5604f0273b20eedf4
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/CHANGELOG.md

Lines changed: 136 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,143 @@ CHANGELOG
44
<details>
55
<summary>Note: This is in reverse chronological order, so newer entries are added to the top.</summary>
66

7-
| Contents |
8-
| :--------------------- |
9-
| [Swift Next](#swift-next) |
10-
| [Swift 5.1](#swift-51) |
11-
| [Swift 5.0](#swift-50) |
12-
| [Swift 4.2](#swift-42) |
13-
| [Swift 4.1](#swift-41) |
14-
| [Swift 4.0](#swift-40) |
15-
| [Swift 3.1](#swift-31) |
16-
| [Swift 3.0](#swift-30) |
17-
| [Swift 2.2](#swift-22) |
18-
| [Swift 2.1](#swift-21) |
19-
| [Swift 2.0](#swift-20) |
20-
| [Swift 1.2](#swift-12) |
21-
| [Swift 1.1](#swift-11) |
22-
| [Swift 1.0](#swift-10) |
7+
| Version | Released | Toolchain |
8+
| :--------------------- | :--------- | :---------- |
9+
| [Swift 5.2](#swift-52) | | |
10+
| [Swift 5.1](#swift-51) | 2019-09-20 | Xcode 11.0 |
11+
| [Swift 5.0](#swift-50) | 2019-03-25 | Xcode 10.2 |
12+
| [Swift 4.2](#swift-42) | 2018-09-17 | Xcode 10.0 |
13+
| [Swift 4.1](#swift-41) | 2018-03-29 | Xcode 9.3 |
14+
| [Swift 4.0](#swift-40) | 2017-09-19 | Xcode 9.0 |
15+
| [Swift 3.1](#swift-31) | 2017-03-27 | Xcode 8.3 |
16+
| [Swift 3.0](#swift-30) | 2016-09-13 | Xcode 8.0 |
17+
| [Swift 2.2](#swift-22) | 2016-03-21 | Xcode 7.3 |
18+
| [Swift 2.1](#swift-21) | 2015-10-21 | Xcode 7.1 |
19+
| [Swift 2.0](#swift-20) | 2015-09-17 | Xcode 7.0 |
20+
| [Swift 1.2](#swift-12) | 2015-04-08 | Xcode 6.3 |
21+
| [Swift 1.1](#swift-11) | 2014-12-02 | Xcode 6.1.1 |
22+
| [Swift 1.0](#swift-10) | 2014-09-15 | Xcode 6.0 |
2323

2424
</details>
2525

26-
Swift Next
27-
----------
26+
Swift 5.2
27+
---------
28+
29+
* [SR-11429][]:
30+
31+
The compiler will now correctly strip argument labels from function references
32+
used with the `as` operator in a function call. As a result, the `as` operator
33+
can now be used to disambiguate a call to a function with argument labels.
34+
35+
```swift
36+
func foo(x: Int) {}
37+
func foo(x: UInt) {}
38+
39+
(foo as (Int) -> Void)(5) // Calls foo(x: Int)
40+
(foo as (UInt) -> Void)(5) // Calls foo(x: UInt)
41+
```
42+
43+
Previously this was only possible for functions without argument labels.
44+
45+
This change also means that a generic type alias can no longer be used to
46+
preserve the argument labels of a function reference through the `as`
47+
operator. The following is now rejected:
48+
49+
```swift
50+
typealias Magic<T> = T
51+
func foo(x: Int) {}
52+
(foo as Magic)(x: 5) // error: Extraneous argument label 'x:' in call
53+
```
54+
55+
The function value must instead be called without argument labels:
56+
57+
```swift
58+
(foo as Magic)(5)
59+
```
60+
61+
* [SR-11298][]:
62+
63+
A class-constrained protocol extension, where the extended protocol does
64+
not impose a class constraint, will now infer the constraint implicitly.
65+
66+
```swift
67+
protocol Foo {}
68+
class Bar: Foo {
69+
var someProperty: Int = 0
70+
}
71+
72+
// Even though 'Foo' does not impose a class constraint, it is automatically
73+
// inferred due to the Self: Bar constraint.
74+
extension Foo where Self: Bar {
75+
var anotherProperty: Int {
76+
get { return someProperty }
77+
// As a result, the setter is now implicitly nonmutating, just like it would
78+
// be if 'Foo' had a class constraint.
79+
set { someProperty = newValue }
80+
}
81+
}
82+
```
83+
84+
As a result, this could lead to code that currently compiles today to throw an error.
85+
86+
```swift
87+
protocol Foo {
88+
var someProperty: Int { get set }
89+
}
90+
91+
class Bar: Foo {
92+
var someProperty = 0
93+
}
94+
95+
extension Foo where Self: Bar {
96+
var anotherProperty1: Int {
97+
get { return someProperty }
98+
// This will now error, because the protocol requirement
99+
// is implicitly mutating and the setter is implicitly
100+
// nonmutating.
101+
set { someProperty = newValue } // Error
102+
}
103+
}
104+
```
105+
106+
**Workaround**: Define a new mutable variable inside the setter that has a reference to `self`:
107+
108+
```swift
109+
var anotherProperty1: Int {
110+
get { return someProperty }
111+
set {
112+
var mutableSelf = self
113+
mutableSelf.someProperty = newValue // Okay
114+
}
115+
}
116+
```
117+
118+
* [SE-0253][]:
119+
120+
Values of types that declare `func callAsFunction` methods can be called
121+
like functions. The call syntax is shorthand for applying
122+
`func callAsFunction` methods.
123+
124+
```swift
125+
struct Adder {
126+
var base: Int
127+
func callAsFunction(_ x: Int) -> Int {
128+
return x + base
129+
}
130+
}
131+
var adder = Adder(base: 3)
132+
adder(10) // returns 13, same as `adder.callAsFunction(10)`
133+
```
134+
135+
* `func callAsFunction` argument labels are required at call sites.
136+
* Multiple `func callAsFunction` methods on a single type are supported.
137+
* `mutating func callAsFunction` is supported.
138+
* `func callAsFunction` works with `throws` and `rethrows`.
139+
* `func callAsFunction` works with trailing closures.
28140

29141
* [SR-4206][]:
30142

31-
A method override is no longer allowed to have a generic signature with
143+
A method override is no longer allowed to have a generic signature with
32144
requirements not imposed by the base method. For example:
33145

34146
```
@@ -65,6 +177,8 @@ Swift Next
65177
Swift 5.1
66178
---------
67179

180+
### 2019-09-20 (Xcode 11.0)
181+
68182
* [SR-8974][]:
69183

70184
Duplicate tuple element labels are no longer allowed, because it leads
@@ -7711,6 +7825,7 @@ Swift 1.0
77117825
[SE-0244]: <https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md>
77127826
[SE-0245]: <https://github.com/apple/swift-evolution/blob/master/proposals/0245-array-uninitialized-initializer.md>
77137827
[SE-0252]: <https://github.com/apple/swift-evolution/blob/master/proposals/0252-keypath-dynamic-member-lookup.md>
7828+
[SE-0253]: <https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md>
77147829
[SE-0254]: <https://github.com/apple/swift-evolution/blob/master/proposals/0254-static-subscripts.md>
77157830

77167831
[SR-106]: <https://bugs.swift.org/browse/SR-106>
@@ -7741,3 +7856,5 @@ Swift 1.0
77417856
[SR-8974]: <https://bugs.swift.org/browse/SR-8974>
77427857
[SR-9043]: <https://bugs.swift.org/browse/SR-9043>
77437858
[SR-9827]: <https://bugs.swift.org/browse/SR-9827>
7859+
[SR-11298]: <https://bugs.swift.org/browse/SR-11298>
7860+
[SR-11429]: <https://bugs.swift.org/browse/SR-11429>

trunk/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ set(SWIFT_ANALYZE_CODE_COVERAGE FALSE CACHE STRING
125125
# SWIFT_VERSION is deliberately /not/ cached so that an existing build directory
126126
# can be reused when a new version of Swift comes out (assuming the user hasn't
127127
# manually set it as part of their own CMake configuration).
128-
set(SWIFT_VERSION "5.1")
128+
set(SWIFT_VERSION "5.1.1")
129129

130130
set(SWIFT_VENDOR "" CACHE STRING
131131
"The vendor name of the Swift compiler")
@@ -219,7 +219,7 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
219219
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
220220
"Path to the directory that contains Swift tools that are executable on the build machine")
221221

222-
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
222+
option(SWIFT_ENABLE_MODULE_INTERFACES
223223
"Generate .swiftinterface files alongside .swiftmodule files"
224224
TRUE)
225225

@@ -996,6 +996,7 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
996996
-DCMAKE_CXX_COMPILER=${SWIFT_LIBDISPATCH_CXX_COMPILER}
997997
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
998998
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
999+
-DCMAKE_INSTALL_LIBDIR=lib
9991000
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
10001001
-DCMAKE_LINKER=${CMAKE_LINKER}
10011002
-DCMAKE_RANLIB=${CMAKE_RANLIB}

trunk/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,26 @@
66
| | **Architecture** | **Master** | **Package** |
77
|---|:---:|:---:|:---:|
88
| **macOS** | x86_64 |[![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-osx/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-osx)|[![Build Status](https://ci.swift.org/job/oss-swift-package-osx/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-osx)|
9-
| **Ubuntu 14.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-14_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-14_04)|
109
| **Ubuntu 16.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-16_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-16_04)|
1110
| **Ubuntu 18.04** | x86_64 | [![Build Status](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-incremental-RA-linux-ubuntu-18_04)|[![Build Status](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-18_04/lastCompletedBuild/badge/icon)](https://ci.swift.org/job/oss-swift-package-linux-ubuntu-18_04)|
1211

1312
**Swift Community-Hosted CI Platforms**
1413

1514
| **OS** | **Architecture** | **Build** |
1615
|---|:---:|:---:|
17-
|**[Debian 9.1 (Raspberry Pi)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/armv7_debian_stretch.json)** | ARMv7 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_1)|
18-
|**[Fedora 27](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_fedora_27.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-fedora-27)|
19-
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04)|
2016
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/ppc64le_ubuntu_16_04.json)** | PPC64LE |[![Build Status](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-5.1-RA-linux-ubuntu-16.04-ppc64le)|
2117
|**[Ubuntu 16.04 ](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/aarch64_ubuntu_16.04.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-aarch64)|
2218
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | ARMv7 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android)|
2319
|**[Android](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_LTS_android.json)** | AArch64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-android-arm64)|
24-
|**[Ubuntu 16.04 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow)|
25-
|**[macOS 10.13 (TensorFlow)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_macos_high_sierra_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow)|
26-
|**[Ubuntu 16.04 (TensorFlow with GPU)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow_gpu.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu)|
27-
|**[Debian 9.5](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_debian_9.5.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_5/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-debian-9_5)|
2820
|**[Windows 2019](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_windows_2019.json)** | x86_64 | [![Build Status](https://ci-external.swift.org/job/oss-swift-windows-x86_64/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-windows-x86_64)|
2921

22+
**Swift TensorFlow Community-Hosted CI Platforms**
23+
24+
| **OS** | **Architecture** | **Build** |
25+
|---|:---:|:---:|
26+
|**[Ubuntu 16.04](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow)|
27+
|**[macOS 10.13](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_macos_high_sierra_tensorflow.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-macOS-tensorflow)|
28+
|**[Ubuntu 16.04 (GPU)](https://github.com/apple/swift-community-hosted-continuous-integration/blob/master/nodes/x86_64_ubuntu_16_04_tensorflow_gpu.json)** | x86_64 |[![Build Status](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu/lastCompletedBuild/badge/icon)](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-16.04-tensorflow-gpu)|
3029

3130
## Welcome to Swift
3231

trunk/benchmark/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ set(SWIFT_BENCH_MODULES
8787
single-source/Exclusivity
8888
single-source/ExistentialPerformance
8989
single-source/Fibonacci
90+
single-source/FindStringNaive
9091
single-source/FlattenList
9192
single-source/FloatingPointParsing
9293
single-source/FloatingPointPrinting
@@ -130,6 +131,7 @@ set(SWIFT_BENCH_MODULES
130131
single-source/Prefix
131132
single-source/PrefixWhile
132133
single-source/Prims
134+
single-source/PrimsNonStrongRef
133135
single-source/ProtocolDispatch
134136
single-source/ProtocolDispatch2
135137
single-source/Queue

0 commit comments

Comments
 (0)