Skip to content

Commit 9c81fc6

Browse files
author
Tim Vermeulen
committed
Update the changelog/README for the 1.0.0 release
1 parent d500cf7 commit 9c81fc6

File tree

3 files changed

+88
-29
lines changed

3 files changed

+88
-29
lines changed

.github/ISSUE_TEMPLATE/BUG_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ about: Something isn't working as expected
1616

1717
Replace this paragraph with a short description of the incorrect incorrect behavior. If this is a regression, please note the last version that the behavior was correct in addition to your current version.
1818

19-
**Swift Algorithms version:** `0.0.1` or the `main` branch, for example.
19+
**Swift Algorithms version:** `1.0.0` or the `main` branch, for example.
2020
**Swift version:** Paste the output of `swift --version` here.
2121

2222
### Checklist

CHANGELOG.md

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,81 @@
44
Add new items at the end of the relevant section under **Unreleased**.
55
-->
66

7-
This project follows semantic versioning. While still in major version `0`,
8-
source-stability is only guaranteed within minor versions (e.g. between
9-
`0.0.3` and `0.0.4`). If you want to guard against potentially source-breaking
10-
package updates, you can specify your package dependency using
11-
`.upToNextMinor(from: "0.1.0")` as the requirement.
7+
This project follows semantic versioning.
128

139
## [Unreleased]
1410

1511
*No new changes.*
1612

1713
---
1814

