Skip to content
You are reading v0.61.0. Read the latest stable guide

Library & Dependencies ​

Spec42 bundles the SysML v2 standard library plus the Elan8 domain libraries. For exact release pins, see What's included.

Standard Library ​

The SysML v2 standard library is bundled with Spec42 — no separate installation needed. It provides base definitions like Part, AttributeValue, ScalarValue, SI units, and more.

The Library view in the Spec42 sidebar shows a dashboard for bundled libraries, configured custom paths, and Sysand dependency status.

You can:

  • Search for symbols by name, package, or type.
  • Browse indexed library content when you do not know the exact name yet.
  • Open a symbol definition directly in the editor.
  • Copy a qualified name or import statement from a result.
  • Open details for the standard library and the bundled domain libraries.

Domain Libraries ​

Elan8 domain libraries extend the standard library with reusable vocabulary for domain and technical modeling (for example robotics, software, electronics, and communication). They are bundled and available automatically.

See the Domain libraries reference for the bundled version and the KPAR package/file tree.

Custom Libraries ​

You can add your own library paths in the Library section:

  1. Click the Manage custom library paths button (gear icon) in the Library view.
  2. Add the folder path containing your .sysml or .kerml library files.
  3. The language server restarts and indexes the new library.

If a configured path is missing, the Library dashboard shows it as a warning so you can fix the path quickly.

Project scope and Sysand dependencies ​

A .project.json identifies a model project and declares its dependencies through usage resource identities and optional versionConstraint values. Nested manifest projects are separate analysis scopes. The configured KerML/SysML standard-library baseline is always preserved; an explicit standard-library usage constrains that baseline instead of selecting another copy.

Put project settings in spec42.toml at the project root (the editor workspace folder for a manifestless project). Spec42 does not read syside.toml.

toml
include = ["model/**", "library/**"]
exclude = ["**/scratch/**", "**/draft.sysml"]
# Optional: the installed environment, relative to this directory.
# sysand-dir = ".sysand"
# Extra library roots. Relative paths are resolved from this file, and may point outside
# the project. These are library roots, not an include whitelist.
library_paths = ["../shared-library/model"]

include and exclude use / separators and are relative to that directory. * matches within one path component; ** can cross directories. A pattern that leaves the project (.., or an absolute path) is a configuration error. Exclusions win. An omitted include admits all model files allowed by the existing filesystem ignore policy; include = [] admits none. Only .sysml and .kerml files are model sources. The installed environment is excluded from workspace sources.

library_paths entries must be existing directories. The CLI and the language server both admit them as library roots, in addition to --library-path and spec42.libraryPaths. A root already admitted is not loaded twice. Files under a library root keep library provenance when that root also sits inside the workspace.

model-export returns workspace elements by default. Use --library-elements referenced to include the transitive closure of typing, specialization, subsetting, and redefinition targets, and the members owned by those library definitions. Unrelated library definitions remain out of the export. --library-elements all includes every admitted library and external element; --library-elements none explicitly selects the default workspace scope. Standard-library targets may appear in referenced, but their owned members are not expanded and all omits standard-library elements. --max-nodes still limits the returned element count.

Source selection is shared by the CLI and VS Code; opening or changing an excluded file does not add it to the editor's project publication. A check or export whose requested sources were all excluded does not report a successful empty model. VS Code watches these project inputs and rebuilds the project when they change, retaining included unsaved buffers and clearing excluded diagnostics.

sysand.toml is not a source-scope manifest and arbitrary strings in it are never treated as library paths.

Sysand can install the dependencies declared by a project. Run dependency installation explicitly (for example, sysand sync) before analysis. Spec42 reads sysand-lock.toml and the installed environment's env.toml; it never downloads packages or invokes installation during analysis. No Sysand executable is required to read an existing install.

  • Only dependencies requested by the owning manifest and their locked transitive closure are admitted. Unrelated installed projects are ignored.
  • Exact resource identities and installed paths come from Sysand metadata, rather than directory names or project display names. Lock-selected versions must still satisfy the authored version constraints and override higher generic catalog candidates.
  • Missing or ambiguous installations, changed project identities/usages, invalid paths, malformed metadata, and unsupported format versions are explicit project-admission errors.
  • Editable paths are resolved relative to the environment's parent (the Sysand workspace root). Non-editable paths are relative to the environment and must remain inside it, including after symlink resolution.

The reader supports resource-form .project.json usages, Sysand lock versions 0.5/0.6, and installed-environment versions 0.1/0.2. Other usage forms, including Sysand-specific typed index and directory usages, are not yet supported by the KPAR project decoder and fail explicitly. The external format baseline is sensmetry/sysand at 5d0b2d8.

The Library panel shows Sysand availability and detected dependencies. Refresh restarts the language server after dependencies are installed or updated. Manifest, lock, source configuration, and environment metadata changes inside workspace folders are also watched automatically. Use Refresh for an environment configured outside the editor workspace.

Spec42 is the SysML v2 language server and tooling behind Elan8 model-based engineering.