OCaml Changelog

RSS

Official stable release announcements and updates from the OCaml compiler, OCaml infrastructure and the OCaml Platform Tools.

See full changelog
  • Remove opam lint warnings for 1.2 files (#2, @samoht)
  • Add a --keep-v option to not drop v at the beginning of version numbers (#6, @samoht)
  • Pass -p <package> to jbuilder (#8, @diml)
  • Fix a bug in Distrib.write_subst which could cause an infinite loop (#10, @diml)
  • Add a --dry-run option to avoid side-effects for all commands (@samoht)
  • Rewrite issues numbers in changelog to point to the right repository (#13, @samoht)
  • Stop force pushing tags to origin. Instead, just force push the release tag directly to the dev-repo repository (@samoht)
  • Fix publishing distribution when the the tag to publish is not the repository HEAD (#4, @samoht)
  • Do not depend on opam-publish anymore. Use configuration files stored in ~/.dune to parametrise the publishing workflow. (@samoht)

Ppxlib 0.2.1

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

See full changelog

Features

  • Add: option to align all infix ops (#150, @hhugo)
  • Add: option to attempt to indent the same as ocp-indent (#162)
  • Add: option for no discretionary parens for tuples (#157, @hhugo)
  • Add: alternative format for if-then-else construct (#155, @hhugo)
  • Add: option to customize position of doc comments (#153, @hhugo)

Bug fixes

  • Fix: dropped item attributes on module expressions
  • Fix: toplevel let%ext (#167, @hhugo)
  • Fix: parens around type alias & empty object type (#166, @hhugo)
  • Fix: missing comments for [let open] (#165, @hhugo)
  • Fix: missing comments in ppat_record (#164, @hhugo)
  • Fix: check_typ wrt constraint on module type (#163, @hhugo)
  • Fix: let binding with constraint (#160, @hhugo)
  • Fix: handle generative functor type (#152, @hhugo)

Formatting improvements

  • Improve: remove redundant parens around application operators
  • Improve: parenthesize and break infix constructors the same as infix ops
  • Improve: consider prefix ops and not to be trivial if their arg is
  • Improve: align arrow type args and do not wrap them (#161)
  • Improve: formatting for multiple attributes (#154, @hhugo)
  • Improve: keep the original string escaping (#159, @hhugo)
  • Improve: discretionary parens in patterns (#151, @hhugo)
  • Improve: breaking of infix op arguments
  • Improve: consider some extensions to be "simple"
  • Improve: punning (#158, @hhugo)
  • Improve: force break of let module/open/exception/pats (#149, @hhugo)

Build, packaging, and testing

  • Add support for bisect (#169, @hhugo)
  • Exclude failing tests from make -C test

Ppxlib 0.3.0

See full changelog
  • Update the AST to 4.06 (#8, @xclerc)
  • Deprecate old references to type_conv in argument and rewriter names and add new ones mentioning deriving instead (#7, #9 @xclerc)
  • Fix compatibility with -safe-string (#10, @hhugo)
  • Restore tests (#11, @xclerc)
  • Allow to set the suffix of corrected files (#15, @diml)
  • Restore compatibility with OCaml 4.04.x (#16, @xclerc)
See full changelog

Features

  • Add: support for new%js (#136, @hhugo)
  • Add: support for Ptyp_object (#104, @smondet)
  • Use original filename when given in error messages. (#96, @mbarbin)

Bug fixes

  • Fix: allow extensions in types (#143, @hhugo)
  • Fix: parens on symbol type constructor
  • Fix: parenthesization of '!=' partial application as a prefix op (#126, @hhugo)
  • Fix: parens around Ppat_constraint under Pexp_match or Pexp_try (#124, @hhugo)
  • Fix: parenthesization of tuple args of variant type declarations (#122, @hhugo)
  • Fix: missing parens around list inside Constr pattern (#123, @hhugo)
  • Fix: incorrect breaking of long strings (#130, @hhugo)
  • Fix: missing parens inside array literal (#129, @hhugo)
  • Fix: attributes on arguments of function (#121, @hhugo)
  • Fix: floating docstrings within a type declaration group
  • Fix: missing parens in sugared Array.set
  • Fix: missing attributes on patterns
  • Fix: is_prefix_id for != (#112, @hhugo)
  • Fix: missing parens around module value types in signatures (#108, @hcarty)
  • Fix: floating docstrings within a value binding group
  • Fix: missing attributes on extension points (#102, @hcarty)
  • Fix: extensible variants with aliases (#100, @hcarty)
  • Fix: several issues with extension sequence expressions
  • Fix: generative functors
  • Fix: preserve files with an empty ast (instead of failing) (#92, @mbarbin)
  • Fix: missing extension on Pexp_sequence
  • Fix: missing docstrings and attributes on types
  • Fix: missing parens around sugared Array and String operations
  • Fix: missing parens around Pexp_newtype
  • Fix: missing parens around Ppat_constraint, Ppat_or, and Ppat_unpack
  • Fix: dropped space when string wrapped between spaces
  • Fix: repeated ppx extension on mutual/recursive let-bindings (#83, @mbarbin)
  • Fix: dropped comments on Pmty_typeof
  • Fix: missing parens around Ppat_unpack under Ppat_constraint

Formatting improvements

  • Improve: two open lines following multiline definition only with --sparse (#144)
  • Improve: indent rhs of ref update (#139, @hhugo)
  • Improve: no parens around precedence 0 infix ops (refines #115) (#141, @hhugo)
  • Improve: support (type a b c) (#142, hhugo)
  • Improve: no parens for { !e with a } (#138, @hhugo)
  • Improve: no parens for constr inside list pattern. (#140, @hhugo)
  • Improve: generative functor applications (#137, @hhugo)
  • Improve: omit parens around lists in local opens (#134, @hhugo)
  • Prepare for ocaml#1705 (#131, @hhugo)
  • Improve: comment wrapping for dangling close
  • Improve: if-then-else conditions that break
  • Improve: suppress spurious terminal line break in wrapped strings
  • Improve: parens for nested constructors in pattern (#125, @hhugo)
  • Improve: remove duplicate parens around Ptyp_package
  • Improve: indentation after comment within record type declaration
  • Improve: add discretionary parens on nested binops with different precedence
  • Improve: empty module as functor argument (#113, @hhugo)
  • Improve: indentation of multiple attributes
  • Improve: attributes on short structure items
  • Improve: attributes on type declarations
  • Improve: tuple attribute args
  • Improve: parenthesization of Ppat_or
  • Improve: determination of file kind based on provided name
  • Improve: extension on the let at toplevel: e.g. let%expect_test _ (#94, @mbarbin)
  • Improve: constraints in punned record fields (#93, @mbarbin)
  • Improve: nullary attributes
  • Improve: Ppat_tuple under Ppat_array with unnecessary but clearer parens
  • Improve: breaking of arguments following wrapped strings

Build, packaging, and testing

  • Simplify using (universe) support in jbuilder 1.0+beta20
  • Add some regtests (#135, @hhugo)
  • Upgrade to Base v0.11.0 (#103, @jeremiedimino)
  • Add Travis CI script
  • Fix: build [make reason] (#97, @mbarbin)
  • Simplify Makefile due to jbuilder 1.0+beta18

Initial release.

Import some code from topkg.

  • Use of Astring, Logs, Fpath andBos instead of custom re-implementations;
  • Remove the IPC layer which is used between topkg and topkg-care;
  • Bundle everything as a single binary;
  • Assume that the package is built using dune;
  • Do not read/need a pkg/pkg.ml file.
See full changelog

Ppxlib 0.2.0

See full changelog
  • Make sure to import command line arguments registered with ocaml-migrate-parsetree (#5, @diml)
  • Fix an issue where cookies set from the command line sometimes disappeared (#6, @diml)

Ppxlib 0.1.0

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

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
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)

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
See full changelog
  • Driver: add --as-pp and --embed-errors flags.

    --embed-errors causes the driver to embed exceptions raised by rewriters as extension points in the Ast

    --as-pp is a shorthand for: --dump-ast --embed-errors

  • Expose more primitives for embedding the driver.

  • Fix bug where reset_args functions where not being called.

  • Fix "OCaml OCaml" in error messages (contributed by Adrien Guatto).

See full changelog
  • Fix findlib predicates:
    • replace omp_driver by ppx_driver
    • replace -custom_ppx by -custom_ppx,-ppx_driver
See full changelog
  • fixes some cases of comments
  • supports new cases of ppx
  • fixed cases of unstable indentation within records
  • supports local excemtions
  • fixed handling of polymorphic methods
  • uses cmdliner 1.0.0

opam-lib 1.3

The package for opam-lib version 1.3 has just been released in the official opam repository. There is no release of opam with version 1.3, but this is an intermediate version of the library that retains compatibility of the file formats with 1.2.2.

The purpose of this release is twofold:

  • provide some fixes and enhancements over opam-lib 1.2.2. For example, 1.3 has an enhanced lint function
  • be a step towards migration to opam-lib 2.0.

This version is compatible with the current stable release of opam (1.2.2), but dependencies have been updated so that you are not (e.g.) stuck on an old version of ocamlgraph.

Therefore, I encourage all maintainers of tools based on opam-lib to migrate to 1.3.

The respective APIs are available in HTML for 1.2 and 1.3.

A note on plugins: when you write opam-related tools, remember that by setting flags: plugin in their definition and installing a binary named opam-toolname, you will enable the users to install package toolname and run your tool with a single opam toolname command.

Architectural changes

If you need to migrate from 1.2 to 1.3, these tips may help:

  • there are now 6 different ocamlfind sub-libraries instead of just 4: format contains the handlers for opam types and file formats, has been split out from the core library, while state handles the state of a given opam root and switch and has been split from the client library.

  • OpamMisc is gone and moved into the better organised OpamStd, with submodules for String, List, etc.

  • OpamGlobals is gone too, and its contents have been moved to:

    • OpamConsole for the printing, logging, and shell interface handling part
    • OpamXxxConfig modules for each of the libraries for handling the global configuration variables. You should call the respective init functions, with the options you want to set, for proper initialisation of the lib options (and handling the OPAMXXX environment variables)
  • OpamPath.Repository is now OpamRepositoryPath, and part of the repository sub-library.

opam-lib 2.0 ?

The development version of the opam-lib (2.0~alpha5 as of writing) is already available on opam. The name has been changed to provide a finer granularity, so it can actually be installed concurrently -- but be careful not to confuse the ocamlfind package names (opam-lib.format for 1.3 vs opam-format for 2.0).

The provided packages are:

  • opam-file-format: now separated from the opam source tree, this has no dependencies and can be used to parse and print the raw opam syntax.
  • opam-core: the basic toolbox used by opam, which actually doesn't include the opam specific part. Includes a tiny extra stdlib, the engine for running a graph of processes in parallel, some system handling functions, etc. Depends on ocamlgraph and re only.
  • opam-format: defines opam data types and their file i/o functions. Depends just on the two above.
  • opam-solver: opam's interface with the dose3 library and external solvers.
  • opam-repository: fetching repositories and package sources from all handled remote types.
  • opam-state: handling of the opam states, at the global, repository and switch levels.
  • opam-client: the client library, providing the top-level operations (installing packages...), and CLI.
  • opam-devel: this packages the development version of the opam tool itself, for bootstrapping. You can install it safely as it doesn't install the new opam in the PATH.

The new API can be also be browsed ; please get in touch if you have trouble migrating.

This release mainly brings support for OCaml 4.04. Internal code was simplified and bugs were fixed in the meantime (cache invalidation, ast traversal, type error recovery, certain cases of completion, ppx working directory, locate, ...).

See full changelog

Oops, we went looking but didn't find the changelog for this release 🙈

Bug fix release before major version.

See full changelog
  • reintroduce lazy substitution to fix performance issue
  • add "FINDLIB_PATH" directive to .merlin (contributed by Gerd Stolpmann)
  • relax arity checks on externals (harmless, requested by Hongbo Zang)
  • handle case insensitivity of OS X (fix longstanding bug)
  • fix build under Cygwin
  • minor cleanup, portability and usability improvements in build system and editor modes
If you want to contribute to a new release announcement, check out the Contributing Guide on GitHub.