Releases: ocaml/opam
2.1.0~rc2
This is the second release candidate of opam 2.1.0.
Binaries and full archive are signed by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
It contains 2 fixes in addition to the original release candidate:
- Fix upgrade issue from opam 2.1.0~alpha2+ where local switches were manually deleted (#4713)
- Fix local switch format upgrade handling if they were created with an alpha or beta release of opam 2.1 (#4715)
- Fix compilation of the
z3
optional solver backend (#4717)
Release Candidate Overview
Since beta4, the release candidates further extend the CLI versioning feature and introduce support to allow tools compiled with older versions of the opam libraries to read opam roots which have been upgraded by a newer version of the opam client. Naturally, it includes many bug fixes since the last beta.
New features
- CLI versioning: new "default" CLI where deprecated options are accepted (in the major version) if the CLI hasn't been explicitly selected with
--cli
(#4503) - CLI versioning now applies to environment variables and flag enums
- Environment variables are now only read by the client when the configuration is loaded, rather than the library (#4606)
- Deprecated
build-doc
,build-test
,make
flags (#4581) - Add
--no
,--confirm-level
andOPAMCONFIRMLEVEL
for automatic answering of prompts (#4582) - Add a
--with-0install-solver
option to the configure script to enable the 'builtin-0install' solver (#4646) - The options
--root
and--switch
are now reflected in environment variables when building packages so that calls toopam
during build access the correct root and switch (#4668) - Introduce a
default-invariant
config field, restore the 2.0 semantics fordefault-compiler
(#4577) - opam roots upgraded to a newer version of opam are read in best effort mode by an older opam library (#4636)
- Improve installation times by only tracking files listed in
.install
instead of the whole switch prefix when there are noinstall:
instructions (and no preinstall commands) (#4422) - Opam file: Rename
hidden-version
toavoid-version
(#4527) - Include doc field in opam-show (#4565)
Bug fixes
CLI versioning
- Scrub
OPAM*
environment variables added since 2.0 from package builds to prevent warnings when a package calls opam (#4660) - Add
opam config
deprecated subcommands in the default cli (#4503) - Clearer messages about using --cli and OPAMCLI (#4655)
Plugin handling
- Ensure the symlink for a plugin is maintained on each invocation and reset the plugin symlinks when the root is upgraded (#4619)
- Expect plugins to end in .exe on Windows (#4709)
Switch & install
- Don't patch file twice (#4529)
- With
--deps-only
, set dependencies as root packages (#4502) - Keep global lock only if root format upgrade is performed (#4597)
- Send the 'opam root layout update' message to stderr (#4692)
- Fix default invariant with no system compiler (#4640)
- Correct the message when more than one depext is missing (#4678)
- Only display one conflict message when they are all owing to identical missing depexts (#4678)
- 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)
- Don't refer to base packages in messages any more (#4572)
- Give the correct command when demonstrating switch creation (#4673)
Pin
- Don't look for lock files for pin depends (#4505)
- Fetch sources when pinning an already pinned package with a different url when using working directory (#4484)
- Don't ask for confirmation for pinning base packages (similarly makes no sense with 2.1 switch invariants) (#4571)
- Fix version pin source retrieving: mustn't error if archive opam file is malformed (#4580)
opam list --silent
renamed to--check
(#4323)
Opam variables
- Fix
sys-ocaml-cc
,sys-ocaml-arch
andsys-ocaml-libc
when no system compiler installed (#4706) - Fix
Not_found
(config file) in config report (#4570) - Config report: Print variables of installed compilers and their (installed) dependencies (#4570)
- Fix
switch
global variable resolving (#4684) - Fix
hash
package variable resolving (#4687)
Lint
- Fix W59 & E60 for conf packages (no url required) (#4549)
- Fix W59 & E60 with VCS urls, don't check upstream if url has VCS backend (#4635)
- Add E67 checksum specified with non archive url (#4635)
- Disable subpath warnings E63, W64 (#4638)
Lock & opam file
- Don't write lock file with
--read-only
,--safe
, and--dryrun
(#4320) - Make
opam lock
consistent withopam install
, on local pin always take last opam file even if uncommitted (#4320) - Fix
features
parser (#4507) - Fix rewriting with preserved format empty field error (#4628)
- Require
opam-file-format.2.1.3+
in order to enforceopam-version: "2.1"
as first non-comment line (#4394)
External dependencies
- Handle macport variants (#4297)
- Always upgrade all the installed packages when installing a new package on Archlinux (#4556)
- Handle some additional environment variables (
OPAMASSUMEDEPEXTS
,OPAMNODEPEXTS
) (#4587) - Improve messages to hint that answering
no
doesn't abort installation (#4591) - Add support for non-interactive mode in macports (#4676)
- Handling of packages of tagged repositories for alpine (#4670)
- Clarify some
assume-depexts
related messages (#4662) - Warn the user if epel-release is missing and unavailable depexts are detected (#4669)
- Ignore config yes automatic answering when asking confirmation to run install commands (#4680)
- Don't check opam system dependencies on reinit after a format upgrade (#4638)
Sandbox
- Fix the conflict with the environment variable name used by dune (#4535; fixes ocaml/dune#4166)
- Kill builds on Ctrl-C with bubblewrap (#4400)
- Various fixes (#4589 and #4609)
Solver
- Fix Cudf preprocessing (#4624)
- 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) - Allow to upgrade to a hidden-version package if a hidden-version package is already installed (#4525)
Misc
- Add missing shell quoting to support space and special shell characters in switch directory path (#4707)
- Rename
state.cache
to include theOpamVersion.magic()
string. All .cache files are deleted if any cache file is written to, allowing multiple versions of the library to co-exist without constantly regenerating it (#4554) - Win32 Console: fix VT100 support (#3897 #4710)
- Harden cygpath wrapper (#4625)
- Formalise opam dev version detection with
OpamVersion.is_dev_version
(#4665) - Run the shell hooks with closed stdin (bash, zsh) (#4692)
- Fix build from source when a dune-project file is presented in the parent directory (#4537)
- Fix opam-devel.install not to install two files called opam (#4664)
- Build release tags as non-dev versions, as for release tarballs (#4656)
- Fix
opam exec
on native Windows when calling cygwin executables (#4588) - Fix temporary file with a too long name causing errors on Windows (#4590)
- Tests and documentation extended and improved
Many thanks to @AltGr and @rjbou (OCamlPro), @dra27 and @kit-ty-kate (OCaml Labs), @emillon (Tarides), @dannywillems, @eth-arm, @LasseBlaauwbroek, @smorimoto and @UnixJunkie and everyone who's helped with issue reports, comments and feedback.
2.1.0~rc
This is a release candidate of opam 2.1.0.
Binaries and full archive are signed by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
Overview
This release candidate further extends the CLI versioning feature and introduces support to allow tools compiled with older versions of the opam libraries to read opam roots which have been upgraded by a newer version of the opam client. Naturally, it includes many bug fixes since the last beta.
New features
- CLI versioning: new "default" CLI where deprecated options are accepted (in the major version) if the CLI hasn't been explicitly selected with
--cli
(#4503) - CLI versioning now applies to environment variables and flag enums
- Environment variables are now only read by the client when the configuration is loaded, rather than the library (#4606)
- Deprecated
build-doc
,build-test
,make
flags (#4581) - Add
--no
,--confirm-level
andOPAMCONFIRMLEVEL
for automatic answering of prompts (#4582) - Add a
--with-0install-solver
option to the configure script to enable the 'builtin-0install' solver (#4646) - The options
--root
and--switch
are now reflected in environment variables when building packages so that calls toopam
during build access the correct root and switch (#4668) - Introduce a
default-invariant
config field, restore the 2.0 semantics fordefault-compiler
(#4577) - opam roots upgraded to a newer version of opam are read in best effort mode by an older opam library (#4636)
- Improve installation times by only tracking files listed in
.install
instead of the whole switch prefix when there are noinstall:
instructions (and no preinstall commands) (#4422) - Opam file: Rename
hidden-version
toavoid-version
(#4527) - Include doc field in opam-show (#4565)
Bug fixes
CLI versioning
- Scrub
OPAM*
environment variables added since 2.0 from package builds to prevent warnings when a package calls opam (#4660) - Add
opam config
deprecated subcommands in the default cli (#4503) - Clearer messages about using --cli and OPAMCLI (#4655)
Plugin handling
- Ensure the symlink for a plugin is maintained on each invocation and reset the plugin symlinks when the root is upgraded (#4619)
- Expect plugins to end in .exe on Windows (#4709)
Switch & install
- Don't patch file twice (#4529)
- With
--deps-only
, set dependencies as root packages (#4502) - Keep global lock only if root format upgrade is performed (#4597)
- Send the 'opam root layout update' message to stderr (#4692)
- Fix default invariant with no system compiler (#4640)
- Correct the message when more than one depext is missing (#4678)
- Only display one conflict message when they are all owing to identical missing depexts (#4678)
- 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)
- Don't refer to base packages in messages any more (#4572)
- Give the correct command when demonstrating switch creation (#4673)
Pin
- Don't look for lock files for pin depends (#4505)
- Fetch sources when pinning an already pinned package with a different url when using working directory (#4484)
- Don't ask for confirmation for pinning base packages (similarly makes no sense with 2.1 switch invariants) (#4571)
- Fix version pin source retrieving: mustn't error if archive opam file is malformed (#4580)
opam list --silent
renamed to--check
(#4323)
Opam variables
- Fix
sys-ocaml-cc
,sys-ocaml-arch
andsys-ocaml-libc
when no system compiler installed (#4706) - Fix
Not_found
(config file) in config report (#4570) - Config report: Print variables of installed compilers and their (installed) dependencies (#4570)
- Fix
switch
global variable resolving (#4684) - Fix
hash
package variable resolving (#4687)
Lint
- Fix W59 & E60 for conf packages (no url required) (#4549)
- Fix W59 & E60 with VCS urls, don't check upstream if url has VCS backend (#4635)
- Add E67 checksum specified with non archive url (#4635)
- Disable subpath warnings E63, W64 (#4638)
Lock & opam file
- Don't write lock file with
--read-only
,--safe
, and--dryrun
(#4320) - Make
opam lock
consistent withopam install
, on local pin always take last opam file even if uncommitted (#4320) - Fix
features
parser (#4507) - Fix rewriting with preserved format empty field error (#4628)
- Require
opam-file-format.2.1.3+
in order to enforceopam-version: "2.1"
as first non-comment line (#4394)
External dependencies
- Handle macport variants (#4297)
- Always upgrade all the installed packages when installing a new package on Archlinux (#4556)
- Handle some additional environment variables (
OPAMASSUMEDEPEXTS
,OPAMNODEPEXTS
) (#4587) - Improve messages to hint that answering
no
doesn't abort installation (#4591) - Add support for non-interactive mode in macports (#4676)
- Handling of packages of tagged repositories for alpine (#4670)
- Clarify some
assume-depexts
related messages (#4662) - Warn the user if epel-release is missing and unavailable depexts are detected (#4669)
- Ignore config yes automatic answering when asking confirmation to run install commands (#4680)
- Don't check opam system dependencies on reinit after a format upgrade (#4638)
Sandbox
- Fix the conflict with the environment variable name used by dune (#4535; fixes ocaml/dune#4166)
- Kill builds on Ctrl-C with bubblewrap (#4400)
- Various fixes (#4589 and #4609)
Solver
- Fix Cudf preprocessing (#4624)
- 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) - Allow to upgrade to a hidden-version package if a hidden-version package is already installed (#4525)
Misc
- Add missing shell quoting to support space and special shell characters in switch directory path (#4707)
- Rename
state.cache
to include theOpamVersion.magic()
string. All .cache files are deleted if any cache file is written to, allowing multiple versions of the library to co-exist without constantly regenerating it (#4554) - Win32 Console: fix VT100 support (#3897 #4710)
- Harden cygpath wrapper (#4625)
- Formalise opam dev version detection with
OpamVersion.is_dev_version
(#4665) - Run the shell hooks with closed stdin (bash, zsh) (#4692)
- Fix build from source when a dune-project file is presented in the parent directory (#4537)
- Fix opam-devel.install not to install two files called opam (#4664)
- Build release tags as non-dev versions, as for release tarballs (#4656)
- Fix
opam exec
on native Windows when calling cygwin executables (#4588) - Fix temporary file with a too long name causing errors on Windows (#4590)
- Tests and documentation extended and improved
Many thanks to @AltGr and @rjbou (OCamlPro), @dra27 and @kit-ty-kate (OCaml Labs), @emillon (Tarides), @dannywillems, @eth-arm, @LasseBlaauwbroek, @smorimoto and @UnixJunkie and everyone who's helped with issue reports, comments and feedback.
2.0.8
This is the release of opam 2.0.8.
This minor release contains some fixes, please see blog post for upgrade instructions.
Binaries and full archive are signed by by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
Fish
Sandbox
- No error when linked directory doesn't exist (e.g. XDG defined) [#4278 @kit-ty-kate]
- Add quotes to avoid space unwanted behaviors [#4278 @kit-ty-kate]
- Handle
CCACHE_DIR
environment variable in sandbox script. [#4087 @rjbou - fix #4079] - Follow links of
~/.cache
&~/.cache/dune
for bwrap call. [#4087 @rjbou - fix #4068] - Don't overwrite user's sandbow script modification. [#4020 #4092 @rjbou]
- On MacOS sandbox script, always read write mount
/tmp
[#3742 @rjbou - fix ocaml/opam-repository#13339]
Install
- The stdout of
pre-
andpost-session
hooks is now propagated to the user [#4382 @AltGr - fix #4359] - Run switch pre/post sessions hooks [#4476 @rjbou - fix #4472]
Build
- Use version var in opam file instead of equal current version number in opamlib dependencies [#4178 @rjbou]
- Opam file build using dune [#4178 @rjbou #4229 @kit-ty-kate - fix #4173]
- Update opam file to 2.0 [#4371 @AltGr]
Internal
- Fix
arch
detection when using 32bit mode on ARM64 [#4462 @kit-ty-kate] - Fix
arch
detection of i486 [#4462 @kit-ty-kate]
2.1.0~beta4
This is a third beta release of opam 2.1.0 (there was a glitch with the number).
This beta release contains quite a few improvements and fixes upon beta3.
Binaries and full archive are signed by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92 ).
Overview
A more complete overview of opam 2.1.0~beta4 is on the platform blog.
CLI Versioning
--cli
was added in the first beta, but is now used throughout the CLI (see #4385). When invoking opam
from a script or program, we recommend using --cli=2.1
. If you need to be compatible with 2.0, you can set the environment variable OPAMCLI
to 2.0
(this is done automatically by opam
when building packages).
As with changes in the Dune language, changes to opam's CLI are now immediate - for example, --unlock-base
is now unavailable without selecting the opam 2.0 CLI (you must use --update-invariant
). Like Dune, opam tries to be helpful and the errors include pointers to the new syntax.
Other new features
- opam now exits with code 31 if all failures were during fetch operations (#4214)
opam install
now has a--download-only
flag (#4036), allowing opam's caches to be primedopam init
now advises the correct shell-specific command foreval $(opam env)
(#4427)post-install
hooks are now allowed to modify or remove installed files (#4388)- New package variable
opamfile-loc
with the location of the installed package opam file (#4402) opam update
now has--depexts
flag (#4355), allowing the system package manager to update too- depext support NetBSD and DragonFlyBSD added (#4396)
- The format-preserving opam file printer has been overhauled (#3993, #4298 and #4302)
- pins are now fetched in parallel (#4315)
os-family=ubuntu
is now treated asos-family=debian
(#4441)opam lint
now checks that strings in filtered package formulae are booleans or variables (#4439)
Bug fixes
- Sandboxing and init script fixes (#4368 and #4482)
- stdout of
pre-
andpost-session
hooks is now propagated to the user (#4359) - Switch-specific hooks now work (#4472)
- Various fixes to architecture detection (#4462)
- Don't advertise upgrades to hidden versions (#4432)
- Don't recompile when modifying the package flags (#4477)
opam remove --autoremove <PKG>
no longer removes unrelated packages or triggers conflicts with orphaned packages (#4250 and #4332)opam switch --update-invariant
not changing the invariant when removing or changing package name (#4353)- Fixed updates of the invariant with
--update-invariant
(#4431) ** NO DESCRIPTION ** - Various pinning fixes (#4255, #4365, #4348 and #4399)
--working-dir
now works with local switches (#4433)- Handling of filename-encoded pkgname in opam files now works (#4401)
- Display of package variables when there's no config file now no longer loads switch state and works (#4428)
- Allow short names and full name paths for ports-based systems for depext; affects OpenBSD, FreeBSD and Gentoo (#4396)
- Fixed
opam option depext-bypass-=["XXX"]
(#4428) ** NO DESCRIPTION ** opam admin cache
now uses the archives cache (#4352)opam admin check --cycles
no longer explodes on repositories with huge cliques (#4392)- Solver fixes (#4362, #4393 and #4357)
- Fixed permission denied fallback calling openssl (#4449 - part of #4448)
--read-only
now causes fewer cache updates (#4467 - part of #4354)
Many thanks to @AltGr and @rjbou (OCamlPRO), @emillon (Tarides), @kit-ky-kate (OCaml Labs), @alan-j-hu, @Armael, @Blaisorblade, @freevoid, @gahr and @lefessan and everyone who's helped with issue reports, comments and feedback.
2.1.0~beta2
This is a second beta release of opam 2.1.0.
This beta release contains a few important fixes upon 2.1.0~beta, and improved conflict error messages.
Binaries and full archive are signed by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
Changelog
Global CLI
- Reduce startup time with better use of more caches, etc. [#4341 @AltGr]
- Do not load the full state on
opam exec
when not necessary [#4341 @AltGr]
Init
Pin
External dependencies
Test
Solver
Internal
2.1.0~beta
This is the first beta release of opam 2.1.0.
This beta release contains many fixes and a few polished or new features upon alpha3.
Binaries and full archive are signed by opam dev team (fingerprint 92C5 26AE 50DF 3947 0EB2 911B ED4C F1CA 67CB AA92
).
Changelog
Possibly scripts breaking changes are prefixed with ✘.
New option/command/subcommand are prefixed with ◈.
Global CLI
- ◈
--cli
/OPAMCLI
option added [#4316 @dra27] - ✘
--yes
passed to all commands, and plugins [#4316 @dra27]
Init
Config Upgrade
Pin
- ◈ Add
pin scan
subcommand to list available pins [#4285 @rjbou] - ◈ Add
--normalise
option to print a normalised list when scanning, that can be taken byopam pin add
[#4285 @rjbou] OpamCommand.pin
refactor, including addingOpamClient.PIN.url_pins
to pin a list of package with url [#4285 #4301 @rjbou]- ◈ Add
with-version
option to set the pinned package version [#4301 @rjbou] - `OpamPinCommand.source_pin', for new package confirmation, don't check that no opam file is given as argument [#4301 @rjbou]
Switch
List
Lock
VCS
Admin
Solver
Client
Internal
- Process: don't display status line if not verbose, and status line disabled [#4285 @rjbou]
- Optimise package name comparison [#4328 @AltGr - fix #4245]
Documentation
Various contributors helped us to update and add code documentation:
- [#4334 @smorimoto]
- [#4317 @dra27]
2.1.0~alpha3
2.1.0-alpha3 2.1.0~alpha3
2.1.0~alpha2
This is the second alpha release of opam 2.1.0.
This alpha release contains many fixes and a few polished or new features upon alpha1.
Binaries and full archive are signed by AltGr.
Changelog
Possibly script-breaking changes are prefixed with ✘
New options are prefixed with ◈
Init
- Remove m4 from the list of recommended tools [#4184 @kit-ty-kate]
- Fix config solver field ignored [#4243 @rjbou - fix #4241]
Upgrade
Archives fetch
- Copy instead of calling rsync when archives are in a local cache [#4270 @kit-ty-kate]
Install
- Add
_build
to rsync exclusion list [#4230 @rjbou - fix #4195] - Recursive opam file lookup: ignore
_build
[#4230 @rjbou] - Assume-built fix & rewriting [#4211 @rjbou]
Remove
Switch
- Fix Not_found with
opam switch create . --deps
[#4151 @AltGr] - Package Var: resolve self
name
variable for orphan packages [#4228 @rjbou - fix #4224] - ✘ Reject (shell) character on switch names [#4237 @rjbou - fix #4231]
- Fix
OPAMSWITCH
empty string setting, consider as unset [#4237 @rjbou] - Add missing depext to unavailable reasons [#4194 @rjbou - fix #4176]
- ✘ Bump config file version to 2.1 (new depext fields) [#4280 @rjbou - fix #4266]
Pin
- Add depext handling on new pinned packages [#4194 @rjbou - fix #4189]
- Don't keep unpinned package version if it exists in repo [#4073 @rjbou - fix #3630]
- Fix path resolving when pinning with
file://
[#4209 @rjbou - fix #4208] - ✘ Disable recursive & subpath pinning (only present experimentally in opam 2.1.0~alpha) [#4252 @rjbou]
List
- Add
--no-depexts
option to disable depexts packages unavailability [#4194 @rjbou - fix #4205] - Warn if packages are not listed because of depexts unavailability [#4194 @rjbou - fix #4205]
Show
- ✘ Display error message for all not found packages [#4179 @rjbou - fix #4164]
- ✘ Keep package order given via cli [#4179 @rjbou - fix #4163]
--sort
apply to with all options, not only--just-file
[#4179 @rjbou]
Var
- Add scope display on Not found message [#4192 @rjbou]
- No scope needed for variable display [#4192 @rjbou - fix #4183]
- Fix package variable resolution [#4192 @rjbou - fix #4182]
Option
- Fix messages advertising a command in an obsolete format [#4194 @rjbou]
- Add switch depext-bypass as modifiable field [#4194 @rjbou - fix #4177]
Lint
External dependencies handling, aka depext
- Fix arch query [#4200 @rjbou]
- Add message when adding a package to
depext-bypass
[#4194 @rjbou] - Fix performance issue of depext under Docker/debian [#4165 @AltGr]
- Refactor package status [#4152 #4200 @rjbou]
- Add environment variables handling [#4200 @rjbou]
- Add Macport support [#4152 @rjbou]
- Homebrew: add no auto update env var for install, accept
pkgname
andpkgname@version
on query [#4200 @rjbou] - Tag packages with missing depexts in Cudf [#4235 @AltGr]
- Force LC_ALL=C for query commands [#4200 @rjbou]
- Put back opam-depext-2.0's behaviour with regards to asking users' consent before installing system packages [#4168 @kit-ty-kate @rjbou]
- Add
OPAMDEPEXTYES
env variable to pass--yes
options to system package manager [#4168 @kit-ty-kate @rjbou] - Fix install command dryrun [#4200 @rjbou]
- ◈ Add
--depext-only
to install only external dependencies, regardless of config depext status [#4238 @rjbou] - Move confirmation message after opam packages install [#4238 @rjbou]
- Error if
--depext-only
is given with--assume-depexts
or--no-depexts
[#4238 @rjbou] - Handle debian virtual packages [#4269 @AltGr @rjbou - fix #4251]
Sandbox
- No error when linked directory doesn't exist (e.g. XDG defined) [#4278 @kit-ty-kate]
- Add quotes to avoid space unwanted behaviors [#4278 @kit-ty-kate]
Repository management
Build
- Opam file build using dune, removal of opam-%.install makefile target [#4178 @rjbou #4229 @kit-ty-kate - fix #4173]
- Use version var in opam file instead of equal current version number in opamlib dependencies [#4178 @rjbou]
- src ext: fix extlib url [#4248 @rjbou]
- Bump to
2.1.0~alpha2
version [#4253 @rjbou]
Infrastructure
Admin
Opam installer
Opam file
Solver
- Fix Cudf generation for compat with external solvers [#4261 @AltGr]
- Check for a solution before calling the solver [#4263 @AltGr]
- Add the package flag
hidden-version
to discourage selection by the solver [#4281 @AltGr] - Tweak the default criteria to handle
missing-depexts
andhidden-version
flags [#4281 @AltGr]
Internal
- Disable chrono when timestamps are disables [#4206 @rjbou]
- Expose some functionality in the
OpamAction
,OpamPath
andOpamSwitchState
modules for use without aswitch
value [#4147 @timberston]- Path: introduce a functor to permit replicating switch layout in different contexts
- Std: Add
map_reduce
toSet
andMap
[#4263 @AltGr] - Fix regression in command resolution from #4072 [#4265 @dra27]
Test
Documentation
Various contributors helped us to update and add code documentation:
2.1.0~alpha
This is the alpha release of opam 2.1.0.
This alpha release contains many new features, please see blog post for some highlights and upgrade instructions.
Binaries and full archive are signed by @AltGr.
Changelog (possibly scripts breaking changes are prefixed with ✘):
New features
Recursive pin
Opam now handles lookup for opam files on subdirectories with recursive, subpath based, and subpath recursive pin: --recursive
and --subpath PATH
options. On recursive mode, opam goes through subdirectories to find opam files & pin them to their subdirectories. On subpath based mode, opam goes to the given subdirectory to find opam file & pin it to this subdirectory.
Switch Invariant
Define switch base packages as a switch invariant, a generic dependency formula instead of an immutable specific package/version.
-
Define switch invariants rather than "base packages" [#3894 @AltGr] {2.1.0-alpha}
-
Don't warn on switch creation with 'ocaml' as invariant [#4108 @AltGr] {2.1.0-alpha}
-
Better error handling on switch creation [#4121 @AltGr] {2.1.0-alpha}
Lock
opam-lock
was during a long time an opam plugin, and it is now integrated into opam. Option --locked
permits to lock an opam package, according the current switch. It produces a locked file (by default <pkgname>.opam.locked
, can be specified with --lock-suffix
) that contains the original opam file with its depends:
field all package are set to their exact version available in the current switch.
-
Integrate lock plugin [#3746 @rjbou - fix #3734 #3769 #3694] {2.1.0-alpha}
-
Check consistency with opam file when reading lock file to suggest regeneration message [#3680 @rjbou - fix #3654] {2.0.2}
Options configuration
Replace switch and global variables settings opam config set
options, by opam var
and opam option
to generalize them to all modifiable options and variables:
-
opam var|option
: list modifiable options and their values -
opam var|option foo
: displayfoo
value, available for all -
opam var|option foo(=|-=|+=)bar
: updatefoo
value -
opam var|option foo=
: remove/revertfoo
value
By default, acts on switch scope. It can be specified with --global
or --switch sw
.
It deprecates opam config (set|unset|set-global-unset-global)
commands.
-
Add configuration modifications as opam config subcommands [#3992 @rjbou] {2.1.0-alpha}
-
opam var and opam option outside of opam config [#4116 @rjbou - fix #4119] {2.1.0-alpha}
-
Enable option var optim switch load [#4138 @rjbou] {2.1.0-alpha}
Depext
opam-depext
is also a long time opam plugin, used to show / install external dependencies of opam packages. It is now fully integrated in the opam workflow:
-
check of installed package dependencies
-
on install, check that required dependencies are present, show / propose to install if not
Global configuration option depext
, depext-verify
, depext-cannot-install
, depext-run-installs, and
depext-bypasspermit to configure depext use and interactions. CLI options
--assume-depextsand
--no-depexts` can also be used for a single command.
-
Integrate depext plugin [#3975 @rjbou @AltGr - fix #3790 #1519 #2426 #3692] {2.1.0-alpha}
-
Enable command/output display only from verbose level 3 [#4141 @rjbou] {2.1.0-alpha}
New options
Install
-
opam install --check <pkg>
checks that<pkg>
dependencies are already installed in the switch. It reports missing ones and exits with 1, 0 otherwise. It is used on a check only purpose, additionally to--deps-only
. [#3854 @rjbou - fix #3823] {2.1.0-alpha} -
--ignore-conflicts
to use with--deps-only
in case it is needed to install dependencies without taking conflicts into account. [#3853 @rjbou - fix #3846] {2.1.0-alpha}
Show
-
opam show --just-file <file>
shows information of a given file, without loading the switch state. It can be combined with other options, as field filter--field
. It deprecates--file
option. [#3729 @rjbou - fix #3721] {2.1.0-alpha} -
opam show --all-versions <pkg>
displays information of all versions of the given package. It can be used in combination of field filter. [#3867 @rjbou - fix #2980] {2.1.0-alpha} -
opam show --sort <pkg>
display on stdout a sorted opam file: all fields are alphabetically sorted. [#3866 @rjbou - fix ocaml-opam/opam2web#173] {2.1.0-alpha} -
Better error handling. [#4118 @rjbou - fix #3875] {2.1.0-alpha}
Lint
opam lint --check-upstream
enables lint checks on archive urls. This option lead to download archives to check their checksum. [#3758 @rjbou] {2.0.5}
List
--silent
to not write in the output, exit with return code 0 if the list is not empty, 1 otherwise. [#3533 @rjbou - fix #3525] {2.0.1}
Env
opam env --check
permit to indicates if an opam environment is synchronized: returns 0 if up-to-date, 1 otherwise. [#4074 @rjbou - fix #3725] {2.1.0-alpha}
Switch export
-
--freeze
option record VCS commit hash when a VCS url is specified. [#4055 @hannesm] {2.1.0-alpha} -
With
--full
option, include extra-files in switch export, on import create an overlay directory with the file contents. [#4040 @hannesm] {2.1.0-alpha}
Enhancements, updates, and fixes
Repository Management
- Optimize repository loading: we store the repository contents as
.tar.gz
files in~/.opam/repo
instead. Rather than resorting to a complex in-memory structure, we just untar them to/tmp
when they need to be read, and re-tar them after modification (opam update, or format upgrade only). Then we let the OS disk cache do the job: in normal operation, the tree never needs to be flushed to disk, and loading the.tar.gz
is orders of magnitude faster than loading the individual files. [#3752 @AltGr - fix l#3721] {2.1.0-alpha}
Fixes
-
Remove mismatching extra-files: sort list before comparing them. [#3744 @rjbou] {2.0.4}
-
Handle failure or interruption of tar during
opam update
. [#3861 @AltGr] {2.1.0-alpha} -
Fallback in case repository archive doesn't exist. [#4008 @rjbou] {2.1.0-alpha}
-
In case repository archive is corrupted, delete it and ask to launch an update. [#4075 @rjbou - fix #4053] {2.1.0-alpha}
-
When adding a repository, an error is displayed in case of mismatching urls, now both urls are displayed. [#4086 @rjbou - fix #4085] {2.1.0-alpha}
Update
- Handle url backend change to VCS of a package from repository. [#4007 @rjbou - fix #3991] {2.1.0-alpha}
Switch & install
-
Allow local compiler switch creation. [#3720 @rjbou - fix #3713] {2.1.0-alpha}
-
Fix multiple compiler candidate. [#3884 @rjbou - fix #3874] {2.1.0-alpha}
-
Make reinstall handling stricter. [#3907 @AltGr] {2.1.0-alpha}
List
-
Fix
opam list --external
[#3558 @rjbou - fix #3557 ocaml/opam-repository#12677] {2.0.1} -
✘ With
--resolve
restrain test dependencies to direct one instead of listing all test dependencies of queried package(s) [#3923 @rjbou - fix ocaml-opam/opam-depext#121] {2.1.0-alpha}
Show
-
opam show
with local opam file returns local file information. Fixes also the non 1.2 conversion to 2.0 format of local files withopam show --raw
. [#3536 @rjbou - fix #3423] {2.0.1} -
Fields are no longer required to end with a colon. [#3931 @rjbou] {2.1.0-alpha}
-
✘ With
--normalise
disable terminal width wrapping. [#3868 @rjbou - fix #3751] {2.1.0-alpha} -
String fields printed with quotes, as lists. [#3368 @rjbou - fix #3365] {2.0.1}
Pinning
-
Update source of (version) pinned directory [#3726 @rjbou - fix #3651] {2.0.4}
-
Pin edit: fix editing an opam file without a name field. [#3535 @rjbou] {2.0.1}
-
Upgrade pin depends on pinning. [#3684 @rjbou - fix #3508] {2.0.2}
-
Update pin-depends confirmation message to add a skip option. [#3852 @rjbou - fix #3840] {2.1.0-alpha}
-
To avoid lint warning 57 (description error) on 1.2 opam file pinning, add auxiliary files (descr, url) before linting. [#3687 @rjbou] {2.0.2}
-
Fix
--ignore-pin-depends
with autopin. [#3736 @AltGr] {2.0.4} -
Fix pin not installing/upgrading already pinned package. [#3800 @AltGr] {2.0.4}
Working directory
-
Add OPAMDROPWORKINGDIR environment variable for C. [#3792 @rjbou - fix #3727] {2.1.0-alpha}
-
Don't restrain copy to versioned file. [#3759 @rjbou] {2.1.0-alpha}
-
Don't fetch sources when working-dir is set. [#4046 @rjbou] {2.1.0-alpha}
-
Update in place source copy:
-
Fix
working-dir
messages on update command. [#3824 @rjbou] {2.1.0-alpha}
Download & url management
Download
-
Don't execute validation hook if update is empty. [#3490 @hannesm] {2.0.1}
-
Don't check hash with --no-checksum on pull_upstream. [#3658 @rjbou - fix #3652] {2.0.2}
-
Update download errors handling during actions processing. [#3811 @AltGr] {2.1.0-alpha}
-
Update
ftp
command, to pass url last. [#3910 @hannesm] {2.1.0-alpha} -
Terminate (with double dashes) list of command-line download optio...