OCaml Changelog

RSS

Read the latest releases and updates from the OCaml ecosystem.

See full changelog
  • Store config files in ~/.config/dune/ instead of ~/.dune to match what dune is doing (#27, @samoht)
  • Support opam 1.2.2 when linting (#29, @samoht)
  • Use -p <pkg> instead of -n <pkg> to follow dune convention (#30, #42, @samoht)
  • Default to nano if the EDITOR environment variable is not set. (#32, @avsm)
  • Fix location of documentation when odoc creates an _html subdirectory (#34, @samoht)
  • Remove the browse command (#36, @samoht)
  • Re-add the publish delegatation mechanism to allow non-GitHub users to publish packages (see dune-release help delegate) (#37, @samoht)
  • Fix dropping of v at the beginning of version numbers in dune-release opam (#40, @let-def)
  • Add basic token validation (#40, @let-def)

We are pleased to announce the release of a third release candidate for opam 2.0.0. This one is expected to be the last before 2.0.0 comes out.

Changes since the 2.0.0~rc2 are, as expected, mostly fixes. We deemed it useful, however, to bring in the following:

  • a new command opam switch link that allows to select a switch to be used in a given directory (particularly convenient if you use the shell hook for automatic opam environment update)
  • a new option opam install --assume-built, that allows to install a package using its normal opam procedure, but for a source repository that has been built by hand. This fills a gap that remained in the local development workflows.

The preview of the opam 2 webpages can be browsed at https://opam.ocaml.org/2.0-preview/ (please report issues here).

Installation instructions (unchanged):

  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. In this case, don't forget to run opam init --reinit -ni to enable sandboxing if you had version 2.0.0~rc manually installed.

  2. From source, using opam:

    opam update; opam install opam-devel
    

    (then copy the opam binary to your PATH as explained, and don't forget to run opam init --reinit -ni to enable sandboxing if you had version 2.0.0~rc manually installed)

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

Thanks a lot for testing out this new RC and reporting any issues you may find.

Thanks to the people who contributed to this release: ELLIOTTCABLE, Louis Roché, Rudi Grinberg, Yotam Barnoy, Leo White, Daniel Below, Andreas Hauptmann, Christophe Troestler, Bobby Priambodo, Milo Davis.

See full changelog
  • backend

    • new "polarity search" feature: provides a Hoogle-like type-based search for libraries that are in merlin's scope. See https://github.com/ocaml/merlin/blob/master/doc/features.md#polarity-search
    • new "open refactoring" feature: helps cleaning the code in the scope of an open statement. See https://github.com/ocaml/merlin/blob/master/doc/features.md#open-refactoring
    • spell-checking: a simple spell-checker has been added to suggest corrections when nothing can be directly completed.
    • type-driven record completion: merlin will now make use of type information from the context for narrowing and refining completion candidates.
    • support for #require directive in a source file, and will treat it as a package use
    • Add support for OCaml 4.07
    • locate: various minor bugfixes, as well as the following general improvements:
      • improved context detection
      • better tracking of namespaces
      • fixed support for local bindings
      • fixed support of disambiguated record fields and variant constructors
      • improved support for functors: merlin will now jump through functor application to the functor definitions and in some cases go back to the argument that was given (if it is simply reexported).
    • backport fixes of OCaml 4.06.1 to the 4.06 backend
    • various minor bugfixes
  • editor modes

    • emacs
      • proper handling of multibyte strings (by @Chris00)
      • bind "q" to close type buffer (by @MiloDavis)
      • make goto-point encoding independent
      • add reason-mode to the guessed favorite mode list (by @Khady)
      • sped up some tight loops (by @rgrinberg)
      • add support for x-ref backend (by @rgrinberg)
    • vim
      • fix support for Neomake (by @bobbypriambodo and @statianzo)
      • fix encoding issues in filepaths (by @Thelyria)
      • fix handling of enclosing-type cache (by @ELLIOTTCABLE)
      • add to prevent flashing when highlighting an enclosing (by @bluddy)
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 🙈

We are pleased to announce the release of a second release candidate for opam 2.0.0.

This new version brings us very close to a final 2.0.0 release, and in addition to many fixes, features big performance enhancements over the RC1.

Among the new features, we have squeezed in full sandboxing of package commands for both Linux and macOS, to protect our users from any misbehaving scripts.

NOTE: if upgrading manually from 2.0.0~rc, you need to run opam init --reinit -ni to enable sandboxing.

The new release candidate also offers the possibility to setup a hook in your shell, so that you won't need to run eval $(opam env) anymore. This is specially useful in combination with local switches, because with it enabled, you are guaranteed that running make from a project directory containing a local switch will use it.

The documentation has also been updated, and a preview of the opam 2 webpages can be browsed at https://opam.ocaml.org/2.0-preview/ (please report issues here). This provides the list of packages available for opam 2 (the 2.0 branch of opam-repository), including the compiler packages.

Installation instructions:

  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. In this case, don't forget to run opam init --reinit -ni to enable sandboxing if you had version 2.0.0~rc manually installed.

  2. From source, using opam:

    opam update; opam install opam-devel
    

    (then copy the opam binary to your PATH as explained, and don't forget to run opam init --reinit -ni to enable sandboxing if you had version 2.0.0~rc manually installed)

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

Thanks a lot for testing out this new RC and reporting any issues you may find.

NOTE: this article is cross-posted on opam.ocaml.org and ocamlpro.com. Please head to the latter for the comments!

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
See full changelog
  • Now based on opam 2 libs and intended for publications in the 2.0 format (inclusive opam files, etc.)
  • Bumped version number to avoid confusion with opam versions
  • Removed the two-step operation ("prepare" and "publish"). A single invocation does all
  • Removed looking up current opam pinnings and repositories for metadata, which was too complex and counter-intuitive. Now opam files are looked up only in the specified directories or archives
  • Multiple publications without added complexity
  • Simplified command-line: URLs, directories, opam files, package names can be specified directly on the command-line, and repeated for multiple publications
  • Allow providing the auth token directly

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

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 🙈

If you want to contribute to a new release announcement, check out the Contributing Guide on GitHub.