Skip to content

feat: move ArrayOpBuilder to hugr-core #2115

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
merged 5 commits into from
Apr 24, 2025
Merged

feat: move ArrayOpBuilder to hugr-core #2115

merged 5 commits into from
Apr 24, 2025

Conversation

ss2165
Copy link
Member

@ss2165 ss2165 commented Apr 24, 2025

Not doing ints or logic atm because those builders are not comprehensive.

Closes #2116

@ss2165 ss2165 requested review from aborgna-q, cqc-alec, doug-q and a team as code owners April 24, 2025 10:41
@ss2165 ss2165 added the breaking-change Changes that break semver label Apr 24, 2025
@ss2165 ss2165 removed request for cqc-alec and aborgna-q April 24, 2025 10:42
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 90.62500% with 12 lines in your changes missing coverage. Please review.

Project coverage is 83.09%. Comparing base (2222b8c) to head (1fadcbf).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...src/std_extensions/collections/array/op_builder.rs 84.81% 1 Missing and 11 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2115   +/-   ##
=======================================
  Coverage   83.08%   83.09%           
=======================================
  Files         219      219           
  Lines       41886    41918   +32     
  Branches    37961    37993   +32     
=======================================
+ Hits        34803    34830   +27     
  Misses       5278     5278           
- Partials     1805     1810    +5     
Flag Coverage Δ
python 85.70% <ø> (ø)
rust 82.82% <90.62%> (+<0.01%) ⬆️

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.

@hugrbot
Copy link
Collaborator

hugrbot commented Apr 24, 2025

This PR contains breaking changes to the public Rust API.
Please deprecate the old API instead (if possible), or mark the PR with a ! to indicate a breaking change.

cargo-semver-checks summary

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait 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/trait_missing.ron

Failed in:
trait hugr_llvm::utils::array_op_builder::ArrayOpBuilder, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-llvm/src/utils/array_op_builder.rs:10
trait hugr_llvm::utils::ArrayOpBuilder, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-llvm/src/utils/array_op_builder.rs:10

@ss2165 ss2165 changed the base branch from release-rs-v0.16.0 to main April 24, 2025 10:47
@ss2165 ss2165 changed the title feat!: move ArrayOpBuilder to hugr-core feat: move ArrayOpBuilder to hugr-core Apr 24, 2025
Copy link
Collaborator

@doug-q doug-q left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Seyon. I think copilot wrote the docs? nice.

This will conflict with https://github.com/CQCL/hugr/pull/2112/files. I suggest merging that first.

@mark-koch
Copy link
Contributor

This will conflict with https://github.com/CQCL/hugr/pull/2112/files. I suggest merging that first.

I think this depends on how quickly we want to merge #2109. Apart from #2101 it's all reviewed, but maybe we want to wait until we support heap arrays full stack?

@ss2165
Copy link
Member Author

ss2165 commented Apr 24, 2025

I am going to merge to main - I am pretty sure the deprecations are valid and this is actually non-breaking. They should be removed as part of #2117.

@ss2165 ss2165 added this pull request to the merge queue Apr 24, 2025
Merged via the queue into main with commit c8090ca Apr 24, 2025
24 of 25 checks passed
@ss2165 ss2165 deleted the ss/builders branch April 24, 2025 12:37
This was referenced Apr 22, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 7, 2025
## 🤖 New release

* `hugr-model`: 0.19.0 -> 0.19.1 (✓ API compatible changes)
* `hugr-core`: 0.15.3 -> 0.15.4 (✓ API compatible changes)
* `hugr-llvm`: 0.15.3 -> 0.15.4 (~⚠ API breaking changes~ overwriten)
* `hugr-passes`: 0.15.3 -> 0.15.4 (✓ API compatible changes)
* `hugr`: 0.15.3 -> 0.15.4 (✓ API compatible changes)
* `hugr-cli`: 0.15.3 -> 0.15.4 (✓ API compatible changes)

### ⚠ `hugr-llvm` breaking changes

```text
--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait 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.40.0/src/lints/trait_missing.ron

Failed in:
  trait hugr_llvm::utils::array_op_builder::ArrayOpBuilder, previously in file /tmp/.tmpyTFqSG/hugr-llvm/src/utils/array_op_builder.rs:10
  trait hugr_llvm::utils::ArrayOpBuilder, previously in file /tmp/.tmpyTFqSG/hugr-llvm/src/utils/array_op_builder.rs:10
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `hugr-model`

<blockquote>

##
[0.19.0](hugr-model-v0.18.1...hugr-model-v0.19.0)
- 2025-04-02

### New Features

- Python bindings for `hugr-model`.
([#1959](#1959))
- Remove extension sets from `hugr-model`.
([#2031](#2031))
- Packages in `hugr-model` and envelope support.
([#2026](#2026))
- Represent order edges in `hugr-model` as metadata.
([#2027](#2027))
</blockquote>

## `hugr-core`

<blockquote>

##
[0.16.0](hugr-core-v0.15.3...hugr-core-v0.16.0)
- 2025-04-30

### New Features

- Export the portgraph hierarchy in HugrInternals
([#2057](#2057))
- Implement Debug for generic Wire<N>s
([#2068](#2068))
- Add ExtensionOp helpers
([#2072](#2072))
- ReplaceTypes: handlers for array constants + linearization
([#2023](#2023))
- move `ArrayOpBuilder` to hugr-core
([#2115](#2115))

### Testing

- Disable IO-dependent tests when running miri
([#2123](#2123))
</blockquote>

## `hugr-llvm`

<blockquote>

##
[0.16.0](hugr-llvm-v0.15.3...hugr-llvm-v0.16.0)
- 2025-04-30

### New Features

- move `ArrayOpBuilder` to hugr-core
([#2115](#2115))
</blockquote>

## `hugr-passes`

<blockquote>

##
[0.16.0](hugr-passes-v0.15.3...hugr-passes-v0.16.0)
- 2025-04-30

### New Features

- ReplaceTypes: handlers for array constants + linearization
([#2023](#2023))
</blockquote>

## `hugr`

<blockquote>

##
[0.16.0](hugr-v0.15.3...hugr-v0.16.0)
- 2025-04-30

### New Features

- Export the portgraph hierarchy in HugrInternals
([#2057](#2057))
- Implement Debug for generic Wire<N>s
([#2068](#2068))
- Add ExtensionOp helpers
([#2072](#2072))
- ReplaceTypes: handlers for array constants + linearization
([#2023](#2023))
- move `ArrayOpBuilder` to hugr-core
([#2115](#2115))

### Testing

- Disable IO-dependent tests when running miri
([#2123](#2123))
</blockquote>

## `hugr-cli`

<blockquote>

##
[0.15.3](hugr-cli-v0.15.2...hugr-cli-v0.15.3)
- 2025-04-02

### Documentation

- Add usage info to hugr-cli's rustdocs
([#2044](#2044))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

---------

Co-authored-by: Agustín Borgna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes that break semver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upstream array op builders from hugr-llvm to core
4 participants