Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here

opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

Subscribe to updates I use opam


Statistics on opam

Number of watchers on Github 852
Number of open issues 300
Average time to close an issue 3 days
Main language OCaml
Average time to merge a PR 4 days
Open pull requests 68+
Closed pull requests 33+
Last commit 3 months ago
Repo Created over 8 years ago
Repo Last Updated 3 months ago
Size 34.1 MB
Homepage https://opam.ocam...
Organization / Authorocaml
Latest Release2.0.7
Contributors61
Page Updated
Do you use opam? Leave a review!
View open issues (300)
View opam activity
View TODOs for opam (8)
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating opam for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

opam - A package manager for OCaml

master 2.0
TravisCI Build Status AppVeyor Build Status TravisCI 2.0 Build Status AppVeyor 2.0 Build Status

Opam is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

Opam was created and is maintained by OCamlPro.

To get started, checkout the Install and Usage guides.

Compiling this repo

Either from an existing opam installation, use opam pin add opam-devel --dev, or:

  • Make sure you have the required dependencies installed:
    • GNU make
    • OCaml >= 4.02.3 (or see below)
    • A C++ compiler (unless building without a solver, see ./configure --without-mccs)
  • Run ./configure
  • Run make lib-ext as advertised by ./configure if you don't have the dependencies installed. This will locally take care of all OCaml dependencies for you (downloading them, unless you used the inclusive archive we provide for each release).
  • Run make
  • Run make install

This is all you need for installing and using opam, but if you want to use the opam-lib (to work on opam-related tools), you need to link it to installed libraries, rather than use make lib-ext which would cause conflicts. It's easier to already have a working opam installation in this case, so you can do it as a second step.

  • Make sure to have ocamlfind, ocamlgraph, cmdliner >= 0.9.8, cudf >= 0.7, dose3 >= 5, re >= 1.5.0, opam-file-format installed. Or run opam install . --deps-only if you already have a working instance. Re-run ./configure once done
  • Run make libinstall at the end

