Dk 2.1.4 - Please upgrade!

THE DkML DISTRIBUTION HAS BEEN SUNSET

End-of-life is December 31, 2026.

The announcement at https://discuss.ocaml.org/t/ann-sunsetting-of-dkml-distribution/17530 has full details.

UPGRADING YOUR OUT-OF-DATE VERSION

In PowerShell do:

winget remove dkml

You’ll see Uninstall failed with exit code: 4294967295 but otherwise it should succeed.

Then do:

winget install dkml

Errata

  1. winget upgrade and winget remove will fail with an innocuous error:

    Uninstall failed with exit code: 4294967295

    Just ignore the error and continue with winget install dkml. Issue: https://gitlab.com/dkml/distributions/dkml/-/issues/26.

  2. The installer does not yet check that all OCaml programs are stopped before upgrading or uninstalling. If you get Permission denied then stop OCaml manually: close Visual Studio Code, stop any dune build, and stop any opam install / opam exec. And then forcibly kill the processes in PowerShell:

    1..6 | % {  @("bash","sh","with-dkml","ocamllsp","git","opam","dune","ocamlrun") | % { taskkill /F /IM "$_.exe" }; Start-Sleep 1 }

Release Notes

Major Changes

Usage Notes

  • You can continue to use dkml.exe and with-dkml.exe but both are deprecated; the new (unified) executable is dk.exe. See Deprecated Commands in the release notes.
  • Once every two weeks DkML news about new versions, errata, uninstalling, etc. will be shown on a webpage. It is triggered from the now deprecated dkml init, the replacement dk Ml.Switch init and the with-dkml proxy commands, and can be disabled with dk Ml.News disable. In particular, use dk Ml.News to show the news if you are experiencing problems with DkML.

Deprecated Commands in 2.1.2+

The deprecated commands still work, but will first display the new command on the standard error and then pause for 15 seconds.

Old CommandNew CommandExample
dkml initdk Ml.Switchdk Ml.Switch init
dk Ml.Newsdk Ml.News show
dkml versiondk Ml.Versiondk Ml.Version show
with-dkml bashdk Ml.Use(1) dk Ml.Use -- bash

(1) with-dkml bash / with-dkml python3 / etc will not pause for 15 seconds.

Minor Changes

  • stdout is redirected from crossplatform-functions.sh’s autodetect_compile() --post-transform scripts to stderr
  • rename and fix dkml-compiler’s env/android-ndk-env-to-ocaml-configure-env.sh to work with latest Android NDK. It includes a patch for android_arm32v7a to remove duplicate labels from OCaml-generated assembly language that fails in NDK24+ (clang assembler is stricter rather than older GNU AS assembler).
  • new dkml-target-abi-any package will be present in your switch if any dkml-target-abi-* package is present. That can simplify your opam package filters. See dkml-target-abi-any package in the diskuv-opam-repository for how to use it in a cross-compiling, binary download use case.
  • Add more than one possibility for the default dkml-target-abi-* when the host ABI is known: Apple Silicon can always run two architectures (Intel+Silicon) and Windows can always two as well (x86+x86_64, or ARM64+x86_64 albeit slower).
  • In crossplatform-functions.sh, for sha256 functions remove --quiet from shasum since the option is not available in shasum 5.96. Remove useless LANG when LC_ALL is defined. Use LC_ALL=C not C.UTF-8 which may not be installed on the machine.

Upgraded opam packages

PackageFromTo
dkml-install,dkml-install-*0.5.20.5.3
earlybird1.3.2+dkml-4_14-backport-linearclosures
cmdliner1.2.01.3.0