Repository navigation
Release 0.12.0 - #597
Merged
Merged
Release 0.12.0#597
Conversation
Range algebra is the new language feature. The rest is seven defects, five of them silent: the compiler accepted the program, emitted C that built without error, and produced the wrong answer. Six of the seven were found by compiling and running the code in the documentation. ./flow test --tier2 covers tests/ and examples/, and nothing in either returns a fixed-size array, concatenates a string with an i64, or reads a value past a defer. Minor rather than patch: sum() gained `|` and `&` over ranges, and the capability-as-value diagnostic is a new error in --lenient, which was previously warnings-only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
0.11.1→0.12.0viascripts/sync_version.py --set 0.12.0, plus the changelog entry.Why minor rather than patch
Two things beyond bug fixes:
sum()gained|and&over ranges (Add range algebra: set operations (union, intersection, difference) on ranges #476), which is new language surface.--lenient, which was warnings-only before (capability E as a parameter type lowers to invalid C instead of a Flow diagnostic #561). Existing code that hit it could not build anyway, since the emitted C referenced a symbol nothing defined, but it is still a behaviour change at the CLI.What is in it
Added: range algebra.
sum(0..1000 step 3 | 0..1000 step 5)folds to233168at parse time.Fixed, wrong answers — all five compiled cleanly and produced wrong output:
array<T, N>returned garbage; all 25 stdlib functions doing so were affected,scales.flowentirely non-functionalarray<array<T, N>, M>was an array of pointers into a dead framedeferran before the return value was read; a nested return skipped defers; both backends"i64=" + vprinted a pointerx as Thad no inferred type, so(buf as string)formatted the pointer with%dFixed, misleading diagnostics: #571 (a type reported as failing to match itself), #561 (a capability used as a value).
Documentation: #574 (
audio/README.mdnamed an API that was never written), #582 (from=locks a block to the file it is copied from). Unverified examples 235 → 221.The pattern worth noting
Six of seven defects came from the documentation examples, not from the test suite.
./flow test --tier2coverstests/andexamples/, and nothing in either returns a fixed-size array, concatenates a string with an i64, or reads a value past adefer. The docs exercised paths nothing else did.Verification
pytest tests/sync_version.py --checkcheck_doc_examples.py --check-ledgercheck_doc_links.py