# \[ANN\] Diskuv OCaml 1.x.x; Windows OCaml installer no longer in preview

**URL:** https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309
**Category:** Ecosystem
**Tags:** announce, windows, dkml
**Created:** [August 14, 2022, 4:03am UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309 "2022-08-14T04:03:53Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)
#### Post date: [August 14, 2022, 4:03am UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/1 "2022-08-14T04:03:53Z")

</div>

Diskuv OCaml (DKML) has graduated to version 1.0.0. That means you’ll see DKML listed as a Windows option for OCaml on the various OCaml websites soon.

To recap … by following the simple [download and install instructions for Windows](https://github.com/diskuv/dkml-installer-ocaml#installing) you will get:

- OCaml 4.12.1
- `dune` and `opam` working transparently as if you were on Unix
- a `playground` Opam switch so you can start coding without having to learn many Opam commands
- your Opam switches supported by the Visual Studio OCaml plugin
- all the prerequisites you need for OCaml programming:
  - a C compiler and assembler (Visual Studio Build Tools)
  - a UNIX environment (MSYS2; mostly you won’t see it)
  - source control (Git for Windows)

- support! File an issue at [https://github.com/diskuv/dkml-installer-ocaml/issues](https://github.com/diskuv/dkml-installer-ocaml/issues). I don’t promise your Windows issue will be fixed, but it will be reviewed.

Changes since 0.4.0:

- An uninstaller. Now you can Add and Remove “Diskuv OCaml” from the Control Panel
- The old GitLab repository at [https://gitlab.com/diskuv/diskuv-ocaml](https://gitlab.com/diskuv/diskuv-ocaml) is being retired. There will be a new GitLab repository with much more testing capacity that will be online in the next few months.

Full documentation is at [https://diskuv.gitlab.io/diskuv-ocaml/#introduction](https://diskuv.gitlab.io/diskuv-ocaml/#introduction).

_Package maintainers_: Have a look at the [just announced `setup-dkml`](https://discuss.ocaml.org/t/ann-setup-dkml-yml-github-actions-workflow-for-distributing-binaries/10308) to test your own GitHub packages using most of the Windows functionality listed above.

Thanks (again!) to the [OCaml Software Foundation (OCSF)](https://ocaml-sf.org/) for their support of DKML. Please consider becoming a contributor to DKML to improve the Windows ecosystem. Enjoy!

---

<div class="post-metadata">

### Author: ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)
#### Post date: [August 19, 2022, 1:09pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/2 "2022-08-19T13:09:18Z")

</div>

Regarding [[ANN] Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0 - #24 by bobzhang](https://discuss.ocaml.org/t/ann-windows-friendly-ocaml-4-12-distribution-diskuv-ocaml-0-1-0/8358/24)

Appreciate that you tried the installer @bobzhang !

Any chance you can also file issues; you get updates when an issue is fixed, and I doubt most new users are going to know/care to search in [discuss.ocaml.org](http://discuss.ocaml.org).

(I’m assuming you installed 1.0.0 rather than a preview 0.x.x version from the old now-closed thread)

* * *

- The long install time is a hard sell but won’t last forever (it is already being worked on). This was discussed earlier in [[ANN] Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0 - #16 by jbeckford](https://discuss.ocaml.org/t/ann-windows-friendly-ocaml-4-12-distribution-diskuv-ocaml-0-1-0/8358/16) (I wrote that earlier for you @bluddy , which shows that [discuss.ocaml.org](http://discuss.ocaml.org) is not good for long term information retrieval).

> [@\[ANN\] Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0](https://discuss.ocaml.org/t/ann-windows-friendly-ocaml-4-12-distribution-diskuv-ocaml-0-1-0/8358/24):
>
> when I format a file in vscode, I got an error:
> 
> ```auto
> ocamlformat: option `--profile': invalid value `'conventional'', expected one
> of `conventional', `default', `compact', `sparse', `ocamlformat'
> or `janestreet'
> Usage: ocamlformat [OPTION]... [SRC]...
> Try `ocamlformat --help' for more information.
> 
> ```

- The ocamlformat looks like you have extraneous and unnecessary quotes in the profile name. ocamlformat does work; I use it habitually several times a day. My guess is you are invoking it directly with extra quotes; a bug issue would really help here.

> [@\[ANN\] Windows-friendly OCaml 4.12 distribution - Diskuv OCaml 0.1.0](https://discuss.ocaml.org/t/ann-windows-friendly-ocaml-4-12-distribution-diskuv-ocaml-0-1-0/8358/25):
>
> also tried `opam install ppx_jane`, which gave me such an error:
> 
> ```auto
> PS C:\Users\IDEA\git\hello> opam install ppx_jane      
> [NOTE] External dependency handling not supported for
> OS family 'windows'.
> You can disable this check using 'opam option   
> --global depext=false'
> [ERROR] Package conflict!
> * Missing dependency:
> - variantslib >= v0.14
> not available because the package is pinned to     
> version 109.15.02
> 
> No solution found, exiting
> 
> ```

- ppx\_jane; I’m unfamiliar with this one, probably because there are many Jane Street packages that do not and will likely not support Windows for the foreseeable future. I’ll have a look at this when I’m back at a PC (may be awhile) for this specific package. Regardless ppx\_jane is an indicator that you may be reliant on other Jane Street packages. I don’t want to speak for Jane Street, but I recall them being clear in their documentation about what only works on Unix and why (mostly they don’t have a Windows Async scheduler) and they have also said on [discuss.ocaml.org](http://discuss.ocaml.org) that they didn’t use Windows in their testing. So three issues. 1. I really need to be more upfront that existing OCaml developers reliant on Jane Street must switch to alternatives (ex. Lwt not Async) to work on Windows. 2. Much of the very very useful Real World OCaml book promotes Jane Street libraries which will cause new Windows users to have immediate problems; I’ll see if a chat with the authors can help create a path forward. 3. The error you get is not helpful here. I _think_ this will change in Opam 2.2 … packages that don’t work in Windows will be clearly flagged as not available in Windows. But regardless some change needs to occur; a bug issue would be helpful here.

Thanks!

---

<div class="post-metadata">

### Author: ![bluddy](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/bluddy/32/104_2.png) [@bluddy](https://discuss.ocaml.org/u/bluddy)
#### Post date: [August 19, 2022, 1:21pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/3 "2022-08-19T13:21:20Z")

</div>

> [@jbeckford](#):
>
> I wrote that earlier for you @bluddy , which shows that [discuss.ocaml.org](http://discuss.ocaml.org) is not good for long term information retrieval).

Sorry @jbeckford, OCaml is a side hobby for me and I sometimes forget what was discussed and when. My bad.

---

<div class="post-metadata">

### Author: ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)
#### Post date: [August 19, 2022, 1:24pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/4 "2022-08-19T13:24:05Z")

</div>

No problem. I was alluding to bug reports and things like ocamlverse (thanks!) being better long term forms of information retrieval.

---

<div class="post-metadata">

### Author: ![anuragsoni](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/anuragsoni/32/1107_2.png) [@anuragsoni](https://discuss.ocaml.org/u/anuragsoni)
#### Post date: [August 19, 2022, 1:28pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/5 "2022-08-19T13:28:55Z")

</div>

> [@jbeckford](#):
>
> ppx\_jane; I’m unfamiliar with this one, probably because there are many Jane Street packages that do not and will likely not support Windows for the foreseeable future

FWIW `ppx_jane` doesn’t have any unix dependencies and should work on Windows. We use `ppx_jane` along with quite a few other Janestreet libraries at work and have been using it successfully on windows with Cygwin + fdopen repositories for a while now.

---

<div class="post-metadata">

### Author: ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)
#### Post date: [August 19, 2022, 1:49pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/6 "2022-08-19T13:49:04Z")

</div>

> [@anuragsoni](#):
>
> FWIW `ppx_jane` doesn’t have any unix dependencies and should work on Windows

Good. That means it will be easy to fix.

> [@anuragsoni](#):
>
> We use `ppx_jane` along with quite a few other Janestreet libraries at work

Curious what “quite a few other Janestreet libraries” implies. Does that mean you don’t need to be aware of the Base/Core split at the bottom of [Base](https://opensource.janestreet.com/base/), and then for each Janestreet library you want to use check its transitive dependencies to see whether a library will work on Windows? Or are you relying on tribal knowledge / trial-and-error about what should work and what doesn’t?

---

<div class="post-metadata">

### Author: ![anuragsoni](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/anuragsoni/32/1107_2.png) [@anuragsoni](https://discuss.ocaml.org/u/anuragsoni)
#### Post date: [August 19, 2022, 1:59pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/7 "2022-08-19T13:59:02Z")

</div>

> [@jbeckford](#):
>
> Does that mean you don’t need to be aware of the Base/Core split at the bottom of [Base](https://opensource.janestreet.com/base/)

The Base/Core split at the bottom of the [Base](https://opensource.janestreet.com/base/) is still relevant, though slightly outdated now that Core itself is compatible with non unix platforms. The situation is fairly simple these days in that `core_unix` is the library that is unix specific and `base` and `core` both work on windows, javascript etc.

> and then for each Janestreet library you want to use check its transitive dependencies to see whether a library will work on Windows? Or are you relying on tribal knowledge / trial-and-error about what should work and what doesn’t?

Checking the transitive dependencies has worked well so far. If a library doesn’t use `core_unix` or `async_unix` it has worked well on windows in my experience.

---

<div class="post-metadata">

### Author: ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)
#### Post date: [August 19, 2022, 5:50pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/8 "2022-08-19T17:50:24Z")

</div>

> [@anuragsoni](#):
>
> Checking the transitive dependencies has worked well so far. If a library doesn’t use `core_unix` or `async_unix` it has worked well on windows in my experience.

Okay that is what I thought. That doesn’t translate well for a new OCaml user. They won’t know how to do that, and even if they did they wouldn’t be able to predict which packages they _would_ need in the future. Speaking from personal experience here … @bobzhang was rightly talking about 3 hours being a hard sell … but using Janestreet on Windows could (and did) waste _weeks_ of time when you realize you can’t get past an Async dependency. Using Cygwin+MinGW doesn’t solve it. Incredibly frustrating and can easily become “I hate OCaml; let me post soemthing terrible on Reddit or HN”, and while I’m glad your work (which sounds like a very experienced OCaml group) only needed the subset that is compatible with Windows, that isn’t the bar for recommending a set of packages to all Windows users.

Does that make sense?

* * *

Regardless, Ppx\_jane and all the PPX subset of JS packages need to be added to the Diskuv OCaml test suite and perhaps upgraded to 0.15.x; I was quite unaware of that package.

---

<div class="post-metadata">

### Author: ![jbeckford](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/jbeckford/32/3027_2.png) [@jbeckford](https://discuss.ocaml.org/u/jbeckford)
#### Post date: [September 5, 2022, 3:29pm UTC](https://discuss.ocaml.org/t/ann-diskuv-ocaml-1-x-x-windows-ocaml-installer-no-longer-in-preview/10309/9 "2022-09-05T15:29:38Z")

</div>

# Diskuv OCaml 1.0.1 Release

This is mostly a bug fix. It is available at [https://github.com/diskuv/dkml-installer-ocaml/releases/download/v1.0.1/setup-diskuv-ocaml-windows\_x86\_64-1.0.1.exe](https://github.com/diskuv/dkml-installer-ocaml/releases/download/v1.0.1/setup-diskuv-ocaml-windows_x86_64-1.0.1.exe) and the full release notes are at [Release v1.0.1 · diskuv/dkml-installer-ocaml · GitHub](https://github.com/diskuv/dkml-installer-ocaml/releases/tag/v1.0.1)

Summary of changes:

- The installer now checks whether files are in use when overwriting a previous installation just like the uninstaller already did.
- Fix Dune shim so `dune build` works consistently on Windows. [Missing `advapi32.lib` and `uuid.lib` when compiling with dune · Issue #6 · diskuv/dkml-installer-ocaml · GitHub](https://github.com/diskuv/dkml-installer-ocaml/issues/6)
- Fix detection of Jane Street package versions so `ppx_jane` dependencies like `fieldslib`, and other JS packages, are pinned to versions like `v0.14.0` (etc.). Also pin transitive dependencies of `ppx_jane`. [ppx\_jane cannot be installed · Issue #8 · diskuv/dkml-installer-ocaml · GitHub](https://github.com/diskuv/dkml-installer-ocaml/issues/8)
- MSYS2 variables are available as Opam global variables. The list is [here](https://gitlab.com/diskuv/diskuv-ocaml/-/blob/main/CHANGES.md#msys2-variables-101). For example, `opam var --global msystem` is `CLANG64` and `opam var --global mingw-package-prefix` is `mingw-w64-clang-x86_64`. They will become useful when Opam depext functionality is added for MSYS2.
- Fix version in Add/Remove Programs that was `dev` instead of `1.0.1` (etc.)
