fix: Improve error messages in ModifierResolver#1808
fix: Improve error messages in ModifierResolver#1808nicolaassolini-qntm wants to merge 8 commits into
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1808 +/- ##
==========================================
+ Coverage 85.74% 85.83% +0.08%
==========================================
Files 198 198
Lines 31478 31582 +104
Branches 30033 30137 +104
==========================================
+ Hits 26991 27108 +117
+ Misses 3208 3194 -14
- Partials 1279 1280 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR addresses #1748 by refining ModifierResolverErrors/UnResolvable messaging so modifier-resolution failures provide clearer context and avoid repetition.
Changes:
- Refactors
ModifierResolverErrors::unresolvableto accept an optional message and updates multiple call sites to useSome(...)/None. - Adjusts
UnResolvable’s Display format to include node + optype context, and updates several error strings for clarity. - Updates/extends tests around rejecting non-quantum
TketOps in modified contexts.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tket/src/modifier/modifier_resolver/tket_op_modify.rs | Updates non-quantum-modification error text/behavior and adjusts tests accordingly. |
| tket/src/modifier/modifier_resolver/dfg_modify.rs | Updates TailLoop dagger error to match new unresolvable signature. |
| tket/src/modifier/modifier_resolver/call_modify.rs | Switches indirect-call wrapping to use unresolvable(..., None, ...). |
| tket/src/modifier/modifier_resolver/array_modify.rs | Updates daggered-array error to pass an optional message. |
| tket/src/modifier/modifier_resolver.rs | Refines ModifierResolverErrors documentation/formatting and changes unresolvable signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
closes #1748
This Pr also slightly refactor
modify_tket_opto avoid redundant tests