[ANN] Diskuv OCaml 1.2.0 (Windows, MSVC)

There is a new release of the Diskuv OCaml installer available for Windows users at Release v1.2.0 · diskuv/dkml-installer-ocaml · GitHub. It contains critical changes that were blocking some Windows users from completing the install, and some performance improvements thanks in large part to @edwin. The release notes have been reproduced immediately below. It will be available using winget install Diskuv.OCaml in a week or so.


Upgrading? First uninstall the old Diskuv OCaml version using “Add or remove programs” in the Control Panel.

What do I do after the install is complete? You SHOULD read the “Install is done! What next?” at https://diskuv-ocaml.gitlab.io/distributions/dkml/#install-is-done-what-next documentation.

Callout to VirtualBox users: You’ll need a workaround for a not-yet backported FMA fix by doing the following in a PowerShell terminal inside VirtualBox before running the installer:

mkdir "$env:ProgramData\DiskuvOCaml\conf\"
Set-Content -Path "$env:ProgramData\DiskuvOCaml\conf\ocamlcompiler.sexp" -Value "((feature_flag_imprecise_c99_float_ops))"

Critical changes:

  • Switch from the official MSYS2 msys2-base install, plus a set of MSYS2
    Internet updates, to a standalone msys2-dkml-base
    that has all the MSYS2 packages needed during installation. That removes the
    Internet, GPG keys, proxies, etc. as a source of failures during the MSYS2
    sub-installation.
  • Special handling for Scoop package manager on Windows which comingles a
    conflicting bash.exe and git.exe in the same directory. A prior
    scoop install git should no longer present a problem during installation.
  • Fixed: No longer need to do opam pin remove ... to install merlin and
    ocaml-lsp.

Performance improvements:

Open source help wanted:

  • Byte-code only installation. That will be fast and simple and light, and is likely the best option for students. The existing installer already ships with a functioning ocamlrun and standard library, and is “component”-based so pieces can be added or removed. No Visual Studio, no MSYS2, no spending time compiling code during installation. However a shim would need to be developed so that ocaml, ocamlc, utop, etc. work without setting required OCaml environment variables. Almost all of this new byte-code only installation can be developed on macOS or Linux.

If you would like to contribute post your github username on Help Wanted Meta Issue · Issue #35 · diskuv/dkml-installer-ocaml · GitHub

Component upgrades:

  • Bump utop from 2.9.0 to 2.10.0.
  • ocurrent ocaml/opam CI Docker image (a source of pins)
    updated from 2022-02-28 to 2022-11-22; numerous pins updated.

Bug fixes:

  • dkml-runtime-common-native works with spaces in the Windows home directory
  • Removed incorrect ptime.0.8.6 pin during dkml init; now ptime.1.1.0

Doc fixes:

  • Create dune-project in Beyond Basics documentation alongside existing
    dune init exe to adhere to Dune 3.x behavior. (Dune 3.6 was added
    in DKML 1.1.0)

Deprecations:

  • The dkml --build-type build type option will be removed next release. It was
    originally created for Linux builds (perf and AFL variants), and can be
    resurrected and simplified if and when Linux support is added.

Internal changes:

  • Added Jane Street’s base package to global utop. In particular, base is
    now part of the dkml switch created during installation. core is too
    expensive (52 packages) to install automatically, but you can install utop
    and core in your own switch.

    For now this is not that useful. The lib/stublibs directory of the dkml
    switch needs to be in the PATH for #require "base";; to work in global
    utop. That would help readers of the Real World OCaml book. A future
    release will automate the PATH change.

  • Removed digestif.1.1.2+msvc pin since MSVC changes upstreamed to 1.1.3.
  • The bytecode *.bc embedded in the installer is compiled with 4.14.0
    and its embedded runtime is also 4.14.0.
  • When using opam option setenv+= stop removing the environment file to
    force a rebuild of the environment.
  • Pin omd.1.3.1
  • Print timestamp for many logging operations to aid performance comparisons

Patches:

6 Likes