From f1a7010e6f786758a364a78cd2d2eccc7c719ddd Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Mon, 19 Oct 2026 18:42:52 +0530 Subject: [PATCH 1/4] Add the streamly-core 0.3.2 changelog section Move the fixes released in 0.3.2 from the Unreleased section to the 0.3.2 section, the same as the changelog on the release branch. --- core/docs/Changelog.md | 75 ++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/core/docs/Changelog.md b/core/docs/Changelog.md index 227f50e9d3..37b175582b 100644 --- a/core/docs/Changelog.md +++ b/core/docs/Changelog.md @@ -11,31 +11,11 @@ ### 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. @@ -45,16 +25,6 @@ * 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. - ### Breaking changes * In Scanl module, `filter` and any other filtering operations like @@ -83,15 +53,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 +69,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. From b757d75181316a6b43e8f0a1f1941a1ca95b73ae Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Mon, 19 Oct 2026 21:52:25 +0530 Subject: [PATCH 2/4] Add missing entries to the streamly changelog Add the parTeeWith filtering scans support and the interject 32-bit delay fix to Unreleased, and the sendExceptionToDriver race fix to the 0.11.1 parDemuxScan entry. --- docs/User/Project/Changelog.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/User/Project/Changelog.md b/docs/User/Project/Changelog.md index 14d05bfade..d4e4b600e5 100644 --- a/docs/User/Project/Changelog.md +++ b/docs/User/Project/Changelog.md @@ -55,10 +55,19 @@ [Building with the JavaScript backend](https://github.com/composewell/streamly/blob/master/docs/User/HowTo/Compiling.md#javascript) for instructions. +* `parTeeWith` supports filtering scans: it emits an output only when both + scans produce an output for the same input. + +### Bug Fixes + +* Fix `interject` returning early for delays longer than 35.8 minutes when + `Int` is 32 bits, e.g. on the JavaScript backend. + ## 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) From 09604e7191c4acd34894e7e1cc720f45033ee17d Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Mon, 19 Oct 2026 21:55:18 +0530 Subject: [PATCH 3/4] Group the JS backend 32-bit fixes under the JS backend entries List the 32-bit Int fixes as sub-items of the JavaScript backend support entries in the streamly and streamly-core changelogs, and add the doubleParser and Serialize length header fixes. --- core/docs/Changelog.md | 12 +++++++++--- docs/User/Project/Changelog.md | 8 ++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core/docs/Changelog.md b/core/docs/Changelog.md index 37b175582b..d575cd49dd 100644 --- a/core/docs/Changelog.md +++ b/core/docs/Changelog.md @@ -7,13 +7,19 @@ * Filtering support for `Scanl`. * FileSystem.Path now does not treat paths with leading "./" as rooted paths. * `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. The + length header is now always `Int64`, the encoding on 64-bit platforms + is unchanged. ### Bug Fixes * 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.partition`, `partitionBy` and `partitionByM` not finalizing one scan when the other terminates. * `enumerateFromTo` and `enumerateFromThenTo` for `Ratio` now round the diff --git a/docs/User/Project/Changelog.md b/docs/User/Project/Changelog.md index d4e4b600e5..e80fe29227 100644 --- a/docs/User/Project/Changelog.md +++ b/docs/User/Project/Changelog.md @@ -53,16 +53,12 @@ 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. -### Bug Fixes - -* Fix `interject` returning early for delays longer than 35.8 minutes when - `Int` is 32 bits, e.g. on the JavaScript backend. - ## 0.11.1 (May 2026) * Fix `parDemuxScan` deadlock when a worker throws an exception while the From e8e0d82e2e5b8a61090c3009bd5368728332bcf2 Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Mon, 19 Oct 2026 22:06:47 +0530 Subject: [PATCH 4/4] Correct and complete the streamly-core Unreleased changelog Add the public API changes and bug fixes since 0.3.0 that were missing: packPathsEndBy, the DirIO options on Windows, the portable Serialize encoding, the Array Show/Read, Serialize and Unfold enumerateFromThen fixes, the Fixed enumeration and UNC splitRoot changes, and the Scanl and Unfold renames. Move the changes to internal APIs (Scan, partitionBy, incrScanWith) to the internal section, drop the enumerateFromToNum fix and the Ratio change, which do not differ from the released behaviour, and the duplicate leading "./" entry. --- core/docs/Changelog.md | 61 +++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/core/docs/Changelog.md b/core/docs/Changelog.md index d575cd49dd..22f2fedbc0 100644 --- a/core/docs/Changelog.md +++ b/core/docs/Changelog.md @@ -5,7 +5,10 @@ ### 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. Fixes for 32-bit `Int`, as on the JavaScript backend: @@ -13,23 +16,27 @@ 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. The - length header is now always `Int64`, the encoding on 64-bit platforms - is unchanged. + * `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 -* Fix the `Arrow` instance of `Scan` failing when a scan skips an input. -* Fix `Scanl.partition`, `partitionBy` and `partitionByM` not finalizing one - scan when the other terminates. -* `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. +* 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 @@ -37,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. @@ -50,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.