import across separately loaded sources does not resolve
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Go
- Estrellas
- 39
- Forks
- 12
- Merge medio
- 14 h 26 min
- PR fusionados (30 d)
- 764
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Open-MBEE/OpenSysML
-
bug spec compliance
Dificultad 4/5 3-5 días Aptitud para principiantes 18/100
Open-MBEE/OpenSysML#1125 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
Los mantenedores suelen responder en 1 día
-
Renaming of OpenSysMLAbiertohelp wanted question
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Open-MBEE/OpenSysML#987 · 11 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de Open-MBEE/OpenSysML
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
area: watch bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
mariadb-operator/mariadb-operator#1962 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
eugenioenko/ttt#919 · 1 comentario ·
Los mantenedores suelen responder en 1 día