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-baseinstall, 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 gitshould no longer present a problem during installation. - Fixed: No longer need to do
opam pin remove ...to installmerlinand
ocaml-lsp.
Performance improvements:
- Plumb the number of cpus to the compiler jobs. [@edwin]
- Skip over cross-compiling support when no target ABIs specified.
- Overall shaved ~15 minutes from installation on a 3-CPU machine (80m instead
of 95m), with additional savings if you have more CPUs.
Timings in NUMCPUS: remove upper limit of 8 by edwintorok · Pull Request #1 · diskuv/dkml-runtime-common · GitHub
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
ocamlrunand 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 thatocaml,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.0to2.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-nativeworks with spaces in the Windows home directory- Removed incorrect
ptime.0.8.6pin duringdkml init; nowptime.1.1.0
Doc fixes:
- Create
dune-projectin Beyond Basics documentation alongside existing
dune init exeto adhere to Dune 3.x behavior. (Dune 3.6 was added
in DKML 1.1.0)
Deprecations:
- The
dkml --build-typebuild 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
basepackage to globalutop. In particular,baseis
now part of thedkmlswitch created during installation.coreis 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/stublibsdirectory of thedkml
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+msvcpin since MSVC changes upstreamed to 1.1.3. - The bytecode
*.bcembedded 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 theenvironmentfile to
force a rebuild of the environment. - Pin
omd.1.3.1 - Print timestamp for many logging operations to aid performance comparisons
Patches:
base_bigstring.v0.15.0for MSVC and MinGW (same in fdopen and esy).
upstream: Apply Windows build patch from esy by jonahbeckford · Pull Request #3 · janestreet/base_bigstring · GitHubtime_now.v0.15.0for MSVC.
upstream: Dropped MSVC support · Issue #3 · janestreet/time_now · GitHubcore.v0.15.1for MSVC.
upstream: MSVC support by jonahbeckford · Pull Request #161 · janestreet/core · GitHubcore_kernel.v0.15.0for MSVC.
upstream: MSVC supported unused attribute by jonahbeckford · Pull Request #107 · janestreet/core_kernel · GitHubalcotest.1.6.0for MSVC.
upstream: alcotest_stubs.c compile with MSVC by jonahbeckford · Pull Request #369 · mirage/alcotest · GitHubcurly.0.2.0for Windows and MSVC (pending release; already unblocked).
upstream: Cutting a new release? · Issue #10 · rgrinberg/curly · GitHubbase.v0.15.1for MSVC 32-bit. Already merged; in v0.16~preview.127.22+307.
upstream: Use _BitScanReverse64 only on _WIN64 by jonahbeckford · Pull Request #128 · janestreet/base · GitHub