Skip to content

Releases: ocaml/opam

2.3.0~rc1

31 Oct 12:41
42992f5
Compare
Choose a tag to compare
2.3.0~rc1 Pre-release
Pre-release

This is the first release candidate of opam 2.3.0.

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

Please see our blog post for the upgrade instructions.

Changelog:

Changes

No significant change compared to 2.3.0~beta2.

2.3.0~beta2

24 Oct 10:26
4275a0e
Compare
Choose a tag to compare
2.3.0~beta2 Pre-release
Pre-release

This is the second beta release of opam 2.3.0.

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

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

Changelog:

Changes

UI

  • [BUG] Fix a regression in the detection of the current terminal size that leads to opam output that tries to fit itself into 80 columns regardless of the current terminal size [#6244 @kit-ty-kate - fix #6243]

Release scripts

  • Upgrade the Alpine Linux container where the Linux release binaries are built from Alpine 3.13 to 3.20 [#6237 @kit-ty-kate]
  • Make the release script produce a Linux/riscv64 binary [#6237 @kit-ty-kate]
  • Upgrade the FreeBSD qemu image where the FreeBSD binary is built from FreeBSD 13.2 to 14.1 [#6237 @kit-ty-kate]
  • Upgrade the OpenBSD qemu image where the OpenBSD binary is built from OpenBSD 7.4 to 7.6 [#6237 @kit-ty-kate]
  • Simplify and improve the reliability of the one-click release script by switching away from a passwordless setup [#6237 @kit-ty-kate]
  • Make the release script produce a NetBSD/x86_64 binary [#6258 @kit-ty-kate]

API updates

opam-core

  • OpamStubs.get_stdout_ws_col: new Unix-only function returning the number of columns of the current terminal window [#6244 @kit-ty-kate]

2.3.0~beta1

15 Oct 10:19
e16a04e
Compare
Choose a tag to compare
2.3.0~beta1 Pre-release
Pre-release

This is the first beta release of opam 2.3.0.

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

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

Changelog:

Changes

Pin

  • [BUG] Fix an opam 2.1 regression where the initial pin of a local VCS directory would store untracked and ignored files. Those files would usually be cleaned before building the package, however git submodules would not be cleaned and would cause issues when paired with the new behaviour added in 2.3.0~alpha1 which makes opam error when git submodules fail to update (was previously a warning) [#6221 @rjbou - fix #5809]

Var

  • [BUG] Fix a regression which would make opam crash on platforms where getconf LONG_BIT is not available (e.g. OpenBSD) [#6230 @kit-ty-kate - fix #6215]

Actions

  • [BUG] Fix the installed packages internal cache, which was storing the wrong version of the opam file after a build failure. This could be triggered easily for users with custom repositories with non-populated extra-files [#6213 @kit-ty-kate]

Lint

  • [BUG] Fix a regression in lint W59 with local urls that are not archives [#6219 @rjbou - fix #6218]

Build

  • Bump to lang dune to 2.8 and bump the requirement to dune >= 2.8, which was actually required in the previous alpha release [#6204 @kit-ty-kate]
  • Bump the vendored version of dune to 3.16.0, cppo to 1.7.0 and extlib to 1.8.0 [#6223 @kit-ty-kate]
  • Fix compilation with OCaml 5.3 when using the vendored extlib by updating to the 5.3 compatible version (e.g. make cold or ./configure --with-vendored-deps) [#6223 @kit-ty-kate]
  • Fix the compilation of opam on Windows with OCaml >= 5.0 (again) [#6216 @kit-ty-kate]

Release scripts

  • Fix the release script after the bump of dune lang to 2.6 [#6204 @kit-ty-kate]
  • Fix the release script after the introduction of opam_core_stubs [#6204 @kit-ty-kate]
  • Improve the release script by ignoring interactive questions asked by the FreeBSD package manager [#6204 @kit-ty-kate]

Testing and documentation

API updates

opam-state

  • OpamSwitchState.Installed_cache: export load function [#6233 @rjbou]

opam-core

  • OpamStd.Sys.{get_terminal_columns,uname,getconf,guess_shell_compat}: Harden the process calls to account for failures [#6230 @kit-ty-kate - fix #6215]
  • OpamStd.Sys.{uname,getconf}: now accepts only one argument as parameter, as per their documentation [#6230 @kit-ty-kate]
  • OpamSystem: add is_archive_from_string that does the same than is_archive but without looking at the file, only analysing the string (extension) [#6219 @rjbou]

2.3.0~alpha1

20 Sep 14:33
6ed22cb
Compare
Choose a tag to compare
2.3.0~alpha1 Pre-release
Pre-release

This is the first alpha release of opam 2.3.0.

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

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

Changelog:

Major changes

Repository

  • Silently mark packages requiring an unsupported version of opam as unavailable [#5665 @kit-ty-kate - fix #5631]
  • When loading a repository, don't automatically populate extra-files: field with found files in files/ [#5564 @rjbou]

List

  • ◈ Add a new --latests-only option to only list the latest packages [#5375 @kit-ty-kate]

Install

  • [BUG] Fix opam install --check pkg when pkg depends on a non-existing package [#6121 @kit-ty-kate]
  • Make opam install --check check if all dependencies are installed recursively [#6122 @kit-ty-kate - fix #6097]

Build (package)

  • ◈ Add --verbose-on option to enable verbose mode on specified package names [#5682 @desumn @rjbou]

Switch

  • ◈ Add opam switch import --deps-only option to install only dependencies of root package at import [#5388 @rjbou - fix #5200]
  • [BUG] Make accepted --repos URLs on creation consistent with opam repository [#6091 @Keryan-dev - fix #4673]
  • ◈ opam switch list-available will not display compilers flagged with avoid-version/deprecated unless --all is given [#6098 @kit-ty-kate - fix #6089]
  • Make opam switch set-invariant return the actual invariant syntax expected by --invariant [#5619 @kit-ty-kate - fixes #5491]

Solver

  • Add support for unordered criteria with the builtin-0install solver [#6130 @kit-ty-kate]
  • Add support for the -changed criteria with the builtin-0install solver, to make the solver prefer to keep packages installed at their current version [#6130 @kit-ty-kate]
  • Add support for the -count[avoid-version,solution] criteria with the builtin-0install solver, to avoid packages marked with avoid-version flag [#6130 @kit-ty-kate]
  • The default criteria for the builtin-0install solver changed from empty to -changed,-count[avoid-version,solution] [#6130 @kit-ty-kate]
  • The upgrade and fixup criteria for the builtin-0install solver changed from empty to -count[avoid-version,solution] [#6130 @kit-ty-kate]
  • Fix must unhelpful conflict messages by merging all formulas together [#6106 @kit-ty-kate]

Var/Option

  • Fix the value of the 'arch' variable when the current OS is 32bit on a 64bit machine [#5950 @kit-ty-kate - fix #5949]

VCS

  • Fail when git submodule fails to update instead of showing a warning and ignoring the error [#6132 @kit-ty-kate - fix #6131]

Miscellaneous changes

Global CLI

Init

  • Suppress all the Windows menus when running with opam init -ya [#6034 @dra27]

Actions

Config report

  • Always list all the repositories regardless of whether or not a switch is currently set [#6116 @kit-ty-kate]
  • Make opam config report return the actual invariant syntax expected by --invariant [#5619 @kit-ty-kate - fixes #5491]

Install

Build (package)

List

Var/Option

  • Warn when setting a variable if an option is shadowed [#4904 @rjbou - fix #4730]

Lint

  • Add E70 to check extra-files: duplicated fields [#5561 @rjbou]
  • Add E71 to check if the same checksum algorithm is used several times for a given url in url section [#5561 @rjbou]
  • Add E72 to check if the same checksum algorithm is used several times for a given url in extra-sources section [#5561 @rjbou]
  • Add E73 to check that paths in extra-files: are not escapable [#5561 @rjbou]
  • Update W59 (no checksum in url) to always display a warning, untying it from --check-upstream [#5561 @rjbou]

Env

  • Make the shell environment update hint easier to copy/paste [#6159 @kit-ty-kate - fix #6158]
  • Add install.exe to the list of non-shadowed programs when adding Cygwin's bin directory to PATH (ocamlfind et al can be affected by Vim for Windows) [#6190 @dra27]

Opamfile

  • Make all writes atomic [#5489 @kit-ty-kate]
  • Propagate future opamfile parse errors correctly [#6199 @dra27]
  • Ensure future syntax errors are only reported when the syntax version is greater than the client, not the format library [#6199 @dra27 - fix #6188]

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]
  • [BUG] Fix apt/debian lookup for installed packages [#6054 @rjbou]

Build

Release scripts

  • Remove the getgroups workaround allowing users belonging to more than 32 groups now that it is no longer necessary [#6200 @dra27 @kit-ty-kate]

Install script

Admin

  • Change hash cache location from ~/.cache to <opamroot>/download-cache/hash-cache [#6103 @rjbou]
  • Make opam admin cache add missing symlinks [#6068 @kit-ty-kate - fix #6064]

Internal

  • Stop using polymorphic comparison when comparing OpamTypes.switch_selections [#6102 @kit-ty-kate]
  • Remove the meta opam packages opam and opam-admin [#6115 @kit-ty-kate]
  • Reduce allocations in OpamVersionCompare [#6144 @talex5]
  • Speedup OpamVersionCompare by 25% by removing the unused handling of epoch [#5518 @kit-ty-kate]
  • Fix error in OpamSystem.transform_patch - patches were only applied when debugging [#6182 @dra27 regression since #3449]
  • Move Windows stubs to opam-core [#5381 @dra27]

Testing and documentation

API updates

opam-client

  • OpamSwitchCommand.import: add optional ?deps_only argument to install only dependencies of root packages [#5388 @rjbou]
  • OpamArg.build_options: add --verbose-on flag [#5682 @desumn @rjbou]
  • OpamClientConfig.build_options: add verbose_on field [#5682 @desumn]
  • OpamClientConfig.E, OpamArg.environment_variables: and OPAMVERBOSEON support [#5682 @desumn @rjbou]
  • OpamListCommand.selector: Add NotFlag selector [#6098 @kit-ty-kate]

opam-repository

  • OpamRepository.fetch_from_cache: when an archive is found, add a symlink (or copy) for the ones found in opam file but not in cache [#6068 @kit-ty-kate]
  • ?full_fetch is now true by default instead of false [#6146 @kit-ty-kate - fix #6145]

opam-state

  • OpamStateConfig.opamroot_with_provenance: restore previous behaviour to OpamStateConfig.opamroot for compatibility with third party code [#6047 @dra27]
  • OpamSwitchState.{,reverse_}dependencies: make unavailable a non-optional argument to enforce speedups when availability information is not needed [#5317 @kit-ty-kate]
  • OpamFilteTools.add_aux_files: ignore non registered extra-files and make the files_subdir_hashes argument optional (defaults to false) [#5564 @@rjbou]
  • OpamFileTools: read_opam & read_repo_opam no more add non registered extra-files [#5564 @rjbou]

opam-solver

  • OpamCudfCriteria, OpamBuiltinZ3.Syntax: Move OpamBuiltinZ3.Syntax into a dedicated module OpamCudfCriteria [#6130 @kit-ty-kate]
  • OpamSolver.dependency_graph: make unavailable a non-optional argument to enforce speedups when availability information is not needed [#5317 @kit-ty-kate]

opam-format

  • Add OpamTypesBase.switch_selections_{compare,equal}: proper comparison functions for OpamTypes.switch_selections [#6102 @kit-ty-kate]
  • OpamFormula: add exists [#5317 @kit-ty-kate]
  • OpamTypes.universe: make u_available and u_attrs lazy to speedup actions that do not require availiblity information [#5317 @kit-ty-kate - fix #5314]
  • OpamFormula: add some missing comparison...
Read more

2.2.1

22 Aug 11:33
7b95e1f
Compare
Choose a tag to compare

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).

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

Changelog:

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

API changes


Note: the linux binaries were built using 34fb54e instead of the release tag

2.2.0

01 Jul 19:29
8e00bd7
Compare
Choose a tag to compare

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

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 to OpamStateConfig.opamroot for compatibility with third party code [#6047 @dra27]

⚠️ opam-full-2.2.0-1.tar.gz is equivalent to opam-full-2.2.0.tar.gz but contains the missing mccs archive as noted in #6066
⚠️ opam-full-2.2.0-2.tar.gz is equivalent to opam-full-2.2.0-1.tar.gz but contains the missing dune archive as noted in #6066

2.2.0~rc1

21 Jun 00:43
0145363
Compare
Choose a tag to compare
2.2.0~rc1 Pre-release
Pre-release

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).

Changelog:

Major changes

Update / Upgrade

  • Fix opam upgrade wanting to recompile opam files containing the x-env-path-rewrite field [#6029 @kit-ty-kate - fix #6028]

Init

  • Provide defaults so opam init -y no longer asks questions [#6033 @dra27 - fix #6013]

Miscellaneous changes

Global CLI

Build

Release scripts

Internal

Testing

API updates

opam-format

2.2.0~beta3

10 Jun 20:07
cdd59ee
Compare
Choose a tag to compare
2.2.0~beta3 Pre-release
Pre-release

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).

Changelog:

Major changes

Global CLI

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

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

Miscellaneous changes

Init

  • [BUG] Fail if --git-location points to a directory not containing git [#6000 @dra27]

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

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 allow make.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 from cygpath 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

Config

  • Move last-env OPAM_LAST_ENV files outside the switch to be in the opam root [#5962 @moyodiallo - fix #5823]

Update / Upgrade

  • Stop triggering "Undefined filter variable variable" warning for ?variable [#5983 @dra27]

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

Release scripts

Testing

API updates

opam-client

  • OpamClient.init and OpamClient.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 in OpamClient [#6000 @dra27]
  • OpamSolution: exposer print_depext_msg [#5994 @dra27]
  • OpamSolution: extracted install_sys_packages from OpamSolution.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 to analyse_install which now also returns whether the installation found was MSYS2 or Cygwin [#6000 @dra27]
  • OpamSysInteract.Cygwin.install: de-label packages 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: remove OpamPath.Switch.last_env function in favor to OpamPath.last_env as the files are no more stored in switch directory [#5962 @moyodiallo - fix #5823]

opam-core

  • OpamCompat: add Seq.find_map from OCaml 4.14 [#6000 @dra27]
  • OpamConsole.menu now supports up to 35 menu items [#5992 @dra27]
  • OpamConsole: Add formatted_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: add split_quoted that preserves quoted separator [#5935 @dra27]
  • OpamStd.Sys.resolve_command: extracted the logic from OpamSystem.resolve_command, without the default environment handling from OpamProcess. [#5991 @dra27]
  • OpamStd.Sys.resolve_in_path: split the logic of OpamStd.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, complements OpamStubs.writeRegistry [#5963 @dra27]
  • OpamSystem.copy_dir and OpamSystem.mv may display a warning on Windows if an invalid symlink (e.g. an LXSS Junction) is found [#5953 @dra27]
  • OpamSystem: add mk_unique_dir that returns an unique directory name as mk_temp_dir but not in temporary directory [#5457 @dra27]

2.1.6

16 May 17:18
dfbe6a0
Compare
Choose a tag to compare

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).

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

Changelog:

  • 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 of patch on NetBSD and DragonFlyBSD [#5893 @kit-ty-kate]
    • Use gpatch if it exists and is detected as GNU patch when patch is not GNU patch [#5893 @kit-ty-kate]
  • 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

09 Apr 16:20
d30c603
Compare
Choose a tag to compare
2.2.0~beta2 Pre-release
Pre-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).

Changelog:

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 of patch 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 or git [#5832 @dra27]

Source

  • Using opam source --dev with git repositories doesn't fetch with --depth 1 [#5888 @moyodiallo - fix #5061]

Var/Option

Repository

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++ and conf-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 when TMPDIR 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 the CYGWIN 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 of FOO 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

  • Add support for Wolfi OS, treat it like Apline family as it uses apk too [#5878 @xnox]

Format upgrade

  • Handle init OCaml sys-ocaml-* eval variables during format upgrade from 2.0 -> 2.1 -> 2.2 [#5829 @dra27]

Build

Install script

Shell

  • Quote all the paths to OPAMROOT when creating the init scripts on Unix in case OPAMROOT 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 of patch on NetBSD and DragonFlyBSD [#5893 @kit-ty-kate]
  • Use gpatch if it exists and is detected as GNU patch when patch is not GNU 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 use SHGetKnownFolderPath instead [#5862 @kit-ty-kate]
  • Improve performance by only calling OpamStubs.getPathToSystem once [#5862 @dra27]

Documentation

Testing

API updates

opam-client

  • OpamClient.windows_checks: On existing Cygwin install, permit to detect msys2 and store os-distribution=msys2 in global-variables config file field [#5843 @rjbou]
  • OpamClient.windows_checks: When updating config file for msys2, resolve pacman path and store it in sys-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: add full_fetch optional argument to pull full history if url is a VCS [#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: add variant 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 for cygcheck.exe in usr/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: add sys_ocaml_eval_variables value, moved OpamInitDefaults as it is also needed in OpamFormatUpgrade too [#5829 @rjbou @kit-ty-kate]
  • OpamEnv supports an internal Cygwin 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: add sys-pkg-manager-cmd field [#5847 @rjbou]
  • OpamTypesBase: add filter_ident_of_string_interp that is used for parsing variables in string interpolation like filter_ident_of_string but permits the parsing of '%{?pkg+:var:}%' syntax [#5840 @rjbou]
  • OpamTypesBase.filter_ident_of_string_interp: add accept 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: add extract_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: add is_cygwin_variant_cygcheck that returns true if in path cygcheck is from a Cygwin or MSYS2 installation [#5843 @rjbou]
  • OpamStd.Env.cyg_env: takes the environment to cygify, usually OpamStd.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]