Skip to content

Commit

Permalink
Feature/lockfiles new (conan-io#1790)
Browse files Browse the repository at this point in the history
* working

* working

* working

* first draft of intro + multi

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* mising cd ..

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/configurations.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/configurations.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/configurations.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/configurations.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/configurations.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* Update versioning/lockfiles/introduction.rst

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* build-order

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* review

* reference

* fix broken refs

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* Update versioning/lockfiles/build_order.rst

Co-authored-by: Daniel <danimanzaneque@gmail.com>

* fix reference indent

* clarify full-partial locked packages

* image

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Daniel <danimanzaneque@gmail.com>
  • Loading branch information
3 people authored Jul 31, 2020
1 parent f1e3ade commit d073c60
Show file tree
Hide file tree
Showing 11 changed files with 838 additions and 506 deletions.
2 changes: 1 addition & 1 deletion reference/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Other useful commands:
commands/misc/remove.rst
commands/misc/alias.rst
commands/misc/inspect.rst
commands/misc/graph.rst
commands/misc/lock.rst
commands/misc/help.rst
commands/misc/conan_build_info.rst

Expand Down
8 changes: 1 addition & 7 deletions reference/commands/consumer/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,6 @@ The output will look like:
difference is that it doesn't try to install or build the binaries, but the package recipes
will be retrieved from remotes if necessary.
.. important::
There is a dedicated command to work with the graph of dependencies and to retrieve information
about it. We encourage you to use :ref:`conan graph<conan_graph>` instead of this ``conan info``
command for those tasks.
It is very important to note, that the :command:`info` command outputs the dependency graph for a
given configuration (settings, options), as the dependency graph can be different for different
configurations. Then, the input to the :command:`conan info` command is the same as :command:`conan install`,
Expand All @@ -189,7 +183,7 @@ argument:
It is possible to use the :command:`conan info` command to extract useful information for Continuous
Integration systems. More precisely, it has the :command:`--build-order, -bo` option (deprecated in
favor of :ref:`conan graph build-order<conan_graph_build_order>`), that will produce
favor of :ref:`conan lock build-order<versioning_lockfiles_build_order>`), that will produce
a machine-readable output with an ordered list of package references, in the order they should be
built. E.g., let's assume that we have a project that depends on Boost and Poco, which in turn
depends on OpenSSL and zlib transitively. So we can query our project with a reference that has
Expand Down
217 changes: 0 additions & 217 deletions reference/commands/misc/graph.rst

This file was deleted.

143 changes: 143 additions & 0 deletions reference/commands/misc/lock.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
.. _conan_lock:

conan lock
===========

.. code-block:: bash
$ conan lock [-h] {update,build-order,clean-modified,create} ...
Generates and manipulates lock files.

.. code-block:: text
positional arguments:
{update,build-order,clean-modified,create}
sub-command help
update Complete missing information in the first lockfile with information defined in the second lockfile. Both lockfiles must represent the same graph,
and have the same topology with the same identifiers, i.e. the second lockfile must be an evolution based on the first one
build-order Returns build-order
clean-modified Clean modified flags
create Create a lockfile from a conanfile or a reference
optional arguments:
-h, --help show this help message and exit
.. seealso::

read about lockfiles in :ref:`versioning_lockfiles`



conan lock create
-----------------
.. code-block:: bash
$ conan lock create [-h] [--name NAME] [--version VERSION] [--user USER] [--channel CHANNEL] [--reference REFERENCE] [-l LOCKFILE] [--base]
[--lockfile-out LOCKFILE_OUT] [-b [BUILD]] [-r REMOTE] [-u] [-e ENV_HOST] [-e:b ENV_BUILD] [-e:h ENV_HOST] [-o OPTIONS_HOST] [-o:b OPTIONS_BUILD]
[-o:h OPTIONS_HOST] [-pr PROFILE_HOST] [-pr:b PROFILE_BUILD] [-pr:h PROFILE_HOST] [-s SETTINGS_HOST] [-s:b SETTINGS_BUILD] [-s:h SETTINGS_HOST]
[path]
.. code-block:: text
positional arguments:
path Path to a conanfile
optional arguments:
-h, --help show this help message and exit
--name NAME Provide a package name if not specified in conanfile
--version VERSION Provide a package version if not specified in conanfile
--user USER Provide a user
--channel CHANNEL Provide a channel
--reference REFERENCE
Provide a package reference instead of a conanfile
-l LOCKFILE, --lockfile LOCKFILE
Path to lockfile to be used as a base
--base Lock only recipe versions and revisions
--lockfile-out LOCKFILE_OUT
Filename of the created lockfile
-b [BUILD], --build [BUILD]
Packages to build from source
-r REMOTE, --remote REMOTE
Look in the specified remote server
-u, --update Will check the remote and in case a newer version and/or revision of the dependencies exists there, it will install those in the local cache. When
using version ranges, it will install the latest version that satisfies the range. Also, if using revisions, it will update to the latest revision
for the resolved version range.
-e ENV_HOST, --env ENV_HOST
Environment variables that will be set during the package build (host machine). e.g.: -e CXX=/usr/bin/clang++
-e:b ENV_BUILD, --env:build ENV_BUILD
Environment variables that will be set during the package build (build machine). e.g.: -e:b CXX=/usr/bin/clang++
-e:h ENV_HOST, --env:host ENV_HOST
Environment variables that will be set during the package build (host machine). e.g.: -e:h CXX=/usr/bin/clang++
-o OPTIONS_HOST, --options OPTIONS_HOST
Define options values (host machine), e.g.: -o Pkg:with_qt=true
-o:b OPTIONS_BUILD, --options:build OPTIONS_BUILD
Define options values (build machine), e.g.: -o:b Pkg:with_qt=true
-o:h OPTIONS_HOST, --options:host OPTIONS_HOST
Define options values (host machine), e.g.: -o:h Pkg:with_qt=true
-pr PROFILE_HOST, --profile PROFILE_HOST
Apply the specified profile to the host machine
-pr:b PROFILE_BUILD, --profile:build PROFILE_BUILD
Apply the specified profile to the build machine
-pr:h PROFILE_HOST, --profile:host PROFILE_HOST
Apply the specified profile to the host machine
-s SETTINGS_HOST, --settings SETTINGS_HOST
Settings to build the package, overwriting the defaults (host machine). e.g.: -s compiler=gcc
-s:b SETTINGS_BUILD, --settings:build SETTINGS_BUILD
Settings to build the package, overwriting the defaults (build machine). e.g.: -s:b compiler=gcc
-s:h SETTINGS_HOST, --settings:host SETTINGS_HOST
Settings to build the package, overwriting the defaults (host machine). e.g.: -s:h compiler=gcc
conan lock update
-----------------
.. code-block:: bash
$ conan lock update [-h] old_lockfile new_lockfile
.. code-block:: text
positional arguments:
old_lockfile Path to lockfile to be updated
new_lockfile Path to lockfile containing the new information that is going to be updated into the first lockfile
optional arguments:
-h, --help show this help message and exit
conan lock build-order
----------------------
.. code-block:: bash
$ conan lock build-order [-h] [--json JSON] lockfile
.. code-block:: text
positional arguments:
lockfile lockfile file
optional arguments:
-h, --help show this help message and exit
--json JSON generate output file in json format
conan lock clean-modified
-------------------------
.. code-block:: bash
$ conan lock clean-modified [-h] lockfile
.. code-block:: text
positional arguments:
lockfile Path to the lockfile
optional arguments:
-h, --help show this help message and exit
Loading

0 comments on commit d073c60

Please sign in to comment.