Consider 2.0.0 a preview release. If you are risk-averse you may want to wait for 2.0.1.
Breaking change: The global environment (where you can run dune, utop, ocamlopt and a few other critical OCaml executables without having to install your own opam switch) has changed significantly. DkML 2.0.0 Release Notes describes those changes in detail, but there is also a Quick Start to see what you can do with utop in the global environment.
Why do this breaking change?
2.0.0+ installations are faster because the global executables do not have to be compiled.
It gets the DkML distribution very close to having a lite “bytecode only” installer that does not need to install (heavy!) Visual Studio, MSYS2 and Git. This upcoming lite installer could be a good fit for educational settings, so feedback from educators is appreciated.
Major non-breaking changes:
The deprecated fdopen repository is no longer used. Previously DkML installed a smaller and smaller portion of the fdopen repository with each subsequent version. Now DkML 2.x.x relies only on the central opam repository and the DkML opam repository.
Dune upgraded to 3.8.3. Among other things, the installer no longer installs a C# file watcher proxy for dune build -w; instead Dune uses its own native Windows file watcher.
The set of pinned packages during a dkml init local switch has gone down from approximately 4000 to 200. Rather than pinning each package in the opam universe to a heuristically-determined version, we pin only packages that we successfully build on Windows.
The following packages are accessible by just typing utop without installing a switch:
The installer can now restart after a failed installation, without having to use the uninstaller.
Allow setup to succeed on Windows filesystems that do not support the setting of file attributes
FlexDLL object files flexdll_initer_msvc64.obj and flexdll_msvc64.obj (or 32-bit variant on 32-bit installs) are installed alongside flexlink.exe so flexlink can be used by itself without setting FLEXDIR environment variable.
Changed packages:
Many packages are upgraded. Here is a sampling of those upgrades:
In the past there was some feedback that the large install time was off-putting for some users. Do you have some comparison of the install times before and after the change? If I understand correctly, you could see a next iteration that would provide a “base system” with bytecode-only tools (and then people would have to install build tools and their own switch for native compilation), do you have a guesstimate on the install time for this bytecode-only base system on standard machines?
I don’t have a good benchmark since I abandoned using (slow and expensive) GitHub CI for this preview release; perhaps someone else can report their install times.
I haven’t been able to get bytecode-only tools and native tools to co-exist at the same time in the same PATH. Today I use a feature flag to flip the environments. See “NOTE4” at the very bottom of the 2.0.0 release notes for the reason why.
The major change is there is a standalone “Bytecode Edition” installer:
utop, ocamlc, ocamlfind work with base, refl, graphics and sqlite3. (I intend later to add the tsdl related packages)
No opam, Visual Studio, Git or MSYS2. That is a fast install (see Answers below).
Comes embedded with a bytecode system OCaml compiler and pre-compiled packages (base, etc.)
dune works to the extent Dune works with bytecode: you have to set explicit (modes ... byte), and you have to explicitly ask for the bytecode artifacts with dune build x/y/z.bc
VS Code works with the OCaml Platform extension (ie. ocamllsp works alongside dune build x/y/z.bc)
If people think they’ll use it, now is the time to say so! I don’t intend to support something very few people will use.
Answers
Thanks! DkML 2.0.2 should have live links, unlike 2.0.1
The “Bytecode Edition” is under 5 minutes to download (~200MiB), and under 5 minutes to install.