1. 12
  1.  

  2. 4

    To be fair, I’ve never felt a need for binary distributions.

    1. The time required to build the toolchain from source remained constant, it’s still under 10 minutes even on modest machines.
    2. You will need opam anyway, and you will need to build utilities and project dependencies for the fresh switch (unless you are using a custom workflow, like Lexifi reportedly does) — that can take longer than building the compiler if you use a lot of different libs and tools.
    3. My personal pet peeve is opam repository sync time rather than compiler build time. Since it has to be done a lot more often than compiler installations, I’d like to make that faster instead.
    1. 3

      If you don’t care about carbon usage, it’s fair to say the default toolchain is quite fast to build.

      However, you might want to use flambda or flambda2 compilers, i.e. OCaml with steroids, and they will probably need much more time to build, than just downloading the corresponding binaries.

      About opam-repository: it was a decision by the maintainers to keep all versions of packages, and that decision progressively makes the repo huge. I personally think it’s a mistake, only a few versions of every package really need to be kept, and this small set could easily be computed so that every package could be installed for every OCaml version it was available for, while still keeping the minimal number of versions.

      1. 2

        I agree with you, but the last two comments of avoiding the cmt* files by default and omitting linkall where not necessary seem to be pretty reasonable to implement. I wonder if it would also reduce compilation times

        1. 2

          as the article notes, an opam switch effectively maintains a “binary distribution” within .opam, so the increase in size affects everyone.

          1. 2

            The opam-bin plugin can be used to share files (through hard-links) between switches containing the same OCaml compiler (typically, a global switch and per-project local switches), making your disk space usage a little smaller.