-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
#2436 added better roundtrip tests that write the test hugr in a given format, convert them to a different one using hugr convert if necessary, and load them back.
These work fine for json -> json, but if we enable writing hugrs in model-exts format then many tests fail with errors like
FAILED hugr-py/tests/test_hugr_build.py::test_simple_id - RuntimeError: 2025-07-17T10:11:34.474358Z ERROR hugr: Error decoding HUGR envelope.
Caused by:
0: failed to import hugr
1: import failed in context: `define-func` node with id 0
2: No visibility for FuncDefn
at hugr-cli/src/main.rs:38
That means we successfully produce an encoded model envelope, but it fails to load from the rust side in the hugr convert call.
To reproduce this, add model-exts to this list
hugr/hugr-py/tests/conftest.py
Lines 189 to 191 in 1a301eb
| # TODO: "model-exts" comes with its own variety of errors. | |
| # Fix them and add it to the list of write formats. | |
| WRITE_FORMATS = ["json"] |
And run with
just test-python -k test_simple_id.Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working