Note: If you install on your system (without changing the prefix), you will need to install as root (sudo). As sudo do not propagate environment variables, there wil be some errors. You can use `sudo -E PATH=$PATH in order to be sure to have the good environment for install.

Developer mode

If you are developing OPAM, you may enable developer features by including the --enable-developer-mode parameter with ./configure.

Compiling on Native Windows

BUILDING ON WINDOWS IS A WORK-IN-PROGRESS AND THESE INSTRUCTIONS WILL EVOLVE!

Cygwin (https://www.cygwin.com/setup-x86_64.exe) is always required to build opam on Windows. Both the 64-bit and 32-bit versions of Cygwin may be used (you can build 32-bit opam using 64-bit Cygwin and vice versa though note that you must be running 64-bit Windows in order to build the 64-bit version).

The following Cygwin packages are required:

  • From Devel - make
  • From Devel - patch (not required if OCaml and all required packages are pre-installed)
  • From Interpreters - m4 (unless required packages are pre-installed or built using make lib-ext rather than make lib-pkg - m4 is required by findlib's build system)
  • From Devel - mingw64-i686-gcc-core & mingw64-x86_64-gcc-core (not required if building with MSVC)

Alternatively, having downloaded Cygwin's setup program, Cygwin can be installed using the following command line:

setup-x86_64 --root=C:\cygwin64 --quiet-mode --no-desktop --no-startmenu --packages=make,mingw64-i686-gcc-core,mingw64-x86_64-gcc-core,m4,patch

The --no-desktop and --no-startmenu switches may be omitted in order to create shortcuts on the Desktop and Start Menu respectively. Executed this way, setup will still be interactive, but the packages will have been pre-selected. To make setup fully unattended, choose a mirror URL from https://cygwin.com/mirrors.lst and add the --site switch to the command line (e.g. --site=http://www.mirrorservice.org/sites/sourceware.org/pub/cygwin/).

It is recommended that you set the CYGWIN environment variable to nodosfilewarning winsymlinks:native.

Cygwin is started either from a shortcut or by running:

C:\cygwin64\bin\mintty -

It is recommended that opam be built outside Cygwin's root (so in /cygdrive/c/...). From an elevated Cygwin shell, edit /etc/fstab and ensure that the file's content is exactly:

none /cygdrive cygdrive noacl,binary,posix=0,user 0 0

The change is the addition of the noacl option to the mount instructions for /cygdrive and this stops from Cygwin from attempting to emulate POSIX permissions over NTFS (which can result in strange and unnecessary permissions showing up in Windows Explorer). It is necessary to close and restart all Cygwin terminal windows after changing /etc/fstab.

opam is able to be built without a pre-installed OCaml compiler. For the MSVC ports of OCaml, the Microsoft Windows SDK 7 or later or Microsoft Visual Studio is required (https://www.microsoft.com/en-gb/download/details.aspx?id=8442 - either x86 or x64 may be installed, as appropriate to your system). It is not necessary to modify PATH, INCLUDE or LIB - opam's build system will automatically detect the required changes.

If OCaml is not pre-installed, run:

make compiler [OCAML_PORT=mingw64|mingw|msvc64|msvc|auto]

The OCAML_PORT variable determines which flavour of Windows OCaml is compiled - auto will attempt to guess. As long as gcc is not installed in Cygwin (i.e. the native C compiler for Cygwin), OCAML_PORT does not need to be specified and auto will be assumed. Once the compiler is built, you may run:

make lib-pkg

to install the dependencies as findlib packages to the compiler. Building lib-pkg requires the ability to create native symbolic links (and the CYGWIN variable must include winsymlinks:native) - this means that either Cygwin must be run elevated from an account with administrative privileges or your user account must be granted the SeCreateSymbolicLinkPrivilege either by enabling Developer mode on Windows 10, or using Local Security Policy on earlier versions of Windows. Alternatively, you may run configure and use make lib-ext, as advised.

You can then configure and build opam as above.

Compiling without OCaml

make cold is provided as a facility to compile OCaml, then bootstrap opam. You don't need need to run ./configure in that case, but you may specify CONFIGURE_ARGS if needed, e.g.:

make cold CONFIGURE_ARGS="--prefix ~/local"
make cold-install

NOTE: You'll still need GNU make.

Bug tracker

Have a bug or a feature request ? Please open an issue on our bug-tracker. Please search for existing issues before posting, and include the output of opam config report and any details that may help track down the issue.

Documentation

User Manual

The main documentation entry point to opam is the user manual, available using opam --help. To get help for a specific command, use opam <command> --help.

Guides and Tutorials

A collection of guides and tutorials is available online. They are generated from the files in doc/pages.

API, Code Documentation and Developer Manual

A more thorough technical document describing opam and specifying the package description format is available in the developer manual. make doc will otherwise make the API documentation available under doc/.

Community

Keep track of development and community news.

  • Have a question that's not a feature request or bug report? Ask on the mailing list.

  • Chat with fellow opamers on IRC. On the irc.freenode.net server, in the #ocaml or the #opam channel.

Contributing

We welcome contributions ! Please use Github's pull-request mechanism against the master branch of the opam repository. If that's not an option for you, you can use git format-patch and email us.

Versioning

The release cycle respects Semantic Versioning.

Related repositories

  • ocaml/opam-repository is the official repository for opam packages and compilers. A number of non-official repositories are also available on the interwebs, for instance on Github.
  • opam2web generates a collection of browsable HTML files for a given repository. It is used to generate http://opam.ocaml.org.
  • opam-rt is the regression framework for opam.
  • opam-publish is a tool to facilitate the creation, update and publication of opam packages.

Copyright and license

The version comparison function in src/core/opamVersionCompare.ml is part of the Dose library and Copyright 2011 Ralf Treinen.

All other code is:

Copyright 2012-2020 OCamlPro Copyright 2012 INRIA

All rights reserved. Opam is distributed under the terms of the GNU Lesser General Public License version 2.1, with the special exception on linking described in the file LICENSE.

Opam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

opam open issues Ask a question     (View All Issues)
  • almost 4 years OPAM 2.0 & variable OPAMKEEPBUILDDIR
  • almost 4 years Typo in Opam FAQ: correct: "opam-depext" wrong: "opam depext"
  • almost 4 years Broken link and github tag for 4.04.0
  • almost 4 years gpgsign=true in .gitconfig is breaking opam repo add
  • almost 4 years gsl incompatible with camlp4
  • almost 4 years building opam from source on Alpine Linux
  • about 4 years on freebsd: set owner/group (was: 1001/0): Operation not perimtted
  • about 4 years Reproducible builds
  • about 4 years "Sorry, no solution found: (...)", but no further information from OPAM
  • about 4 years [Documentation][2.0] Need more info about adding new compiler
  • about 4 years opam behavior when disk is full
  • about 4 years Error: Port opam not found
  • about 4 years Should /usr/local should be included in the compiler CFLAGS on osx?
  • about 4 years Could not update repository `default` for opam 2.0~beta
  • about 4 years opam silently drops all dependencies when an undefined variable is encountered
  • about 4 years Document opam-lib use-cases before OPAM2
  • about 4 years maintainer information
  • about 4 years Overly enthusiastic conflict message
  • about 4 years OPAM does not compile with recent version of OCaml
  • about 4 years OpamStd dependency-free opam file format parser
  • about 4 years add a `compiler-bundle:` field
  • about 4 years Add hooks for validation of repository updates
  • about 4 years opam or OPAM ?
  • about 4 years Unix.lockf may fail on some platforms (e.g. Hurd)
  • over 4 years Options to navigate versions of a package.
  • over 4 years `~/.gitconfig` configuration option breaking opam git backend
  • over 4 years Feature: rename opam switches
  • over 4 years documentation clarification plus feature request for testing local opam-repository changes
  • over 4 years Replace absolute path of OPAMROOT in config files by a variable
  • over 4 years Tracking wishlist issue for opam 2.0
opam open pull requests (View All Pulls)
  • Unit tests
  • Minor simplification in OpamState.
  • Removals last (don't merge yet!)
  • Improve error message
  • Feature/mini repo
  • Adhering to SPDX standard for licence naming
  • new functionality to opam lint to detect redundant dependencies / conflicts
  • Refine maintainer warning in Opamfile.validate
  • add support for displaying active switch in prompt
  • Set OPAM_COLUMNS to force the formatting line length
  • Add automatic fallbacks using backup-urls
  • Add a lint check on unclosed variables
  • Document test dependencies
  • Minor typos and suggestions to Packaging.md
  • Update src_ext dependencies
  • add back pef/opam export functions
  • Next
  • AppVeyor: print opam config env at end of compilation
  • Update the sub-lib packages
  • Define OPAM_SWITCH_PREFIX when running package commands
  • Update src_ext dependencies
  • next: add package subcommand
  • next: add local subcommand
  • For external plugin search, always do a full PATH search
  • Dose3.5.0 rc1
  • Delay removal of packages as much as possible.
  • Dose3.5.0
  • [experimental] try a more consistent setup without global 'ocaml-version'
  • Add pre/post & switch wrappers
  • Fix bug in removals-last that could lead to cyclic actions
  • Add --inplace-build
  • Experiment: Unquote package names in opam files
  • Experiment: don't remove extra parens when printing opam files
  • [WIP] add the Conex hooks
  • Add prototype 'opam build' command
  • Some fixes and UI improvements
  • %<...>% path expansion notation
  • Added alternate way to get opam_installer.sh
  • Update Ubuntu install instructions
  • Fix configuration and build system for native Windows
  • lib-ext improvements
  • Developer tweaks
  • Support make distclean at toplevel
  • Switch defaults configuration file
  • No longer set OPAMROOT or OPAMSWITCH automatically as part or 'opam env'
  • lib-pkg alternative to lib-ext
  • Update README with C++ compiler information
  • RFC: allow recursive lookup of opam files for `opam pin .`
  • [WIP] Move most of the external tools calls to a single module
  • Pass fd to functions in OpamFilename.with_flock*
  • Fixes the version parsing starting with 'v' for pinning.
  • C stubs for native Windows support
  • Update re to 1.7.2
  • Update to dune18!
  • Fix a crash in sandbox.sh when the XDG cache directory does not exist
  • Use the uname syscall instead of calling the uname command
  • depext/debian: restore support for virtual packages with minimal cost
  • Restore `Denied behaviour of PATH resolution
  • 2.0: Changes required to build on the 2.0 branch with gcc10
  • Bootstrap Opam with OCaml 4.10.0
  • Add an optional solver relying on opam-0install-cudf
  • appveyor: add Visual Studio 2019 image
  • [WIP] Add a --download-only flag to "opam install"
  • opamCudf: provide machine-readable information on conflicts caused by cycles
  • Support etc_root and etcexec_root in opam-installer
  • Build ocamlfind in AppVeyor tests
  • VT100 escape sequences appearing on Windows 10 Console
  • Fix opam env messages
