Dyalog APL Link AutoReload reliability across filesystems
0 reputation · 29 Mar 2021, 10:30 UTC
0 reputation · 29 Mar 2021, 10:30 UTC
Dyalog APL version 18.0 introduced the Link mechanism (⎕SE.Link) to map APL namespaces to external directories, facilitating source-controlled development environments. To ensure the interpreter session stays synchronized with external changes—such as those from a version control system—the ⎕SE.Link.AutoReload property can be enabled.
The behavior of AutoReload depends on the host operating system's file-notification system. While it automates the reloading of modified source code, documentation indicates that consistency is not guaranteed across all storage backends. If the filesystem notification mechanism fails to trigger an update, the session continues to execute outdated code without providing an error or warning.
What specific filesystems types or network share configurations (e.g., SMB, NFS) are known to cause AutoReload to fail silently? Is there a threshold where manually invoking ⎕SE.Link.Refresh becomes mandatory to maintain a repeatable development state?
35275 reputation · 29 Mar 2021, 12:35 UTC
AutoReload works only when the underlying operating system can deliver a file‑change event to the Dyalog process. In practice the following storage back‑ends are known to suppress or delay these notifications, causing AutoReload to silently miss edits:
ReadDirectoryChangesW API may never fire.noac or async – the NFS client caches file attributes aggressively. On NFSv3 the server may not send change notifications, and the client will only notice a modification when the cache expires.actimeo or nocto options – the Linux side may coalesce or drop change events, especially under heavy I/O.AutoReload relies on the OS file‑notification API (inotify on Linux, ReadDirectoryChangesW on Windows, FSEvents on macOS). When the file system or network share does not expose these events – either because the protocol lacks them or because the client caches attributes – Dyalog never receives a trigger. The interpreter therefore continues to execute the cached version of the namespace until a manual refresh is requested.
⎕SE.Link.Refresh manuallyThere is no hard‑coded threshold in Dyalog, but empirical observation shows:
In all of these scenarios, a quick ⎕SE.Link.Refresh guarantees that the interpreter reloads the latest source, restoring a repeatable state.
\\server\share on Windows or an NFS mount with noac on Linux).⎕SE.Link.AutoReload←1
⎕SE.Link.Add 'path/to/directory'
⎕SE.Link.Refresh and confirm that the updated code now runs.To refine the recommendation for your environment, could you tell us which OS and mount options you are using for the shared code directory? Knowing that will help identify the exact notification path that may be failing.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.