opam 2.1.0~rc2 released

See full changelog
  • (*) Environment variables initialised only at opam client launch, no more via libraries [#4606 #4703 @rjbou]
  • (*) Deprecated build-doc, build-test, make flags [#4581 @rjbou]
  • (+) Add --confirm-level and OPAMCONFIRMLEVEL for automatic answering [#4582 @rjbou - fix #4168; #4683 @dra27 - fix #4682; #4691 @rjbou - fix #4682]
  • (+) Add --no [#4582 @rjbou]
  • (+) Add a --with-0install-solver option to the configure script to enable the 'builtin-0install' solver [#4646 @kit-ty-kate]
  • Add default CLI mechanism: deprecated options are accepted (in the major version) if no CLI is specified [#4575 @rjbou]
  • Add opam config deprecated subcommands in the default CLI [#4575 @rjbou - fix #4503]
  • Add CLI versioning for opam environment variables [#4606 @rjbou]
  • Add CLI versioning for enums of flags with predefined enums [#4606 @rjbou]
  • Clearer messages about using --cli and OPAMCLI [#4655 @dra27]
  • The options --root and --switch are now reflected in environment variables when building packages so that calls to opam during build access the correct root and switch [#4668 @LasseBlaauwbroek]
  • Add CLI versioning for enums of flags with predefined enums [#4626 @rjbou]
  • Preprocess --confirm-level for plugins calls/install [#4694 @rjbou]
  • Ensure the symlink for a plugin is maintained on each invocation [#4621 @dra27 - partially fixes #4619]
  • Initialise environment variables for plugins call/install [#4582 @rjbou]
  • Expect plugins to end in .exe on Windows [#4709 @dra27]
  • Introduce a default-invariant config field, restore the 2.0 semantics for default-compiler [#4607 @AltGr]
  • Fix default invariant with no system compiler [#4644 @AltGr - fix #4640]
  • Perform an hard upgrade on intermediate roots, i.e., root from 2.1~alpha/beta, and keep a light upgrade from 2.0 [#4638 @rjbou]
  • Send the 'opam root layout update' message to stderr [#4692 @AltGr]
  • If opam root is different from the binary, allow reading it and try to read in best effort mode [#4638 @rjbou - fix #4636]
  • Don't check opam system dependencies on reinit after a format upgrade [#4638 @rjbou]
  • Fix sys-ocaml-cc, sys-ocaml-arch, and sys-ocaml-libc when no system compiler installed [#4706 @dra27]
  • Fix Not_found (config file) in config report [#4570 @rjbou]
  • Config report: Print variables of installed compilers and their (installed) dependencies [#4570 @rjbou]
  • Don't patch twice file [#4529 @rjbou]
  • With --deps-only, set dependencies as root packages [#4964 @rjbou - fix #4502]
  • Keep global lock only if root format upgrade is performed [#4612 @rjbou - fix #4597]
  • Improve installation times by only tracking files listed in .install instead of the whole switch prefix when there are no install: instructions (and no preinstall commands) [#4494 @kit-ty-kate @rjbou; #4667 @dra27 - fix #4422]
  • Scrub opam* environment variables added since 2.0 from package builds to prevent warnings when a package calls opam [#4663 @dra27 - fix #4660]
  • Correct the message when more than one depext is missing [#4678 @dra27]
  • Only display one conflict message when they are all owing to identical missing depexts [#4678 @dra27]
  • Don't exclude base packages from rebuilds (made some sense in opam 2.0 with base packages but doesn't make sense with 2.1 switch invariants) [#4569 @dra27]
  • Don't refer to base packages in messages any more [#4623 @dra27 - fixes #4572]
  • Give the correct command when demonstrating switch creation [#4675 @dra27 - fixes #4673]
  • On switch loading, if invariant is inferred and a write lock required, write the file [#4638 @rjbou]
  • Don't look for lock files for pin depends [#4511 @rjbou - fix #4505]
  • Fetch sources when pinning an already-pinned package with a different URL when using working directory [#4542 @rjbou - fix #4484]
  • Don't ask for confirmation for pinning base packages (similarly makes no sense with 2.1 switch invariants) [#4571 @dra27]
  • Fix version pin source retrieving: mustn't error if archive opam file is malformed [#4580 @rjbou]
  • opam list --silent renamed to --check [#4595 @dra27 - fix #4323]
  • Include doc field in opam-show [#4567 @dra27 - partially fix #4565]
  • Fix switch global variable resolving [#4685 @rjbou - fix #4684]
  • Fix hash package variable resolving [#4687 @rjbou]
  • Lint: Fix W59 & E60 for conf packages (no URL required) [#4550 @rjbou - fix #4549]
  • Lint: Fix W59 & E60 with VCS URLs, don't check upstream if URL has VCS backend [#4635 @rjbou]
  • Lint: Add E67 checksum specified with non archive URL [#4635 @rjbou]
  • Lint: Disable subpath warning E63,W64 [#4638 @rjbou]
  • Lint: Fix manpage listing [#4708 @rjbou]
  • Don't write lock file with --read-only, --safe, and --dryrun [#4562 @rjbou - fix #4320]
  • Make opam lock consistent with opam install. On local pin, always take last opam file even if uncommitted [#4562 @rjbou - fix #4320]
  • Opam file: Fix features parser [#4507 @rjbou]
  • Opam file: Rename hidden-version to avoid-version [#4527 @dra27]
  • Opam file: Fix rewriting with preserved format empty field error [#4634 @rjbou - fix #4628]
  • Opam file: Switch config: Defined invariant field as an option to differentiate when it is not defined [#4638 @rjbou]
  • Opam file: Differentiate bad format from bad (opam) version with Bad_version exception, raised from OpamFormat.check_opam_version [#4638 @rjbou]
  • Opam file: Always print the opam-version field on files [#4638 @rjbou]
  • Opam file: Config: add opam-root-version field as a marker for the whole opam root [#4638 @rjbou - fix #4636]
  • Opam file: Add BestEffort modules with reading functions that don't show errors, given the opam_file_format internal field [#4638 @rjbou - fix #4636]
  • Depext: Handle macport variants [#4509 @rjbou - fix #4297]
  • Depext: Always upgrade all the installed packages when installing a new package on Archlinux [#4556 @kit-ty-kate]
  • Depext: Handle some additional environment variables (OPAMASSUMEDEPEXTS, OPAMNODEPEXTS) [#4587 @AltGr]
  • Depext: Improve messages to hint that answering no doesn't abort installation [#4591 @AltGr]
  • Depext: Add support for non-interactive mode in MacPorts [#4676 @kit-ty-kate]
  • Depext: Handling of packages of tagged repositories for Alpine [#4700 @rjbou - fix #4670]
  • Depext: Clarify some assume-depexts related messages [#4671 @AltGr - partial fix #4662]
  • Depext: Warn the user if epel-release is missing and unavailable, depexts are detected [#4679 @dra27 fix #4669]
  • Depext: Ignore config yes automatic answering when asking confirmation to run install commands [#4698 @rjbou - fix #4680]
  • Sandbox: Fix the conflict with the environment variable name used by Dune [#4535 @smorimoto - fix ocaml/dune#4166]
  • Sandbox: Kill builds on Ctrl-C with bubblewrap [#4530 @kit-ty-kate - fix #4400]
  • Sandbox: Linux: mount existing TMPDIR read-only, re-bind $TMPDIR to a separate TMPFs [#4589 @AltGr]
  • Sandbox: Fix the sandbox check [#4589 @AltGr]
  • Sandbox: Fix sandbox script shell mistake that made PWD read-write on remove actions [#4589 @AltGr]
  • Sandbox: Port bwrap improvements to sandbox_exec [#4589 @AltGr]
  • Sandbox: Fix realpath use for macOS, partial revert of #4589 [#4609 @AltGr]
  • Add missing shell quoting to support space and special shell characters in switch directory path [#4707 @kit-ty-kate]
  • Rename state.cache to include the OpamVersion.magic() string. All .cache files are deleted if any cache file is written to, allowing multiple versions of the library to coexist without constantly regenerating it [#4642 @dra27 - fix #4554]
  • Fix cuDF preprocessing [#4534 #4627 @AltGr - fix #4624]
  • Allow to upgrade to a hidden-version package if a hidden-version package is already installed [#4525 @kit-ty-kate]
  • Add support for a few select criteria useful to CI to the 0install solver: +count[version-lag,solution] to always choose the oldest version available, +removed to not try to keep installed packages [#4631 @kit-ty-kate]
  • Fix opam-devel's tests on platforms without OpenSSL, GNU-diff, and a system-wide OCaml [#4500 @kit-ty-kate]
  • Use Dune to run reftests [#4376 @emillon]
  • Restrict extlib and dose version [#4517 @kit-ty-kate]
  • Restrict to opam-file-format.2.1.2 [#4495 @rjbou]
  • Require opam-file-format.2.1.3+ in order to enforce opam-version: "2.1" as first non-comment line [#4639 @dra27 - fix #4394]
  • Switch to newer version of MCCS (based on newer GLPK) for src_ext [#4559 @AltGr]
  • Bump Dune version to 2.8.2 [#4592 @AltGr]
  • Bump the minimal Dune requirement to Dune 1.11 [#4437 @dra27 @kit-ty-kate]
  • 4.12 compatibility [#4437 @dra27 @kit-ty-kate]
  • Cold compiler updated to 4.12 [#4616 @dra27]
  • Fix build from source when a dune-project file is presented in the parent directory [#4545 @kit-ty-kate]
  • Fix build from source when a dune-project file is presented in the parent directory [#4545 @kit-ty-kate - fix #4537]
  • Fix opam-devel.install not to install two files called opam [#4664 @dra27]
  • Build release tags as non-dev versions, as for release tarballs [#4665 @dra27 - fix #4656]
  • Disable dev version for tests (needed for format upgrade test) [#4638 @rjbou]
  • Add a hint for missing openssl in make cold [#4702 @rjbou]
  • Remove test field from opam-devel, they need the network [#4702 @rjbou]
  • Update src_ext for Dune and MCCS [#4704 @dra27]
  • Release scripts: switch to OCaml 4.10.2 by default, add macOS/ARM64 builds by default [#4559 @AltGr]
  • Release scripts: add default CLI version check on full archive build [#4575 @rjbou]
  • Arg: Generalise mk_tristate_opt to mk_state_opt [#4575 @rjbou]
  • Arg: Fix mk_state_opt and rename to mk_enum_opt [#4626 @rjbou]
  • Arg: Add mk_enum_opt_all for state flags that appears more than once [#4582 @rjbou]
  • Fix opam exec on native Windows when calling Cygwin executables [#4588 @AltGr]
  • Fix temporary file with a too long name causing errors on Windows [#4590 @AltGr]
  • CLI: Add flag deprecation and replacement helper [#4595 @rjbou]
  • Win32 Console: fix VT100 support [#3897 #4710 @dra27]
  • Tidied the opam files [#4620 @dra27]
  • Externalise CLI versioning tools from OpamArg into OpamArgTools [#4606 @rjbou]
  • Each library defines its own environment variables that fills the config record [#4606 @rjbou]
  • Harden cygpath wrapper [#4625 @dra27]
  • Reset the plugin symlinks when the root is upgraded [#4641 @dra27 - partial fix for #4619]
  • Formalise opam dev version detection with OpamVersion.is_dev_version [#4665 @dra27]
  • Add OpamStd.String.is_prefix_of [#4694 @rjbou @dra27]
  • Fix OpamStd.Format.pretty_list: last argument dropped if list contains more than 2 elements [#4694 @rjbou]
  • Run the shell hooks with closed stdin (bash, zsh) [#4692 @AltGr]
  • Improved and extended tests [#4376 #4504 #4545 #4612 #4668 #4612 #4634 #4672 #4638 #4702 #4697 #4697 @AltGr @dra27 @emillon @rjbou]
  • Improve GitHub Actions [#4593 #4575 #4610 #4610 #4618 #4606 #4695 #4695 @AltGr @dra27 @rjbou]
  • Improve documentation [#4496 #4506 #4513 #4637 #4681 #4702 @dannywillems @eth-arm @kit-ty-kate @rjbou @UnixJunkie]