chore(build): add mtconnect_sysml_model as a submodule#162
Draft
ottobolyos wants to merge 1 commit into
Draft
Conversation
…-model Pins the SysML XMI source of truth as a tracked submodule rather than a documented-but-untracked external clone. The submodule's default tip tracks `v2.7` (the latest published spec version); switching to a prior version is `git -C build/sysml-model checkout v2.5` (or `v2.6`, `v2.0`, etc.) followed by a regen. Worktree usage: * In the main checkout: `git submodule update --init build/sysml-model` once after pulling, then the path is populated and the importer can consume `--xmi build/sysml-model/MTConnectSysMLModel.xml` directly. * In a `git worktree`-created tree: the submodule must be initialised per-worktree (`git -C <worktree> submodule update --init build/sysml-model`). The submodule's own `.git` lives under the primary repository's `.git/modules/build/sysml-model/`; per-worktree trees share the gitdir and only differ in their working-tree checkout. * For multi-version regen in parallel: the submodule's gitdir is shared, so `git -C build/sysml-model worktree add /tmp/sysml-v2.6 v2.6` creates a v2.6 working tree without disturbing the primary v2.7 checkout. The importer can then be pointed at `/tmp/sysml-v2.6/MTConnectSysMLModel.xml` while the main tree retains the v2.7 model. Updated `build/MTConnect.NET-SysML-Import/README.md` regen recipe to reference the submodule path; the prior recipe instructed contributors to clone the model into `/tmp/mtconnect-sysml` which is now replaced by the in-tree submodule. The clone option remains documented as the fallback for ad-hoc one-off regens against an unpinned commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
mtconnect_sysml_modelas a tracked git submodule atbuild/sysml-model, pinned to tagv2.7. The submodule replaces the prior documented-but-untracked external clone pattern (where contributors had togit clone https://github.com/mtconnect/mtconnect_sysml_model.gitto some out-of-tree path and pass--xmimanually toMTConnect.NET-SysML-Import).Why
The regen pipeline that builds
Devices/Components/*.g.cs,Devices/DataItems/*.g.cs, the asset / events / samples / conditions hierarchies, and the organizer lists needs a pinned XMI source so the output is reproducible. A submodule makes the version explicit in-tree and ties commit history of regenerated code to a specific upstream model commit.What changed
.gitmodules— new entry registeringbuild/sysml-modelagainsthttps://github.com/mtconnect/mtconnect_sysml_model.git.build/sysml-model— submodule pointer at tagv2.7(commit25796ac59).build/MTConnect.NET-SysML-Import/README.md— regen recipe rewritten to reference the in-tree submodule path; the legacygit clone … /tmp/mtconnect-sysmlrecipe is retained as an ad-hoc fallback for one-off regens against an unpinned commit.Bumping the pinned model version
Then regen against the new tip and commit the
.g.cschanges in a follow-up commit. Older versions (v2.5,v2.6,v2.0) work the same way for backports.Worktree usage
The commit body includes a longer note on
git worktreeinteractions: in short, the submodule's gitdir lives under the primary repo's.git/modules/build/sysml-model/, so per-worktree checkouts must each rungit submodule update --init build/sysml-modelonce, and multi-version parallel regen can usegit -C build/sysml-model worktree add …to spin a sibling working tree without disturbing the primary checkout.Test plan
git submodule update --init build/sysml-modelpopulates the path.MTConnect.NET-SysML-Importconsumes--xmi build/sysml-model/MTConnectSysMLModel.xmlcleanly.*.g.csis whitespace + four v2.6 / v2.7 components losing the spuriousNameback-fill — verified separately onfix/issue-136-137(PR fix(common): drop default values from Device and Component constructors #148).🤖 Generated with Claude Code