Maxon 0.2.2
Maxon 0.2.2 is released. Archives for every supported target are on the GitHub releases page.
What changed
Section titled “What changed”MAXON_PREEMPT=off, which stops the scheduler taking a processor back from the green thread holding it, for a program whose result depends on a thread running uninterrupted. Unset oronpreempts as before; any other value stops the program beforemainruns.
Changed
Section titled “Changed”maxon build, andmaxonwith no arguments, open with the version line and a warning that Maxon is an early preview whose language, standard library and tools may change incompatibly between releases.- A build reports how long the compile took, and no longer prints a line naming the executable format it wrote.
- The one-line installers make
maxonwork in the terminal that ran them rather than only in the next one. On macOS and Linux, an install whosePATHalready holds a writable~/.local/binor~/binlinks the compiler there and edits no shell profile.
- A
StreamingSubprocesshandle kept after its child was released could drive the next child the runtime started in the same slot — waiting on it, reading its output, writing to its input. A copiedStreamingSubprocessvalue reached this on its own, because each copy tracked release separately. A released handle is refused now. - The sixty-fifth
runDetachedin a program’s life failed, because a detached child never gave its runtime slot back. - Releasing a
StreamingSubprocesswhile another green thread collected it left the collector reading a slot holding no child, and could corrupt the poll records of unrelated sockets and pipes. Two green threads collecting one handle stopped with the error for two readers on one socket. Each of the three is a named stop of its own now. - A socket closed and reopened while an operation was parked on it could take the previous socket’s timeout, or wake a green thread that no longer owned it.
- Connecting to, or binding, an address written as a dotted quad parked the green thread for a name resolution that never ran.
- On Windows, a socket send or receive cancelled by its deadline after the kernel had already moved part of the buffer reported a timeout and no count, so a retried send went out twice and received bytes were consumed unseen. It reports what it moved, and the deadline is reported by the next call.
- On Windows, opening, connecting to and closing a socket counted as blocking kernel calls, so the scheduler could take a processor back during them, and Winsock was started up again on every connect.
Environment.inheritUpdatingandEnvironment.customtake anEnvMap, which the standard library did not export, so no caller could build the argument. It is public.- A compiler rebuilding itself moved the running binary aside before compiling, so a compile error left the tree with no compiler to build the fix — and the move failed outright when another process, such as a language server, still ran the previous binary. The move happens only once the compile has succeeded, and a previous binary still in use is retired aside rather than deleted.
- On Windows,
maxon upgraderan the install script in a Windows PowerShell that inherited the caller’sPSModulePath. Started from pwsh, that names another edition’s modules ahead of this one’s, and the script stopped withThe term 'Get-FileHash' is not recognized. The child is handed this PowerShell’s own module directory.
Install
Section titled “Install”To install Maxon or upgrade an existing install, see Installation, which also shows how to install a specific release.