Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ indentation. Documentation makes an extensive use of bash, python, txt and cmake

[requires]
poco/1.9.4
zlib/1.2.11
zlib/1.3.1
```

```
Expand Down
2 changes: 1 addition & 1 deletion examples/graph/requires/consume_cmake_macro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ recipes, for example this application:

class App(ConanFile):
package_type = "application"
generators = "CMakeToolchain"
generators = "CMakeToolchain", "CMakeDeps"
settings = "os", "compiler", "arch", "build_type"
requires = "pkg/0.1"

Expand Down
2 changes: 1 addition & 1 deletion examples/tools/meson/build_simple_meson_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Let's create a *conanfile.txt* with the following content to install **Zlib**:
:caption: **conanfile.txt**

[requires]
zlib/1.2.11
zlib/1.3.1

[generators]
PkgConfigDeps
Expand Down
1 change: 1 addition & 0 deletions knowledge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Knowledge
knowledge/guidelines
knowledge/faq
knowledge/videos
knowledge/academy

19 changes: 19 additions & 0 deletions knowledge/academy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. _academy:

Conan 2 Essentials Training
===========================

This new course has been created from the ground up to cover the fundamental features and best practices of Conan 2.
It will provide you with the essential knowledge needed to start working with the tool effectively,
whether you are a new user or migrating from a previous version.

A Hands-On, Free, and Self-Paced Course
---------------------------------------
This course is designed to be a practical learning experience.
There’s `a dedicated GitHub repository <https://github.com/conan-io/conan-training2>`__
with the source code that you will use throughout the lessons to apply the concepts with hands-on examples,
allowing you to experiment firsthand with the features of Conan 2.

The course is completely free and available for you to take at your own pace, with no schedules or deadlines.

Register `here <https://academy.jfrog.com/conan-2-essentials?utm_source=Conan+Docs>`__ to freely access the course.
10 changes: 5 additions & 5 deletions knowledge/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ that you get an error like the following one:

.. code-block:: text

ERROR: Missing binary: zlib/1.2.11:b1d267f77ddd5d10d06d2ecf5a6bc433fbb7eeed
ERROR: Missing binary: zlib/1.3.1:b1d267f77ddd5d10d06d2ecf5a6bc433fbb7eeed

zlib/1.2.11: WARN: Can't find a 'zlib/1.2.11' package binary 'b1d267f77ddd5d10d06d2ecf5a6bc433fbb7eeed' for the configuration:
zlib/1.3.1: WARN: Can't find a 'zlib/1.3.1' package binary 'b1d267f77ddd5d10d06d2ecf5a6bc433fbb7eeed' for the configuration:
[settings]
arch=x86_64
build_type=Release
Expand All @@ -34,14 +34,14 @@ that you get an error like the following one:
fPIC=True
shared=False

ERROR: Missing prebuilt package for 'zlib/1.2.11'. You can try:
ERROR: Missing prebuilt package for 'zlib/1.3.1'. You can try:
- List all available packages using 'conan list "{ref}:*" -r=remote'
- Explain missing binaries: replace 'conan install ...' with 'conan graph explain ...'
- Try to build locally from sources using the '--build=zlib/1.2.11' argument
- Try to build locally from sources using the '--build=zlib/1.3.1' argument

More Info at 'https://docs.conan.io/en/2/knowledge/faq.html#error-missing-prebuilt-package'

This means that the package recipe ``zlib/1.2.11`` exists, but for some reason there is no
This means that the package recipe ``zlib/1.3.1`` exists, but for some reason there is no
precompiled package for your current settings or options. Maybe the package creator didn't build and
shared pre-built packages at all and only uploaded the package recipe, or they are only
providing packages for some platforms or compilers. E.g. the package creator built
Expand Down
4 changes: 2 additions & 2 deletions reference/commands/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ For example, to verify the integrity of the whole Conan local cache, do:
mypkg/1.0: Integrity checked: ok
mypkg/1.0:454923cd42d0da27b9b1294ebc3e4ecc84020747: Integrity checked: ok
mypkg/1.0:454923cd42d0da27b9b1294ebc3e4ecc84020747: Integrity checked: ok
zlib/1.2.11: Integrity checked: ok
zlib/1.2.11:6fe7fa69f760aee504e0be85c12b2327c716f9e7: Integrity checked: ok
zlib/1.3.1: Integrity checked: ok
zlib/1.3.1:6fe7fa69f760aee504e0be85c12b2327c716f9e7: Integrity checked: ok


