Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

import across separately loaded sources does not resolve

Chiusa
#645 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, backend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).

Lingua principale
Go
Stelle
36
Fork
10
Merge medio
13h 17m
PR unite (30g)
791

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Open-MBEE/OpenSysML

Tutte le issue di Open-MBEE/OpenSysML

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.