diff --git a/core/docs/Changelog.md b/core/docs/Changelog.md index 227f50e9d3..22f2fedbc0 100644 --- a/core/docs/Changelog.md +++ b/core/docs/Changelog.md @@ -5,55 +5,38 @@ ### Enhancements * Filtering support for `Scanl`. -* FileSystem.Path now does not treat paths with leading "./" as rooted paths. +* Added `packPathsEndBy` in `Streamly.FileSystem.Path`. +* The `followSymlinks`, `ignoreMissing`, `ignoreSymlinkLoops` and + `ignoreInaccessible` options of `Streamly.FileSystem.DirIO` are now + available on Windows too. * `streamly-core` now builds with GHC's JavaScript backend (GHC 9.10), - replacing the support for the old GHCJS compiler. + replacing the support for the old GHCJS compiler. Fixes for 32-bit `Int`, + as on the JavaScript backend: + * `RingArray.ringsOf` and `scanRingsOf` produced rings of a wrong size + after `2^31` bytes. + * `Unicode.Parser.double` gave wrong results for numbers with more than 9 + significant digits. + * `Serialize` for lists and arrays wrote past the end of the buffer. + * `Serialize` now encodes `Int`, `Word`, `Integer` and the list and array + length headers the same on all platforms, data serialized on a 32-bit + platform can be read on a 64-bit platform. The encoding on 64-bit + platforms is unchanged. ### Bug Fixes -* Fixed `Stream.postscanl` to omit the output of a scan that terminates without - consuming any input (e.g. `Scanl.take 0`). -* Fix overflow in enumerateFrom and enumerateFromTo variants in Stream and - Unfold modules. -* Fix `Unfold.enumerateFromTo` for the `Identity` type, it was incorrectly - calling `enumerateFromThen` instead of `enumerateFromTo`. -* Fix `Stream.splitEndBySeq` and `Stream.splitEndBySeq_` dropping the last - segment when the separator is longer than a machine word, the last segment - is the separator without its last element, and it follows an earlier - separator, e.g. separator `"abc"` and input `"abcab"`. -* Fix `chunksOf` in the array modules emitting a trailing empty array when - the stream length is a multiple of the chunk size. -* Fix `classify` and `classifyIO` in Fold and Scanl, and - `Fold.classifyScan` and `classifyScanIO`, restarting the fold for a key - that terminated on its first input. -* Fix the `Arrow` instance of `Scan` failing when a scan skips an input. -* Fix `RingArray.ringsOf` and `scanRingsOf` producing rings of a wrong size - after `2^31` bytes when `Int` is 32-bit, e.g. on the JavaScript backend. -* Fix `Scanl.uniq` and `uniqBy` failing before the first input. -* Fix `Scanl.partition`, `partitionBy` and `partitionByM` not finalizing one - scan when the other terminates. -* Fix `Stream.foldr1` combining the first element last, e.g. - `foldr1 (-)` on `[1,2,3]` returned `0` instead of `2`. -* Fix `Stream.isInfixOf` returning `False` for an empty infix when the - stream has fewer than two elements. -* `enumerateFromTo` and `enumerateFromThenTo` for `Ratio` now round the - limit to the nearest step, and `Enumerable` for `Fixed` now steps by the - resolution of the type, the same as their `Enum` instances. -* Fix `enumerateFromToNum` and `enumerateDownFromToNum` emitting one element - beyond the limit when the difference between the limits is not a whole - number. +* Fix `Scanl.partition` not finalizing one scan when the other terminates. * Fix `enumerateFromThen` and `enumerateFromThenTo` for `Natural` failing with an underflow when enumerating downwards. - -* On POSIX platforms, the `Path` based APIs that open an existing file in - `WriteMode`, e.g. `write` and `withFile` in `Streamly.FileSystem.FileIO`, - did not truncate it, the old contents beyond the newly written data - remained. The file descriptor leaked when the file could not be opened as - a Handle, e.g. if it was a directory or was locked. - -* Fix `timesWith`, `absTimesWith`, `relTimesWith`, `timestamped` and the - other operations using `asyncClock`, the clock stopped advancing after a - major GC. Fix the same bug in `timer`, the timer stopped producing ticks. +* Fix `enumerateFromThen` in `Streamly.Data.Unfold` wrapping around instead + of stopping at `maxBound`, or `minBound` downwards, for bounded integral + types. +* Fix the `Show` and `Read` instances of `Array` and Generic `Array` when + nested, e.g. `show (Just arr)` gave `Just fromList [...]`, which could not + be read back. +* Fix deserialization reading beyond the end of a corrupt or truncated buffer + for `Array`, `Proxy` and derived instances of types with one constructor + and no fields. `()` and `Proxy` now serialize to a 0 byte, the byte was + left unwritten. ### Breaking changes @@ -61,10 +44,14 @@ `filterM`, `catMaybes`, `catLefts` etc. used to emit the previous value of accumulator for filtered-out elements, now they do not emit any output for those. -* `Scanl.incrScanWith` now provides the ring array reflecting the - state of the window /before/ the incoming element is inserted. +* `Enumerable` for `Fixed` now steps by the resolution of the type, the same + as its `Enum` instance, e.g. `enumerateFromTo (1.5 :: Milli) 1.503` gives + `[1.500,1.501,1.502,1.503]` instead of `[1.500]`. * In `FileSystem.Path` module the default for `eqPath` changed - on Windows to case-sensitive comparison. + on Windows to case-sensitive comparison. The drive and the UNC + `\\server\share` root are always compared case-insensitively. +* On Windows, `splitRoot` returns the whole `\\server\share` of a UNC path + as the root, the share name is no longer the first component of the path. * A leading "." component (e.g. "." or "./x") is no longer treated as a rooted path, making the behavior more in line with intuitive expectation. @@ -74,8 +61,26 @@ `c:` and `c:` on Windows) now compare equal. Pass `allowRelativeEquality False` to restore the previous strict behaviour. +### Deprecations + +* In `Streamly.Data.Scanl`, `mkScanl`, `mkScanlM`, `mkScanl1`, `mkScanl1M` + and `scanl` are renamed to `scanl'`, `scanlM'`, `scanl1'`, `scanl1M'` and + `compose`. The old names are deprecated. +* In `Streamly.Data.Unfold`, `first`, `second` and `carry` are renamed to + `supplyFirst`, `supplySecond` and `carryInput`. The old names are + deprecated. + ### Internal changes +* Renamed the `Streamly.Internal.Data.Scanr` module to + `Streamly.Internal.Data.Scan`, and the `Scanr` type to `Scan`. +* Fix the `Arrow` instance of `Scan` failing when a scan skips an input. +* Fix `Scanl.partitionBy` and `partitionByM` not finalizing one scan when + the other terminates. +* `Scanl.incrScanWith` now provides the ring array reflecting the + state of the window /before/ the incoming element is inserted. +* Renamed the `Streamly.Internal.FileSystem.Posix.*` and `Windows.*` modules + to `Streamly.Internal.Syscall.Posix.*` and `Syscall.Windows.*`. * `Scanl`'s Step type is now different from Fold's `Step` type with an additional `Continue` constructor, this change enables proper filtering in scans. @@ -83,15 +88,6 @@ Use `Streamly.Internal.Data.Stream` instead. * enumerateFrom*Num are not numerically stable any more, use enumerateFrom*RealFloat for that. -* Fix `MutArray.appendMax` on a slice returning an array with a capacity - beyond its allocation, appending to it could corrupt memory. -* Fix `MutArray.createMinOf 0` writing beyond its allocation. -* Fix `Fold.bracketIO` losing the input after the inner fold terminates, - and not running the release action if the stream ends there. -* Fix `Fold.finallyIO` running the action only on GC when the inner fold - terminates. -* Fix `Fold.distributeScan` losing the result of a fold that terminates on - the last input. * Renamed `Stream.altBfsConcatIterate` to `wideDfsConcatIterateRev` and added `wideDfsConcatIterate`. * Deprecated `Stream.unfoldIterate`, `bfsUnfoldIterate` and @@ -108,6 +104,42 @@ * Added `Stream.bfsConcatIterateRev` and `bfsUnfoldIterateRev`, faster BFS variants that start the streams of a level in reverse order. +## 0.3.2 (Oct 2026) + +### Bug Fixes + +* On POSIX platforms, the `Path` based APIs that open an existing file in + `WriteMode`, e.g. `write` and `withFile` in `Streamly.FileSystem.FileIO`, + did not truncate it, the old contents beyond the newly written data + remained. The file descriptor leaked when the file could not be opened as + a Handle, e.g. if it was a directory. +* Fix `timer`, `timesWith`, `absTimesWith` and `relTimesWith` stopping after a + major GC. +* Fix `enumerateFrom` and `enumerateFromTo` in Stream and Unfold not + terminating for bounded integral types when the limit is `maxBound`. +* Fix `Unfold.enumerateFromTo` for `Identity` calling `enumerateFromThen`. +* Fix `Stream.splitEndBySeq` and `splitEndBySeq_` dropping the last segment + for separators longer than a machine word. +* `chunksOf` in the array modules no longer emits a trailing empty array + when the stream length is a multiple of the chunk size, or when the stream + is empty. +* Fix `classify` and `classifyIO` in Fold and Scanl, and `Fold.classifyScan`, + restarting the fold for a key that terminated on its first input. +* Fix `Scanl.uniqBy` failing before the first input. +* Fix `Stream.postscanl` emitting an output for a scan that terminates + without consuming any input. +* Fix `Stream.isInfixOf` returning `False` for an empty infix. +* Fix `RingArray.getIndex`, `cast`, `fold`, `eqArray` and `eqArrayN` for + out-of-range indices, misaligned heads, empty rings and array slices. +* Fix deserialization reading beyond the end of a corrupt or truncated buffer + for lists and for derived `Serialize` instances. + +### Internal API Bug Fixes + +* Fix memory corruption in `MutArray.appendMax`, `MutArray.createMinOf` and + `RingArray.Generic.copyToMutArray`, and resource release in + `Fold.bracketIO` and `Fold.finallyIO`. + ## 0.3.1 (May 2026) * Fixed `Path.fromString` truncation when unicode chars are present. diff --git a/docs/User/Project/Changelog.md b/docs/User/Project/Changelog.md index 14d05bfade..e80fe29227 100644 --- a/docs/User/Project/Changelog.md +++ b/docs/User/Project/Changelog.md @@ -53,12 +53,17 @@ with the JavaScript backend, the `network` package does not build for it. See [Building with the JavaScript backend](https://github.com/composewell/streamly/blob/master/docs/User/HowTo/Compiling.md#javascript) - for instructions. + for instructions. Fixes for 32-bit `Int`, as on the JavaScript backend: + * `interject` returned early for delays longer than 35.8 minutes. + +* `parTeeWith` supports filtering scans: it emits an output only when both + scans produce an output for the same input. ## 0.11.1 (May 2026) * Fix `parDemuxScan` deadlock when a worker throws an exception while the - driver is blocked on a full input buffer. + driver is blocked on a full input buffer, and a race in which the driver + of a concurrent fold or scan could miss an exception thrown by a worker. ## 0.11.0 (Sep 2025)