-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Following #2309 and #2360, our impl Arbitrary for Term
(and hence Type and others) generated instances that did not conform to the Hugr JSON schema. The ideal solution here is to update the schema.
Further history: prior to #2412, we were roundtrip testing these non-schema-compliant instances, but not checking schema conformance.
#2412 changed so that our impl Arbitrary
s generate only instances that do conform to the schema. However, this leads to several problems:
- Any other code/proptests using
Arbitrary
run only on Terms that conform to the old schema, a significant narrowing - e.g. we no longer check that non-conforming instances roundtrip (we could check this without checking schema compliance)
- The restriction to schema-conforming instances is done via an inefficient (not recommended)
prop_filter
Thus, if we can't update the JSON schema, we could still fix some of these problems, albeit requiring significant refactoring of the impl Arbitrary
s / #[derive(Arbitrary)]
s
Metadata
Metadata
Assignees
Labels
No labels