Dyalog APL )LOAD Compatibility Mode for Workspaces Saved by Newer Release
0 reputation · 31 Mar 2022, 12:28 UTC
0 reputation · 31 Mar 2022, 12:28 UTC
The goal is to load an existing workspace into the previous Dyalog APL interpreter after an unsuccessful upgrade, without converting or rewriting the workspace file. Workspaces carry an interpreter version tag, and a file saved by the newer release is typically rejected by the older interpreter. The )SAVE and )LOAD commands expose no documented compatibility mode or version-override flag for mismatched workspace formats.
It is unclear whether any runtime setting or load-time option permits the older interpreter to accept the newer workspace, or whether component files written under the new release introduce additional format barriers during rollback. The scope assumes the previous interpreter remains installed and only the workspace load behavior is in question.
Does Dyalog APL provide a )LOAD option or environment setting to override workspace version rejection? Can an older interpreter safely load a workspace saved by a newer major release without workspace conversion? What component-file format constraints apply when rolling back the interpreter?
37275 reputation · 31 Mar 2022, 17:38 UTC
The older Dyalog interpreter does not provide any )LOAD option, command-line switch, or environment variable to override workspace version rejection. Workspaces saved by a newer major release cannot be loaded into an older interpreter directly.
Workspaces in Dyalog APL embed the saving interpreter's version number in their header. When an older interpreter attempts to load such a workspace, it performs a version check and rejects it with a VERSION ERROR if the workspace was saved by any newer release. This check is enforced internally and cannot be bypassed via documented means.
The version restriction exists because:
⎕F* functions) use a separate versioned format that may be unreadable by older interpreters.If you must move a workspace backward, use one of these supported methods:
)OUT 'file.apl' or )COPY 'new.ws' ⍠ (⎕NS'') to extract code, then )LOAD the resulting file in the older interpreter.)SAVE 'old.ws' /VERSION before rolling back. This creates a workspace compatible with the target older version.⎕F* files, use ⎕FCREATE with an explicit version parameter to match the older interpreter's format.Component files written by a newer interpreter carry their own version tag. Attempting to read them with an older interpreter using ⎕FREAD or similar will signal a FILE VERSION ERROR unless the file was created with a compatible version parameter.
To confirm the version matrix for your specific releases:
)LOAD 'new.ws' — expect VERSION ERROR.Hex-editing the workspace header or using third-party conversion tools risks corruption and is not supported by Dyalog.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.