Skip to content

Conversation

@doug-q
Copy link
Contributor

@doug-q doug-q commented May 1, 2025

BREAKING CHANGE: bump to hugr 0.20

@hugrbot
Copy link
Collaborator

hugrbot commented May 1, 2025

This PR contains breaking changes to the public Rust API.

cargo-semver-checks summary

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/enum_missing.ron

Failed in:
enum tket2::serialize::CircuitStoreError, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:256

--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/enum_variant_missing.ron

Failed in:
variant CircuitLoadError::PackageError, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:344

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/inherent_method_missing.ron

Failed in:
Circuit::store_hugr, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:78
Circuit::to_hugr_writer, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:100
Circuit::to_package_writer, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:119
Circuit::load_hugr, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:192
Circuit::load_hugr_reader, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:212
Circuit::load_function_reader, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:228
Circuit::store_hugr, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:78
Circuit::to_hugr_writer, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:100
Circuit::to_package_writer, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:119
Circuit::load_hugr, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:192
Circuit::load_hugr_reader, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:212
Circuit::load_function_reader, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2/src/serialize.rs:228

--- failure method_parameter_count_changed: pub method parameter count changed ---

Description:
A publicly-visible method now takes a different number of parameters.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/method_parameter_count_changed.ron

Failed in:
tket2::circuit::Circuit::try_new now takes 1 parameters instead of 2, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit.rs:91
tket2::circuit::Circuit::new now takes 1 parameters instead of 2, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit.rs:103
tket2::circuit::Circuit::store_str now takes 2 parameters instead of 1, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/serialize.rs:49
tket2::Circuit::try_new now takes 1 parameters instead of 2, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit.rs:91
tket2::Circuit::new now takes 1 parameters instead of 2, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit.rs:103
tket2::Circuit::store_str now takes 2 parameters instead of 1, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/serialize.rs:49

--- failure method_requires_different_generic_type_params: method now requires a different number of generic type parameters ---

Description:
A method now requires a different number of generic type parameters than it used to. Uses of this method that supplied the previous number of generic types will be broken.
      ref: https://doc.rust-lang.org/reference/items/generics.html
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/method_requires_different_generic_type_params.ron

Failed in:
tket2::portmatching::matcher::PatternMatch::try_from_root_match_with_checker takes 1 generic types instead of 0, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/portmatching/matcher.rs:137
tket2::portmatching::matcher::PatternMatch::try_from_io_with_checker takes 1 generic types instead of 0, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/portmatching/matcher.rs:197
tket2::portmatching::PatternMatch::try_from_root_match_with_checker takes 1 generic types instead of 0, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/portmatching/matcher.rs:137
tket2::portmatching::PatternMatch::try_from_io_with_checker takes 1 generic types instead of 0, in /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/portmatching/matcher.rs:197

--- failure trait_method_parameter_count_changed: pub trait method parameter count changed ---

Description:
A trait method now takes a different number of parameters.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#major-any-change-to-trait-item-signatures
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/trait_method_parameter_count_changed.ron

Failed in:
CircuitHash::circuit_hash now takes 2 instead of 1 parameters, in file /home/runner/work/tket2/tket2/PR_BRANCH/tket2/src/circuit/hash.rs:26

--- failure enum_variant_missing: pub enum variant removed or renamed ---

Description:
A publicly-visible enum has at least one variant that is no longer available under its prior name. It may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/enum_variant_missing.ron

Failed in:
variant LowerTk2Error::ValidationError, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/extension/qsystem/lower.rs:62
variant LazifyMeasurePassError::ValidationError, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/lazify_measure.rs:48
variant QSystemPassError::ValidationError, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/lib.rs:59
variant QSystemPassError::MonomorphizeError, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/lib.rs:69

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.41.0/src/lints/inherent_method_missing.ron

Failed in:
LazifyMeasurePass::with_validation_level, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/lazify_measure.rs:77
QSystemPass::with_validation_level, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/lib.rs:176
LowerTket2ToQSystemPass::with_validation_level, previously in file /home/runner/work/tket2/tket2/BASELINE_BRANCH/tket2-hseries/src/extension/qsystem/lower.rs:257

@codecov
Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 83.13953% with 58 lines in your changes missing coverage. Please review.

