If you want the latest installer, scroll down this discussion thread to the latest DkML 2.0.* post
There are several major changes in version 2.0.0 of DkML, a OCaml distribution that uses Visual Studio on Windows. Full DkML 2.0.0 Release Notes are available, and the installer is https://gitlab.com/dkml/distributions/dkml/-/releases/2.0.0/downloads/setup64u.exe.
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
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_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.
- Many packages are upgraded. Here is a sampling of those upgrades:
Thanks a lot for your work. I just installed this to do some OCaml hacking on Windows and it worked as advertised.
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.
It would continue to be either/or, not both.
Approx 5-10 minutes. Somewhere around there.
Do not use this version.
Version 2.0.1 is available with an installer and release notes at <don’t use this version!>
Its main new feature is that the OCaml package
sqlite3 is available from the global environment. Examples of
sqlite3 are in the Quick Start.
If you installed 2.0.0 you should upgrade to 2.0.1 for the bug fixes.
FYI, The “windows 64-bit installer” in this page is a dead link.
Major oops. Forgot to publish it. Instead of recreating it I’ll just skip 2.0.1 and publish 2.0.2 in a day or so.
Consider 2.0.2 to be a preview release. The 2.0.2 installers and release notes are here
The major change is there is a standalone “Bytecode Edition” installer:
ocamlfind work with
sqlite3. (I intend later to add the
tsdl related packages)
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 (
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.
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.
Consider 2.0.3 to be a release candidate. The installers and release notes are here.
The major bugfix solves Visual C++ Redistributables failing when a higher version is already
The major change is that the “Bytecode Edition” installer is no longer being released, due to the lack of users saying they would use it.