-
Notifications
You must be signed in to change notification settings - Fork 13
refactor(ReplaceTypes): [tiny] correct computation of containing_func #2807
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
Merged
Conversation
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2807 +/- ##
=======================================
Coverage 83.71% 83.71%
=======================================
Files 261 261
Lines 52635 52637 +2
Branches 47376 47378 +2
=======================================
+ Hits 44061 44064 +3
+ Misses 6184 6183 -1
Partials 2390 2390
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cqc-alec
approved these changes
Jan 9, 2026
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 9, 2026
## 🤖 New release * `hugr-model`: 0.25.2 -> 0.25.3 (✓ API compatible changes) * `hugr-core`: 0.25.2 -> 0.25.3 (✓ API compatible changes) * `hugr-llvm`: 0.25.2 -> 0.25.3 (✓ API compatible changes) * `hugr-passes`: 0.25.2 -> 0.25.3 (✓ API compatible changes) * `hugr-persistent`: 0.4.2 -> 0.4.3 (✓ API compatible changes) * `hugr`: 0.25.2 -> 0.25.3 (✓ API compatible changes) * `hugr-cli`: 0.25.2 -> 0.25.3 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr-model` <blockquote> ## [0.25.0](hugr-model-v0.24.3...hugr-model-v0.25.0) - 2025-12-22 ### Bug Fixes - *(model)* avoid non abi-compatible pyo3 calls ([#2679](#2679)) ### New Features - [**breaking**] Upgrade pyo3 dependency to 0.27 ([#2736](#2736)) ### Refactor - Direct import of model representation to Python ([#2683](#2683)) </blockquote> ## `hugr-core` <blockquote> ## [0.25.3](hugr-core-v0.25.2...hugr-core-v0.25.3) - 2026-01-09 ### Bug Fixes - more nondeterminism in linking ([#2792](#2792)) ### Documentation - Add collection extension ops to the spec ([#2767](#2767)) </blockquote> ## `hugr-llvm` <blockquote> ## [0.25.0](hugr-llvm-v0.24.3...hugr-llvm-v0.25.0) - 2025-12-22 ### New Features - *(llvm)* [**breaking**] upgrade to inkwell 0.7 ([#2695](#2695)) ### Refactor - Deprecate Value::Function and inline_constant_functions ([#2770](#2770)) </blockquote> ## `hugr-passes` <blockquote> ## [0.25.3](hugr-passes-v0.25.2...hugr-passes-v0.25.3) - 2026-01-09 ### Bug Fixes - *(hugr-passes)* Recursive replacement on NodeTemplate::LinkedHugr ([#2800](#2800)) ### Refactor - *(ReplaceTypes)* [tiny] correct computation of containing_func ([#2807](#2807)) </blockquote> ## `hugr-persistent` <blockquote> ## [0.4.0](hugr-persistent-v0.3.4...hugr-persistent-v0.4.0) - 2025-12-22 ### New Features - [**breaking**] Remove `RootCheckable` ([#2704](#2704)) - [**breaking**] Bump MSRV to Rust 1.89 ([#2747](#2747)) - [**breaking**] Type-safe access for node metadata ([#2755](#2755)) ### Refactor - [**breaking**] Remove multiple deprecated definitions ([#2751](#2751)) </blockquote> ## `hugr` <blockquote> ## [0.25.3](hugr-v0.25.2...hugr-v0.25.3) - 2026-01-09 ### Bug Fixes - *(hugr-passes)* Recursive replacement on NodeTemplate::LinkedHugr ([#2800](#2800)) - more nondeterminism in linking ([#2792](#2792)) ### Documentation - Add collection extension ops to the spec ([#2767](#2767)) ### Refactor - *(ReplaceTypes)* [tiny] correct computation of containing_func ([#2807](#2807)) </blockquote> ## `hugr-cli` <blockquote> ## [0.25.0](hugr-cli-v0.24.3...hugr-cli-v0.25.0) - 2025-12-22 ### New Features - *(cli, python)* programmatic interface to cli with python bindings ([#2677](#2677)) - return description output to python on error ([#2681](#2681)) - [**breaking**] Type-safe access for node metadata ([#2755](#2755)) - [**breaking**] GeneratorDesc metadata definition ([#2759](#2759)) ### Refactor - [**breaking**] move envelope reading to dedicated module with dedicated errors ([#2689](#2689)) - *(cli)* [**breaking**] remove deprecated hugr_json handling ([#2690](#2690)) - [**breaking**] Remove multiple deprecated definitions ([#2751](#2751)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/).
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.
Guess I hit merge on #2800 slightly too soon, although in practice it makes no difference: the old code would have computed
containing_funcas being the module root, and so recursively processed ("replace_with_opts") the entrypoint-subtree twice (once before and once after insertion); however, the second would have done nothing. So perhaps this is a small performance optimization ;), but mostly for correctness-of-variable-name and readability!