-
Notifications
You must be signed in to change notification settings - Fork 14
refactor(hugr-model/binary/read.rs): common up 4-6* code for reading symbols #2343
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2343 +/- ##
==========================================
- Coverage 82.13% 82.12% -0.01%
==========================================
Files 241 241
Lines 44018 43976 -42
Branches 39857 39810 -47
==========================================
- Hits 36154 36117 -37
- Misses 5870 5874 +4
+ Partials 1994 1985 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 9, 2025
Note: modified to come after #2412 as I want those Schema checks in place to check this works! closes #2354, #1752. Includes cherry-pick of #2343. * Add `enum Visibility`. In fact *2 (hugr-model version is not serde-able so cannot be used in hugr-core). * `FuncDefn` and `FuncDecl` gain this. (A good use-case for a private FuncDecl is building cyclic functions via builder `define_declaration`.) * I've not added to `AliasDecl` or `AliasDefn` - I could, it would be consistent, but we hardly use them.... * `validate` checks that the *public* children of a Module have unique names (except multiple FuncDecls may alias). * `FuncDefn::new` defaults to private (also builder `define_function` / `FunctionBuilder::new`, and json-deserialize in both python and rust). There is a `_vis` taking an explicit Visibility parameter. * `FuncDecl::new` defaults to public (also builder `declare_function`, and json-deserialize*2). Again there is `_vis`. * hugr-model import/export + roundtrip + AST printing via new keyword `pub`. Note since `hugr-core` does not have visibility on aliases or extension operations I've defaulted these to private to avoid any change to textual output. * add field to hugr-py, using "string"-enum (`Literal["Public", "Private"]`) * I've attempted to add hugr-model hugr-py bindings, but there are no tests of these yet. Note all changes to hugr-passes delayed until a follow-up PR. BREAKING CHANGE: hugr-model: Symbol has an extra field
Went in as part of #2143 |
lmondada
pushed a commit
that referenced
this pull request
Jul 9, 2025
Note: modified to come after #2412 as I want those Schema checks in place to check this works! closes #2354, #1752. Includes cherry-pick of #2343. * Add `enum Visibility`. In fact *2 (hugr-model version is not serde-able so cannot be used in hugr-core). * `FuncDefn` and `FuncDecl` gain this. (A good use-case for a private FuncDecl is building cyclic functions via builder `define_declaration`.) * I've not added to `AliasDecl` or `AliasDefn` - I could, it would be consistent, but we hardly use them.... * `validate` checks that the *public* children of a Module have unique names (except multiple FuncDecls may alias). * `FuncDefn::new` defaults to private (also builder `define_function` / `FunctionBuilder::new`, and json-deserialize in both python and rust). There is a `_vis` taking an explicit Visibility parameter. * `FuncDecl::new` defaults to public (also builder `declare_function`, and json-deserialize*2). Again there is `_vis`. * hugr-model import/export + roundtrip + AST printing via new keyword `pub`. Note since `hugr-core` does not have visibility on aliases or extension operations I've defaulted these to private to avoid any change to textual output. * add field to hugr-py, using "string"-enum (`Literal["Public", "Private"]`) * I've attempted to add hugr-model hugr-py bindings, but there are no tests of these yet. Note all changes to hugr-passes delayed until a follow-up PR. BREAKING CHANGE: hugr-model: Symbol has an extra field
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.