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

Open
wants to merge 3 commits into
base: arrays/conversion
Choose a base branch
from

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 80.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.40%. Comparing base (64a032f) to head (bf394b6).

Files with missing lines Patch % Lines
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                  @@
##           arrays/conversion    #2110      +/-   ##
=====================================================
- Coverage              83.40%   83.40%   -0.01%     
=====================================================
  Files                    226      226              
  Lines                  42440    42444       +4     
  Branches               38493    38497       +4     
=====================================================
+ Hits                   35396    35399       +3     
- Misses                  5225     5226       +1     
  Partials                1819     1819              
Flag Coverage Δ
python 85.68% <ø> (ø)
rust 83.16% <80.00%> (-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 -.-)

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