Skip to content

Releases: ocaml/opam

2.2.0~beta1

19 Jan 09:08
cb228ac
Compare
Choose a tag to compare
2.2.0~beta1 Pre-release
Pre-release

This is the first beta release of opam 2.2.0.

This beta release contains new features, enhancements, updates & fixes compared to the previous 2.2.0~alpha3 release. Please see blog post for main new features highlights and upgrade instructions.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92, PR open to upload new ones).

Changelog:

Major changes

Init

  • Check and advertise to use Git for Windows [#5718 @rjbou - fix #5617]
  • Add the --git-location and --no-git-location cli arguments for Windows [#5718 @rjbou - fix #5617]

Option

  • Add a new git-location modifiable opam option used only on Windows [#5718 @rjbou - fix #5617]

Build

  • When compiling opam on Windows with MinGW, the resulting opam binary now contains libstdc++ instead of requiring the DLL to be distributed alongside it or present in the environment [#5680 @kit-ty-kate - fix #5647]
  • Add ./configure --enable-static to compile the opam binary statically on Linux [#5680 @kit-ty-kate - fix #5647]

Env

Miscellaneous changes

Solver

  • Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD [#5769 @kit-ty-kate]

Build

Tree

  • Fix opam tree --dev [#5687 @rjbou - fix #5675]
  • Fix opam tree --no-switch: instead of emptying the current switch from its installed packages, it load a fresh virtual switch [#5687 @rjbou - fix #5675]

Switch

  • Display a more precise message when Ctrl-C'ing during an opam switch creation ("Switch left partially installed") [#5713 @rjbou - fix #5710]

Documentation

Testing

API updates

opam-client

  • OpamClient: on init and reinit add git lookup in windows checks [#5718 @rjbou]
  • OpamClient.init: add option git-location argument for git binary location configuration [#5718 @rjbou]
  • OpamTreeCommand.run: remove optional argument no_switch [@rjbou #5687]

opam-format

  • OpamFile.Config: add git-location field and its functions [#5718 @rjbou]

opam-core

  • OpamCoreConfig: add git_location field [#5718 @rjbou]
  • OpamStd.Env.cyg_env: add git location argument and labels cygbin and git_location [#5718 @rjbou]
  • OpamSystem.apply_cygpath: runs cygpath over the argument [#5723 @dra27 - function itself added in #3348]

2.2.0~alpha3

14 Nov 14:41
f36c638
Compare
Choose a tag to compare
2.2.0~alpha3 Pre-release
Pre-release

This is the third alpha release of opam 2.2.0.

This alpha release contains new features, enhancements, updates & fixes. Please see blog post for main new features highlights and upgrade instructions.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

Major changes

Environment variables path rewriting

  • When computing environment variables updates, use rewriting rules (defined in opam file, or default per variable) to split, join, quote, etc. [#5636 @rjbou - fix #5602 #4690 #2927]
  • Add x-env-path-rewrite extensions field to permit specification of rewriting rules for variables defined in setenv and build-env: no rewrite; separator and path format formulae [#5636 @rjbou - fix #5602 #4690 #2927]
  • Reinstall if x-env-path-rewrite is updated [#5636 @rjbou]
  • environment file now stores environment variable rewriting rules [#5636 @rjbou]

Sandbox

Tree

  • Allow packages with a specific version, directories or local opam files, as input [#5613 @kit-ty-kate]
  • Add handling of --recurse and --subpath for directory arguments [#5613 @kit-ty-kate]

Admin

  • Add add-extrafiles command to add, check, and update extra-files: field according files present in files/ directory [#5647 @rjbou]

Lint

Miscellaneous changes

Global CLI

  • [BUG] Fix the OPAMVERBOSE setting, levels 0 and 1 were inverted: "no" gave level 1, and "yes" gave level 0 [#5686 @smorimoto]

Install

  • [BUG] On install driven by .install file, track intermediate directories too, in order to have them suppressed at package removal [#5691 @rjbou - fix #5688]
  • [BUG] With --assume-built, resolve variables in depends filter according switch & global environment, not only depends predefined variables [#570 @rjbou - fix #5698]
  • [BUG] Handle undefined variables defaults to false in dependencies formula resolution for assume built [#5701 rjbou]

Lint

  • [BUG] Fix extra-files handling when linting packages from repositories, see #5068 [#5639 @rjbou]
  • Improve the debug log when checking extra-files [#5640 @rjbou]

Repository

Opamfile

Build

  • [BUG] Fix "make cold" on Windows when gcc is available [#5635 @kit-ty-kate - fixes #5600]
  • Fix incorrect error message when alternate C compiler is missing [#5667 @dra27 - partial fix #5661]

Internal: Windows

  • Fix sporadic crash and segfault in shell detection (seen in native containers) [#5714 @dra27]

Release

Documentation

Testing

API updates

opam-client

opam-format

  • OpamFile.Environment: add parsing-printing of rewriting rules, keeping backward compatibility [#5636 @rjbou]
  • OpamFile.OPAM: effective_part keeps x-env-path-rewrite, affects also effectively_equal [#5636 @rjbou]
  • OpamFile.OPAM: add handling of x-env-path-rewrite extensions field, that specifies rewrite rules [#5636 @rjbou]
  • OpamFilter: add expand_interpolations_in_file_full which allows setting the output file along with the input file [#5629 @rgrinberg]
  • OpamFilter: expose string_interp_regex which allows clients to identify variable interpolations in strings [#5633 @gridbugs]
  • OpamFormat.V: add path_format & separator value parser printer [#5636 @rjbou]
  • OpamFormat: add formula_items to permit definition of formulae pp not only of the type package-formula [#5636 @rjbou]
  • OpamPp.fallback: add name concatenation and printing fallback too [#5636 @rjbou]
  • OpamTypes.env_update: add a rewrite field, that contains environment variable rewriting rules (formula to resolved, or already resolved, or no rewriting) [#5636 @rjbou]
  • OpamTypes.env_update: change from tuple to a record [#5636 @rjbou]
  • OpamTypesBase: add env_update_resolved and env_update_unresolved builders [#5636 @rjbou]
  • OpamTypesBase: add env_update, env_update_resolved, and env_update_unresolved builders [#5636 @rjbou]
  • OpamTypesBase: add to_string function for path_format & separator [#5636 @rjbou]

opam-core

  • OpamStd.Config.env_level: fix level parsing, it was inverted (eg, "no" gives level 1, and "yes" level 0) [#5686 @smorimoto]
  • OpamStd.Sys.chop_exe_suffix: removes .exe from the end of a path, if present [#5714 @dra27]
  • OpamSystem.apply_cygpath_path_transform: fix cygpath call, use resolved name [#5716 @rjbou]
  • OpamSystem.get_cygpath_path_transform: add labeled argument to specify if path is a pathlist [#5636 @rjbou]
  • OpamSystem.mk_temp_dir: resolve real path with OpamSystem.real_path before returning it [#5654 @rjbou]
  • OpamSystem.resolve_command: in command resolution path, check that the file is not a directory and that it is a regular file [#5606 @rjbou - fix #5585 #5597 #5650 #5626]

2.2.0~alpha2

25 Jul 13:11
a2638a5
Compare
Choose a tag to compare
2.2.0~alpha2 Pre-release
Pre-release

This is the second alpha release of opam 2.2.0.

This alpha release contains new features, enhancements, updates & fixes. Please see blog post for main new features highlights and upgrade instructions.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

New feature

Init

  • Make opam init install Cygwin internally automatically by default instead of asking the user to install it manually [#5545 @rjbou @dra27]
  • Add --no-cygwin-setup, --cygwin-internal-install, --cygwin-local-install and --cygwin-location <path> experimental flags available only on Windows to permit non-interactive Cygwin configuration [#5545 @rjbou]

Enhancements, updates, and fixes

Var/Option

  • Error with more accurate message in case of package/self variable wrongly given as argument [#4903 @rjbou - fix #4489]
  • Handle package variable syntax in parse update regexp [#4903 @rjbou - fix #4489]

Lint

  • E29: The conflicts field's filter does not support package variables [#5535 @kit-ty-kate]

Admin

  • On linting, clean output when stdout is not tty [#5594 @rjbou]

Build

  • Run autoupdate to silence autogen warnings [#5555 @MisterDA]
  • Update bootstrap to use FlexDLL 0.43 from ocaml/flexdll [#5579 @MisterDA]
  • configure: Ensure a complementary (32bit on 64bit platforms and 64bit on 32bit platforms) C compiler is installed on Windows [#5522 @kit-ty-kate]
  • Bump version, authors [#5603 #5609 #5611 @rjbou]

Testing

Improve and extend tests

Improve test engine

Cram tests

Github Actions

Opam libraries API changes
opam-client
  • OpamInitDefault: add required_packages_for_cygwin packages tool list [#5545 @rjbou]
  • OpamClient.init: now propose to install internal Cygwin install [#5545 @rjbou]
  • OpamSolution.get_depext: do not confirm in case of internal Cygwin install [#5545 @rjbou]
  • OpamClient.init: add optional cygwin_setup argument to permit non interactive setup [#5545 @rjbou]
  • OpamCommands.init: add cygwin setup flags [#5545 @rjbou]
opam-state
  • OpamSysinteract.Cygwin: add install that performs a Cygwin install in opam internals [#5545 @rjbou @dra27]
  • OpamSysInteract.Cygwin: add is_internal [#5545 @rjbou]
  • OpamSysInteract.install: on Cygwin, upgrade automatically packages, and select local cache [#5545 @rjbou]
opam-core
  • OpamConsole.carriage_delete: no-op when not tty out [#5595 @rjbou]
  • OpamSystem.make_command: Remove the warning triggered when the command contained spaces [#5596 @rjbou - fix #5163]

2.2.0~alpha

28 Jun 18:21
d1fe3e8
Compare
Choose a tag to compare
2.2.0~alpha Pre-release
Pre-release

This is the alpha release of opam 2.2.0.

This alpha release contains new features, enhancements, updates & fixes. Please see blog post for main new features highlights and upgrade instructions.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog (possibly scripts breaking changes are prefixed with ✘):

New features

Windows Support

Opam 2.2 comes with native Windows compatibility. You can now use opam from your preferred Windows terminal! We rely on the Cygwin UNIX-like environment for Windows as a compatibility layer, but it is possible for packages to generate native executables.

For more details, see blog post entry.

Recursive Pin

Recursive pinning allows to have opam lookup for opam files into subdirectories. It provides 2 new options --recursive and --subpath <path> that permit, respectively, to lookup recursively in directories, and to focus on a given directory. They can be combined.

For more details, see blog post entry.

Tree

opam tree show packages and their dependencies on a tree view. It can also display a reverse-dependency tree (through opam why, which is an alias to opam tree --rev-deps`), which can be useful to examine how dependency versions get constrained.

For more details, see blog post entry.

  • Add tree subcommand to display a dependency tree of currently installed packages [#5171 @cannorin - fix #3775]
  • Add why subcommand to examine how the versions of currently installed packages get constrained (alias to tree --rev-deps) [#5171 @cannorin - fix #3775]
  • tree subcommand now supports --json option [#5303 @cannorin - fix #5298]

Recommended development tools

There is now a way for a project maintainer to share their project developments tools: the with-dev-setup dependency flag. It is used in the same way as with-doc and with-test.

For more details, see blog post entry.

  • Add --dev-setup option to install recommended development tools from opam file (as with-test/with-doc), and its environment variable OPAMWITHDEVSETUP, and for post-messages [#5016 #5160 #5214 @rjbou - fix #4959]
  • Opam file: Add with-dev-setup variable for recommended tools [#5016 #5214 @rjbou]

Software Heritage binding

Opam now integrates a fallback to Software Heritage archive retrieval, based on SWHID. If an SWHID url is present in an opam file, the fallback can be activated.

For more details, see blog post entry.

Formula (experimental)

It is now possible to leverage the full expressivity of package dependency formulas from the command-line during switch creation and package operations.

  • Add --formula option to specify a formula to install [#4975 @AltGr]

New options

Pin

  • New option opam pin --current to fix a package to its current state (disabling pending reinstallations or removals from the repository) [#4973 @AltGr - fix #4970]
  • Add opam pin remove --all to remove all the pinned packages from a switch [#5308 @kit-ty-kate]
  • Allow opam pin remove to take a package (<pkg>.<version>) as argument [#5325 @kit-ty-kate]

Exec

Source

Clean

  • Add --untracked option to remove untracked files interactively [#4915 @rjbou - fix #4831] {2.1.3}

Switch

  • Add support for opam switch - that goes to previous selected global switch [#4910 @kit-ty-kate - fix #4688]
  • ✘ Change --base into --invariant, column name and the content is invariant formula installed dependencies [#5208 @rjbou]

Admin

  • Add opam admin add-constraint <cst> --packages to select a subset of packages to apply constraints [#5386 @rjbou - fix #3077]

Repository

  • Add OPAMREPOSITORYTARRING environment variable to enable repository tarring optimisation, it is disabled by default because it is an optimisation only on some os/configurations [#5015 @rjbou]

Enhancements, updates, and fixes

Initialisation

opam init

  • Run the sandbox check in the temporary directory [#4787 @dra27 - fix #4783] {2.1.1}
  • Use .opam from %HOME% or %USERPROFILE% on Windows, only if found; otherwise use %LOCALAPPDATA%\opam as root. [#5212 @dra27]
  • Display actual location of OPAMROOT in opam init if --root or OPAMROOT have been set [#5212 @dra27 - fix #4992]
  • Surround and add a comment describing the role of the lines added to the ~/.profile or equivalent [#5456 @kit-ty-kate]
  • Use menu for init setup [#5057 @AltGr #5217 @dra27]

Fixes

  • Fix opam init and opam init --reinit when the jobs variable has been set in the opamrc or the current config. [#5056 @rjbou] {2.1.3}

Variable & option configuration

  • Handle empty environment variable updates - missed cherry-pick from 2.0 [#4840 @dra27] {2.1.1}
  • When a field is defined in switch and global scope, try to determine the scope also by checking switch selection [#5027 @rjbou] {2.1.3}
  • Resolve and use global config and environment variable before polling system informations (os, os-family, etc.) [#4892 @rjbou - fix #4883]
  • Catch an package not found error and print skipping message [#5280 @rjbou - fix #5279]
  • Make archive-mirrors modifiable (extendable) via opam config [#5321 @hannesm @rjbou - fix #5316]
  • Open the release files when determining the distribution [#5568 @Leonidas-from-XIV

Fixes

  • Fix OPAMCURL and OPAMFETCH value setting [#5111 @rjbou - fix #5108]
  • Don't error when displaying if switch is not set [#5027 @rjbou - fix #5025] {2.1.3}
  • Try to set a variable with option --switch <sw> fails instead of writing a wrong switch-config file [#5027 @rjbou] {2.1.3}
  • Fix typo in error message for opam var [#4786 @kit-ty-kate - fix #4785] {2.1.1}

Config report

Fixes

CLI

  • Add CLI 2.2 handling [#4853 @rjbou] {2.1.1}
  • --no-depexts is the default in CLI 2.0 mode [#4908 @dra27] {2.1.2}
  • Error report display: print action name [#5045 @AltGr]
  • Add experimental flags handling [#5099 @rjbou]
  • Put back support for switch creation with packages argument and --packages option with CLI 2.0, and a specific error message for CLI 2.1 [#4853 @rjbou - fix #4843] {2.1.1}

Fixes

  • Fix default CLI handling for simple flags [#5099 @rjbou]

Client

  • Check whether the repository might need updating more often [#4935 @kit-ty-kate]
  • ✘ It is no longer possible to process actions on packages that depend on a package that was removed upstream [#4969 @AltGr]
  • ✘ PEF output: change base field into invariant-pkg [#5208 @rjbou]

Fixes

Download optimisation

  • Factorise source-archive fetching. If several packages relies on the same archive, it is downloaded once then copied to several source directories [#4893 @rjbou - fix #3741]

Install

Fixes

UI

  • Add subpath on actions listing urls [#4876 @rjbou]
  • Make the status of pinned packages more explicit during installation [#4987 @kit-ty-kate - fix #4925]
  • Refresh the actions list output, now sorted by action/package rather than dependency [#5045 @kit-ty-kate @AltGr - fix #5041]
  • Put back the actions summary as part of confirmation question [#5045 @AltGr]
  • Fix display of pinned packages in action list [#5079 @rjbou]
  • Show the reason for installing packages when using opam re...
Read more

2.1.5

24 May 16:17
93f47ec
Compare
Choose a tag to compare

This is the release of opam 2.1.5.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Please see our blog post for a highlight on the major changes and upgrade instructions.

Changelog:

  • [BUG] Variables are now expanded in build-env (as for setenv) [#5352 @dra27]
  • Correctly handle empty environment variable additions [#5350 @dra27]
  • Skip empty environment variable additions [#5350 @dra27]
  • [BUG] Fix passing archive-mirrors field from init config file to config [#5315 @hannesm]
  • git, hg: Use the full SHA1 revision instead of just the 8 first characters [#5342 @reynir]
  • [BUG] Fix opam installing packages without checking their checksum when the local cache is corrupted in some case [#5538 @kit-ty-kate]

EDIT 31/05/2023: opam-full-2.1.5.tar.gz was rebuilt, removing the mistakenly included .gît directory, reducing archive size.

2.1.4

14 Dec 18:00
3dd624a
Compare
Choose a tag to compare

This is the release of opam 2.1.4.

This minor release contains some fixes, please see blog post for upgrade instructions.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

2.1.3

12 Aug 16:31
c3a6a09
Compare
Choose a tag to compare

This is the release of opam 2.1.3.

This minor release contains some fixes, please see blog post for upgrade instructions.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

Fixes

Init

  • Fix opam init and opam init --reinit when the jobs variable has been set in the opamrc or the current config. [#5056 @rjbou]

Switch

  • 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]

Pin

  • 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]

List

  • 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]

Show

  • 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]
  • 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]

Var/Option

  • opam var no longer fails if no switch is set [#5027 @rjbou - fix #5025]
  • 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]

External dependencies

Sandbox

  • Clearer error message if a command doesn't exist [#4971 @kit-ty-kat - fix #4112]

State

  • Actually allow multiple state caches to co-exist [#4934 @dra27 - actually fixes #4554]

Client

Internal

  • Remove windows double printing on commands and their output [#4940 @rjbou]

Admin

  • Fix an internal error on repository upgrade from OPAM 1.2 [#4965 @AltGr]

Misc

Build

Documentation

Tests

API updates

opam-client

  • OpamClient: fix update_with_init_config, when jobs was set in init_config, it dropped rest of config update [#5056 @rjbou]
  • OpamConfigCommand: set_opt_switch, set_var_switch, options_list_switch, and var_list_switch now raise configuration error exception (50) if no switch is found [#5027 @rjbou]
  • OpamClient.Pin.post_pin_action: no more updates depexts information, moved to OpamSwitchState.update_pin [#5047 @rjbou]

opam-repository

  • OpamVCS.VCS: add a clean function to the interface clearing all the uncommited files [#4879 @rjbou]
  • OpamVCS.pull_url: clean repository before fetching [#4879 @rjbou]

opam-state

  • OpamSwitchState.update_pin: updates depexts state informations (sys_packages, avalaible_packages) [#5047 @rjbou]

opam-core

  • OpamCompat: add Lazy module and Lazy.map function [#5176 @dra27]

2.1.2

08 Dec 18:34
1388025
Compare
Choose a tag to compare

This is the release of opam 2.1.2.

Binaries and full archive are signed by the opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

  • Fallback on dnf if yum does not exist on RHEL-based systems [#4825 @kit-ty-kate]
  • Use --no-depexts in CLI 2.0 mode [#4908 @dra27]
  • bootstrap: update ocaml version (fixes the compilation of opam with mingw) [#4927 @kit-ty-kate]

2.1.1

05 Nov 14:44
838b017
Compare
Choose a tag to compare

This is the release of opam 2.1.1.

Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

Bug fixes

Switch

  • Put back support for switch creation with packages argument and --packages option with cli 2.0, and a specific error message for cli 2.1 [#4853 @rjbou - fix #4843]
  • Fix set-invariant: default repos were loaded instead of switch repos [#4866 @rjbou]

External dependencies

  • Homebrew: Add support for casks and full-names [#4801 @kit-ty-kate]
  • Archlinux: handle virtual package detection [#4833 @rjbou - partial fix #4759]
  • Disable the detection of available packages on RHEL-based distributions. This fixes an issue on RHEL-based distributions where yum list used to detect available and installed packages would wait for user input without showing any output and/or fail in some cases [#4791 @kit-ty-kate - fixes #4790]

Sandbox

System

  • Fix reverting environment additions to PATH-like variables when several dirs added at once [#4861 @dra27]
  • Ensure setenv can use package variables defined during the build [#4841 @dra27]
  • OpamSystem: avoid calling Unix.environment at top level [#4789 @hannesm] [#4802 @kit-ty-kate - fix #4801]
  • Handle empty environment variable updates - missed cherry-pick from 2.0 [#4840 @dra27]

opam build

  • Fix the cold target in presence of an older OCaml compiler version on macOS
  • Fix vendored build on mingw-w64 with g++ 11.2 [#4835 @dra27]
  • Fix dose3 download url since gforge is gone [#4870 @avsm]

Misc

Many thanks to @AltGr and @rjbou (OCamlPro), @dra27 and @kit-ty-kate (OCaml Labs), @hannesm, @avsm and everyone who's helped with issue reports, comments and feedback.

2.0.10

05 Nov 11:56
7d4a0f2
Compare
Choose a tag to compare

This is the release of opam 2.0.10.

Binaries and full archive are signed by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92).

Changelog:

Bug fixes

  • Fix reverting environment additions to PATH-like variables when several dirs added at once [#4861 @dra27]
  • Ensure setenv can use package variables defined during the build [#4841 @dra27]