v1.1.0_r2
1.1.0 (2022-12-27)
Quick Links:
Upgrading from 1.0.1?
- Uninstall the old version first with the uninstaller above!
- Exit Visual Studio Code and any
utop
orocaml
sessions. Then use the installer above. - After installing the new version, run the following in PowerShell in each directory that has a local opam switch to upgrade to
OCaml 4.14.0 and all the other package versions that come with DKML 1.1.0:# Sometimes `dkml init` can fail, but you are OK as long as you see: # ... upgrade ocaml-system 4.12.1 to 4.14.0 dkml init opam upgrade opam install . --deps-only --with-test
Cautions:
- Do not use this distribution if you have a space in your username
(ex.C:\Users\Jane Smith
). Sorry, but the broader OCaml ecosystem does not
yet consistently support spaces in directories. - Your Windows anti-virus may play havoc with the installer. If possible,
temporarily disable your anti-virus (the "realtime protection",
"exploit protection" and/or "malware protection" options). Some anti-virus
products include a button to temporarily disable AV protection for two hours;
do that. If you forget and the installer fails, you will need to disable
AV protection, run the uninstaller, and then rerun the installer!
New features:
- The system OCaml is 4.14.0 (was 4.12.1)
- The system includes ocamlnat, the experimental native toplevel. It should be
run usingwith-dkml ocamlnat
so native code is compiled with Visual Studio. - Add odoc 2.1.0 to user PATH, to align with the OCaml Platform.
- Relocatable native binaries are installed rather than compiled into place.
Installations should be quicker, which is a pre-requisite forwinget install
on Windows. - Add opam global variable
sys-pkg-manager-cmd-msys2
for future compatibility
with opam 2.2 depext support of MSYS2 - The
opam dkml init
command is nowdkml init
. Thedkml
executable is
precompiled and shaves ~20 minutes of installation time.
New security:
-
(Advanced; experimental) If you are behind a corporate firewall that uses
man-in-the-middle (MITM) TLS proxying, you can install your corporate CA chain
so DKML, in particular MSYS2, does not reject connections. Only persons with
write access to$env:ProgramData\DiskuvOCaml\conf\unixutils.sexp
will be
able to define the allowed MITM TLS chain; you may need access
from your corporate Administrator. An exampleunixutils.sexp
is:( (trust_anchors ("C:\\conf\\my.pem" "D:\\conf\\my.cer")) )
You specify one or more
.pem
or.cer
CA files, making sure to use two
backslashes to escape your paths. Your Administrator may have already placed
the CA files on your machine; otherwise use the guide at
https://www.msys2.org/docs/faq/#how-can-i-make-msys2pacman-trust-my-companys-custom-tls-ca-certificate
to copy them from your web browsers.
Not so good problems:
- Many opam packages do not work with the MSVC compiler or with Windows.
It will take a long time (months, years) to substantially improve Windows
coverage. When you do find a package that fails to compile on Windows, please
file an issue with whoever owns the package expressing interest in the
package working on Windows. Please be patient: some package owners may want
to see several people express interest before deciding the extra work is
justified.
Breaking changes:
- Cross-compiling on macOS with dkml-base-compiler now requires you to be explicit
which CPU architecture you are targeting. Before usingdune -x darwin_arm64
would always cross-compile both Intel and Silicon. Now Silicon developers
need to usedune -x darwin_x86_64
and Intel developers need to use
dune -x darwin_arm64
. The change was necessary to not rely on the presence
of optional Rosetta2 translation. Since this cross-compiling feature is little used, it does not warrant a breaking version bump.
Documentation changes:
- The documentation site has moved to
https://diskuv-ocaml.gitlab.io/distributions/dkml/. Please update your
bookmarks!
Bug fixes:
-
The dune.exe shim uses a cache containing the expensive-to-compute MSVC environment
settings. A race condition populating the cache has been fixed. -
Repetitive opam repository updates, a source of slowness, were eliminated
during installation. -
ocaml-crunch upgraded (pinned) from 3.2.0 to 3.3.1 to fix Windows/Unix path
inconsistency and handling of CRLF. That and other changed package versions
are:Package Old Version New Version dune 2.9.3 3.6.2 ocaml-crunch 3.2.0 3.3.1 cmdliner 1.0.4 1.1.1 uuidm 0.9.7 0.9.8 ptime 0.8.6 1.1.0 sexplib v0.14.0 v0.15.1 lsp 1.9.0 1.10.3 ocaml-lsp-server 1.9.0 1.10.3 jsonrpc 1.9.0 1.10.3 odoc 2.1.0 2.2.0 odoc-parser 0.9.0 1.0.1 stdio v0.14.0 v0.15.0 base v0.14.2 v0.15.1 mdx 2.0.0 2.1.0 ocamlformat 0.19.0 0.23.0 ocamlformat-rpc 0.19.0 not pinned ocamlformat-rpc-lib 0.19.0 0.23.0 -
The Visual Studio installation cleans up aborted previous installations.
-
The Visual Studio installation, on failure, writes error logs to a location
that isn't immediately erased.
Component changes:
opam.exe is compiled directly from the opam master branch; no patches! There isThere is one patch for opam on top of the opam master branch (opam 2.2) dated 2022-12-21.
still a shim but that shim just sets up environment variables and delegates
to the authoritative (unpatched) opam.- MSYS2 setup program is bundled inside the installer to lessen download TLS problems
when a proxy is present (common with corporate/school Windows PCs).
Resolves #19
Reproducibility features:
- Packages promoted to central Opam repository:
- dkml-runtime-common
- dkml-runtime-distribution
- dkml-component-opam
- Introduce simple spec for which package+versions are installed and/or compiled
as part of the DKML distribution (in dkml-runtime-distribution). Eventually it
will become authoritative. - Introduce dkml-component-desktop which does CI for changes to that spec (aka.
testing new package versions for Windows using MSVC), and builds all relocatable
binaries like dune and ocp-indent used in the Windows installer. It is not
yet in the central Opam repository. - During installation any
CAMLLIB
environment variable (in addition to
OCAMLLIB
which was already checked) is renamed to deconflict with a new
OCaml installation. Among other things, this provides an upgrade from
CamlLight to OCaml. #13
Usability tweaks:
- When building DKML packages like dkml-base-compiler, limit dump of Opam
logs used for troubleshooting to 4 hours
Feature flags:
-
Enable
--enable-imprecise-c99-float-ops
during OCaml compilation by setting( (feature_flag_imprecise_c99_float_ops) )
in
$env:ProgramData\DiskuvOCaml\conf\ocamlcompiler.sexp
. This is sometimes
needed inside virtual machines like Vagrant
Licensing:
- Diskuv OCaml is fully open-source, and is targeted for pure OCaml development.
Commercial tools and support are available from Diskuv for mixed OCaml/C
development; however, Diskuv OCaml only has limited support
for mixed OCaml/C. For example, thectypes
opam package has been patched
to work with Visual Studio but is out-dated. Contact
support AT diskuv.com if you need OCaml/C development.
Internal changes:
- with-dkml.exe is now configured as a opam wrapper relative to the
installation directory ($DiskuvOCamlHome) rather than the tools opam switch.
That change decouples your new switches (aka. opam dkml init) from another
opam switch.
Asset Listing
Asset | Supported? | Description |
---|---|---|
setup-diskuv-ocaml-windows_x86_64-1.1.0.exe | Yes | 64-bit OCaml distribution installer. You should download+install this |
setup-diskuv-ocaml-windows_x86-1.1.0.exe | Partial | 32-bit OCaml distribution on 64-bit Windows. Some OCaml packages may have problems |
uninstall-diskuv-ocaml-windows_x86_64-1.1.0.exe | Yes | 64-bit OCaml distribution uninstaller. Use this if support@ tells you |
uninstall-diskuv-ocaml-windows_x86-1.1.0.exe | Partial | 32-bit OCaml distribution uninstaller |
unsigned-diskuv-ocaml-windows_x86_64-i-1.1.0.exe | Yes | Unsigned installer. Use when you want to verify you can reproduce the installer ... |
unsigned-diskuv-ocaml-windows_x86-i-1.1.0.exe | Partial | ... directly from source code. Reproducibility is not yet 100% |
diskuv-ocaml-darwin_x86_64-i-1.1.0.tar.gz | No | Unsigned macOS on Intel binary distribution |
diskuv-ocaml-linux_x86_64-i-1.1.0.tar.gz | No | Linux distribution compatible with CentOS 7, CentOS 8, Fedora 32+, Mageia 8+, ... |
diskuv-ocaml-linux_x86-i-1.1.0.tar.gz | No | ... openSUSE 15.3+, Photon OS 4.0+ (3.0+ with updates), Ubuntu 20.04+Linux |
diskuv-ocaml-windows_x86-i-1.1.0.sfx | No | Self-extracting executable header used when creating signed installers from ... |
diskuv-ocaml-windows_x86_64-i-1.1.0.sfx | No | ... the pk7zip contents of the unsigned Windows installers |
-u-1.1.0. | No | Uninstallers for all the above |