Skip to content

Commit fdc0e75

Browse files
ss2165zrho
andauthored
feat!: More helpful error messages in model import (#2272)
## Duplicate of #2264, approved, wait to merge for breaking release. This PR adds more helpful error messages to model import to help debug errors that may occur during the migration to hugr-model as the default serialisation format (see #2260). The errors are still far from ideal, but should already provide a significant improvement. We hide the internals of ImportError in order to allow for the error messages to improve without incurring breaking changes. This PR also implements a remaining todo!() concerning importing tuple types. BREAKING CHANGE: The internals of ImportError are hidden. --------- Co-authored-by: Lukas Heidemann <[email protected]>
1 parent e9c5e91 commit fdc0e75

File tree

6 files changed

+873
-655
lines changed

6 files changed

+873
-655
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ result_large_err = "allow"
4242
large_enum_variant = "allow"
4343

4444
[workspace.dependencies]
45+
anyhow = "1.0.98"
4546
insta = { version = "1.43.1" }
4647
bitvec = "1.0.1"
4748
capnp = "0.20.6"

hugr-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@ proptest-derive = { workspace = true }
8080
# Required for documentation examples
8181
hugr = { path = "../hugr" }
8282
serde_yaml = "0.9.34"
83+
anyhow = { workspace = true }

0 commit comments

Comments
 (0)