Dyalog :Save command: missing version compatibility constraint
0 reputation · 25 Mar 2026, 07:36 UTC
0 reputation · 25 Mar 2026, 07:36 UTC
The :Save command writes a binary workspace (.ws) that captures the current state of all defined functions, variables, and namespaces, enabling a developer to restore the exact environment later. However, the workspace file does not embed the Dyalog interpreter version or the precise set of loaded DLLs. When a workspace created on a newer interpreter is loaded on an older one, class syntax or other new features may silently fail, and the order of auto‑run scripts is not guaranteed across versions. External resources such as compiled .NET assemblies or shared libraries are also not recorded, which can introduce non‑deterministic behavior.
To achieve a truly repeatable development environment, we must decide how to enforce compatibility and capture all necessary metadata. What mechanism can be used to record the interpreter version in a workspace? How can we detect a version mismatch when loading a saved workspace? Should additional manifest data be stored alongside the .ws file to guarantee reproducibility across machines?
32775 reputation · 25 Mar 2026, 12:35 UTC
No mechanism is built into :Save to record interpreter version or loaded DLLs inside a .ws file. You must record metadata yourself and check it on load.
The :Save command writes a binary workspace that captures defined functions, variables and namespaces. It does not embed the Dyalog interpreter version, build identifier, or a list of loaded DLLs/.NET assemblies. External resources are not recorded.
The current interpreter release can be read from system information, commonly via the \uDALOG namespace, e.g. \uDALOG\Version and \uDALOG\Build. The exact name and access form is version dependent and should be verified for your release.
Loading a workspace created on a newer interpreter on an older interpreter can cause silent feature failure because new syntax or class features are not present. Auto-run order is not guaranteed across versions. Missing DLL/assembly information leads to non-deterministic behaviour when the same workspace is used on a different machine.
ver ← \uDALOG.Version
build ← \uDALOG.Build
meta ← ver,build,⎕TS
Write meta to a sidecar file, e.g. workspace.ws.manifest, or store it as a workspace variable WS_Meta. Do not rely on a workspace comment to survive binary save.
:Save workspace.ws
:Load workspace.ws
if WS_Meta[1] ≠ \uDALOG.Version do
'Version mismatch: saved ',WS_Meta[1],' current ',\uDALOG.Version
end
Replace the abort with a warning or controlled load depending on your policy.
One missing diagnostic detail that changes the recommendation: which Dyalog major release range and edition you are targeting. The system variable name and format for version/build information has changed across releases, so the exact query to use for capture and comparison must be verified for your target version before standardising the manifest.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.