Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

import across separately loaded sources does not resolve

Closed
#645 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
go
Domain
api, backend

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Open-MBEE/OpenSysML

All issues in Open-MBEE/OpenSysML

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.