Skip to content

chore(build): add mtconnect_sysml_model as a submodule#162

Draft
ottobolyos wants to merge 1 commit into
TrakHound:masterfrom
ottobolyos:chore/sysml-model-submodule
Draft

chore(build): add mtconnect_sysml_model as a submodule#162
ottobolyos wants to merge 1 commit into
TrakHound:masterfrom
ottobolyos:chore/sysml-model-submodule

Conversation

@ottobolyos
Copy link
Copy Markdown
Contributor

@ottobolyos ottobolyos commented May 15, 2026

Summary

Add mtconnect_sysml_model as a tracked git submodule at build/sysml-model, pinned to tag v2.7. The submodule replaces the prior documented-but-untracked external clone pattern (where contributors had to git clone https://github.com/mtconnect/mtconnect_sysml_model.git to some out-of-tree path and pass --xmi manually to MTConnect.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 the commit history of regenerated code to a specific upstream model commit.

What changed

  • .gitmodules - new entry registering build/sysml-model against https://github.com/mtconnect/mtconnect_sysml_model.git.
  • build/sysml-model - submodule pointer at tag v2.7 (commit 25796ac59).
  • build/MTConnect.NET-SysML-Import/README.md - regen recipe rewritten to reference the in-tree submodule path; the legacy git clone ... /tmp/mtconnect-sysml recipe retained as an ad-hoc fallback for one-off regens against an unpinned commit.

…-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.
@ottobolyos ottobolyos force-pushed the chore/sysml-model-submodule branch from 0f22556 to 2cfd465 Compare May 18, 2026 21:08
@ottobolyos ottobolyos marked this pull request as ready for review May 18, 2026 21:08
@ottobolyos ottobolyos marked this pull request as draft May 18, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants