-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Support LineConvexChecker #2487
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2487 +/- ##
==========================================
- Coverage 82.67% 82.66% -0.01%
==========================================
Files 251 251
Lines 46661 46786 +125
Branches 42190 42315 +125
==========================================
+ Hits 38576 38675 +99
- Misses 6034 6060 +26
Partials 2051 2051
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:
|
|
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary |
56bf271 to
90abe47
Compare
90abe47 to
3fe880e
Compare
3fe880e to
86be906
Compare
|
@aborgna-q my thoughts
So rather than whether this is breaking, for me the question is whether it's worth the hassle to overwrite semver-checks (because I think it creates issues when generating the changelog, right?) Whilst we're at it, can you confirm that hiking the portgraph dependency wouldn't be breaking? It would be a patch upgrade on portgraph. |
|
An alternative is to play it safe (i.e. define There shouldn't be too many merge conflicts arising, given that it only touches this one file. |
|
Relevant semver-checks issue: obi1kenobi/cargo-semver-checks#609 (comment). I think we're fine overwriting the breaking change marker here. |
|
(nit)
Our case is slightly different: the type alias and struct are both defined within this crate, so the justification does not apply. However, in our case, the aliased struct isn't equal to the old one (it is equal once some of the generics are fixed). Do you think I should open an issue in semver-checks? |
|
Uhm, you're right though it's quite the edge case. |
## 🤖 New release
* `hugr-model`: 0.22.1 -> 0.23.0 (✓ API compatible changes)
* `hugr-core`: 0.22.1 -> 0.23.0 (⚠ API breaking changes)
* `hugr-llvm`: 0.22.1 -> 0.23.0 (✓ API compatible changes)
* `hugr-passes`: 0.22.1 -> 0.23.0 (✓ API compatible changes)
* `hugr-persistent`: 0.2.1 -> 0.2.2 (✓ API compatible changes)
* `hugr`: 0.22.1 -> 0.23.0 (✓ API compatible changes)
* `hugr-cli`: 0.22.1 -> 0.23.0 (✓ API compatible changes)
### ⚠ `hugr-core` breaking changes
```text
--- failure struct_missing: pub struct removed or renamed ---
Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct 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/struct_missing.ron
Failed in:
struct hugr_core::hugr::views::sibling_subgraph::TopoConvexChecker, previously in file /tmp/.tmpA42bjc/hugr-core/src/hugr/views/sibling_subgraph.rs:601
```
<details><summary><i><b>Changelog</b></i></summary><p>
## `hugr-model`
<blockquote>
##
[0.23.0](hugr-model-v0.22.1...hugr-model-v0.23.0)
- 2025-08-06
### New Features
- Type of constants in `core` `Term`s.
([#2411](#2411))
</blockquote>
## `hugr-core`
<blockquote>
##
[0.23.0](hugr-core-v0.22.1...hugr-core-v0.23.0)
- 2025-08-06
### New Features
- Type of constants in `core` `Term`s.
([#2411](#2411))
- Support LineConvexChecker
([#2487](#2487))
</blockquote>
## `hugr-llvm`
<blockquote>
##
[0.23.0](hugr-llvm-v0.22.1...hugr-llvm-v0.23.0)
- 2025-08-06
### Bug Fixes
- added public func getter for EmitFuncContext
([#2482](#2482))
- *(hugr-llvm)* Set llvm function linkage based on Visibility hugr node
field ([#2502](#2502))
</blockquote>
## `hugr-passes`
<blockquote>
##
[0.22.1](hugr-passes-v0.22.0...hugr-passes-v0.22.1)
- 2025-07-28
### New Features
- Include copy_discard_array in DelegatingLinearizer::default
([#2479](#2479))
- Inline calls to functions not on cycles in the call graph
([#2450](#2450))
</blockquote>
## `hugr-persistent`
<blockquote>
##
[0.2.0](hugr-persistent-v0.1.0...hugr-persistent-v0.2.0)
- 2025-07-24
### New Features
- [**breaking**] Update portgraph dependency to 0.15
([#2455](#2455))
</blockquote>
## `hugr`
<blockquote>
##
[0.23.0](hugr-v0.22.1...hugr-v0.23.0)
- 2025-08-06
### New Features
- Type of constants in `core` `Term`s.
([#2411](#2411))
- Support LineConvexChecker
([#2487](#2487))
</blockquote>
## `hugr-cli`
<blockquote>
##
[0.23.0](hugr-cli-v0.22.1...hugr-cli-v0.23.0)
- 2025-08-06
### New Features
- *(cli)* Deprecate HugrInputArgs::get_hugr
([#2506](#2506))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
---------
Co-authored-by: Luca Mondada <[email protected]>
This PR's goal is to expose the new
LineConvexCheckerinportgraphin the hugr API. For details see the original PR: CQCL/portgraph#240This PR will require a (non-breaking) portgraph release. Currently pinning portgraph main (to be reverted).
There are also two functions whose API could be generalised -- but that would be a breaking change. I've marked them as TODOs in the code.
Breaking change?
Confirm: hiking the patch version of portgraph is considered non-breaking, right?
The current "breaking change" detected by semver-checks is due to
struct TopoConvexCheckernow being a type synonym forConvexChecker<'g, Base, pg:TopoConvexChecker<CheckerRegion<'g, Base>>>. It behaves exactly identically from a user's perspective, so I would be in favour of ignoring that warning, unless someone can spot an issue with it?Alternatively, I could define a newtype
struct TopoConvexChecker(ConvexChecker)that delegates all methods to the inner struct. Presumably semver-checks would accept that as non-breaking (but it would be ugly, verbose and would need to be undone before the next breaking release).