2.2.0~beta2
Pre-release
Pre-release
kit-ty-kate
released this
09 Apr 16:20
·
522 commits
to master
since this release
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 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]