15+
## [1.0.0] - 2021-09-08
16+
17+
### Changes
18+
19+
- Most sequence and collection types have been renamed, following a more
20+
consistent naming structure:
21+
- The `Lazy` prefix was dropped.
22+
- Either a `Sequence` or `Collection` suffix was added depending on whether or
23+
not the type is unconditionally a collection.
24+
- The base name was derived from the name of the method that produces it,
25+
including an argument label to disambiguate if necessary.
26+
```
27+
Chain2 -> Chain2Sequence
28+
ChunkedBy -> ChunkedByCollection
29+
ChunkedOn -> ChunkedOnCollection
30+
ChunkedByCount -> ChunksOfCountCollection
31+
Combinations -> CombinationsSequence
32+
Cycle -> CycledSequence
33+
FiniteCycle -> CycledTimesCollection
34+
Indexed -> IndexedCollection
35+
Intersperse -> InterspersedSequence
36+
LazySplitSequence -> SplitSequence
37+
LazySplitCollection -> SplitCollection
38+
Permutations -> PermutationsSequence
39+
UniquePermutations -> UniquePermutationsSequence
40+
Product2 -> Product2Sequence
41+
ExclusiveReductions -> ExclusiveReductionsSequence
42+
InclusiveReductions -> InclusiveReductionsSequence
43+
StrideSequence -> StridingSequence
44+
StrideCollection -> StridingCollection
45+
Uniqued -> UniquedSequence
46+
Windows -> WindowsCollection
47+
```
48+
- Types that can only be produced from a lazy sequence chain now unconditionally
49+
conform to `LazySequenceProtocol` and wrap the base sequence instead of the
50+
lazy wrapper, making some return types slightly simpler.
51+
- e.g. `[1, 2, 3].lazy.reductions(+)` now returns
52+
`ExclusiveReductionsSequence<[Int]>`, not
53+
`ExclusiveReductionsSequence<LazySequence<[Int]>>`.
54+
- This concerns `JoinedByClosureSequence`, `JoinedByClosureCollection`,
55+
`ExclusiveReductionsSequence`, `InclusiveReductionsSequence`.
56+
- The generic parameters of the `ExclusiveReductions` type have been swapped,
57+
putting the base collection first and the result type second.
58+
- The `Indices` associated type of `IndexedCollection` now matches
59+
`Base.Indices`.
60+
61+
### Removals
62+
63+
- Previously deprecated type and method names have been removed:
64+
- The `Chain` type alias for `Chain2Sequence`
65+
- The `chained(with:)` method which was replaced with the `chain(_:_:)` free
66+
function
67+
- The `LazyChunked` and `Chunked` type aliases for `ChunkedByCollection`
68+
- The `rotate(subrange:at:)` and `rotate(at:)` methods which were renamed to
69+
`rotate(subrange:toStartAt:)` and `rotate(toStartAt:)` respectively
70+
71+
### Fixes
72+
73+
- The `StridingSequence` and `StridingCollection` types now conditionally
74+
conform to `LazySequenceProtocol`, allowing the `striding(by:)` method to
75+
properly propagate laziness in a lazy sequence chain.
76+
- Fixed `chunked(by:)` to always compare two consecutive elements rather than
77+
each element with the first element of the current chunk. ([#162])
78+
79+
The 1.0.0 release includes contributions from [iainsmith], [mdznr], and
80+
[timvermeulen]. Thank you!
81+
1982
## [0.2.1] - 2021-06-01
2083

2184
### Additions
@@ -206,7 +269,8 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
206269

207270
<!-- Link references for releases -->
208271

209-
[Unreleased]: https://github.com/apple/swift-algorithms/compare/0.2.1...HEAD
272+
[Unreleased]: https://github.com/apple/swift-algorithms/compare/1.0.0...HEAD
273+
[1.0.0]: https://github.com/apple/swift-algorithms/compare/0.2.1...1.0.0
210274
[0.2.1]: https://github.com/apple/swift-algorithms/compare/0.2.0...0.2.1
211275
[0.2.0]: https://github.com/apple/swift-algorithms/compare/0.1.1...0.2.0
212276
[0.1.1]: https://github.com/apple/swift-algorithms/compare/0.1.0...0.1.1
@@ -243,6 +307,7 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
243307
[#125]: https://github.com/apple/swift-algorithms/pull/125
244308
[#130]: https://github.com/apple/swift-algorithms/pull/130
245309
[#138]: https://github.com/apple/swift-algorithms/pull/138
310+
[#162]: https://github.com/apple/swift-algorithms/pull/162
246311

247312
<!-- Link references for contributors -->
248313

@@ -256,6 +321,7 @@ This changelog's format is based on [Keep a Changelog](https://keepachangelog.co
256321
[fedeci]: https://github.com/apple/swift-algorithms/commits?author=fedeci
257322
[hashemi]: https://github.com/apple/swift-algorithms/commits?author=hashemi
258323
[IanKeen]: https://github.com/apple/swift-algorithms/commits?author=IanKeen
324+
[iainsmith]: https://github.com/apple/swift-algorithms/commits?author=iainsmith
259325
[iSame7]: https://github.com/apple/swift-algorithms/commits?author=iSame7
260326
[karwa]: https://github.com/apple/swift-algorithms/commits?author=karwa
261327
[kylemacomber]: https://github.com/apple/swift-algorithms/commits?author=kylemacomber

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,32 +57,25 @@ To use the `Algorithms` library in a SwiftPM project,
5757
add the following line to the dependencies in your `Package.swift` file:
5858

5959
```swift
60-
.package(url: "https://github.com/apple/swift-algorithms", from: "0.0.1"),
60+
.package(url: "https://github.com/apple/swift-algorithms", from: "1.0.0"),
6161
```
6262

63-
Because `Algorithms` is under active development,
64-
source-stability is only guaranteed within minor versions (e.g. between `0.0.3` and `0.0.4`).
65-
If you don't want potentially source-breaking package updates,
66-
use this dependency specification instead:
63+
Include `"Algorithms"` as a dependency for your executable target:
6764

6865
```swift
69-
.package(url: "https://github.com/apple/swift-algorithms", .upToNextMinor(from: "0.1.0")),
66+
.target(name: "<target>", dependencies: [
67+
.product(name: "Algorithms", package: "swift-algorithms"),
68+
]),
7069
```
7170

72-
Finally, include `"Algorithms"` as a dependency for your executable target:
71+
Finally, add `import Algorithms` to your source code.
7372

74-
```swift
75-
let package = Package(
76-
// name, platforms, products, etc.
77-
dependencies: [
78-
.package(url: "https://github.com/apple/swift-algorithms", from: "0.1.0"),
79-
// other dependencies
80-
],
81-
targets: [
82-
.target(name: "<target>", dependencies: [
83-
.product(name: "Algorithms", package: "swift-algorithms"),
84-
]),
85-
// other targets
86-
]
87-
)
88-
```
73+
## Source Stability
74+
75+
The Swift Numerics package is source stable; version numbers follow [Semantic Versioning](https://semver.org/). Source breaking changes to public API can only land in a new major version.
76+
77+
The public API of version 1.0 of the `swift-algorithms` package consists of non-underscored declarations that are marked `public` in the `Algorithms` module. Interfaces that aren't part of the public API may continue to change in any release, including patch releases.
78+
79+
Future minor versions of the package may introduce changes to these rules as needed.
80+
81+
We'd like this package to quickly embrace Swift language and toolchain improvements that are relevant to its mandate. Accordingly, from time to time, we expect that new versions of this package will require clients to upgrade to a more recent Swift toolchain release. Requiring a new Swift release will only require a minor version bump.

0 commit comments

Comments
 (0)