conan cache backup-upload
Expand Down
40 changes: 20 additions & 20 deletions reference/commands/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Listing recipe references
string-view-lite
string-view-lite/1.6.0
zlib
zlib/1.2.11
zlib/1.3.1

This command is equivalent to ``$ conan list "*"`` (make sure to quote the argument), if no argument
is provided Conan will list all packages.
Expand All @@ -61,7 +61,7 @@ is provided Conan will list all packages.
$ conan list zlib
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
zlib/1.2.12


Expand All @@ -75,7 +75,7 @@ search.
$ conan list "zlib/*"
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
zlib/1.2.12

You can also use version ranges in the version field to define the versions you want:
Expand All @@ -87,7 +87,7 @@ You can also use version ranges in the version field to define the versions you
$ conan list "zlib/[<1.2.12]" -r=conancenter
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
$ conan list "zlib/[>1.2.11]" -r=conancenter
Local Cache
zlib
Expand Down Expand Up @@ -115,7 +115,7 @@ Use the ``...@`` pattern for searching only references that don't have *user* an
string-view-lite
string-view-lite/1.6.0
zlib
zlib/1.2.11
zlib/1.3.1

Listing recipe revisions
------------------------
Expand All @@ -126,10 +126,10 @@ we can use the ``#latest`` placeholder:
.. code-block:: text
:caption: *list latest recipe revision*

$ conan list zlib/1.2.11#latest
$ conan list zlib/1.3.1#latest
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
revisions
ffa77daf83a57094149707928bdce823 (2022-11-02 13:46:53 UTC)

Expand All @@ -138,10 +138,10 @@ To list all recipe revisions use the ``*`` wildcard:
.. code-block:: text
:caption: *list all recipe revisions*

$ conan list "zlib/1.2.11#*"
$ conan list "zlib/1.3.1#*"
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
revisions
ffa77daf83a57094149707928bdce823 (2022-11-02 13:46:53 UTC)
8b23adc7acd6f1d6e220338a78e3a19e (2022-10-19 09:19:10 UTC)
Expand All @@ -160,10 +160,10 @@ using ``name/version@user/channel:*`` as the pattern:
:caption: *list all package IDs for latest recipe revision*

# Make sure to quote the argument
$ conan list "zlib/1.2.11:*"
$ conan list "zlib/1.3.1:*"
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
revisions
d77ee68739fcbe5bf37b8a4690eea6ea (2022-08-05 17:17:30 UTC)
packages
Expand Down Expand Up @@ -193,7 +193,7 @@ using ``name/version@user/channel:*`` as the pattern:
.. note::

Here the ``#latest`` for the recipe revision is implicit, i.e., that pattern is
equivalent to ``zlib/1.2.11#latest:*``
equivalent to ``zlib/1.3.1#latest:*``


To list all the package IDs for all the recipe revisions use the ``*`` wildcard in the
Expand All @@ -203,10 +203,10 @@ revision ``#`` part:
:caption: *list all the package IDs for all the recipe revisions*

# Make sure to quote the argument
$ conan list "zlib/1.2.11#*:*"
$ conan list "zlib/1.3.1#*:*"
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
revisions
d77ee68739fcbe5bf37b8a4690eea6ea (2022-08-05 17:17:30 UTC)
packages
Expand Down Expand Up @@ -245,10 +245,10 @@ package ID is using the pattern ``name/version@user/channel#rrev:pkgid``
.. code-block:: text
:caption: *list latest package revision for a specific recipe revision and package ID*

$ conan list zlib/1.2.11#8b23adc7acd6f1d6e220338a78e3a19e:fdb823f07bc228621617c6397210a5c6c4c8807b
$ conan list zlib/1.3.1#8b23adc7acd6f1d6e220338a78e3a19e:fdb823f07bc228621617c6397210a5c6c4c8807b
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
revisions
8b23adc7acd6f1d6e220338a78e3a19e (2022-08-05 17:17:30 UTC)
packages
Expand All @@ -263,10 +263,10 @@ To list all the package revisions for for the latest recipe revision:
:caption: *list all the package revisions for all package-ids the latest recipe revision*

# Make sure to quote the argument
$ conan list "zlib/1.2.11:*#*"
$ conan list "zlib/1.3.1:*#*"
Local Cache
zlib
zlib/1.2.11
zlib/1.3.1
revisions
6a6451bbfcb0e591333827e9784d7dfa (2022-12-29 11:51:39 UTC)
packages
Expand All @@ -282,7 +282,7 @@ To list all the package revisions for for the latest recipe revision:
.. note::

Here the ``#latest`` for the recipe revision is implicit, i.e., that pattern is
equivalent to ``zlib/1.2.11#latest:*#*``
equivalent to ``zlib/1.3.1#latest:*#*``


Listing graph artifacts
Expand Down Expand Up @@ -366,7 +366,7 @@ with the following structure:
.. code-block:: text

# Make sure to quote the argument
$ conan list "zlib/1.2.11:*#*" --format=json
$ conan list "zlib/1.3.1:*#*" --format=json
{
"Local Cache": {
"zli/1.0.0": {
Expand Down
8 changes: 4 additions & 4 deletions reference/commands/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@ This command is equivalent to ``conan list <query> -r=*``, and is provided for s
conancenter
zlib
zlib/1.2.8
zlib/1.2.11
zlib/1.3.1
zlib/1.2.12
zlib/1.2.13

$ conan search zlib -r=conancenter
conancenter
zlib
zlib/1.2.8
zlib/1.2.11
zlib/1.3.1
zlib/1.2.12
zlib/1.2.13

$ conan search zlib/1.2.1* -r=conancenter
conancenter
zlib
zlib/1.2.11
zlib/1.3.1
zlib/1.2.12
zlib/1.2.13

$ conan search zlib/1.2.1* -r=conancenter --format=json
{
"conancenter": {
"zlib/1.2.11": {},
"zlib/1.3.1": {},
"zlib/1.2.12": {},
"zlib/1.2.13": {}
}
Expand Down
13 changes: 12 additions & 1 deletion reference/commands/workspace.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ The command ``conan workspace source`` performs the equivalent of ``conan source
defined within the workspace.


conan workspace install
-----------------------

.. autocommand::
:command: conan workspace install -h


The command ``conan workspace install`` performs the equivalent of ``conan install <package-path>`` for every ``package``
defined within the workspace in the correct order.


conan workspace build
---------------------

Expand All @@ -171,7 +182,7 @@ conan workspace super-install
-----------------------------

.. autocommand::
:command: conan workspace install -h
:command: conan workspace super-install -h


The command ``conan workspace super-install`` is useful to install and build the current workspace
Expand Down
6 changes: 3 additions & 3 deletions reference/conanfile/methods/generate.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ Iterating the dependencies can be done as:

.. code-block:: python

requires = "zlib/1.2.11", "poco/1.9.4"
requires = "zlib/1.3.1", "poco/1.9.4"

def generate(self):
for require, dependency in self.dependencies.items():
Expand All @@ -224,7 +224,7 @@ will output:

.. code-block:: bash

conanfile.py (hello/0.1): Dependency is direct=True: zlib/1.2.11
conanfile.py (hello/0.1): Dependency is direct=True: zlib/1.3.1
conanfile.py (hello/0.1): Dependency is direct=True: poco/1.9.4
conanfile.py (hello/0.1): Dependency is direct=False: pcre/8.44
conanfile.py (hello/0.1): Dependency is direct=False: expat/2.4.1
Expand Down Expand Up @@ -255,7 +255,7 @@ They can be used in the same way:

.. code-block:: python

requires = "zlib/1.2.11", "poco/1.9.4"
requires = "zlib/1.3.1", "poco/1.9.4"

def generate(self):
cmake = self.dependencies.direct_build["cmake"]
Expand Down
4 changes: 2 additions & 2 deletions reference/conanfile/methods/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ The ``requirements()`` method is used to specify the dependencies of a package.
.. code-block:: python

def requirements(self):
self.requires("zlib/1.2.11")
self.requires("zlib/1.3.1")


For simple cases the attribute syntax can be used, like ``requires = "zlib/1.2.11"``.
For simple cases the attribute syntax can be used, like ``requires = "zlib/1.3.1"``.


Requirement traits
Expand Down
6 changes: 3 additions & 3 deletions reference/conanfile_txt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ List of requirements, specifying the full reference. Equivalent to ``self.requir

[requires]
poco/1.9.4
zlib/1.2.11
zlib/1.3.1


This section supports references with version-ranges too:
Expand All @@ -29,7 +29,7 @@ This section supports references with version-ranges too:

[requires]
poco/[>1.0 <1.9]
zlib/1.2.11
zlib/1.3.1

And specific recipe revisions can be pinned too:

Expand Down Expand Up @@ -103,7 +103,7 @@ List of options scoped for each package with a pattern like **package_name*:opti

[requires]
poco/1.9.4
zlib/1.2.11
zlib/1.3.1

[generators]
CMakeDeps
Expand Down
Loading