Skip to content

feat: Allow emission of diagnostics inside GuppyError #553

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 7 commits into from
Oct 18, 2024

Conversation

mark-koch
Copy link
Collaborator

@mark-koch mark-koch commented Oct 9, 2024

Closes #538.

  • Allow to pass a Diagnostic object to GuppyError instead of an error message
  • The old error reporting system remains untouched until we have migrated everything to the new diagnostics system
  • Adds a TypeMismatchError diagnostic as a test to ensure that the pipeline works

@mark-koch mark-koch requested a review from a team as a code owner October 9, 2024 14:01
@mark-koch mark-koch requested review from ss2165 and removed request for a team October 9, 2024 14:01
@codecov-commenter
Copy link

codecov-commenter commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.22%. Comparing base (f9709ae) to head (6d3eef7).

Files with missing lines Patch % Lines
guppylang/checker/expr_checker.py 86.66% 2 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           feat/diagnostics     #553      +/-   ##
====================================================
+ Coverage             91.09%   91.22%   +0.12%     
====================================================
  Files                    61       61              
  Lines                  6482     6505      +23     
====================================================
+ Hits                   5905     5934      +29     
+ Misses                  577      571       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from diag/rendering to feat/diagnostics October 10, 2024 13:13
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.

Finally using python for what it's good at: pretty printing

This really feels like a standalone library to me 🤷

@mark-koch mark-koch merged commit 3dc8b87 into feat/diagnostics Oct 18, 2024
2 checks passed
@mark-koch mark-koch deleted the diag/emit branch October 18, 2024 11:21
github-merge-queue bot pushed a commit that referenced this pull request Nov 11, 2024
This is the development branch for our new diagnostics infrastructure.
Tracked by #535.

*  #548
* #551
* #552 
* #553
* #586
* #588
* #587
* #589 
* #590
* #600
* #601
* #604 
* #605 
* #606
github-merge-queue bot pushed a commit that referenced this pull request Nov 12, 2024
🤖 I have created a release *beep* *boop*
---


## [0.13.0](v0.12.2...v0.13.0)
(2024-11-12)


### ⚠ BREAKING CHANGES

* `prelude` module renamed to `std`

### Features

* add `qubit` discard/measure methods
([#580](#580))
([242fa44](242fa44))
* Add `SizedIter` wrapper type
([#611](#611))
([2e9da6b](2e9da6b))
* conventional results post processing
([#593](#593))
([db96224](db96224))
* Improve compiler diagnostics
([#547](#547))
([90d465d](90d465d)),
closes [#551](#551)
[#553](#553)
[#586](#586)
[#588](#588)
[#587](#587)
[#590](#590)
[#600](#600)
[#601](#601)
[#606](#606)
* restrict result tag sizes to 256 bytes
([#596](#596))
([4e8e00f](4e8e00f)),
closes [#595](#595)


### Bug Fixes

* Mock guppy decorator during sphinx builds
([#622](#622))
([1cccc04](1cccc04))


### Documentation

* Add DEVELOPMENT.md
([#584](#584))
([1d29d39](1d29d39))
* Fix docs build ([#639](#639))
([bd6011c](bd6011c))


### Miscellaneous Chores

* Manually set last release commit
([#643](#643))
([b2d569b](b2d569b))


### Code Refactoring

* rename prelude to std
([#642](#642))
([1a68e8e](1a68e8e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Agustín Borgna <agustin.borgna@quantinuum.com>
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.

3 participants