Project coverage is 81.73%. Comparing base (b9cb9ca) to head (f0547c5).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tket2/src/serialize.rs 55.55% 8 Missing and 4 partials ⚠️
tket2/src/passes/pytket.rs 52.38% 0 Missing and 10 partials ⚠️
tket2/src/circuit.rs 84.44% 5 Missing and 2 partials ⚠️
tket2-hseries/src/lazify_measure.rs 86.36% 4 Missing and 2 partials ⚠️
tket2/src/passes/commutation.rs 14.28% 5 Missing and 1 partial ⚠️
tket2-hseries/src/lib.rs 91.17% 1 Missing and 2 partials ⚠️
tket2/src/circuit/hash.rs 81.25% 3 Missing ⚠️
tket2/src/portmatching/matcher.rs 80.00% 2 Missing and 1 partial ⚠️
tket2-hseries/src/extension/qsystem/lower.rs 90.00% 0 Missing and 2 partials ⚠️
tket2-hseries/src/extension/result.rs 88.88% 1 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #862      +/-   ##
==========================================
- Coverage   82.12%   81.73%   -0.39%     
==========================================
  Files          68       68              
  Lines        7944     7875      -69     
  Branches     7672     7603      -69     
==========================================
- Hits         6524     6437      -87     
- Misses       1020     1055      +35     
+ Partials      400      383      -17     
Flag Coverage Δ
python 81.61% <100.00%> (ø)
rust 81.74% <83.04%> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@doug-q doug-q changed the title chore!: BUmp to hugr-0.20 chore!: Bump to hugr-0.20 May 1, 2025
@doug-q doug-q force-pushed the update-hugr-202505 branch from 2563a8d to f7c7737 Compare May 1, 2025 09:43
@aborgna-q aborgna-q self-assigned this May 13, 2025
@lmondada
Copy link
Contributor

Actually, please wait a second. I suddenly have a doubt about the fixes I made yesterday. I'll double check before we merge this in.

@lmondada
Copy link
Contributor

As feared, Quantinuum/hugr#2221 makes a test fail...

@aborgna-q aborgna-q marked this pull request as ready for review May 16, 2025 13:47
@aborgna-q aborgna-q requested a review from a team as a code owner May 16, 2025 13:47
@aborgna-q aborgna-q requested review from lmondada and ss2165 May 16, 2025 13:47
@lmondada
Copy link
Contributor

lmondada commented May 16, 2025

easy small PR to review 😅 I'm on it nvm thanks @aborgna-q

@aborgna-q aborgna-q added this pull request to the merge queue May 16, 2025
Merged via the queue into main with commit 652a7d0 May 16, 2025
18 checks passed
@aborgna-q aborgna-q deleted the update-hugr-202505 branch May 16, 2025 14:01
github-merge-queue bot pushed a commit that referenced this pull request May 16, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.7.0](tket2-exts-v0.6.0...tket2-exts-v0.7.0)
(2025-05-16)


### ⚠ BREAKING CHANGES

* bump to hugr 0.20
* **hseries:** ZZMax removed from Qsystem extension. Use ZZPhase(pi/2).

### Features

* Add `tket2.bool` extension
([#823](#823))
([8818d2f](8818d2f))
* Add debug extension with state result op
([#843](#843))
([64bbe88](64bbe88)),
closes [#832](#832)
* **hseries:** remove ZZMax operation from Qsystem extension
([#852](#852))
([b488125](b488125))


### Miscellaneous Chores

* Bump to hugr-0.20 ([#862](#862))
([652a7d0](652a7d0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
github-merge-queue bot pushed a commit that referenced this pull request May 16, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.4.0](tket2-eccs-v0.3.0...tket2-eccs-v0.4.0)
(2025-05-16)


### ⚠ BREAKING CHANGES

* bump to hugr 0.20

### Miscellaneous Chores

* Bump to hugr-0.20 ([#862](#862))
([652a7d0](652a7d0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Seyon Sivarajah <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request May 16, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.9.0](tket2-py-v0.8.1...tket2-py-v0.9.0)
(2025-05-16)


### ⚠ BREAKING CHANGES

* bump to hugr 0.20

### Features

* **tket2-py:** Expose new modules in python
([#860](#860))
([4bfb3ff](4bfb3ff))


### Miscellaneous Chores

* Bump to hugr-0.20 ([#862](#862))
([652a7d0](652a7d0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Seyon Sivarajah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants