feat: add crossmodel edition info to DataModel#266
Conversation
Unit Test Results 2 files 15 suites 20s ⏱️ Results for commit ca724f7. ♻️ This comment has been updated with latest results. |
harmen-xb
left a comment
There was a problem hiding this comment.
@hardiksinh Thanks for the implementation, I added some questions and remarks.
| if (typeof args.model !== 'string' && isCrossModelRoot(args.model)) { | ||
| this.ensureDataModelVersionUpdated(args.model); | ||
| } else if (isCrossModelRoot(root)) { | ||
| this.ensureDataModelVersionUpdated(root); | ||
| } |
There was a problem hiding this comment.
The model received here can be any CrossModelRoot right? So I think we should check for object type being a DataModel. So isDataModel(...). Otherwise this is executed on documents which are not datamodel documents.
Or is this so the function is executed on any file change, and then invokes the function to make sure the datamodel crossmodel info is updated?
There was a problem hiding this comment.
Done. In [model-service.ts] we use [isDataModel()] for AST saves, and in the text-save path we parse first and update only if it’s a datamodel. This ensures the logic runs on all saves but only mutates datamodels.
Refactored deprecated function call in OnBuildUpdate method Removed crossmodel version and edition exported constants
No description provided.