Repository navigation
SysML2: one uniquely named package per file; no package merging - #65
Merged
Merged
Conversation
SysML v2 has no package merging; same-named root packages in different
files are duplicate members of the global namespace (Pilot: "Duplicate
of other owned member name"). Declare one uniquely named package per
file, named {System}_{Subsystem}Subsystem / {System}_{Unit}, reference
other files through private import or qualified names, and write
filter not (@x); with parentheses.
See demaconsulting/SysML2Tools#143, #146, #147.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add the repository-wide uniqueness rule with a subsystem-path-qualified fallback, and use one repository-level views package, matching demaconsulting/SysML2Tools#143 (SysML2ToolsDesignViews). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The newly added template comment contains a grammatical error and still inaccurately describes the package structure, leaving active documentation issues to correct.
2 open issues
What changed in this PR
Updates the SysML2 templates so each file declares a uniquely named root package instead of relying on non-standard package merging, while adjusting imports, views, and documentation.
Changes:
- Gives system, subsystem, unit, and view files distinct package names.
- Adds private imports for cross-file model dependencies.
- Updates view filtering syntax and repository-map package documentation.
| File | Description |
|---|---|
| repository-map.md | Documents the package names associated with each SysML2 model and view file. |
| docs/sysml2/views/design-views.sysml | Introduces a repository-level views package and updates imports, exposure paths, and filter syntax. |
| docs/sysml2/model/system-name/subsystem-name/unit-name.sysml | Gives each unit file an independent package and documents cross-unit reference conventions. |
| docs/sysml2/model/system-name/subsystem-name.sysml | Gives the subsystem its own package and imports its unit package. |
| docs/sysml2/model/system-name.sysml | Keeps the system package as the root model package and imports its direct subsystem packages. |
Review effort: Lite
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 22, 2026
Malcolmnixon
added a commit
that referenced
this pull request
Nov 22, 2026
…74) Refines #64, #65, #70, #71. System and subsystem example packages now public-import the packages they own (downward only); the unit and views directives explain private imports of specific item packages. Co-authored-by: Malcolm Nixon <Malcolm.Nixon@hiarc.inc> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Malcolmnixon
added a commit
that referenced
this pull request
Nov 22, 2026
…odels (#73) * SysML2 standard: facade packages with public imports for multi-file models Refines #64, #65, #70, #71. Each file keeps one unique top-level package; the system and subsystem packages become facades that public-import the packages they own (downward only), units private-import what they reference, and a migration section covers models that split one package across files. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * SysML2 standard: clarify facade imports for owned units and migration Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Malcolm Nixon <Malcolm.Nixon@hiarc.inc> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 The template's SysML2 model files reopened the
SystemNamepackage in every file, relying on same-named packages merging into one namespace. That is not SysML v2. The spec has no package merging: each file is its own root namespace, and two same-named root packages are duplicate members of the global namespace. ## Evidence The OMG SysML v2 Pilot Implementation reportsDuplicate of other owned member namefor each same-named root package, and references across the split halves do not resolve. SysML2Tools only accepted the pattern through leniency, which SysML2Tools#146 turns into a lint warning. The replacement pattern is the one in SysML2Tools#143 (docs/sysml2/, branchsysml2-self-model), which loads in the Pilot with 0 errors and 0 warnings. ## Changes -docs/sysml2/model/system-name.sysml: packageSystemNameprivately imports each direct member's package. -docs/sysml2/model/system-name/subsystem-name.sysml: own packageSystemName_SubsystemNameSubsystem, importing its units' packages. -docs/sysml2/model/system-name/subsystem-name/unit-name.sysml: own packageSystemName_UnitName. The directive explains using a qualified name instead of an import where an import would form a cycle. -docs/sysml2/views/design-views.sysml: packageRepoNameDesignViewsimports what it exposes. The multi-system note now readsfilter not (@SysML::Documentation);(parentheses are required, SysML2Tools#147). -repository-map.md:docs/sysml2/tree comments now show each file's package name. The standard and skill text is in the companion PR againstmain. ## Validation -pwsh ./lint.ps1passes, includingsysml2tools lint(0 errors). -sysml2tools renderof the template model produces the same three views.