import across separately loaded sources does not resolve
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with the load_from_content and conn.load entry points using the base.sysml and chapter.sysml examples, and inspect how the project/commit model handles separately loaded resources. Compare this behavior with the sysml-toolkit command that resolves the pair. Done means documenting the intended loading pattern and confirming whether cross-file imports resolve without concatenation.
Written by the indexing model from the issue text.
Description
Summary
A model split across two files, where one imports a package from the other, fails to resolve when the two are loaded as separate sources — even from the same directory — though the same pair resolves fine when concatenated into one source, and sysml-toolkit resolves the pair without concatenation.
Version: OpenSysML v0.9.0. sysml-toolkit v0.9.1 resolves the same pair (sysmlv2 check base.sysml chapter.sysml).
Observed
base.sysml:
package Base { part def Heater; part def Timer; }
chapter.sysml:
package Chapter {
private import Base::*;
part def Toaster { part heater : Heater; part timer : Timer; }
}
Loading chapter.sysml alone — via load_from_content with only its own text, or via conn.load(path) with base.sysml present in the same directory — fails with unresolved reference. Concatenating both files' text into a single source and loading that works.
Question, not (yet) a bug report
We haven't established what the SysML/KerML package-import semantics, or the API's project/commit model, require for resolving imports across multiple separately-loaded resources — this may be entirely by design (e.g. a caller is expected to supply a single already-merged/pre-linked source, or to explicitly register each resource with the connection first). Rather than assert a bug, we'd like to ask: what is the intended way to load a model that spans multiple files or commits, so that imports between them resolve? If there is a documented pattern for this we've missed, a pointer would be very welcome.
Workaround in place
We concatenate sources ourselves before loading, which works but loses whatever the API's project/commit model would otherwise give us (e.g. provenance of which file/commit an element came from).
- Dominant language
- Go
- Stars
- 36
- Forks
- 10
- Avg merge
- 13h 17m
- Merged PRs (30d)
- 791
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-MBEE/OpenSysML
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
help wanted question
Difficulty 5/5 Over a week Newbie friendliness 25/100
Open-MBEE/OpenSysML#987 · 9 comments ·
Maintainers usually reply within 1 day
-
-strict accepts a namespace with indistinguishable memberships (warning, exit 0)Possibly taken @devin-ai-integration claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Open-MBEE/OpenSysML#973 · 1 comment ·
Maintainers usually reply within 1 day
All issues in Open-MBEE/OpenSysML
Similar issues
-
bug go
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
genkit-ai/genkit#6761 · 1 comment ·
Maintainers usually reply within 2 days
-
ready
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
kubeflow/pipelines#14784 · 1 comment ·
Maintainers usually reply within 2 days
-
bug frontend good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
trust: update-propagation-directive requires developer mode while add and remove do notPossibly taken @bhuvan-somisetty claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
oalders/clodhopper#133 ·