Skip to content

2.2.0~alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@rjbou rjbou released this 28 Jun 18:21
· 448 commits to master since this release
d1fe3e8

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 reinstall [#5229 @kit-ty-kate]

Remove

Fixes

  • Fix message when running opam remove on an unavailable package [#4995 @AltGr - fix #4890]
  • Fix removal of root packages with -a and an optional dependency explicitly specified [#4995 @AltGr - fix #4727]

Switch

  • On loading, check for executable external files if they are in PATH, and warn if not the case [#4932 @rjbou - fix #4923]
  • 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] {2.1.3}
  • When setting invariant, really install invariant formula if not installed in switch [#5188 @rjbou]
  • When setting invariant, update switch state to compute invariant packages [#5208 @rjbou]
  • On import, check that installed pinned packages changed, reinstall if so [#5181 @rjbou - fix #5173]
  • Update compiler / base packages handling: always updated, the field contains installed packages resolving invariant formula [#5208 @rjbou]
  • Fill empty switch synopsis with invariant formula instead of compiler package name [#5208 @rjbou]

Fixes

  • Ensure setenv can use package variables defined during the build [#4841 @dra27] {2.1.1}
  • Fix set-invariant: default repos were loaded instead of switch repos [#4869 @rjbou] {2.1.1}
  • Enforce extra-source to have a checksum when using "opam switch export --freeze" [#5418 @kit-ty-kate]

Pin

Fixes

  • Fix using --working-dir with non pinned packages: it was not downloading sources as they were remove from package that need sources [#5082 @rjbou - fix #5060]
  • Fix windows path for subpath, by introducing their own type in OpamFilename [#4876 @rjbou]
  • Fix recpin of locked pins when there is no change in lock file [#5079 @rjbou - fix #4313]
  • Fix opam install ./file.opam lock pinning [#5148 @rjbou - fix #4313]
  • Fix origin opam file retrieval when opam originate from locked file [#5079 @rjbou - fix #4936]
  • 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] {2.1.3}
  • 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] {2.1.3}

List

Updates

  • Some optimisations to 'opam list --installable' queries combined with other filters [#4882 @AltGr - fix #4311] {2.1.3}
  • Improve performance of some opam list combination (e.g. --available --installable) [#4999 @kit-ty-kate] {2.1.3}
  • Improve performance of opam list --conflicts-with when combined with other filters [#4999 @kit-ty-kate] {2.1.3}
  • Improve performance for recursive --required-by and depends-on [#5337 @rjbou]
  • Colorise as unavailable (magenta) packages that are specified in the invariant formula and that do not verify it (previous was non installed compiler package) [#5208 @rjbou]

Fixes

  • Fix coinstallability filter corner case [#5024 @AltGr] {2.1.3}

Show

New field

Updates

  • Make opam show --list-files <pkg> fail with not found when <pkg> is not installed [#4956 @kit-ty-kate - fix #4930]
  • Improve performance of opam show by 300% when the package to show is given explicitly or unique [#4998 @kit-ty-kate - fix #4997 and partially #4172] {2.1.3}

Source

Fixes

Update / Upgrade

Fixes

  • If a package is pinned from a locked file, it is automatically updated/upgraded accordingly a lock file (same extension) [#5080 @rjbou]

UI

  • More clear message for pinned package update that have local changes, with no working dir given, or no arguments specified [#5300 @rjbou - fix #5294]

Lint

New lint

Updates

  • Warning 47: remove the mention of the opam 1.2 descr file in the warning message [#5069 @rjbou - fix #4989]
  • Warning 56: detection removed, since OPAM_LAST_ENV allows reliable reverting [#5417 @dra27]
  • Error 57: (capital on synopsis) not trigger Warning 47 (empty descr) [#5070 @rjbou]
  • Error 57: Enforce synopsis to always be there, restoring behaviour from opam 2.1 [#5442 @kit-ty-kate]
  • Update repository package filename display [#5068 @rjbou]
  • Warning 62: use the spdx_licenses library to check for valid licenses. This allows to use compound expressions such as "MIT AND (GPL-2.0-only OR LGPL-2.0-only)", as well as user defined licenses e.g. "LicenseRef-my-custom-license" [#4768 @kit-ty-kate - fix #4598] [#5571 @3Rafal - fix #5570]

Fixes

  • Fix linting packages from repository with tarred repositories, the file in temporary repository was no more available when lint is done [#5068 @rjbou]
  • Error 67: check checksums only for VCS urls [#4960 @rjbou]

Repository

Security fix

  • [SECURITY] Fix opam installing packages without checking their checksum when the local cache is corrupted in some cases [#5538 @kit-ty-kate] {2.1.5}

Updates

  • When several checksums are specified, instead of adding in the cache only the archive by first checksum, name by best one and link others to this archive [#4696 @rjbou]
  • Set the priority of user-set archive-mirrors higher than the repositories'. This allows opam-repository to use the default opam.ocaml.org cache and be more resilient to changed/force-pushed or unavailable archives. [#4830 @kit-ty-kate - fix #4411]
  • Repository tarring "optimisation" no more needed, removed in favor of a plain directory. It still can be used with environment variable OPAMREPOSITORYTARRING. [#5015 @kit-ty-kate @rjbou @AltGr - fix #4586] {2.1.3}
    • Fix loading a plain repository from a tarred one [#5109 @rjbou]
  • Avoid reloading repository contents when the repo has no changes [#5043 @Armael]
  • Avoid rewriting cache is nothing changed [#5146 @rjbou]
  • On setting url fetch failure (sync or file error), revert url change and rollback to old one [#4967 @rjbou - fix #4780 #4779]
  • Update opam repository man doc regarding removal of the last repository in a switch [#4435 - fix #4381]

UI

  • Don't display global message when this-switch is given [#4899 @rjbou - fix #4889]

Lock

Update

  • Remove url section from lock file, it is ignored on pinning [#5465 @rjbou]

Fix

  • Fix lock generation of multiple interdependent packages [#4993 @AltGr]

External dependencies

General

Fix

  • When checking again, more accurate check of missing packages (available and not found) [#5157 @rjbou]

System-specific

  • Better recognize depexts on Gentoo, NetBSD, OpenBSD [#5065 @mndrix]
  • Set DEBIAN_FRONTEND=noninteractive for unsafe-yes confirmation level [#4735 @dra27 - partial fix #4731]
  • Homebrew: Add support for casks and full-names [#4801 @kit-ty-kate] {2.1.1}
  • 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 - fix #4790] {2.1.1}
  • Fallback on dnf if yum does not exist on RHEL-based systems [#4825 @kit-ty-kate] {2.1.2}
  • Archlinux: handle virtual package detection [#4831 @rjbou - partial fix #4759]
  • Stop zypper from upgrading packages on updates on OpenSUSE [#4978 @kit-ty-kate] {2.1.3}

Fix

  • Fix depext alpine tagged repositories handling [#4763 @rjbou] [2.1.0~rc2 #4758]

UI

  • Improve the error message when neither MacPorts or Homebrew could be detected on macOS [#5240 @kit-ty-kate]
  • Print depexts together with action list on --show [#5236 @AltGr]
  • Don't display system package manager helper if packages are not found [#5157 @rjbou]
  • Increase verbose logging of command to 4 [#5151 @rjbou]
  • Refactored depext-related questions, with a flat menu instead of nested y/n questions [#5053 @AltGr - fix #5026]
    • Fix removal of interactive special characters is output is not tty [#5155 @rjbou]
    • Fix behaviour of menu and depexts in non-interactive environments [#5295 @AltGr]
    • Reword message for the ignore path to avoid ambiguity [#5499 @AltGr]

Testing

  • Introduce dummy-success & dummy-failure os-family to make testing depexts behaviour easier [#5268 @kit-ty-kate]
    • Add specification of installed/available packages: dummy-<success|failure>[:<*|0|pkgslist>:*|0|pkgslist>]" [#5453 @rjbou @dra27]

Shell

Updates

Fix

Admin

  • opam admin cache now ignores all already present cache files. Option --check-all restores the previous behaviour of validating all checksums.

Fixes

Sandbox

  • Sync the behaviour of the macOS sandbox script with Linux's: /tmp is now ready-only [#4719 @kit-ty-kate]
  • Always mount every directories under / on Linux [#4795 @kit-ty-kate]
  • Get rid of OPAM_USER_PATH_RO (never used on macOS and no longer needed on Linux) [#4795 @kit-ty-kate]
  • Resolve symlink for ccache directory [#5267 @rjbou - fix #5194]
  • Enforce the macOS sandbox script to use /bin/bash instead of /usr/bin/env bash for a more consistent experience [#5451 @kit-ty-kate]

UI

Opamfile

  • Add x-locked extension fields for overlay internal use, it stores if the files originate from a locked file, if so its extension [#5080 @rjbou]
  • Set depext-bypass parsing with depth 1, no needed bracket if single package [#5154 @rjbou]

Fixes

  • Fix substring errors in `to_string_with_preserved_format [#4941 @rjbou - fix #4936]
  • Variables are now expanded in build-env (as for setenv) [#5352 @dra27] {2.1.5}

Solver

  • Add builtin support for the 'deprecated' flag. Any packages flagged with deprecated would be avoided by the solver unless there is no other choice (e.g. some user wants to install package a which depends on b which is deprecated) If it is installed, show up a note after installation notifying the user that the package is deprecated. [#4523 @kit-ty-kate]
  • Make sure that --best-effort only installs root package versions that where requested [#4796 #5261 @LasseBlaauwbroek]
  • Ask users to report errors when no explanations are given to them [#4981 @kit-ty-kate]
  • Fix and improve the Z3 solver backend [#4880 @AltGr]
  • Refactored, fixed, improved and optimised the z3 solver backend [#4878 @AltGr]
  • Add an explanation for "no longer available" packages [#4969 @AltGr]
  • Orphan packages are now handled at the solver level instead of a pre-processing phase, better ensuring consistency [#4969 @AltGr #5182 @rjbou]
  • Make the 0install solver non-optional [#4909 @kit-ty-kate]
  • Optimised reverse dependencies calculation [#5005 @AltGr]
  • Enable CUDF preprocessing for (co)insallability calculation, resulting in a x20 speedup [#5024 @AltGr]
  • Log the time dose3's check_request takes [#5407 @kit-ty-kate]

Fixes

  • On CUDF strong and weak dependencies computation, some weak dependencies were wrongly kept, from #4627 [#5338 @rjbou @AltGr]
  • Fix "opam list -s --coinstallable-with pkg.1 pkg.2" listing pkg.2 as coinstallable with pkg.1 [#5414 @kit-ty-kate]

Internal enhancements

State

  • Repository state: stop scanning directory once opam file is found [#4847 @rgrinberg]
  • Fix reverting environment additions to PATH-like variables when several dirs added at once [#4861 @dra27] {2.1.1} {2.0.10}
  • Actually allow multiple state caches to co-exist [#4934 @dra27 - fix #4554 properly this time] {2.1.3}
  • Don’t rebuild packages when updating dependencies or availability, unless the current state needs to be changed [#5118 @kit-ty-kate - fix #4647]
  • Rebuild packages when removing or adding the "plugin" flag [#5118 @kit-ty-kate]
  • Do not rebuild packages when an extra-source's url changes but not its checksum [#5258 @kit-ty-kate]
  • Correctly handle empty environment variable additions [#5350 @dra27] {2.1.5}
  • Skip empty environment variable additions [#5350 @dra27] {2.1.5}

Config

  • Add sys-pkg-manager-cmd field to store specific system package manager command paths [#5433 @rjbou]
  • Regenerate the environment file when a local switch is moved [#5476 @dra27 - fix #3411]
  • Regenerate the environment file in opam exec [#5476 @dra27]
  • Regenerate the environment file when a local switch is moved [#5417 @dra27 - fix #3411]
  • Regenerate the environment file in opam exec [#5417 @dra27]
  • Store the exact environment in OPAM_LAST_ENV [#5417 @dra27 - fix #3411]

VCS

  • git, hg: Use the full SHA1 revision instead of just the 8 first characters [#5342 @reynir] {2.1.5}
  • git: differentiate non initialised repo and branch not found errors [#5326 @rjbou - fix #5324]
  • Pass --depth=1 to git-fetch in the Git repo backend [#4442 @dra27]
  • git: disable colored output [#4884 @rjbou]
  • Use 4.08's unnamed functor arguments to silence warning 67 [#4775 @dra27]
  • Check if a source is up to date with subpath [#4876 @rjbou]

Format upgrade

  • Reorganise intermediate roots that need an upgrade handling (for 2.1, prone to generalisation) [#4926 @rjbou]
  • Reset the "jobs" config variable when upgrading from opam 2.0 [#5284 @kit-ty-kate #5305 @rjbou]

Fix

  • Fix root format upgrade when only an inner file format is upgraded : new mechanism does the usual on-the-fly upgrade and keeps the information of needed inner upgrade or no, to perform them when a write lock is required [#5305 @rjbou]

Windows portability

  • Support MSYS2: treat MSYS2 and Cygwin as equivalent [#4813 @jonahbeckford]
  • Process control: close stdin by default for Windows subprocesses and on all platforms for the download command [#4615 @dra27]
  • OpamCudf: provide machine-readable information on conflicts caused by cycles [#4039 @gasche]
  • Remove memoization from best_effort () to allow for multiple different settings during the same session (useful for library users) [#4805 @LasseBlaauwbroek]
  • Permissions: chmod+unlink before copy [#4827 @jonahbeckford @dra27]
  • Support MSYS2: two-phase rsync on MSYS2 to allow MSYS2's behavior of copying rather than symlinking [#4817 @jonahbeckford]
  • Environment: translate PATH from Windows to Unix during opam env. [#4844 @jonahbeckford]
  • Correct invocation of Cygwin binaries when Cygwin bin directory is first in PATH [#5293 @dra27]
  • Always open files with O_SHARE_DELETE, which eliminates unnecessary "access denied" errors in various situations on Windows. [#5435 @dra27]
  • Use OCaml code to copy/move/remove directories instead of unix commands [#4823 @kit-ty-kate - fix #1073]
  • Update Windows-on-Windows detection for ARM [#5541 @dra27]
  • Overhaul parent process detection [#5541 @dra27]
  • Tweak UTF-8 support for Windows Terminal [#5541 @dra27]
  • Handle Windows specific environment variables [#5541 @dra27]

Fixes

Misc

  • Add license and lowerbounds to opam files [#4714 @kit-ty-kate]
  • Bump version to 2.2.0alphadev [#4725 @dra27]
  • Upgrade root version to 2.2~alpha [#4926 @rjbou]
  • Add specific comparison function on several module (that includes OpamStd.ABSTRACT) [#4918 @rjbou]
  • Homogeneise is_archive tar & zip: if file exists check magic number, otherwise check extension [#4964 @rjbou]
  • Add some debug log to OpamCudf.extract_explanations to help debug #4373 [#4981 @kit-ty-kate]
  • Make SHA computation faster by using ocaml-sha [#5042 @kit-ty-kate]
  • Overhaul Windows C stubs and update for Unicode [#5190 @dra27]
  • Unify constructors for powershell hosts [#5203 @dra27]
  • Use grep -F instead of fgrep, as the latter is deprecated [#5309 @MisterDA]
  • Ensure the cwd is restored when launching a process fails [#5441 @dra27]
  • Move the .ocamlinit script out of the root directory [#5526 @kit-ty-kate]
  • Do not show --yes and --no as special global options when using cmdliner >= 1.1 [#5269 @kit-ty-kate]
  • Make the plugin lookup faster when mistyping a subcommand [#5297 @kit-ty-kate]

Fixes

  • Remove windows double printing on commands and their output [#4940 @rjbou] {2.1.3}
  • Fix display of command when parallelised [#5091 @rjbou]
  • Display correct exception backtrace on uncaught exception on Windows [#5216 @dra27]
  • Fix behaviour on closed stdout/stderr [#4901 @AltGr - fix #4216]
  • Fix spaces in root and switch dirs [#5205 @jonahbeckford]
  • Fix linting on opam-crowbar.opam [#5507 @kit-ty-kate]
  • Fix lazy compilation of regular expression in OpamFormula.atom_of_string [#5211 @dra27]

Build

Dependencies

Configure & builds

Documentation

Testing

Improve and extend tests

Improve test engine

Cram tests

Github Actions


API updates

For this release, we tested to track API changelog.

Opam libraries API changes
opam-client

opam-client

  • OpamAction: prepare_package_source can now take any switch state (previously required rw) [#4850 @rjbou]
  • OpamAction: add ?dev_setup filtering argument in build_package, install_package [#5016 #5214 @rjbou]
  • OpamAction: in build_package, install_package, and remove_package expand build-env variables content added to the environment [#5352 @dra27] {2.1.5}
  • OpamAction: when defined, add Cygwin binary path to build environment [#5543 @rjbou]
  • OpamArg.mkd_subdoc: add an optional argument for extra default elements: ?extra_defaults:(validity * string * string) list [#4910 @kit-ty-kate]
  • OpamArg.opam_init: retrieve Cygwin binary path from config (low level reading) to add it to OpamCoreConfig.r.cygbin [#5543 @rjbou]
  • OpamArgTools: all flag definition takes now a section as a labelled argument [#5275 @rjbou]
  • OpamArg: all flag definition takes now a section as an optional argument, default is set to Manpage.s_options [#5275 @rjbou]
  • OpamArg: externalise post, dev, doc_flag, test, and devsetup package selection flags, to avoid redefining them [#5299 @rjbou]
  • OpamArg, OpamArgTools: add experimental optional argument to cli_from and replace default by option:['experimental | 'default] for cli_between, to handle experimental features [#5099 @rjbou]
  • OpamAuxCommand: add ?locked (and handle lock file then) argument to name_and_dir_of_opam_file, opams_of_dir, opams_of_dir_w_target, resolve_locals, autopin, and simulate_autopin [#5080 @rjbou]
  • OpamClient.PIN: change ?locked:bool argument into string, to have lock extension name [#5080 @rjbou]
  • OpamClient.PIN.post_pin_action: no more updates depexts information, moved to OpamSwitchState.update_pin [#5047 @rjbou] {2.1.3}
  • OpamClient.update_with_init_config: Fix passing the dl_cache from InitConfig to Config [#5315 @hannesm] {2.1.5}
  • OpamClient: requested argument moved from name_package_set to package_set, to precise installed packages with --best-effort [#4796 @LasseBlaauwbroek]
  • OpamClient: fix update_with_init_config, when ``jobswas set ininit_config`, it dropped rest of `config` update [#5056 @rjbou] {2.1.3}
  • OpamClient: handle formula on several functions, adding a formula labelled or optional argument (upgrade_t, compute_upgrade_t, upgrade, fixup, install_t, install, remove_t, and remove) [#4975 @AltGr]
  • OpamConfigCommand.global_allowed_fields: make it fully lazy [#5162 @LasseBlaauwbroek]
  • OpamConfigCommand.global_allowed_fields: add archive-mirrors (dl_cache) to allowed modifiable fields, extendable [#5321 @hannesm @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] {2.1.3}
  • OpamConfigCommand: add a labelled argument no_switch to exec [#4957 @kit-ty-kate]
  • OpamListCommand.apply_selector, string_of_selector: change column name base to invariant, and the content is invariant formula installed dependencies [#5208 @rjbou]
  • OpamListCommand: add ?dev_setup filtering argument in dependency_toggles [#5016 #5214 @rjbou]
  • OpamListCommand: add swhid in info printable fields and its handling in details_printer
  • OpamPinCommand.fetch_all_pins: return the list of well fetched pins instead of fetched urls [#5080 @rjbou]
  • OpamPinCommand, OpamClient, OpamAuxCommands: use OpamStateTypes pin record types [#5080 @rjbou]
  • OpamSolution.apply: take an optional argument skip, to avoid filtering solution beforehand [#4975 @AltGr]
  • OpamSolution: add dry_run to simulate the new switch state after applying a solution [#5171 @cannorin]
  • OpamSolution: add print_requested to print actions reasons [#4975 @AltGr]
  • OpamStd.ABSTRACT: add compare and equal, that added those functions to OpamCLIVersion [#4918 @rjbou]
  • OpamSwitchCommand.install_compiler: fill empty switch synopsis with invariant formula instead of compiler package name [#5208 @rjbou]
  • OpamSwitchCommand: add previous_switch [#4910 @kit-ty-kate]
  • OpamTreeCommand: add module [#5171 @cannorin]
opam-repository

opam-repository

  • OpamRepositoryConfig: add in config record repo_tarring field and as an argument to config functions, and a new constructor REPOSITORYTARRING in E environment module and its access function [#5015 @rjbou] {2.1.3}
  • New download functions for shared source, old ones kept [#4893 @rjbou]
  • OpamClient.filter_unpinned_locally now display a warning of skipped packages instead of debug log [#5083 @rjbou]
  • OpamSolution.parallel_apply: fix sources_needed package set, now integrate requested but not locally pinned packages [#5082 @rjbou]
  • Add ?subpath to OpamRepository.fetch_dev_packages, OpamVCS.is_up_to_date and VCS specific functions in OpamDarcs, OpamHG, and OpamGit [#4876 @rjbou]
  • OpamRepositoryConfig.E: add curl_t and fetch_t to get their respective environment variables value dynamically, without lazyness. It is used in opamClient.InitDefaults, that can be called at topelevel [#5111 @rjbou]
  • OpamRepository.update: Return a change state result of the repo update [#5043 @Armael]
  • OpamVCS.VCS: add a clean function to the interface clearing all the uncommitted files [#4879 @rjbou] {2.1.3}
  • OpamVCS.pull_url: clean repository before fetching [#4879 @rjbou] {2.1.3}
  • OpamDownload: Add SWHID submodule that implements SWH fallback (retrieve url, download, check hash, and copy in target) [#4859 @rjbou]
  • OpamCLIVersion.of_string: print version when failing to parse it [#5566 @MisterDA]
  • OpamInitdefaults.recommended_tools: don't require cc on Windows [#5541 @dra27]
opam-state

opam-state

  • OpamEnv: add env_expansion [#5352 @dra27] {2.1.5}
  • OpamEnv: add handling of SH_pwsh and SH_cmd in shell lists [#5541 @dra27]
  • OpamEnv: fix invalid argument raised when trying to unzip empty string [#5350 @dra27] {2.1.5}
  • OpamEnv: generalise splitting of environment variables [#5541 @dra27]
  • OpamEnv: skip environment updates and revert with empty strings [#5350 @dra27] {2.1.5}
  • OpamFormatUpgrade: add repo_switch_hard_upgrade to perform inner layers hard upgrade when needed if write lock is required [#5305 @rjbou]
  • OpamGlobalState.load: Retrieve Cygwin binary path from config to add it to opamCoreConfig.r.cygbin [#5543 @rjbou]
  • OpamGlobalState: add as_necessary_repo_switch_upgrade that checks conditions and call OpamFormatUpgrade.repo_switch_hard_upgrade [#5305 @rjbou]
  • OpamPackageVar: add ?dev_setup filtering argument in filter_depends_formula, all_depends [#5016 #5214 @rjbou]
  • OpamPinned: add ?locked:string (and handle lock file then) argument to files_in_source, and name_of_opam_filename [#5080 @rjbou]
  • OpamPinned: add version_opt` [#5325 @kit-ty-kate]
  • OpamPinned: use pin record types [#5080 @rjbou]
  • OpamPinned: when looking at opam files, keep (and return) information about its locked origin [#5080 @rjbou]
  • OpamStateTypes.global_state: add global_state_to_upgrade field to keep incomplete upgrade information [#5305 @rjbou]
  • OpamStateConfig: add with-dev-setup support ; i.e. add E.withdevsetup, add with_sev_setup in config record [#5016 #5214 @rjbou]
  • OpamStateTypes: Add record types for to pin and pinned packages informations (in order to avoid n-uplet with n growing) ; name_and_file, name_and_file_w_url, nameopt_and_file, nameopt_and_file_w_url, and pinned_opam [#5080 @rjbou]
  • OpamSwitchState.load: fill empty switch synopsis with invariant formula instead of compiler package name [#5208 @rjbou]
  • OpamSwitchState.universe: requested argument moved from name_package_set to package_set, to precise installed packages with --best-effort [#4796 @LasseBlaauwbroek]
  • OpamSwitchState.universe: add a chrono for universe loading [#4975 @AltGr]
  • OpamSwitchState.universe: set to false unresolved variables used in constraint, and warn [#5141 @rjbou - fix #5139]
  • OpamSwitchState.update_pin: updates depexts state informations (sys_packages, avalaible_packages) [#5047 @rjbou] {2.1.3}
  • OpamSwitchState, OpamRepositoryState: at the beginning of load function, check if an upgrade is needed with OpamGlobalState.as_necessary_repo_switch_upgrade [#5305 @rjbou]
  • OpamSwitchState: add ?dev_setup filtering argument in universe [#5016 #5214 @rjbou]
  • OpamSwitchState: add compiler_packages that returns set of installed compilers, with their dependencies including only build & depopt [#5480 @rjbou]
  • OpamSwitchState: move and reimplement opam-solver dependencies and reverse_dependencies [#5337 @rjbou]
  • OpamSysInteract.Cygwin: add cygbin_opt to retrieve Cygwin binary path from config file [#5543 @rjbou]
  • OpamSysInteract.Cygwin: add check_install to check that a given path is a Cygwin installation, regarding presence of cygcheck.exe [#5544 @rjbou @dra27]
  • OpamSysInteract.Cygwin: add check_setup to check, copy or download a Cygwin setup.exe [#5544 @rjbou]
  • OpamSysInteract.install_packages_command: change return type to (['AsAdmin of string | 'AsUser of string] * string list) list [#5268 @kit-ty-kate]
  • OpamSysInteract: add package_manager_name [#5268 @rjbou]
  • OpamSysInteract: add global config argument to function, in order to be able to retrieve system package manager path for MSYS2, and in the future Cygwin, etc. [#5433 @rjbou]
  • OpamSysPoll, OpamSysInteract: Add optional argument ?env:(variable_contents option Lazy.t * string) OpamVariable.Map.t to OpamSysPoll and OpamSysInteract functions. It is used to get syspolling variables from the environment first. [#4892 @rjbou]
  • OpamUpdate.download_package_source: add SWH fallback when archive remain not found [#4859 @rjbou]
  • OpamUpdate.pinned_package: use locked information to automatically update from locked file if present, if ?autolock is given to true [#5080 @rjbou]
  • OpamUpdate: change repository output to update function option, to not write cache and new repo config if nothing changed in repositories [#5146 @rjbou]
opam-solver

opam-solver

  • OpamActionGraph.to_aligned_strings: add explicit optional argument to print action name in utf8 [#5045 @AltGr]
  • OpamCudf.filter_solution: can do not remove recursively actions with optional ~recursive:true [#4975 @AltGr]
  • OpamCudf.print_solution: add optional skip, to avoid filtering solution beforehand [#4975 @AltGr]
  • OpamCudf: Change type of conflict_case.Conflict_cycle (string list list to Cudf.package action list list) and cycle_conflict, string_of_explanations, conflict_explanations_raw types accordingly [#4039 @gasche]
  • OpamCudf: add conflict_cycles [#4039 @gasche]
  • OpamCudf: add trim_universe [#5024 @AltGr] {2.1.3}
  • OpamCudf: add trim_universe, opam_deprequest_package_name, and opam_deprequest_package [#4975 @AltGr]
  • OpamSolver.coinstallable_subset: add add_invariant optional argument [#5024 @AltGr] {2.1.3}
  • OpamSolver.CUDF_versions_map: no more takes a package set as argument, compute whole packages (repo + installed) and take accounet of invariant [#5024 @AltGr] {2.1.3}
  • OpamSolver.explicit: when adding fetch nodes, add shared source ones. Change of sources_needed argument type [#4893 @rjbou]
  • OpamSolver.installable: use installable_subset that uses coinstallable_subset [#5024 @kit-ty-kate] {2.1.3}
  • OpamSolver.load_CUDF_universe: change staging of add_invariant [#5024 @AltGr] {2.1.3}
  • OpamSolver.print_solution: change output format [#5045 @AltGr]
  • OpamSolver, OpamCudf: Several changes to handle installation from a formula [#4975 @AltGr]
  • OpamSolver, OpamCudf: remove dependencies and reverse_dependencies [#5337 @rjbou]
  • OpamSolver: add removed_packages to retrieve packages that are removed from solution [#5208 @rjbou]
  • OpamSwitchAction.update_switch_state: compiler_packages now computes dependency cone of invariant formula [#5208 @rjbou]
  • OpamSwitchState: add invariant_root_packages, compute_invariant_packages, compute_compiler_packages [#5208 @rjbou]
    • OpamSwitchState: invariant_root_packages, compute_invariant_packages, compute_compiler_packages no more take an universe argument [#5503 @kit-ty-kate - fix #5502]
opam-format

opam-format

  • OpamFile.Config: order list of installed switches according their last use, update with_switch accordingly, and add previous_switch [#4910 @AltGr]
  • OpamFile.Dot_install: Exposed with_* functions [#5169 @panglesd]
  • OpamFile.Environment: enable atomic writing [#5476 @dra27]
  • OpamFile.OPAM.effective_part and OpamFile.OPAM.effectively_equal now take an optional ?modulo_state:bool parameter, that if true, eliminates the fields relying on the state of the switch (depends, available, …). This is false by default. [#5118 @kit-ty-kate]
  • OpamFile.OPAM.effective_part: empty extra-source url if checksum is specified and take first one (as for url) [#5258 @kit-ty-kate]
  • OpamFile.OPAM.effectively_equal: return true if an extra-source url changes but not its checksum (as for url) [#5258 @kit-ty-kate]
  • OpamFile.OPAM.to_string_with_preserved_format: handle substring errors [#4941 @rjbou - fix #4936]
  • OpamFile.OPAM: Add locked, file origin and extension, in the record with its modifiers/getter [#5080 @rjbou]
  • OpamFile.URL: add swhid field in t record, and its access functions [#4859 @rjbou]
  • OpamFile.URL: add with_mirrors [#4859 @rjbou]
  • OpamFile: add atomic value in IO_Arg to enable/disable atomic file writing [#5476 @dra27]
  • OpamFilter: add ?custom argument in to_string to tweak the output [#5171 @cannorin]
  • OpamFilter: add ?dev_setup filtering argument in filter_deps [#5016 #5214 @rjbou]
  • OpamFormula: add generic formula_to_cnf and formula_to_dnf, and use them in to_cnf and to_dnf [#5171 @cannorin]
  • OpamPackage.Version: add default returning the version number used when no version is given for a package [#4949 @kit-ty-kate]
  • OpamPath.Switch: add man_dirs [#4915 @rjbou] {2.1.3}
  • OpamStd.ABSTRACT: add compare and equal, that added those functions to OpamSysPkg and OpamVariable [#4918 @rjbou]
  • OpamTypes.universe: remove u_base field, as it is no more needed with switch invariant [#5208 @rjbou]
  • OpamTypes: Change 'Fetch action to take several packages, in order to handle shared fetching of packages [#4893 @rjbou]
  • OpamTypes: request.wish_install now takes a formula instead of a conjunction [#4975 @AltGr]
opam-core

opam-core

  • OpamCompat.Unix: add realpath for ocaml < 4.13, and use it in OpamSystem [#5152 @rjbou]
  • OpamCompat: add Filename.quote_command [#5543 @rjbou]
  • OpamCompat: add Int.equal (for ocaml < 4.12)
  • OpamCompat: add Lazy module and Lazy.map function [#5176 @dra27] {2.1.3}
  • OpamConsole.Tree: add valu and children getters [#5303 @cannorin]
  • OpamConsole.header_msg: remove trailing space when there is no left padding [#5363 @rjbou]
  • OpamConsole: add a Tree submodule to draw a unicode/ascii-art tree [#5171 @cannorin]
  • OpamCoreConfig.r: remove openssl related config: use_openssl parameter & config field, and OPAMUSEOPENSSL environment variable [#5042 @kit-ty-kate]
  • OpamCoreConfig: add cygbin, the Cygwin install binary path [#5543 @rjbou]
  • OpamDirTrack: Add to_summary_string to summarise changes [#5144 @na4zagin3]
  • OpamFilename.SubPath: remove pretty_string in favor to OpamUrl.to_string_w_subpath [#5219 @rjbou]
  • OpamFilename.clean_dir: as the directory is recreated after removal, checks that the directory exists beforhand. It avoid creating a new empty directory uselessly [#4967 @rjbou]
  • OpamFilename: add with_open_out_bin and with_open_out_bin_atomic [#5476 @dra27]
  • OpamFilename: add a SubPath submodule to handle multi-platform subpath specifications. It has an effect on a lot of functions signatures [#4876 @rjbou]
  • OpamHash: add is_null
  • OpamHash: add sort from strongest to weakest kind
  • OpamHash: add module SWHID that create and check Software Heritage IDs hashes format [#4859 @rjbou]
  • OpamJson: use Jsonm and add an of_string function [#5142 @rjbou]
  • OpamJson: use Jsonm and add an of_string function [#5142 @rjbou]
  • OpamParallel, MakeGraph(_).to_json: fix incorrect use of List.assoc [#5038 @Armael]
  • OpamProcess.apply_cygpath: fix empty output [#5543 @rjbou]
  • OpamProcess.wait_one: display command in verbose mode for finished found process [#5091 @rjbou]
  • OpamProcess: add default_env to retrieve environment, if Cygwin is set, adds Cygwin binary path to environment ; and use it instead of Unix.environment [#5543 @rjbou]
  • OpamProcess: expose the command type as a private type [#5452 @Leonidas-from-XIV
  • OpamSHA: add sha1 support [#4859 @rjbou]
  • OpamSHA: use now only sha, some function removed (shaxxx, shaxxx_bytes, etc.) [#5042 @kit-ty-kate]
  • OpamSWHID: add module to handle swhid [#4859 @rjbou]
  • OpamStd.ABSTRACT: add compare and equal, that added those functions to OpamFilename, OpamHash, OpamStd, OpamStd, OpamUrl, and OpamVersion [#4918 @rjbou]
  • OpamStd.Compare: add module to flag polymorphic comparison functions in opam codebase [#5374 @kit-ty-kate @rjbou]
  • OpamStd.Config.E: add value_t to allow getting environment variable value dynamically [#5111 @rjbou]
  • OpamStd.Config.E: add a REMOVED variant to allow removing completely an environment variable handling [#5112 @rjbou]
  • OpamStd.Env.: introduce OpamStd.Env.Name to abstract environment variable names [#5356 @dra27]
  • OpamStd.Env: add cyg_env that returns the environment with PATH containing Cygwin binary path [#5543 @rjbou]
  • OpamStd.List: add find_map_opt (for ocaml < 4.10) and fold_left_map (for ocaml < 4.11) [#5171 @cannorin]
  • OpamStd.List: add pick [#4859 @rjbou]
  • OpamStd.List: add comparison function argument to some OpamList functions [#5374 @kit-ty-kate @rjbou]
  • OpamStd.Map: add filter_map [#5337 @rjbou]
  • OpamStd.Option: add equal function [#5374 @rjbou]
  • OpamStd.Set: Add to_list_map [#5308 @kit-ty-kate]
  • OpamStd.String: add is_hex [#4859 @rjbou]
  • OpamStd.Sys.get_windows_executable: Add cygbin argument to pass Cygwin binary path [#5543 @rjbou]
  • OpamStd.Sys.is_Cygwin_variant: returns a boolean [#5543 @rjbou]
  • OpamStd.Sys: add SH_pwsh of powershell_host and SH_cmd to shell type [#4816 @jonahbeckford #5203 @dra27 #5541 @dra27]
  • OpamStd.Sys: add all_shells list of all supported shells [#5217 @dra27]
  • OpamStd.Sys: add get_windows_executable_variant to use instead of is_Cygwin_variant [#4817 @jonahbeckford]
  • OpamStd.Sys: add is_Cygwin_cygcheck anf get_Cygwin_variant [#5543 @rjbou]
  • OpamStd.Sys: fix get_windows_executable_variant to distinguish MSYS2 from Cygwin, esp. for rsync rather than symlinking [#5404 @jonahbeckford]
  • OpamSystem.copy_dir: two-pass rsync copy for MSYS2, to handle symlinks [#4817 @jonahbeckford]
  • OpamSystem.read_command_output: add an optional parameter to unmerge stdout and stderr [#4859 @rjbou]
  • OpamSystem.real_path: Remove the double chdir trick on OCaml >= 4.13.0 [#4961 @kit-ty-kate]
  • OpamSystem: avoid calling Unix.environment at top level [#4789 @hannesm] {2.1.1}
  • OpamURL: add module SWHID that contains helpers from and to internal swhid url [#4859 @rjbou]
  • OpamURL: add to_string_w_subpath to display subpath inside urls (before hash) [#5219 @rjbou]