Skip to content

Conversation

@acl-cqc
Copy link
Contributor

@acl-cqc acl-cqc commented Jan 2, 2026

This somewhat looks forward to #2341 but seems like a good thing right now.

Removal of impl from Type(RV) for TypeRow(RV) requires an extra vec![...] at each callsite, but if we add impl <const N: usize> From<[Type; N] for TypeRow (further parametrized by RV) then only two extra characters [...] are required, which seems bearable; and this strengthens the distinction between type and list-of-type.

BREAKING CHANGE: implicit conversion from single Type to TypeRow removed, use array of single Type instead.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 2, 2026

CodSpeed Performance Report

Merging #2784 will improve performance by 44.01%

Comparing acl/no_1type_row (3ec0890) with main (af77d76)

Summary

⚡ 1 improvement
✅ 24 untouched

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
construction 17.2 µs 11.9 µs +44.01%

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

❌ Patch coverage is 89.97868% with 47 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.69%. Comparing base (cd371ba) to head (3ec0890).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
hugr-passes/src/nest_cfgs.rs 0.00% 0 Missing and 12 partials ⚠️
hugr-core/src/builder/dataflow.rs 64.28% 0 Missing and 5 partials ⚠️
hugr-core/src/hugr/validate/test.rs 82.75% 0 Missing and 5 partials ⚠️
hugr-core/src/hugr/views/sibling_subgraph.rs 72.72% 0 Missing and 3 partials ⚠️
hugr-core/src/builder/module.rs 0.00% 0 Missing and 2 partials ⚠️
hugr-core/src/hugr/patch/inline_dfg.rs 0.00% 0 Missing and 2 partials ⚠️
hugr-core/src/hugr/patch/outline_cfg.rs 33.33% 0 Missing and 2 partials ⚠️
hugr-core/src/types/poly_func.rs 84.61% 1 Missing and 1 partial ⚠️
hugr-llvm/src/emit/func.rs 0.00% 0 Missing and 2 partials ⚠️
hugr-passes/src/normalize_cfgs.rs 50.00% 0 Missing and 2 partials ⚠️
... and 9 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2784   +/-   ##
=======================================
  Coverage   83.69%   83.69%           
=======================================
  Files         261      261           
  Lines       52551    52574   +23     
  Branches    47307    47330   +23     
=======================================
+ Hits        43981    44003   +22     
- Misses       6183     6184    +1     
  Partials     2387     2387           
Flag Coverage Δ
python 88.82% <ø> (ø)
rust 83.12% <89.97%> (+<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.

@acl-cqc acl-cqc requested a review from ss2165 January 2, 2026 09:01
@acl-cqc acl-cqc marked this pull request as ready for review January 2, 2026 09:01
@acl-cqc acl-cqc requested a review from a team as a code owner January 2, 2026 09:01
@ss2165
Copy link
Member

ss2165 commented Jan 2, 2026

suggested "BREAKING CHANGE" notice:

BREAKING CHANGE: implicit conversion from single Type to TypeRow removed, use array of single Type instead.

Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

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

I agree pretty strongly that implicitly converting T to Vec makes it much harder for the rust type system to find bugs for us and causes (me) confusion, so I'm very happy with this change. Will defer the utility/performance of TypeRow to future discussions.

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.

4 participants