Skip to content

feat: add crossmodel edition info to DataModel#266

Open
hardiksinh wants to merge 4 commits intomainfrom
feature/crossmodel-version-in-datamodel
Open

feat: add crossmodel edition info to DataModel#266
hardiksinh wants to merge 4 commits intomainfrom
feature/crossmodel-version-in-datamodel

Conversation

@hardiksinh
Copy link
Collaborator

No description provided.

@hardiksinh hardiksinh requested a review from harmen-xb February 3, 2026 16:54
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Unit Test Results

  2 files   15 suites   20s ⏱️
140 tests 140 ✅ 0 💤 0 ❌
174 runs  174 ✅ 0 💤 0 ❌

Results for commit ca724f7.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@harmen-xb harmen-xb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hardiksinh Thanks for the implementation, I added some questions and remarks.

Comment on lines 147 to 151
if (typeof args.model !== 'string' && isCrossModelRoot(args.model)) {
this.ensureDataModelVersionUpdated(args.model);
} else if (isCrossModelRoot(root)) {
this.ensureDataModelVersionUpdated(root);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator Author

@hardiksinh hardiksinh Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hardiksinh hardiksinh requested a review from harmen-xb February 4, 2026 07:18
hardiksinh and others added 2 commits February 4, 2026 15:52
Refactored deprecated function call in OnBuildUpdate method
Removed crossmodel version and edition exported constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants