opam 2.1.3

Feedback on this post is welcomed on Discuss!

We are pleased to announce the minor release of opam 2.1.3.

This opam release consists of backported fixes:

  • Fix opam init and opam init --reinit when the jobs variable has been set in the opamrc or the current config. (#5056)
  • opam var no longer fails if no switch is set (#5025)
  • Setting a variable with option --switch <sw> fails instead of writing an invalid switch-config file (#5027)
  • Handle external dependencies when updating switch state pin status (all pins), instead as a post pin action (only when called with opam pin (#5046)
  • Remove windows double printing on commands and their output (#4940)
  • Stop Zypper from upgrading packages on updates on OpenSUSE (#4978)
  • Clearer error message if a command doesn't exist (#4112)
  • Actually allow multiple state caches to co-exist (#4554)
  • Fix some empty conflict explanations (#4373)
  • Fix an internal error on admin repository upgrade from OPAM 1.2 (#4965)

and improvements:

  • When inferring a 2.1+ switch invariant from 2.0 base packages, don't filter out pinned packages as that causes very wide invariants for pinned compiler packages (#4501)
  • Some optimisations to opam list --installable queries combined with other filters (#4311)
  • Improve performance of some opam list combinations (e.g. --available, --installable) (#4999)
  • Improve performance of opam list --conflicts-with when combined with other filters (#4999)
  • Improve performance of opam show by as much as 300% when the package to show is given explicitly or is unique (#4997)(#4172)
  • When a field is defined in switch and global scope, try to determine the scope also by checking switch selection (#5027)

You can also find API changes in the release note.


Opam installation instructions (unchanged):

  1. From binaries: run

    bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh) --version 2.1.3"
    

    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 or to update you sandbox script.

  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 or to update your sandbox script)

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

We hope you enjoy this new minor version, and remain open to bug reports and suggestions.

See full changelog
  • [BUG] Fix opam init and opam init --reinit when the jobs variable has been set in the opamrc or the current config. [#5056 @rjbou]
  • When inferring a 2.1+ switch invariant from 2.0 base packages, don't filter out pinned packages as that causes very wide invariants for pinned compiler packages [#5176 @dra27 - fix #4501]
  • [BUG] Fix an internal error on repository upgrade from OPAM 1.2 [#4965 @AltGr]
  • Some optimisations to opam list --installable queries combined with other filters [#4882 @AltGr - fix #4311]
  • Improve performance of some opam list combinations (e.g. --available, --installable) [#4999 @kit-ty-kate]
  • Improve performance of opam list --conflicts-with when combined with other filters [#4999 @kit-ty-kate]
  • Improve performance of opam show by as much as 300% when the package to show is given explicitly or is unique [#4998 @kit-ty-kate - fix #4997 and partially #4172]
  • [BUG] opam var no longer fails if no switch is set [#5027 @rjbou - fix #5025]
  • [BUG] Setting a variable with option --switch <sw> fails instead of writing an invalid switch-config file [#5027 @rjbou]
  • When a field is defined in switch and global scope, try to determine the scope also by checking switch selection [#5027 @rjbou]
  • [BUG] Handle external dependencies when updating switch state pin status (all pins), instead as a post pin action (only when called with opam pin [#5047 @rjbou - fix #5046]
  • [BUG] When reinstalling a package that has a dirty source, if uncommitted changes are the same than the ones stored in opam's cache, opam consider that it is up to date and nothing is updated [4879 @rjbou]
  • Stop Zypper from upgrading packages on updates on OpenSUSE [#4978 @kit-ty-kate]
  • Clearer error message if a command doesn't exist [#4971 @kit-ty-kat - fix #4112]
  • [BUG] Remove windows double printing on commands and their output [#4940 @rjbou]
  • Actually allow multiple state caches to co-exist [#4934 @dra27 - actually fixes #4554]
  • Update cold compiler to 4.13 to avoid issues with glibc 2.34 on Unix [#5017 @dra27]
  • Bump opam-file-format to 2.1.4 [#5117 @kit-ty-kate - fix #5116]
  • Fix some empty conflict explanations [#4982 @kit-ty-kate - partially fix #4373]
  • Port some tests from master [#4841 #4974 #4861 #4915 #4979 #5004 #5006 #5015 #5024 #5025 #5031 #5131 #5176 @AltGr @dra27 @kit-ty-kate]
  • Update test engine to allow for additional tests [#4913 #4966 #4979 #5004 #5009 #5024 #5097 @AltGr @kit-ty-kate @rjbou]
  • Update for git protocol deprecation on GitHub [#5097 @rjbou]
  • When building opam, do not fail if curl/wget is missing [#5223 #5233 @kit-ty-kate]