-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use RemoveDeadFuncsPass
instead of deprecated remove_polyfuncs()
#759
Conversation
RemoveDeadFuncsPass
instead of deprecated remove_polyfuncs()
RemoveDeadFuncsPass
instead of deprecated remove_polyfuncs()
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #759 +/- ##
=======================================
Coverage 82.31% 82.31%
=======================================
Files 63 63
Lines 7740 7742 +2
Branches 7484 7486 +2
=======================================
+ Hits 6371 6373 +2
Misses 979 979
Partials 390 390
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
uv.lock
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outdated uv
? Try uv self update
.
tket2-hseries/Cargo.toml
Outdated
@@ -23,6 +23,7 @@ required-features = ["cli"] | |||
|
|||
[dependencies] | |||
hugr.workspace = true | |||
hugr-passes = "0.14.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Dependencies should go on the workspace's
Cargo.toml
, and.workspace = true
'd here. -
We are currently at
hugr 0.14.1
on the workspace file, we should use the same versions all around.
@@ -80,7 +81,7 @@ impl QSystemPass { | |||
self.validation_level.run_validated_pass(hugr, |hugr, _| { | |||
let mut owned_hugr = Hugr::default(); | |||
mem::swap(&mut owned_hugr, hugr); | |||
owned_hugr = remove_polyfuncs(owned_hugr); | |||
RemoveDeadFuncsPass::default().run(&mut owned_hugr).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unwrap
here is annoying, but returning the error requires a release with CQCL/hugr#1883.
We should have a TODO
here linking to that PR.
#753 should fix it later.
## 🤖 New release * `tket2`: 0.7.1 -> 0.7.2 (✓ API compatible changes) * `tket2-hseries`: 0.8.0 -> 0.9.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `tket2` <blockquote> ## [0.7.1](tket2-v0.7.0...tket2-v0.7.1) - 2025-01-10 ### Bug Fixes - remove unicode pi symbols in rotation extension (#743) </blockquote> ## `tket2-hseries` <blockquote> ## [0.9.0](tket2-hseries-v0.8.0...tket2-hseries-v0.9.0) - 2025-02-12 ### Bug Fixes - Use `RemoveDeadFuncsPass` instead of deprecated `remove_polyfuncs()` (#759) - nondeterminism in lazify-measure (#766) ### New Features - *(tket2-hseries)* Add `tket2.wasm` extension (#737) - force-order qfree early and qalloc late. (#762) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
Fixes #758 .