Skip to content

feat!: Make array.get give back the passed array #2110

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 12 commits into from
Apr 29, 2025
Merged

Conversation

mark-koch
Copy link
Contributor

@mark-koch mark-koch commented Apr 23, 2025

Since the array type is now linear following #2097, we need to change the signature of the array.get op to give the passed array back to the user.

BREAKING CHANGE: std.collections.array.get now also returns the passed array as an extra output

@mark-koch mark-koch requested a review from a team as a code owner April 23, 2025 14:29
@mark-koch mark-koch requested review from aborgna-q and removed request for a team April 23, 2025 14:29
@mark-koch mark-koch changed the title feat!: Make array.get give back the passed array feat!: Make array.get give back the passed array Apr 23, 2025
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 86.40000% with 17 lines in your changes missing coverage. Please review.

Project coverage is 83.40%. Comparing base (26a079c) to head (bf394b6).
Report is 2 commits behind head on feat/arrays.

Files with missing lines Patch % Lines
...d_extensions/collections/array/array_conversion.rs 87.37% 11 Missing and 2 partials ⚠️
hugr-llvm/src/extension/collections/value_array.rs 75.00% 0 Missing and 3 partials ⚠️
...src/std_extensions/collections/array/op_builder.rs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           feat/arrays    #2110      +/-   ##
===============================================
+ Coverage        83.38%   83.40%   +0.01%     
===============================================
  Files              225      226       +1     
  Lines            42335    42444     +109     
  Branches         38388    38497     +109     
===============================================
+ Hits             35303    35399      +96     
- Misses            5215     5226      +11     
- Partials          1817     1819       +2     
Flag Coverage Δ
python 85.68% <ø> (ø)
rust 83.16% <86.40%> (+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.

@@ -30,13 +30,13 @@ pub trait ArrayOpBuilder<AK: ArrayKind>: Dataflow {
size: u64,
input: Wire,
index: Wire,
) -> Result<Wire, BuildError> {
) -> Result<(Wire, Wire), BuildError> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It wouldn't hurt to document the trait method saying which output is which.
(none of the other methods have docs though -.-)

Base automatically changed from arrays/conversion to feat/arrays April 29, 2025 11:22
@mark-koch mark-koch merged commit 8c6d342 into feat/arrays Apr 29, 2025
26 checks passed
@mark-koch mark-koch deleted the arrays/get branch April 29, 2025 11:23
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.

2 participants