Releases: ocaml/opam
2.2.1
This is the release of opam 2.2.1.
Binaries and full archive are signed by the opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
Bug fixes
- Fix a regression in
opam install --deps-only
where the direct dependencies were not set as root packages [#6125 @rjbou] - Fix a regression when fetching git packages where the resulting git repository could lead to unexpected outputs of git commands, by disabling shallow clone by default except when fetching an opam repositories [#6146 @kit-ty-kate - fix #6145]
- Mitigate curl/curl#13845 by falling back from
--write-out
to--fail
if exit code 43 is returned by curl [#6168 @dra27 - fix #6120]
Build, test updates
- Synchronise opam-core.opam with opam-repository changes [#6043 @dra27]
- Fix and improve the release script and the creation of the
opam-full-<version>.tar.gz
archive [#6067 @kit-ty-kate] - Improve and extend the tests [#6125 #6146 @rjbou]
- Improve the test infrastructure [#6079 #6081 @rjbou]
API changes
?full_fetch
is nowtrue
by default instead offalse
[#6146 @kit-ty-kate - fix #6145]
Note: the linux binaries were built using 34fb54e instead of the release tag
2.2.0
This is the release of opam 2.2.0.
This release candidate contains a couple of fixes compared to the previous 2.2.0~rc1 release.
Please see the blog post for a description of the main features compared to opam 2.1.6 and the upgrade instructions.
Binaries and full archive are signed by the opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
Changelog compared to 2.2.0~rc1:
Miscellaneous changes
Version
- Bump
opam-root-version
to 2.2 [#5980 @kit-ty-kate]
External dependencies
- Always pass
--no-version-check
and--no-write-registry
to Cygwin setup [#6046 @dra27] - Use
--quiet-mode noinput
for the internal Cygwin installation (which is definitely a fully-specified command line) and--quiet-mode
unattended for external Cygwin installations (in case the user does need to select something, e.g. a mirror) [#6046 @dra27]
API updates
opam-state
OpamStateConfig.opamroot_with_provenance
: restore previous behaviour toOpamStateConfig.opamroot
for compatibility with third party code [#6047 @dra27]
2.2.0~rc1
This is the first release candidate of opam 2.2.0.
This release candidate contains enhancements, updates & fixes compared to the previous 2.2.0~beta3 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
).
Major changes
Update / Upgrade
- Fix
opam upgrade
wanting to recompile opam files containing thex-env-path-rewrite
field [#6029 @kit-ty-kate - fix #6028]
Init
Miscellaneous changes
Global CLI
- Fix
OpamConsole.menu
> 9 options [#6026 @kit-ty-kate]
Build
- Fix the lower-bound constraint on ocaml-re (bump from >= 1.9.0 to >= 1.10.0) [#6016 @kit-ty-kate]
- Update source file location as caml.inria.fr is unavailable [#6032 #5789 @mtelvers @kit-ty-kate]
Release scripts
- Add Windows to opam's release script [#5789 @kit-ty-kate]
Internal
- Fix a wrong use of
OpamFilename.of_string
[#6024 @kit-ty-kate]
Testing
- Improve and extend the tests [#6029 @kit-ty-kate]
API updates
opam-format
OpamTypesBase
: Addnullify_pos_map
andnullify_pos_value
[#6029 @kit-ty-kate]
2.2.0~beta3
This is the third and final beta release of opam 2.2.0.
This beta release contains new features, enhancements, updates & fixes compared to the previous 2.2.0~beta2 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
).
Major changes
Global CLI
- Out-of-the-box UTF-8 paged --help on Windows [#5970 @kit-ty-kate]
- stop hiding the Windows specific arguments of opam init on non-Windows platforms [#6003 @rjbou @kit-ty-kate]
Init
- New option
opam init --cygwin-extra-packages=CYGWIN_PKGS --cygwin-internal-install
, to specify additional packages for internal Cygwin [#5930, #5964 @moyodiallo - fix #5834] - Skip Git-for-Windows menu if the Git binary resolved in PATH is Git-for-Windows [#5963 @dra27 - fix #5835]
- Enhance the Git menu by warning if the user appears to need to restart the shell to pick up PATH changes [#5963 @dra27]
- Include Git for Windows installations in the list of possibilities where the user instructed Git-for-Windows setup not to update PATH [#5963 @dra27]
- Redirect the opam root to
C:\opamroot\opam-xxx
when the opam root contains spaces on Windows [#5457 @rjbou @dra27] - Overhaul Windows
opam init
to determine Unix and Git configuration simultaneously, and to detect from Cygwin, Git and MSYS2 from all the known package managers and shells [#6000 @dra27]
Repository
- Fix download URLs containing invalid characters on Windows (e.g. the ? character in
?full_index=1
) [#5921 @dra27] - Fix curl failures - the progress meter can become interleaved with the status code on Windows [#5984 @dra27 @kit-ty-kate @rjbou]
Tree
- Fix
opam tree --with-*
assigning thewith-*
variables to unrequested packages [#5919 @kit-ty-kate @rjbou - fix #5755] - Fix combinations of
opam tree --with-*
and--no-switch
[#5919 @kit-ty-kate @rjbou - fix #5920]
Source
- Fix extraction of tarballs on Windows which contain symlinks both when those symlinks can't be created or if they point to files which don't exist [#5953 @dra27]
Switch
- Allow to parse opam 2.1 switch import files containing extra-files [#5943 @kit-ty-kate - fix #5941]
Miscellaneous changes
Init
Global CLI
- Fix a typo in the variable description returned by "opam var" [#5961 @jmid]
- Display lock hold/release messages on stderr instead of stdout [#5999 @kit-ty-kate - fix #5990]
Client
- Fix rounding error when displaying the timestamp in debug mode [#5912 @kit-ty-kate - fix #5910]
Env
- Fix reverting of environment variables, principally on Windows [#5935 @dra27 fix #5838]
- Fix splitting environment variables [#5935 @dra27]
- When opam creates an empty variable then appends/prepends a value, ensure no additional separator is added [#5935 @dra27 - fix #5925]
- Fix
x-env-path-rewrite
splitting of values when reverting [#5935 @dra27 - fix #5838] - Rework the logic of := and =: so that an empty entry is correctly preserved on multiple updates [#5935 @dra27 - fix #5926]
- Fix incorrect reverting of
=+
and=:
[#5935 @dra27 - fix #5926] - For the
Cygwin
internal operator, don't allowmake.exe
to become shadowed [#5996 @dra27] - Fix incorrect quoting rule for
MANPATH
[#5972 @dra27 - partial fix for #5923] - Do not special case the rewriting rule for the PKG_CONFIG_PATH environment variable [#6002 @kit-ty-kate - fix #5923]
External dependencies
- Pass
--symlink-type
native to Cygwin setup if symlinks are available [#5830 @dra27] - Pass
--no-version-check
to Cygwin setup (suppresses a message box if setup needs updating) [#5830 @dra27] - Pass
--quiet-mode noinput
to stop the user interrupting the setup GUI [#5830 @dra27] - Always pass
--no-write-registry
to the Cygwin installer, not just on first installation [#5995 @dra27] os-distribution
is now by default calculated fromcygpath
for Cygwin and MSYS2, instead of needing to be set by opam init [#6000 @dra27]- Cygwin setup is now always downloaded and updated both for internal and external Cygwin installations [#6000 @dra27]
Install
- Fix performance regression when calling opam install
--deps-only
on an already installed package [#5908 @kit-ty-kate - fix #5817]
Version
- Upgrade the
opam-root-version
to2.2~beta
[#5904 @kit-ty-kate]
Config
- Move last-env
OPAM_LAST_ENV
files outside the switch to be in theopam root
[#5962 @moyodiallo - fix #5823]
Update / Upgrade
Format upgrade
- Handle init OCaml
sys-ocaml-*
eval variables during format upgrade from 2.0 -> 2.1 -> 2.2 [#5829 @dra27] - Reset the "jobs" config variable when upgrading from opam 2.1 to 2.2, instead of 2.0 to 2.1 [#5904 @kit-ty-kate - fix #5816]
Lint
- W41: Relax warning 41 not to trigger on uses of package variables which are guarded by a package:installed filter [#5927 @dra27]
Build
- Upgrade vendored cmdliner to 1.3.0 [#5970 @kit-ty-kate]
- Remove unused/untested Makefile targets lib-pkg [#5494 @kit-ty-kate]
- Upgrade vendored OCaml compiler to 4.14.2 [#5976 @kit-ty-kate]
Release scripts
- Upgrade the OCaml compiler used for releases to 4.14.2 [#5976 @kit-ty-kate]
Testing
- Improve and extend the tests [#5919 #5919 #5904 #5925 #5935 #5926 #5935 #5927 @rjbou @dra27]
- Improve the benchmarks [#5909 @kit-ty-kate]
- Improve the test infrastructure [#5935 #5938 #5998 @dra27]
API updates
opam-client
OpamClient.init
andOpamClient.reinit
: now can have additional cygwin packages to install [#5930 @moyodiallo]OpamInitDefaults.required_packages_for_cygwin
: no longer includes git; as the need to add that is computed inOpamClient
[#6000 @dra27]OpamSolution
: exposerprint_depext_msg
[#5994 @dra27]OpamSolution
: extractedinstall_sys_packages
fromOpamSolution.install_depexts
[#5994 @dra27]
opam-repository
OpamDownload.download_command
: separate output from stdout and stderr [#5984 @kit-ty-kate]
opam-state
OpamEnv.cygwin_non_shadowed_programs
: exposes the list of executables (not including git) which should always come from Cygwin [#6000 @dra27]OpamSysInteract.Cygwin.check_install
renamed toanalyse_install
which now also returns whether the installation found was MSYS2 or Cygwin [#6000 @dra27]OpamSysInteract.Cygwin.install
: de-labelpackages
argument [#6000 @dra27]
opam-format
OpamFilter.fold_down_left
: correct handling of FDefined and FUndef [#5983 @dra27]OpamFilter.map_up
: correct handling of FDefined [#5983 @dra27]OpamPath
: removeOpamPath.Switch.last_env
function in favor toOpamPath.last_env
as the files are no more stored in switch directory [#5962 @moyodiallo - fix #5823]
opam-core
OpamCompat
: addSeq.find_map
from OCaml 4.14 [#6000 @dra27]OpamConsole.menu
now supports up to 35 menu items [#5992 @dra27]OpamConsole
: Addformatted_errmsg
[#5999 @kit-ty-kate]OpamProcess.run_background
: name the stderr output file have the .err extension when cmd_stdout is given [#5984 @kit-ty-kate]OpamStd.String
: addsplit_quoted
that preserves quoted separator [#5935 @dra27]OpamStd.Sys.resolve_command
: extracted the logic fromOpamSystem.resolve_command
, without the default environment handling from OpamProcess. [#5991 @dra27]OpamStd.Sys.resolve_in_path
: split the logic ofOpamStd.Sys.resolve_command
to allow searching for an arbitrary file in the search path [#5991 @dra27]OpamStd.Sys.{get_windows_executable_variant,get_cygwin_variant,is_cygwin_variant}
: renamed~cygbin
to?search_in_path
with a change in semantics so that it acts as though the directory was simply the first entry in PATH [#6000 @dra27]OpamStubs.enumRegistry
: on Windows, retrieves all the values of a given type from a registry key, with their names [#6000 @dra27]OpamStubs.getVersionInfo
: on Windows, retrives the version information block of an executable/library [#5963 @dra27]OpamStubs.get_initial_environment
: on Windows, returns the pristine environment for new shells [#5963 @dra27]OpamStubs.readRegistry
: on Windows, complementsOpamStubs.writeRegistry
[#5963 @dra27]OpamSystem.copy_dir
andOpamSystem.mv
may display a warning on Windows if an invalid symlink (e.g. an LXSS Junction) is found [#5953 @dra27]OpamSystem
: addmk_unique_dir
that returns an unique directory name asmk_temp_dir
but not in temporary directory [#5457 @dra27]
2.1.6
This is the release of opam 2.1.6.
Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
- Changes necessary for opam repository (see ocaml/opam-repository#23789):
- Warn if
GNU patch
is not detected when a patch is applied [#5893 @kit-ty-kate] - Use
gpatch
by default instead ofpatch
on NetBSD and DragonFlyBSD [#5893 @kit-ty-kate] - Use
gpatch
if it exists and is detected as GNU patch whenpatch
is notGNU patch
[#5893 @kit-ty-kate]
- Warn if
- Better recognize depexts on Gentoo, NetBSD, OpenBSD [#5065 @mndrix]
- Upgrade the vendored dune to 3.14.0 [#5869 @kit-ty-kate]
- Upgrade the vendored mccs to 1.1+17 [#5769 @kit-ty-kate]
- Require mccs >= 1.1+17: Fix debug logs showing up regardless of verbosity on macOS 12.7.1 / 13.6.3 / 14.2 and FreeBSD [#5769 @kit-ty-kate]
- API Changes:
OpamSystem.patch
now displays a warning when GNU patch is not detected and looks for both patch and gpatch as a backup option depending on the OS [#5893 @kit-ty-kate]
Pre-compiled binaries built using the release script in 1cb2f33
2.2.0~beta2
This is the second beta release of opam 2.2.0.
This beta release contains new features, enhancements, updates & fixes compared to the previous 2.2.0~beta1 release. Please see upcoming 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
).
Major changes
Init
- Recommend enabling Developer Mode on Windows [#5831 @dra27]
- Disable ACL in Cygwin internal install to avoid permission mismatch errors [#5796 @kit-ty-kate - fix #5781]
- Fix MSYS2 support [#5843 @rjbou - fix #5683]
- Properly test if "we're in interactive mode" instead of "in a tty" in fish script [#5866 @ElectreAAS]
- Make the computation of the init default
sys-ocaml-*
eval variables on Windows faster, no more depending on Cygwin [#5829 @dra27 @rjbou] - Simplify computation of OCaml init default
sys-ocaml-*
eval variables on Unix [#5829 @dra27] - Add a init OCaml
sys-ocaml-system
eval variable [#5829 @dra27] - Mark the internal cygwin installation as recommended [#5903 @kit-ty-kate]
- Check for
gpatch
instead ofpatch
on NetBSD and DragonFlyBSD [#5893 @kit-ty-kate]
Env
- Internal Cygwin installation's bin directory is placed as far down PATH as is necessary not to shadow
bash
,tar
,sort
orgit
[#5832 @dra27]
Source
- Using
opam source --dev
with git repositories doesn't fetch with--depth 1
[#5888 @moyodiallo - fix #5061]
Var/Option
- Disable Software Heritage fallback by default [#5899 @kit-ty-kate]
Repository
- Warn if
GNU patch
is not detected during a repository update [#5893 @kit-ty-kate]
Opamfile
- Hijack the
"%{var?string-if-true:string-if-false-or-undefined}%"
syntax to support extending the variables of packages with + in their name (conf-c++
andconf-g++
already exist) using"%{?pgkname:var:}%"
[#5840 @kit-ty-kate]
Lint
- Add warning 69: Warn for new syntax when package name in variable in string interpolation contains several '+' [#5840 @rjbou]
Sandbox
- Mark the user temporary directory (as returned by
getconf DARWIN_USER_TEMP_DIR
) as writable whenTMPDIR
is not defined on macOS [#5780 @ElectreAAS]
Build
- Allow to compile opam when the environment contains unicode characters on Windows [#5880 @kit-ty-kate - fix #5861]
- Add
winsymlinks:native
to theCYGWIN
environment variable when installing a package on Windows [#5793 @kit-ty-kate - fix #5782]
Miscellaneous changes
Init
- Add
rsync
system package to internal Cygwin packages list (enables local pinning and is used by the VCS backends [#5808 @dra27] - Add
sys-pkg-manager-cmd
as an accepted field in opamrc files [#5847 @rjbou - fix #5844] - Fix
git-location
handling in init config file [#5848 @rjbou - fix #5845] - Test if file exists before sourcing in fish + powershell [#5864 @ElectreAAS]
Env
- Fix shell detection on Windows when opam is called via Cygwin's /usr/bin/env even though cmd/powershell is used [#5797 @kit-ty-kate]
- Fix incorrect deduplication of environment variables on update. Effect was that
FOO += ""
would occlude the value ofFOO
in the environment [#5837 @dra27] - Fix regression from #5356 on the detection of out-of-date environment variables. As part of a refactoring, a filter predicate got inverted [#5837 @dra27]
- Unixify Windows paths in init shells scripts (sh, bash, zsh, fish & tsh) [#5797 @rjbou]
OpamProcess.cygwin_create_process_env
no longer adjusts PATH [#5832 @dra27]
External dependencies
Format upgrade
- Handle init OCaml
sys-ocaml-*
eval variables during format upgrade from 2.0 -> 2.1 -> 2.2 [#5829 @dra27]
Build
- Do not check for cppo in the configure script (not used directly anymore since #5498) [#5794 @kit-ty-kate]
- Upgrade vendored cmdliner to 1.2.0 [#5797 @kit-ty-kate]
- Upgrade the vendored dune to 3.14.0 [#5869 @kit-ty-kate]
- Upgrade the vendored re to 1.11.0 [#5869 @dra27]
- Upgrade the vendored ocamlgraph to 2.1.0 [#5869 @dra27]
- Upgrade the vendored opam-file-format to 2.1.6 [#5869 @dra27]
- Upgrade the vendored dune to 3.14.2 [#5880 @kit-ty-kate]
Install script
- Add support for
doas
as an alternative tosudo
[#5820 @kit-ty-kate - fix #5792]
Shell
- Quote all the paths to
OPAMROOT
when creating the init scripts on Unix in caseOPAMROOT
contains spaces, backslashes or special characters [#5841 @kit-ty-kate - fix #5804]
Internal
- Warn if
GNU patch
is not detected when a patch is applied [#5893 @kit-ty-kate] - Use
gpatch
by default instead ofpatch
on NetBSD and DragonFlyBSD [#5893 @kit-ty-kate] - Use
gpatch
if it exists and is detected as GNU patch whenpatch
is notGNU patch
[#5893 @kit-ty-kate]
Internal: Windows
- Ensure that the system critical error dialog is disabled when opam starts [#5828 @dra27]
- Fix loading git location at init [#5843 @rjbou]
- Remove use of deprecated function
SHGetFolderPath
and useSHGetKnownFolderPath
instead [#5862 @kit-ty-kate] - Improve performance by only calling
OpamStubs.getPathToSystem
once [#5862 @dra27]
Documentation
Testing
- Improve and extend the tests [#5864 #5829 #5840 #5888 @moyodiallo @kit-ty-kate @rjbou]
- Improve the benchmarks [#5900 @kit-ty-kate]
- Improve the test infrastructure [#5851 #5869 #5788 @dra27 @rjbou]
API updates
opam-client
OpamClient.windows_checks
: On existing Cygwin install, permit to detect msys2 and storeos-distribution=msys2
inglobal-variables
config file field [#5843 @rjbou]OpamClient.windows_checks
: When updating config file for msys2, resolvepacman
path and store it insys-pkg-manager-cmd
for msys2 [#5843 @rjbou]OpamArg.apply_global_options
: load MSYS2 Cygwin binary path too [#5843 @rjbou]
opam-repository
OpamRepositoryBackend.S.pull_url
,OpamVCS.fetch
,OpamRepository.pull_tree
: addfull_fetch
optional argument to pull full history if url is aVCS
[#5888 @moyodiallo - fix #5061]
opam-state
OpamEnv.env_expansion
: Fix detection of out-of-date environment variables, a filter predicate was inverted [#5837 @dra27]OpamSysInteract.Cygwin.check_install
: addvariant
argument to permit checking that it is an Cygwin-like install if it is set to true, keep checking that it is a strictly Cygwin install if false [#5843 @rjbou]OpamSysInteract.Cygwin.check_install
: look forcygcheck.exe
inusr/bin
also as MSYS2 doesn't have "bin" [#5843 @rjbou]OpamGlobalState.load_config
: load MSYS2 Cygwin binary path too at config file loading [#5843 @rjbou]OpamEnv
: addsys_ocaml_eval_variables
value, movedOpamInitDefaults
as it is also needed inOpamFormatUpgrade
too [#5829 @rjbou @kit-ty-kate]OpamEnv
supports an internalCygwin
environment operation which pushes the given directory as far down the list as can be done without shadowing. This mechanism replaces the opposite which was done in OpamProcess [#5832 @dra27]
opam-format
OpamFile.InitConfig
: addsys-pkg-manager-cmd
field [#5847 @rjbou]OpamTypesBase
: addfilter_ident_of_string_interp
that is used for parsing variables in string interpolation likefilter_ident_of_string
but permits the parsing of '%{?pkg+:var:}%' syntax [#5840 @rjbou]OpamTypesBase.filter_ident_of_string_interp
: addaccept
optional argument to be able to raise an error when several pluses are in the package name without using the new syntax, like%{pkg+++:var}%
OpamFilter
: addextract_variables_from_string
to retrieve string of variables, and exposes it [#5840 @rjbou]OpamTypes.env_update
now has an additional type parameter indicating whether the update is internal or writeable [#5832 @dra27]
opam-core
OpamStd.Sys
: addis_cygwin_variant_cygcheck
that returns true if in pathcygcheck
is from a Cygwin or MSYS2 installation [#5843 @rjbou]OpamStd.Env.cyg_env
: takes the environment to cygify, usuallyOpamStd.Env.raw_env
[#5829 @dra27]OpamSystem.patch
now displays a warning when GNU patch is not detected and looks for both patch and gpatch as a backup option depending on the OS [#5893 @kit-ty-kate]
2.2.0~beta1
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 upcoming 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).
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
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
- Fix
opam env
containing carriage return on Cygwin [#5715 @dra27 @rjbou @kit-ty-kate - fix #5684] - Remove stray comments from pwsh and cmd env [#5715 @dra27]
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
- Upgrade to, and require mccs >= 1.1+17 [#5769 @kit-ty-kate]
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
: oninit
andreinit
add git lookup in windows checks [#5718 @rjbou]OpamClient.init
: add optiongit-location
argument for git binary location configuration [#5718 @rjbou]OpamTreeCommand.run
: remove optional argumentno_switch
[@rjbou #5687]
opam-format
opam-core
2.2.0~alpha3
This is the third alpha release of opam 2.2.0.
This alpha release contains new features, enhancements, updates & fixes. Please see upcoming 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
).
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 insetenv
andbuild-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
- Make /tmp writable again to restore POSIX compliancy [#5634 #5662 @kit-ty-kate - fixes #5462]
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 updateextra-files:
field according files present infiles/
directory [#5647 @rjbou]
Lint
- Allow to mark a set of warnings as errors using a new syntax
-W @1..9
[#5652 @kit-ty-kate @rjbou - fixes #5651]
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
Release
- Create ppc64le and s390x binaries during releases [#5420 @kit-ty-kate]
- Workaround incorrect
<limits.h>
in musl [#5383 @dra27] - Upgrade to FreeBSD 13.2 and OpenBSD 7.4 [#5727 @kit-ty-kate]
- Fix check for adding
-lsha_stubs
only onmaster
on OpenBSD [#5733 @punchagan]
Documentation
Testing
- Improve and extend tests [#5560 #5600 #5607 #5636 #5639 #5647 #5672 #5686 #5691 #5700 #5701 @kit-ty-kate @rjbou]
- Improve test engine [#5560 #5606 #5607 #5654 #5657 @rjbou]
API updates
opam-client
OpamTreeCommand.run
: now takes anatom
instead ofname
[#5613 @kit-ty-kate]
opam-format
OpamFile.Environment
: add parsing-printing of rewriting rules, keeping backward compatibility [#5636 @rjbou]OpamFile.OPAM
:effective_part
keepsx-env-path-rewrite
, affects alsoeffectively_equal
[#5636 @rjbou]OpamFile.OPAM
: add handling ofx-env-path-rewrite
extensions field, that specifies rewrite rules [#5636 @rjbou]OpamFilter
: addexpand_interpolations_in_file_full
which allows setting the output file along with the input file [#5629 @rgrinberg]OpamFilter
: exposestring_interp_regex
which allows clients to identify variable interpolations in strings [#5633 @gridbugs]OpamFormat.V
: addpath_format
&separator
value parser printer [#5636 @rjbou]OpamFormat
: addformula_items
to permit definition of formulae pp not only of the typepackage-formula
[#5636 @rjbou]OpamPp.fallback
: add name concatenation and printing fallback too [#5636 @rjbou]OpamTypes.env_update
: add arewrite
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
: addenv_update_resolved
andenv_update_unresolved
builders [#5636 @rjbou]OpamTypesBase
: addenv_update
,env_update_resolved
, andenv_update_unresolved
builders [#5636 @rjbou]OpamTypesBase
: add to_string function forpath_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 withOpamSystem.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
This is the second alpha release of opam 2.2.0.
This alpha release contains new features, enhancements, updates & fixes. Please see upcoming 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
).
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
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-client
OpamInitDefault
: addrequired_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 optionalcygwin_setup
argument to permit non interactive setup [#5545 @rjbou]OpamCommands.init
: add cygwin setup flags [#5545 @rjbou]
opam-state
2.2.0~alpha
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.
- Support MSYS2 on Windows for depexts [#5348 @jonahbeckford #5433 @rjbou]
- Don't require cc on Windows [#5541 @dra27]
- Generate init and variables for Windows [#5541 @dra27]
- When defined, add Cygwin binary path to build environment [#5543 @rjbou]
- Depexts support Cygwin on Windows [#5542 @rjbou] [#5544 @rjbou]
- On Windows, ask for pre-existent Cygwin installation, check it, and configure opam with it [#5544 @dra27 @rjbou]
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 totree --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 (aswith-test
/with-doc
), and its environment variableOPAMWITHDEVSETUP
, 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.
- Add Software Heritage fallback when downloading archive source, triggered when all urls and cache fails, with confirmation [#4859 @rjbou @zapashcanon]
- Add swhid url handling in url field [#4859 @rjbou @zapashcanon]
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.
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
- Add
opam exec --no-switch
to remove opam environment from launched command [#4957 @kit-ty-kate - fix #4951]
Source
Clean
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
orOPAMROOT
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]
- ✘ Change default from no to yes for shell update [#5456 #5540 @rjbou @kit-ty-kate]
Fixes
- Fix
opam init
andopam init --reinit
when thejobs
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
andOPAMFETCH
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 wrongswitch-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
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 intoinvariant-pkg
[#5208 @rjbou]
Fixes
- Fix all empty conflict explanations [#4982 #5263 @kit-ty-kate] {2.1.4 partially} {2.1.3}
- Fix passing
archive-mirrors
field from init config file to config [#5315 @hannesm] {2.1.5} - Fix json double printing [#5143 @rjbou]
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
- Reimplement deps-only [#4975 @AltGr]
- Log a summary of recorded
.changes
as aACTION
trace log to help debug #4419 [#5144 @na4zagin3] - Use the default criteria during reinstall/upgrade when requesting at least one non-installed package [#5228 @kit-ty-kate]
Fixes
- Prevent
.changes
files from being updated during dry-run [#5144 @na4zagin3 - fix #5132]
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...