-
Notifications
You must be signed in to change notification settings - Fork 4
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
Only nodes from a single language are deserialized #61
Comments
Good catch! I've made a preliminary fix in branch fix/multi-language-models, but that raises questions about the relation between languages (as instances of the M3 Could you maybe contribute a multi-lingual test case? |
I created a fairly minimal failing test here #62 |
Ha, the serialization is already wrong: it's missing nodes and properties, for some reason... |
OK, got things working again: see e7a727d But we still have to rethink the relation language ⇆ API... |
I think it would make sense to have a single API but make the methods "language-aware". For deserialization it is already easy, since the language is in the meta pointer so it can easily be passed to the API funtions. For serialization the language probably needs to be added to a language-specific BaseNode that extends the BaseNode used in the API? At least, if you want to follow the current way it works in the examples. |
I agree: one API but one that's aware of which language a certain I'm also thinking of splitting the |
Yeah, splitting would definitely make sense to me. It makes it also more clear what (for example) the difference is between |
See commit 5431121 for what the splitting might look like. |
And commit 611df30 for what the extended API could look like. |
* Multi language deserializer test (#62) * Minimal example of failing multi-lang deserialziing * Small typo --------- Co-authored-by: Roel van Bakel <[email protected]> * fix issue #61 (preliminarily!) * wrangle unit test to work with the preliminary fix * (fix code after rebase) * process Arsene's comments + reorganize models/ into "languages" vs. "instances" + reorganize src-test to align with models/ --------- Co-authored-by: Roel van Bakel <[email protected]> Co-authored-by: Roel van Bakel <[email protected]>
Fixed with PR #63 |
A model containing nodes from different languages cannot be deserialized.
I have a model that contains 4 languages in its languages property., however, I can only specify a single language when calling
deserializeModel
and nodes from any of the other languages (apart from the builtins) throw an error like:The text was updated successfully, but these errors were encountered: