conan lock¶
The conan lock
command contains several subcommands.
In addition to these commands, most of the Conan commands that compute a graph, like create
, install
,
graph
, can both receive lockfiles as input and produce lockfiles as output.
conan lock add: Manually add items to a lockfile
conan lock remove: Manually remove items from a lockfile
conan lock create: Evaluates a dependency graph and save a lockfile
conan lock merge: Merge several existing lockfiles into one.
$ conan lock -h
WARN: Downgrading cache from Conan 2.2.3 to 2.1.0
usage: conan lock [-h] [-v [V]] [-cc CORE_CONF] {add,create,merge,remove} ...
Create or manage lockfiles.
positional arguments:
{add,create,merge,remove}
sub-command help
add Add requires, build-requires or python-requires to an
existing or new lockfile. The resulting lockfile will
be ordered, newer versions/revisions first. References
can be supplied with and without revisions like "--
requires=pkg/version", but they must be package
references, including at least the version, and they
cannot contain a version range.
create Create a lockfile from a conanfile or a reference.
merge Merge 2 or more lockfiles.
remove Remove requires, build-requires or python-requires
from an existing or new lockfile. References can be
supplied with and without revisions like "--
requires=pkg/version",
options:
-h, --help show this help message and exit
-v [V] Level of detail of the output. Valid options from less
verbose to more verbose: -vquiet, -verror, -vwarning,
-vnotice, -vstatus, -v or -vverbose, -vv or -vdebug,
-vvv or -vtrace
-cc CORE_CONF, --core-conf CORE_CONF
Global configuration for Conan