diff --git a/Cargo.lock b/Cargo.lock index c0e30e7c59..4a884ef108 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1201,7 +1201,7 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hugr" -version = "0.20.2" +version = "0.21.0" dependencies = [ "bumpalo", "criterion", @@ -1216,7 +1216,7 @@ dependencies = [ [[package]] name = "hugr-cli" -version = "0.20.2" +version = "0.21.0" dependencies = [ "anyhow", "assert_cmd", @@ -1237,7 +1237,7 @@ dependencies = [ [[package]] name = "hugr-core" -version = "0.20.2" +version = "0.21.0" dependencies = [ "anyhow", "base64", @@ -1282,7 +1282,7 @@ dependencies = [ [[package]] name = "hugr-llvm" -version = "0.20.2" +version = "0.21.0" dependencies = [ "anyhow", "delegate", @@ -1301,7 +1301,7 @@ dependencies = [ [[package]] name = "hugr-model" -version = "0.20.2" +version = "0.21.0" dependencies = [ "base64", "bumpalo", @@ -1325,7 +1325,7 @@ dependencies = [ [[package]] name = "hugr-passes" -version = "0.20.2" +version = "0.21.0" dependencies = [ "ascent", "derive_more 1.0.0", diff --git a/hugr-cli/CHANGELOG.md b/hugr-cli/CHANGELOG.md index 5bbc26a608..5c498a199f 100644 --- a/hugr-cli/CHANGELOG.md +++ b/hugr-cli/CHANGELOG.md @@ -1,6 +1,12 @@ # Changelog +## [0.21.0](https://github.com/CQCL/hugr/compare/hugr-cli-v0.20.2...hugr-cli-v0.21.0) - 2025-07-09 + +### New Features + +- [**breaking**] Better error reporting in `hugr-cli`. ([#2318](https://github.com/CQCL/hugr/pull/2318)) + ## [0.20.2](https://github.com/CQCL/hugr/compare/hugr-cli-v0.20.1...hugr-cli-v0.20.2) - 2025-06-25 ### New Features diff --git a/hugr-cli/Cargo.toml b/hugr-cli/Cargo.toml index 003ed92ee7..964967ca79 100644 --- a/hugr-cli/Cargo.toml +++ b/hugr-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr-cli" -version = "0.20.2" +version = "0.21.0" edition = { workspace = true } rust-version = { workspace = true } license = { workspace = true } @@ -19,7 +19,7 @@ bench = false clap = { workspace = true, features = ["derive", "cargo"] } clap-verbosity-flag.workspace = true derive_more = { workspace = true, features = ["display", "error", "from"] } -hugr = { path = "../hugr", version = "0.20.2" } +hugr = { path = "../hugr", version = "0.21.0" } serde_json.workspace = true clio = { workspace = true, features = ["clap-parse"] } anyhow.workspace = true diff --git a/hugr-core/CHANGELOG.md b/hugr-core/CHANGELOG.md index 9026431a7a..28aee65198 100644 --- a/hugr-core/CHANGELOG.md +++ b/hugr-core/CHANGELOG.md @@ -1,5 +1,48 @@ # Changelog +## [0.21.0](https://github.com/CQCL/hugr/compare/hugr-core-v0.20.2...hugr-core-v0.21.0) - 2025-07-09 + +### Bug Fixes + +- Fixed two bugs in import/export of function operations ([#2324](https://github.com/CQCL/hugr/pull/2324)) +- Model import should perform extension resolution ([#2326](https://github.com/CQCL/hugr/pull/2326)) +- [**breaking**] Fixed bugs in model CFG handling and improved CFG signatures ([#2334](https://github.com/CQCL/hugr/pull/2334)) +- Use List instead of Tuple in conversions for TypeArg/TypeRow ([#2378](https://github.com/CQCL/hugr/pull/2378)) +- Do extension resolution on loaded extensions from the model format ([#2389](https://github.com/CQCL/hugr/pull/2389)) +- Make JSON Schema checks actually work again ([#2412](https://github.com/CQCL/hugr/pull/2412)) +- Order hints on input and output nodes. ([#2422](https://github.com/CQCL/hugr/pull/2422)) + +### New Features + +- [**breaking**] No nested FuncDefns (or AliasDefns) ([#2256](https://github.com/CQCL/hugr/pull/2256)) +- [**breaking**] Split `TypeArg::Sequence` into tuples and lists. ([#2140](https://github.com/CQCL/hugr/pull/2140)) +- [**breaking**] Added float and bytes literal to core and python bindings. ([#2289](https://github.com/CQCL/hugr/pull/2289)) +- [**breaking**] More helpful error messages in model import ([#2272](https://github.com/CQCL/hugr/pull/2272)) +- [**breaking**] Better error reporting in `hugr-cli`. ([#2318](https://github.com/CQCL/hugr/pull/2318)) +- [**breaking**] Merge `TypeParam` and `TypeArg` into one `Term` type in Rust ([#2309](https://github.com/CQCL/hugr/pull/2309)) +- *(persistent)* Add serialisation for CommitStateSpace ([#2344](https://github.com/CQCL/hugr/pull/2344)) +- add TryFrom impls for TypeArg/TypeRow ([#2366](https://github.com/CQCL/hugr/pull/2366)) +- Add `MakeError` op ([#2377](https://github.com/CQCL/hugr/pull/2377)) +- Open lists and tuples in `Term` ([#2360](https://github.com/CQCL/hugr/pull/2360)) +- Call `FunctionBuilder::add_{in,out}put` for any AsMut ([#2376](https://github.com/CQCL/hugr/pull/2376)) +- Add Root checked methods to DataflowParentID ([#2382](https://github.com/CQCL/hugr/pull/2382)) +- Add PersistentWire type ([#2361](https://github.com/CQCL/hugr/pull/2361)) +- Add `BorrowArray` extension ([#2395](https://github.com/CQCL/hugr/pull/2395)) +- [**breaking**] Rename 'Any' type bound to 'Linear' ([#2421](https://github.com/CQCL/hugr/pull/2421)) +- [**breaking**] Add Visibility to FuncDefn/FuncDecl. ([#2143](https://github.com/CQCL/hugr/pull/2143)) +- *(per)* [**breaking**] Support empty wires in commits ([#2349](https://github.com/CQCL/hugr/pull/2349)) +- [**breaking**] hugr-model use explicit Option, with ::Unspecified in capnp ([#2424](https://github.com/CQCL/hugr/pull/2424)) + +### Refactor + +- [**breaking**] move PersistentHugr into separate crate ([#2277](https://github.com/CQCL/hugr/pull/2277)) +- [**breaking**] remove deprecated runtime extension errors ([#2369](https://github.com/CQCL/hugr/pull/2369)) +- [**breaking**] Reduce error type sizes ([#2420](https://github.com/CQCL/hugr/pull/2420)) + +### Testing + +- Check hugr json serializations against the schema (again) ([#2216](https://github.com/CQCL/hugr/pull/2216)) + ## [0.20.2](https://github.com/CQCL/hugr/compare/hugr-core-v0.20.1...hugr-core-v0.20.2) - 2025-06-25 ### Documentation diff --git a/hugr-core/Cargo.toml b/hugr-core/Cargo.toml index 946fda2018..4ee6baf4a4 100644 --- a/hugr-core/Cargo.toml +++ b/hugr-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr-core" -version = "0.20.2" +version = "0.21.0" edition = { workspace = true } rust-version = { workspace = true } @@ -28,7 +28,7 @@ bench = false name = "model" [dependencies] -hugr-model = { version = "0.20.2", path = "../hugr-model" } +hugr-model = { version = "0.21.0", path = "../hugr-model" } cgmath = { workspace = true, features = ["serde"] } delegate = { workspace = true } diff --git a/hugr-llvm/CHANGELOG.md b/hugr-llvm/CHANGELOG.md index 0ed47be85a..936fa57f03 100644 --- a/hugr-llvm/CHANGELOG.md +++ b/hugr-llvm/CHANGELOG.md @@ -5,6 +5,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.21.0](https://github.com/CQCL/hugr/compare/hugr-llvm-v0.20.2...hugr-llvm-v0.21.0) - 2025-07-09 + +### New Features + +- [**breaking**] No nested FuncDefns (or AliasDefns) ([#2256](https://github.com/CQCL/hugr/pull/2256)) +- [**breaking**] Split `TypeArg::Sequence` into tuples and lists. ([#2140](https://github.com/CQCL/hugr/pull/2140)) +- [**breaking**] More helpful error messages in model import ([#2272](https://github.com/CQCL/hugr/pull/2272)) +- [**breaking**] Merge `TypeParam` and `TypeArg` into one `Term` type in Rust ([#2309](https://github.com/CQCL/hugr/pull/2309)) +- Add `MakeError` op ([#2377](https://github.com/CQCL/hugr/pull/2377)) + ## [0.20.2](https://github.com/CQCL/hugr/compare/hugr-llvm-v0.20.1...hugr-llvm-v0.20.2) - 2025-06-25 ### New Features diff --git a/hugr-llvm/Cargo.toml b/hugr-llvm/Cargo.toml index 4d7e9d198a..dee032ede0 100644 --- a/hugr-llvm/Cargo.toml +++ b/hugr-llvm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr-llvm" -version = "0.20.2" +version = "0.21.0" description = "A general and extensible crate for lowering HUGRs into LLVM IR" edition.workspace = true @@ -26,7 +26,7 @@ workspace = true [dependencies] inkwell = { version = "0.6.0", default-features = false } -hugr-core = { path = "../hugr-core", version = "0.20.1" } +hugr-core = { path = "../hugr-core", version = "0.21.0" } anyhow.workspace = true itertools.workspace = true delegate.workspace = true diff --git a/hugr-model/CHANGELOG.md b/hugr-model/CHANGELOG.md index 901f077d14..fbfb9a2593 100644 --- a/hugr-model/CHANGELOG.md +++ b/hugr-model/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.21.0](https://github.com/CQCL/hugr/compare/hugr-model-v0.20.2...hugr-model-v0.21.0) - 2025-07-09 + +### Bug Fixes + +- Model import should perform extension resolution ([#2326](https://github.com/CQCL/hugr/pull/2326)) +- [**breaking**] Fixed bugs in model CFG handling and improved CFG signatures ([#2334](https://github.com/CQCL/hugr/pull/2334)) +- [**breaking**] Fix panic in model resolver when variable is used outside of symbol. ([#2362](https://github.com/CQCL/hugr/pull/2362)) +- Order hints on input and output nodes. ([#2422](https://github.com/CQCL/hugr/pull/2422)) + +### New Features + +- [**breaking**] Added float and bytes literal to core and python bindings. ([#2289](https://github.com/CQCL/hugr/pull/2289)) +- [**breaking**] Add Visibility to FuncDefn/FuncDecl. ([#2143](https://github.com/CQCL/hugr/pull/2143)) +- [**breaking**] hugr-model use explicit Option, with ::Unspecified in capnp ([#2424](https://github.com/CQCL/hugr/pull/2424)) + ## [0.20.2](https://github.com/CQCL/hugr/compare/hugr-model-v0.20.1...hugr-model-v0.20.2) - 2025-06-25 ### New Features diff --git a/hugr-model/Cargo.toml b/hugr-model/Cargo.toml index 24c1f9e42e..aca5528904 100644 --- a/hugr-model/Cargo.toml +++ b/hugr-model/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr-model" -version = "0.20.2" +version = "0.21.0" readme = "README.md" documentation = "https://docs.rs/hugr-model/" description = "Data model for Quantinuum's HUGR intermediate representation" diff --git a/hugr-passes/CHANGELOG.md b/hugr-passes/CHANGELOG.md index d5f2921845..08698b8cf4 100644 --- a/hugr-passes/CHANGELOG.md +++ b/hugr-passes/CHANGELOG.md @@ -1,6 +1,23 @@ # Changelog +## [0.21.0](https://github.com/CQCL/hugr/compare/hugr-passes-v0.20.2...hugr-passes-v0.21.0) - 2025-07-09 + +### Bug Fixes + +- DeadFuncElimPass+CallGraph w/ non-module-child entrypoint ([#2390](https://github.com/CQCL/hugr/pull/2390)) + +### New Features + +- [**breaking**] No nested FuncDefns (or AliasDefns) ([#2256](https://github.com/CQCL/hugr/pull/2256)) +- [**breaking**] Split `TypeArg::Sequence` into tuples and lists. ([#2140](https://github.com/CQCL/hugr/pull/2140)) +- [**breaking**] Merge `TypeParam` and `TypeArg` into one `Term` type in Rust ([#2309](https://github.com/CQCL/hugr/pull/2309)) +- [**breaking**] Rename 'Any' type bound to 'Linear' ([#2421](https://github.com/CQCL/hugr/pull/2421)) + +### Refactor + +- [**breaking**] Reduce error type sizes ([#2420](https://github.com/CQCL/hugr/pull/2420)) + ## [0.20.2](https://github.com/CQCL/hugr/compare/hugr-passes-v0.20.1...hugr-passes-v0.20.2) - 2025-06-25 ### Bug Fixes diff --git a/hugr-passes/Cargo.toml b/hugr-passes/Cargo.toml index 8c1daafbcd..bd37426d75 100644 --- a/hugr-passes/Cargo.toml +++ b/hugr-passes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr-passes" -version = "0.20.2" +version = "0.21.0" edition = { workspace = true } rust-version = { workspace = true } license = { workspace = true } @@ -19,7 +19,7 @@ workspace = true bench = false [dependencies] -hugr-core = { path = "../hugr-core", version = "0.20.2" } +hugr-core = { path = "../hugr-core", version = "0.21.0" } portgraph = { workspace = true } ascent = { version = "0.8.0" } derive_more = { workspace = true, features = ["display", "error", "from"] } diff --git a/hugr-py/Cargo.toml b/hugr-py/Cargo.toml index 27020c8122..4a4c6f11a4 100644 --- a/hugr-py/Cargo.toml +++ b/hugr-py/Cargo.toml @@ -21,6 +21,6 @@ bench = false [dependencies] bumpalo = { workspace = true, features = ["collections"] } -hugr-model = { version = "0.20.2", path = "../hugr-model", features = ["pyo3"] } +hugr-model = { version = "0.21.0", path = "../hugr-model", features = ["pyo3"] } paste.workspace = true pyo3 = { workspace = true, features = ["extension-module", "abi3-py310"] } diff --git a/hugr/CHANGELOG.md b/hugr/CHANGELOG.md index 46439ca695..71f1549c8e 100644 --- a/hugr/CHANGELOG.md +++ b/hugr/CHANGELOG.md @@ -1,5 +1,62 @@ # Changelog +## [0.21.0](https://github.com/CQCL/hugr/compare/hugr-v0.20.2...hugr-v0.21.0) - 2025-07-09 + + +This release includes a long list of changes: + +- The HUGR model serialization format is now stable, and should be preferred over the old JSON format. +- Type parameters and type arguments are now unified into a single `Term` type. +- Function definitions can no longer be nested inside dataflow regions. Now they must be defined at the top level module. +- Function definitions and declarations now have a `Visibility` field, which define whether they are visible in the public API of the module. +- And many more fixes and improvements. + +### Bug Fixes + +- DeadFuncElimPass+CallGraph w/ non-module-child entrypoint ([#2390](https://github.com/CQCL/hugr/pull/2390)) +- Fixed two bugs in import/export of function operations ([#2324](https://github.com/CQCL/hugr/pull/2324)) +- Model import should perform extension resolution ([#2326](https://github.com/CQCL/hugr/pull/2326)) +- [**breaking**] Fixed bugs in model CFG handling and improved CFG signatures ([#2334](https://github.com/CQCL/hugr/pull/2334)) +- Use List instead of Tuple in conversions for TypeArg/TypeRow ([#2378](https://github.com/CQCL/hugr/pull/2378)) +- Do extension resolution on loaded extensions from the model format ([#2389](https://github.com/CQCL/hugr/pull/2389)) +- Make JSON Schema checks actually work again ([#2412](https://github.com/CQCL/hugr/pull/2412)) +- Order hints on input and output nodes. ([#2422](https://github.com/CQCL/hugr/pull/2422)) + +### Documentation + +- Hide hugr-persistent docs ([#2357](https://github.com/CQCL/hugr/pull/2357)) + +### New Features + +- [**breaking**] Split `TypeArg::Sequence` into tuples and lists. ([#2140](https://github.com/CQCL/hugr/pull/2140)) +- [**breaking**] Added float and bytes literal to core and python bindings. ([#2289](https://github.com/CQCL/hugr/pull/2289)) +- [**breaking**] More helpful error messages in model import ([#2272](https://github.com/CQCL/hugr/pull/2272)) +- [**breaking**] Better error reporting in `hugr-cli`. ([#2318](https://github.com/CQCL/hugr/pull/2318)) +- [**breaking**] Merge `TypeParam` and `TypeArg` into one `Term` type in Rust ([#2309](https://github.com/CQCL/hugr/pull/2309)) +- *(persistent)* Add serialisation for CommitStateSpace ([#2344](https://github.com/CQCL/hugr/pull/2344)) +- add TryFrom impls for TypeArg/TypeRow ([#2366](https://github.com/CQCL/hugr/pull/2366)) +- Add `MakeError` op ([#2377](https://github.com/CQCL/hugr/pull/2377)) +- Open lists and tuples in `Term` ([#2360](https://github.com/CQCL/hugr/pull/2360)) +- Call `FunctionBuilder::add_{in,out}put` for any AsMut ([#2376](https://github.com/CQCL/hugr/pull/2376)) +- Add Root checked methods to DataflowParentID ([#2382](https://github.com/CQCL/hugr/pull/2382)) +- Add PersistentWire type ([#2361](https://github.com/CQCL/hugr/pull/2361)) +- Add `BorrowArray` extension ([#2395](https://github.com/CQCL/hugr/pull/2395)) +- [**breaking**] Add Visibility to FuncDefn/FuncDecl. ([#2143](https://github.com/CQCL/hugr/pull/2143)) +- *(per)* [**breaking**] Support empty wires in commits ([#2349](https://github.com/CQCL/hugr/pull/2349)) +- [**breaking**] hugr-model use explicit Option, with ::Unspecified in capnp ([#2424](https://github.com/CQCL/hugr/pull/2424)) +- [**breaking**] No nested FuncDefns (or AliasDefns) ([#2256](https://github.com/CQCL/hugr/pull/2256)) +- [**breaking**] Rename 'Any' type bound to 'Linear' ([#2421](https://github.com/CQCL/hugr/pull/2421)) + +### Refactor + +- [**breaking**] remove deprecated runtime extension errors ([#2369](https://github.com/CQCL/hugr/pull/2369)) +- [**breaking**] Reduce error type sizes ([#2420](https://github.com/CQCL/hugr/pull/2420)) +- [**breaking**] move PersistentHugr into separate crate ([#2277](https://github.com/CQCL/hugr/pull/2277)) + +### Testing + +- Check hugr json serializations against the schema (again) ([#2216](https://github.com/CQCL/hugr/pull/2216)) + ## [0.20.2](https://github.com/CQCL/hugr/compare/hugr-v0.20.1...hugr-v0.20.2) - 2025-06-25 ### Bug Fixes diff --git a/hugr/Cargo.toml b/hugr/Cargo.toml index 439386c250..80c285a6c0 100644 --- a/hugr/Cargo.toml +++ b/hugr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hugr" -version = "0.20.2" +version = "0.21.0" edition = { workspace = true } rust-version = { workspace = true } @@ -31,10 +31,10 @@ zstd = ["hugr-core/zstd"] persistent_unstable = ["hugr-persistent"] [dependencies] -hugr-model = { path = "../hugr-model", version = "0.20.2" } -hugr-core = { path = "../hugr-core", version = "0.20.2" } -hugr-passes = { path = "../hugr-passes", version = "0.20.2" } -hugr-llvm = { path = "../hugr-llvm", version = "0.20.2", optional = true } +hugr-model = { path = "../hugr-model", version = "0.21.0" } +hugr-core = { path = "../hugr-core", version = "0.21.0" } +hugr-passes = { path = "../hugr-passes", version = "0.21.0" } +hugr-llvm = { path = "../hugr-llvm", version = "0.21.0", optional = true } hugr-persistent = { path = "../hugr-persistent", version = "0.1.0", optional = true } [dev-dependencies]