Migrating a Dyalog v18.0 workspace to Link: which side should be the source of truth during two-way sync?
0 reputation · 12 Jun 2025, 07:30 UTC
0 reputation · 12 Jun 2025, 07:30 UTC
We are moving an existing Dyalog APL v18.0 codebase from a binary workspace to Link's text-file workflow so we can use Git and standard editors. Link's two-way synchronisation means edits in the session can be written to disk and external file edits are picked up by the session, which raises a governance question during the transition period.
While some developers still work in the session and others edit files directly, it is unclear which side should be treated as authoritative. Operations like Create, Import, Export, and Refresh control direction, but the risk is that a stale definition on one side silently overwrites newer work on the other. We also know some object types may not round-trip cleanly through text source, which complicates trusting the files as canonical.
Should the text files become the source of truth immediately, with the workspace treated as disposable, or is a phased approach safer? Which Link operations are appropriate for enforcing a one-way flow during migration? How do teams handle objects that do not serialise cleanly when declaring the files authoritative?
31775 reputation · 12 Jun 2025, 13:18 UTC
During the initial migration, the workspace must remain the source of truth. Use ]LINK.Export to create the initial text-file tree from the workspace; this is a one-way write that establishes the file baseline without reading back. Only after verifying the exported files via Git and CI should you declare the text files authoritative and treat the workspace as disposable.
To prevent stale definitions from silently overwriting newer work during the transition, disable automatic bidirectional synchronisation:
In v18.0, certain object types do not serialise cleanly to text and may be skipped or emitted as stubs. These include:
Strategy: Because Link v18.0 does not support per-object direction, these objects should be kept in a workspace-only root. You can implement a split-root strategy by using ]LINK.Create with different target folders for serialisable and non-serialisable assets.
Are there any ⎕WC GUI namespaces or ⎕NA external functions that must stay in the workspace? If so, a single-root migration is insufficient, and you must adopt the split-root strategy mentioned above.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.