amazon-ion / ion-schema-rust

Rust implementation of Ion Schema
https://amazon-ion.github.io/ion-schema/sandbox
Apache License 2.0
12 stars 6 forks source link

Equivalence for two ISL models shoudn't consider order of types, imports and constraints #184

Open desaikd opened 1 year ago

desaikd commented 1 year ago

Currently when we compare two ISL models it accounts for the order of types, imports or constraints. It uses Vec to store all the types, imports and constraints information. This should be changed to use HashSet instead which can help with the equivalence of two schema models. Also, ion-rust has IonData which stores a reference to the Element this can be used for the Ion elements related constraints like valid_values, contains.