opam questions on Stackoverflow (View All Questions)
  • How to get "opam init --comp=..." to install at the latest OCaml version?
  • OPAM "Illegal Instruction: 4" for Infer Static Analyzer
  • using the uint package with OCaml - opam
  • Packages of OPAM remote can be searched but not installed
  • Oracle OPAM REST API checkout method returns an http 409 code
  • problems occurred when installing slap package by using opam in ocaml
  • How to list current package versions in OPAM?
  • Compiling ocaml can't find module in opam library, Js.ml in js_from_ocaml
  • opam fails trying to install lwt looking for pthreads
  • Cygwin & OCaml: OPAM + Batteries
  • Switch environment in OPAM
  • Opam says upgrade is not possible
  • coq Hello World example (with opam) can't find libraries
  • What is the use of eval `opam config env`?
  • In Opam how do I tell which package owns a given file?
  • How to make library installed from OPAM available to OCaml?
  • OPAM: how to locally reinstall a package without re-downloading it?
  • Uninstall binary file when removing OPAM package
  • Installation of camlp4 with opam on OS X 10.9 failed
  • Sedlex installed by opam but not found by ocamlfind
  • making OPAM work with system compiler under MacOS X
  • Basic Oasis or Opam file for a simple OCaml project
  • How do I install OPAM package documentation?
  • Using Opam to manage project dependencies
  • opam report config file is missing
  • Installing OPAM System-Wide?
  • not able to install anything using opam
  • Specifying prefix in opam file
  • Is it possible to make an opam "sandbox"?
  • How can I use ocamlbrowser with opam packages?
opam list of languages used
opam latest release notes
2.0.7 2.0.7

This is the release of opam 2.0.7.

This minor release contains small fixes, please see blog post for upgrade instructions.

Binaries and full archive are signed by @AltGr.

Changelog:

  • Properly escape Windows paths on manpages [#4129 @AltGr @rjbou]
  • Fix opam installer opam file [#4058 @rjbou]
  • Fix various warnings [#4132 @rjbou @AltGr - fix #4100]
  • Fix dune 2.5.0 promote-install-files duplication [#4132 @rjbou ]
  • opam exec: display command not found message [#4133 @rjbou - fix #4131]
2.1.0-alpha 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.

  • Recursive & subpath based pin [#3499 @rjbou @hngrgr - fix #3174 #3477] {2.1.0-alpha}

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: display foo value, available for all

  • opam var|option foo(=|-=|+=)bar: update foo value

  • opam var|option foo=: remove/revert foo 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, anddepext-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/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-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 with opam 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}

  • Remove pin depends messages. [#3679 @rjbou] {2.0.2}

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:

    • review sync_dirty on VCS:
      • use VCS to synchronize, then rsync & remove others files
      • exclude _build, _opam & VCS directories
    • when --inplace-build is given, it does a dirty synchronization of the sources, in order to keep tracking package stats (clean, local or dirty). [#3948 @rjbou] {2.1.0-alpha}
  • Fix working-dir messages on update command. [#3824 @rjbou] {2.1.0-alpha}

  • Working-dir fixes. [#3982 @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 option. [#3913 @cfcs] {2.1.0-alpha}

VCS

  • Git: fallback, fetch all repository remotes to get SHA1 with git < 2.1. [#3561 @rjbou - fix #3523 #3548] {2.0.1}

  • Fix hg opam1.2 url parsing. [#3754 @rjbou] {2.0.4}

  • Repository: remove 'file://' prefix for darcs. [#3761 @rjbou] {2.1.0-alpha}

  • Use git -c diff.noprefix=false diff. [#3788/#3628 @Blaisorblade - fix #3627] {2.0.4}

  • Don't remove git cache objects that may be used. [#3831 @AltGr - fix #3828] {2.0.6}

  • Don't include .gitattributes in index.tar.g. [#3873 @dra27] {2.0.6}

  • Opam{Git,Hg}: Fix diffs in presence of binary file. [#3879 @kit-ty-kate] {2.1.0-alpha}

  • Set core.autocrlf and core.eol for Git remotes. This change ensures that Git always disables text file line-ending normalization when cloning changes from a Git remote. [#3882 @dra27] {2.1.0-alpha}

  • Add a git clean on reset_tree to keep source dir clean. [#3948 @rjbou] {2.1.0-alpha}

Lint

New lint checks

  • Error 57: A description or a synopsis must be present and non empty. [#3581 @rjbou - fix ocaml/opam-repository#12729] {2.0.1}

  • Warning 58: Advise to use with-test and with-doc variables if test and doc are present. [#3591 @rjbou - fix #3580 ocaml/opam-repository#12729] {2.0.1}

  • Warning 59: No url checksum given (if check-upstream enabled). [#3758 @rjbou] {2.0.5}

  • Error 60: Unavailable archive or checksum mismatching (if check-upstream enabled). [#3758 @rjbou] {2.0.5}

  • Error 61: Out-of-scope with-test variable in run-test: field. [#3763 @rjbou - fix AltGr/Camelus/issues/27] {2.0.5}

  • Warning 62: Add a lint check for SPDX license. [#3976 @AltGr] {2.1.0-alpha}

Updates

  • Add result in json output. [#3848 @rjbou - fix #3046] {2.1.0-alpha}

  • Add lint codes in manpage. [#3903 @rjbou] {2.1.0-alpha}

Fixes

  • Warning 47: Update warning message. [#3753 @rjbou - fix #3738] {2.0.4}

  • Error 52: Fix light_uninstall flag. [#3631 @rjbou - fix #3625] {2.0.2}

  • Warning 58: Restrain warning to filters. [#3871 @rjbou - fix ocaml/opam-repository#14280 (comment)] {2.0.5}

  • Warning 61: Restrain to run-test:. [#3860 @rjbou] {2.0.5}

Initialization

opam init

  • Don't fail if empty compiler given. [#3633 @rjbou - fix #3614] {2.0.2}

  • Retrieve root is ok from global options instead of initialization. [#3704 @rjbou - fix #3695] {2.0.3}

  • Default configuration file: add getconf to required tools. [#3813 @rjbou] {2.1.0-alpha}

  • Clarify message in opam init --yes. [#3893 @dra27] {2.1.0-alpha}

  • Shell setup: don't advice an infinite sourcing loop. [#3832 @rjbou] {2.1.0-alpha}

  • Default configuration file: Add compilation target globals, sys-ocaml-arch,sys-ocaml-cc, andsys-ocaml-libc`. [#3900 @dra27] {2.1.0-alpha}

  • Ensure that environment is initialized lazily, not before init functions are called [#4111 @gasche] {2.1.0-alpha}

  • Fix OPAMLOGS handling, and logdir opam_init argument [#4117 @rjbou - fix #4076] {2.1.0-alpha}

opam config / variable configuration

  • Harmonization of opam config list and opam config var <var>: resolve variable first with switch state (loading it only for package defined variables), otherwise, global state. [#3723 @rjbou - fix #3717] {2.0.4}

  • Include base packages configuration variables in opam config report. [#3798 @dra27] {2.1.0-alpha}

  • Determine jobs number at launch (OpamStateConfig) [#4004 @rjbou - fix #3986] {2.1.0-alpha}

  • Read jobs variable from OpamStateConfig [#3881 @dra27] {2.0.5}

  • opam exec: display command not found message [#4133 @rjbou - fix #4131] {2.0.7}

Portability

Windows

  • Fully test native Windows in the testsuite. [#3260 @dra27] {2.1.0-alpha}

  • Allow native Windows to use Cygwin tool. [#3348 @dra27] {2.1.0-alpha}

  • Deal with Windows path conventions (backslashes, .exe, etc.) [#3350 @dra27] {2.1.0-alpha}

  • Correct display of dir separator on Windows. [#3893 @dra27] {2.1.0-alpha}

  • Tested wrong variable in OPAMW_HasGlyp. [#3898 @dra27] {2.1.0-alpha}

  • Escape Windows paths on manpages [#4129 @AltGr @rjbou - fix #4100] {2.0.7}

BSD

  • Add gtar as OpenBSD required tool, as tar does not support the J flag. [#3538 @adamsteen] {2.0.1}

  • Default use fetch on FreeBSD, ftp on OpenBSD. [#3904 @hannesm] {2.1.0-alpha}

MacOS

  • Hash: fallback to internal library in case of openssl error. [#3543 @rjbou - fix ocaml/opam-repository#12613] {2.0.1}

Shell files

Sandbox

  • Respect user's TMPDIR when invoking bwrap. [#3487 @3noch] {2.0.1}

  • Adding way to mount unusual path in bwrap sandbox: introduction of OPAM_USER_PATH_RO environment variable. [#3540 @ErwanGa] {2.0.1}

  • Make /var read-only instead of empty and rw. [#3605 @bobot - fix #3604] {2.0.2}

  • Handle symlinks in bwrap. [#3661 @mroch - fix #3660] {2.0.2}

  • Change one-line conditional to if statement which was incompatible with set -e. [#3645 @rjbou - fix #3607] {2.0.2}

  • Do not fail if $HOME/.ccache is missing. [#3957 @mseri - fix discuss thread] {2.0.6}

  • Add dune cache as rw. [#4019 @rjbou - fix #4012] {2.0.6}

  • Don't overwrite user's modification. [#4020 #4092 @rjbou] {2.1.0-alpha}

  • Handle CCACHE_DIR environment variable in case ccache call fail. [#4087 @rjbou - fix #4079] {2.1.0-alpha}

  • Follow links of ~/.cache & ~/.cache/dune for bwrap call. [#4087 @rjbou - fix #4086] {2.1.0-alpha}

MacOS specific

  • Considering the possibility that TMPDIR is unset. [#3597 @herbelin - fix

    3576] {2.0.4}

  • Release use of unix sockets on MacOS. [#3663 @silene - fix #3659] {2.0.2}

  • Always read write mount /tmp [#3742 @rjbou - fix ocaml/opam-repository#13339] {2.1.0-alpha}

Environment file

  • Regenerate missing environment file. [#3691 @rjbou - fix #3690 #3594] {2.0.3}

  • Right handling for empty switch. [#3899 @dra27] {2.1.0-alpha}

fish

  • Unconditionally display MANPATH when fish version is 2.7 or late. [#3728 @gregory-nisbet] {2.0.4}

  • Add colon for fish MANPATH. [#3886 @rjbou - fix #3878] {2.0.6} [#4084 @rjbou - fix #4078] {2.1.0-alpha}

zsh

  • Update zsh check interactive terminal (ohmyzsh fix) [#4095 @OCamlPro-mattiasdrp #4128 @AltGr] {2.1.0-alpha}

opam admin

  • Handle non http backend on repository upgrade: compute hash only for http or distant rsync backend [#3596 @rjbou - fix #3590] {2.0.1}

  • Add package selection to add-hashes [#3787 @rjbou - fix #3767] {2.1.0-alpha}

  • Download files (patches, etc.) using a safe filename. [#3900 @dra27] {2.1.0-alpha}

  • With --add-constraints, add constraint on depopts. [#4002 @rjbou - fix #3994] {2.1.0-alpha}

  • Fix opam-admin.to. [#3885 @dra27] {doc}

Internal enhancements

Opam file

  • Add format-version field to all files. [#3478 #3906 @AltGr] {2.1.0-alpha}

  • Clarify pin depend parse error. [#3762 @rjbou] {2.1.0-alpha}

  • Opam file extensions (x- fields) enhancement. [#4049 @hannesm] {2.1.0-alpha}

Inner Actions

Solver

  • Fix closure computation in the presence of cycle. [#3670 @AltGr - fix #3662 #3666] {2.0.2}

  • Fix some cases of listing coinstallable package. [#3689 @AltGr] {2.0.2}

  • Add support for Z3 as a solver backend. [#3845 @AltGr] {2.1.0-alpha}

Scheduler

  • Interleave download actions with build/install actions. [#3777 @Armael] {2.1.0-alpha} [#4083 @rjbou - fix #4080] {2.1.0-alpha}

  • Generalization of the job scheduler: provide separate job pools for different subsets of the tasks. [#3778 @AltGr] {2.1.0-alpha}

  • Refactor the return types of OpamSolution.{apply,resolve_and_apply} [#3781 @Armael] {2.1.0-alpha}

  • Use the scheduler pools to respect the download-jobs parameter. [#3791 @AltGr] {2.1.0-alpha}

Internals

Upgrade 1.2 2.0

  • Upgrade to opam 2.0 format overlay opam files of pinned package. [#3528 @rjbou - fix #3513] {2.0.1}

  • Add Compiler file translation function. [#3530 @rjbou - fix ocaml/opam-repository#12523] {2.0.1}

  • Extract archived source files of version-pinned packages. [#3610 @rjbou - fix #3600] {2.0.2}

  • Add function to upgrade opam file, including its auxiliary files: descr, url, files/. [#3624 @rjbou] {2.0.2}

  • Set the right format-version field on upgrade. [#4014 @rjbou] {2.1.0-alpha}

UI

  • Streamline the output from download action. [#3794 @AltGr] {2.1.0-alpha}

  • Use a character that displays better on terminals for download action. [#3802 @AltGr] {2.1.0-alpha}

  • Change symbol for download action. [#3862 @AltGr] {2.1.0-alpha}

  • Include the version number in compilation failed message. [#4052 @Armael] {2.1.0-alpha}

Directory Tracking

  • Fix precise tracking mode:: missing to_hex conversion. [#3796 @rjbou] {2.0.4}

  • Check both size and mtime for cached entries. [#4038 @hannesm] {2.0.6}

  • Propagate --force to directory tracking revert function. [#4094 @rjbou - fix #4091] {2.1.0-alpha}

  • Add OpamDirTack.string_of_changes [#4107 @rjbou @hannesm] {2.1.0-alpha}

States

  • Introduce drop to replace ignore (unlock ..) for more lock-type-safety. [#3783 @gasche] {2.1.0-alpha} [#3812 @rjbou] {2.1.0-alpha}

  • Change OpamStateTypes.switch_state.conf_files from package_map to name_map [#3799 @dra27] {2.1.0-alpha}

  • Fix handling of availability outside of switches. [#3864 @AltGr] {2.1.0-alpha}

Formulas

  • Sorting formulas function. [#3945 @rjbou] {2.1.0-alpha}

  • Sort formula: fix compare_formula & add compare [#3960 @rjbou] {2.1.0-alpha}

System

  • Patch rewrite test. [#3456 @dra27] {2.1.0-alpha}

  • Tar extract fail error message: if a tar extract fails, it checks the presence of underlying commands (bzip2, xz, lzma, gzip) to display the error message in verbose mode. [#3502 @rjbou - fix #3497] {2.0.1}

  • Remove link only if it exists. [#3519 @rjbou - fix ocaml/opam-depext#104] {2.0.1}

  • Catch signal to select ones that are really cancelling a blocking state (e.g. waiting for a lock to be released). [#3541 @rjbou] {2.0.4}

  • Set .out suffix for read_command_output stdout file. [#3644 @rjbou] {2.0.2}

  • Default opam root is resolved at creation, in order to have the correct linked path. [#3681 @rjbou - fix #3622] {2.0.2}

  • opam clean: ignore errors trying to remove directories. [#3732 @kit-ty-kate] {2.0.4}

  • Command errors display: differentiate command not found & permission denied. [#3865 @rjbou] {2.1.0-alpha}

  • Factorize option functions in OpamProcess [#4016 @nobrakal] {2.1.0-alpha}

  • Use ocaml code for looking up commands in PATH [#4072 @Armael] {2.1.0-alpha}

  • Copy files using OCaml code instead of calling to cp or install [#4064 @Armael] {2.1.0-alpha}

Variables

  • Sort & clean pkg:depend. [#4060 @rjbou - fix #4057] {2.1.0-alpha}

Misc

  • Reinsert and deprecate alias-of & no-autoinstall option. [#3685 @rjbou - fix #3390] {2.0.2}

  • Add of_json functions & crowbar. [#3776 @gasche] {2.1.0-alpha}

  • JSON (de)serialization for OpamParallel graph. [#3786 @gasche] {2.1.0-alpha}

  • Url: catch failure & specific exception. [#3946 @rjbou] {2.1.0-alpha}

  • Update: don't update installed dev package that is not pinned. [#3947 @rjbou] {2.1.0-alpha}

  • Use OpamArg helpers for option. [#4059 @rjbou] {2.1.0-alpha}

Build

  • Updates for OCaml 4.07. [#3474 @dra27] {2.0.2}

  • Remove GNUism from bootstrap-ocaml.sh. [#3481 @dra27 - fix #3480] {2.0.1}

  • Steps towards sudo-enabled make install. [#3522 @dra27] {2.1.0-alpha}

  • Avoid sed -i, a GNU sed extension: use mv instead [#3603 @hannesm] {2.0.1}

  • Port build system to Dune (1.2) [#3618 @dra27] {2.1.0-alpha}

  • Update shell/msvs-detect to 0.4.0. [#3869 @dra27] {2.1.0-alpha}

  • Build man pages with dune. [#3937 @AltGr @dra27] {2.0.6}

  • Sort out repository script mode. [#3963 @dra27] {2.1.0-alpha}

  • Preliminary support for Dune 2.0. [#3965 @dra27] {2.1.0-alpha}

  • make cold: fail if patch or bunzip2 missing. [#4006 @rjbou - fix #3842] {2.0.6}

  • Fix opam installer opam file. [#4058 @rjbou] {2.0.7}

  • Fix various warnings [#4132 @rjbou @AltGr - fix #4100] {2.0.7}

  • Update mccs.1.1+11 [#4109 #4146 @MisterDA] {2.1.0-alpha}

Configure

  • Add patch & bunzip2 check. [#3531 @rjbou - fix #3520] {2.0.1}

  • Not having wget or curl is now only a hard-error if src_ext/archives doesn't contain the archives (i.e. if make -C src_ext cache-archives has not been run) which means that this should no longer be a requirement for building with the full tarball. [#3572 @dra27 - fix #3551] {2.0.1}

  • C++ test for MCCS is now moved to the correct place and the message as to whether the solver will be build should work correctly with --disable-checks. Note that not having a C++ compiler is not considered an error if --disable-checks is specified because configure is permitted to believe that the MCCS library exists even if it couldn't detect it. [#3572 @dra27] {2.0.1}

  • Fix developer mode option. [#3646 @rjbou] {2.1.0-alpha}

  • Fix cppo detection. [#3915 @rjbou] {2.0.5}

  • Ensure configure generates consistently. [#3935 @dra27] {2.1.0-alpha}

Documentation

Various contributors helped us to update and add code documentation:

  • [#3542 @0xflotus] {2.1.0-alpha}

  • [#3571 @hannesm] {2.1.0-alpha}

  • [#3731 @MisterDA] {2.0.4}

  • [#3780 @gasche] {2.1.0-alpha doc}

  • [#3944 @tchajed] {2.1.0-alpha}

  • [#3955 @nbraud] {2.1.0-alpha}

  • [#3999 @maroneze] {2.0.6}

  • [#4106 @vp2177] {2.1.0-alpha}

  • [#3863 @dra27] {2.1.0-alpha}

  • [#3809 #3891 @dra27] {2.0.5}

  • [#3554 @rjbou - fix #3540 #2255 #3612 #3606] {2.1.0-alpha}

  • [#3656 @rjbou - fix #3634 #3653 #3639] {2.0.2}

  • [#3685 @rjbou - fix #3390] {2.0.2}

  • [#3703 @rjbou - fix #3700] {2.0.3}

  • [#4058 @rjbou] {2.1.0-alpha}

  • [#4114 @rjbou @AltGr] {2.1.0-alpha}

2.0.6 2.0.6

This is the release of opam 2.0.6.

This minor release contains mainly fixes, please see the changelog for details, and blog post for upgrade instructions.

Binaries and full archive are signed by @AltGr.

Other projects in OCaml
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark