OCaml Changelog

RSS

Read the latest releases and updates from the OCaml ecosystem.

See full changelog
  • Add a --null argument to suppress the output. This is used to write linters
  • Use the new generic ppx driver support of jbuilder

Utop 2.1.0

See full changelog
  • Add support for company-mode based completion in utop.el (#233)
See full changelog

Features

  • Wrap lines in string literals, comments and docstrings
  • Improve char escaping to ascii / uniform hexa / utf8 (#73)
  • Add support for Pexp_new expressions (#76, @smondet)
  • Add support for Pexp_send _ expressions (#72, @smondet)
  • Add options to format chars and break strings (#70, @smondet)
  • Formatting of %ext on if/while/for/match/try/; (#63, @hcarty)
  • Disable formatting with [@@@ocamlformat.disable] (#66, @hcarty)

Formatting improvements

  • Improve sequences under if-then-else with unnecessary but safer parens
  • Improve optional arguments with type constraints
  • Improve let-bound functions with type constraints
  • Improve newtype constraints in let-bindings
  • Improve placement of exception docstrings

Bug fixes

  • Fix missing break hint before comment on sugared []
  • Fix formatting of [%ext e1]; e2 (#75, @hcarty)
  • Fix missing parens around let exception, let module, for, while under apply
  • Fix missing parens under alias patterns
  • Fix placement of attributes on extension constructors
  • Fix missing parens around unpack patterns
  • Fix let-bindings with pattern constraints
  • Fix mutually recursive signatures

We are pleased to announce a first release candidate for the long-awaited opam 2.0.0.

A lot of polishing has been done since the last beta, including tweaks to the built-in solver, allowing in-source package definitions to be gathered in an opam/ directory, and much more.

With all of the 2.0.0 features getting pretty solid, we are now focusing on bringing all the guides up-to-dateยน, updating the tools and infrastructure, making sure there are no usability issues with the new workflows, and being future-proof so that further updates break as little as possible.

You are invited to read the beta5 announcement for details on the 2.0.0 features. Installation instructions haven't changed:

  1. From binaries: run

    sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
    

    or download manually from the Github "Releases" page to your PATH.

  2. From source, using opam:

    opam update; opam install opam-devel
    

    (then copy the opam binary to your PATH as explained)

  3. From source, manually: see the instructions in the README.

Thanks a lot for testing out the RC and reporting any issues you may find. See what we need tested for more detail.


ยน You can at the moment rely on the manpages, the Manual, and of course the API, but other pages might be outdated.

See full changelog

Features

  • Check fatal warnings not only in inplace mode

Documentation

  • Improve doc of --no-warn-error
  • Mention object language not implemented
  • Update documentation of --output

Bug fixes

  • Colon instead of arrow before type for GADT constructors with no arguments (@mbouaziz)
  • Fix some dropped comments attached to idents
  • Fix missing parens around Ppat_alias under Ppat_variant
  • Fix module type constraints on functors
  • Fix broken record field punning
  • Fix broken docstring attachment with multiple docstrings
  • Fix missing parens around application operators
  • Fix missing parens around Ppat_or under Ppat_variant
  • Fix missing/excess parens around Pexp_open under Pexp_apply/Pexp_construct
  • Fix duplicated attributes on Pexp_function
  • Fix missing parens around Ptyp_package under Pstr_type
  • Add '#' to the list of infix operator prefix (@octachron)
  • Do not add space between [ and < or > in variant types
  • Add a break hint before "constraint" in a type def (@hcarty)

Formatting improvements

  • Remove unnecessary parens around Pexp_tuple under Pexp_open
  • Improve single-case matches
  • Improve constructor arguments
  • Remove unnecessary parens around match, etc. with attributes
  • Fix missing parens around constraint arg of variant type
  • Fix missing parens on left arg of infix list constructor
  • Fix missing parens around arrow type args of variant constructors
  • Fix missing parens around type of constraints on module exps

Build and packaging

  • Separate Format patch into ocamlformat_support package
  • Fix test script
  • Unbreak build of ocamlformat_reason.ml (@mroch)
  • Improve opam installation (JacquesPa)
  • Install emacs support via opam package
See full changelog

Features

  • Output to stdout if output file omitted

Bug fixes

  • Fix Ppat_any value bindings
  • Fix missing parens around variant patterns in fun arg
  • Fix position of comments attached to end of sugared lists
  • Fix missing comments on module names
  • Fix package type constraints
  • Fix first-class module alias patterns
  • Fix first-class module patterns in let bindings
  • Fix missing parens around Ptyp_package under Psig_type
  • Fix missing "as" in Ptyp_alias formatting (@hcarty)
  • Fix let bindings with constraints under 4.06

Formatting improvements

  • Improve line breaking of or-patterns
  • Improve placement of comments within pattern matches
  • Improve clarity of aliased or-patterns with parens
  • Improve matches on aliased or-patterns
  • Improve infix applications in limbs of if-then-else
  • Improve final function arguments following other complex arguments
  • Improve consistency of paren spacing after Pexp_fun
  • Improve sugar for Pexp_let under Pexp_extension
  • Improve sugar for newtype
  • Improve first-class module expressions
  • Improve indentation when comments are sprinkled through types
  • Do not add open line after last binding in a structure

Build and packaging

  • Simplify build and packaging, and adopt some common practices
  • Add Warnings.Errors argument for < 4.06 compatibility (@hcarty)
  • Update base to v0.10.0 (@hcarty)

After a few more months brewing, we are pleased to announce a new beta release of opam. With this new milestone, opam is reaching feature-freeze, with an expected 2.0.0 by the beginning of next year.

This version brings many new features, stability fixes, and big improvements to the local development workflows.

What's new

The features presented in past announcements: local switches, in-source package definition handling, extended dependencies are of course all present. But now, all the glue to make them interact nicely together is here to provide new smooth workflows. For example, the following command, if run from the source tree of a given project, creates a local switch where it will restore a precise installation, including explicit versions of all packages and pinnings:

opam switch create ./ --locked

this leverages the presence of opam.locked or <name>.opam.locked files, which are valid package definitions that contain additional details of the build environment, and can be generated with the opam-lock plugin (the lock command may be merged into opam once finalised).

But this new beta also provides a large amount of quality of life improvements, and other features. A big one, for example, is the integration of a built-in solver (derived from mccs and glpk). This means that the opam binary works out-of-the box, without requiring the external aspcud solver, and on all platforms. It is also faster.

Another big change is that detection of architecture and OS details is now done in opam, and can be used to select the external dependencies with the new format of the depexts: field, but also to affect dependencies or build flags.

There is much more to it. Please see the changelog, and the updated manual.

How to try it out

Our warm thanks for trying the new beta and reporting any issues you may hit.

  1. The easiest is to use our pre-compiled binaries. This script will also make backups if you migrate from 1.x, and has an option to revert back:

    sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
    

    This uses the binaries from https://github.com/ocaml/opam/releases/tag/2.0.0-beta5

  2. Another option is to compile from source, using an existing opam installation. Simply run:

    opam update; opam install opam-devel
    

    and follow the instructions (you will need to copy the compiled binary to your PATH).

  3. Compiling by hand from the inclusive source archive, or from the git repo. Use ./configure && make lib-ext && make if you have OCaml >= 4.02.3 already available; make cold otherwise.

    If the build fails after updating a git repo from a previous version, try git clean -fdx src/ to remove any stale artefacts.

Note that the repository format is different from that of opam 1.2. Opam 2 will be automatically redirected from the opam-repository to an automatically rewritten 2.0 mirror, and is otherwise able to do the conversion on the fly (both for package definitions when pinning, and for whole repositories). You may not yet contribute packages in 2.0 format to opam-repository, though.

What we need tested

We are interested in all opinions and reports, but here are a few areas where your feedback would be specially useful to us:

  • Use 2.0 day-to-day, in particular check any packages you may be maintaining. We would like to ensure there are no regressions due to the rewrite from 1.2 to 2.0.
  • Check the quality of the solutions provided by the solver (or conflicts, when applicable).
  • Test the different pinning mechanisms (rsync, git, hg, darcs) with your project version control systems. See the --working-dir option.
  • Experiment with local switches for your project (and/or opam install DIR). Give us feedback on the workflow. Use opam lock and share development environments.
  • If you have any custom repositories, please try the conversion to 2.0 format with opam admin upgrade --mirror on them, and use the generated mirror.
  • Start porting your CI systems for larger projects to use opam 2, and give us feedback on any improvements you need for automated scripting (e.g. the --json output).

Odoc 1.2.0

See full changelog
  • Support for standalone documentation pages (.mld files) (#61).
  • Display [@@deprecated] attributes as the @deprecated tag (#57).
  • Allow each component of OCaml paths to be disambiguated using the kind-identifer syntax (part of #61).
  • Support OCaml 4.06.
  • Fix spurious leading blank lines in verbatim text (ocaml-doc/octavius#6).

Add support for 4.06. Use Leo White's short-path for 4.05. Various bug fixes (in locate, in emacs serialization).

See full changelog

Oops, we went looking but didn't find the changelog for this release ๐Ÿ™ˆ

The major change Windows support is contributed by David Allsopp.

Other changes are a bunch of fixes:

  • compilation on FreeBSD contributed by Malcolm Matalka
  • improvement to emacs mode contributed by Olivier Andrieu, Christophe Troestler and Steve Purcell
  • improvement to vim mode by Fabian Hemmer and Gregory Nisbet
  • fixes to ppx invocation by Keigo Imai
  • fixes to Merlin s-expr dialect to bring UTF-8 compatibility with Emacs (WIP)
See full changelog

Oops, we went looking but didn't find the changelog for this release ๐Ÿ™ˆ

Bug fix after 3.0.1:

  • CMT magic number for 4.05 was wrong
  • handle merlin.focus, merlin.ignore, merlin.loc/merlin.relaxed-loc and merlin.syntax-error
  • missing include preventing build on some platforms contributed by Bernhard Schommer
See full changelog

Oops, we went looking but didn't find the changelog for this release ๐Ÿ™ˆ

Bug fix release after 3.0.0 major release.

  • portability fixes by David Allsop in configure script and vim mode (tough Windows support is not ready yet)
  • preliminary support for findlib toolchains with FINDLIB_TOOLCHAIN .merlin directive
  • make ocamlmerlin.c frontend more portable
  • various fixes to the frontend
See full changelog

Oops, we went looking but didn't find the changelog for this release ๐Ÿ™ˆ

The major change is a new protocol that moves process management inside Merlin codebase, saving a lot of pain in Emacs and Vim. There are not much new user facing features.

Windows support is not yet available.

In editor configuration is now done with merlin-flags, merlin-extensions and merlin-use in Emacs and :MerlinFlags, :MerlinExtensions and :MerlinPackages in Vim. In previous versions, enabled extensions, flags and packages were retained while now only the last command is remembered.

"M-x merlin-use a", "M-x merlin-use b" should be replaced by "M-x merlin-use a,b". ":MerlinUse a", ":MerlinUse b" should be replaced by ":MerlinUse a b".

The old protocol is still supported, so existing editor modes should not be affected (tested with Atom, Visual Studio and Sublime-text).

Other main changes:

  • Support for OCaml 4.05 was added
  • Merlin uses a new implementation of short-path by Leo White which addresses performance problems
  • Merlin now works with the upstream version of Menhir
  • numerous cleanup and refactoring to decrease the amount of changes to upstream typechecker
  • emacs-imenu feature was contributed by tddsg. It is similar the "outline" feature in vim for navigating in a buffer.

Thanks to the many contributors (Jochen Bartl, tddsg, Ximin Luo, Jason Staten, Leo White, Leandro Ostera, Jacob Bass, Xavier Guรฉrin, Yotam Barnoy, Jacques Pascal Deplaix, David Allsopp, ...).

See full changelog

Oops, we went looking but didn't find the changelog for this release ๐Ÿ™ˆ

See full changelog
  • Support .opam files
  • Add Travis CI tests
  • Support the simultaneous publication of multiple packages from the same repo

Odoc 1.1.1

See full changelog
  • make odoc more noisy when generating html for hidden units
  • changed html-deps subcommand behavior: it now expects to be given a directory, not a single odoc file.

Utop 2.0.1

See full changelog
  • Fix: restore the installation of utop.el (#210, Louis Gesbert)

Utop 2.0.0

See full changelog
  • Add -implicit-bindings option to automatically bind expressions to names _0, _1 and so on. For example, 3 + 4;; becomes let _0 = 3 + 4;; (#161, #193, Fabian Hemmer)
  • Add tab completion for #mod_use (#181, Leonid Rozenberg)
  • Mention #help in #utop_help (#190, Fabian Hemmer)
  • Add #utop_stash and #utop_save to save the session to a file (#169, #199, Christopher Mcalpine and Fabian Hemmer)
  • Add support for reason in the emacs mode (#206, Andrea Richiardi)
  • Fix a bug where utop wouldn't apply ppx rewriters when running in emacs (Bug report: #192, fix: #202, Deokhwan Kim)
  • Refactor the use of hooks to support the various OCaml emacs mode (#201, Andrea Richiardi)
  • Drop support for camlp4/camlp5
  • Drop support for OCaml <= 4.01
  • Switch the build system to jbuilder
  • Resurect UTop_main.interact

Minor release.

See full changelog
  • handle hole in 4.04
  • bug fixes in emacs mode
  • introduce merlin-imenu
If you want to contribute to a new release announcement, check out the Contributing Guide on GitHub.