Skip to content

Commit

Permalink
Automatic deploy (build number 489)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConanCI bot committed May 18, 2023
1 parent f413a36 commit 9d03c43
Show file tree
Hide file tree
Showing 525 changed files with 14,403 additions and 1,793 deletions.
2 changes: 1 addition & 1 deletion 2.0/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ae65a433ae0bbbd5cea7e8f53e515f4a
config: 8449a1f930bcc2a97858d0b4aa010df0
tags: 645f666f9bcd5a90fca523b33c5a78b7
6 changes: 3 additions & 3 deletions 2.0/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Page Not Found &mdash; conan 2.0.4 documentation</title>
<title>Page Not Found &mdash; conan 2.0.5 documentation</title>



Expand Down Expand Up @@ -45,7 +45,7 @@
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="conan 2.0.4 documentation" href="index.html"/>
<link rel="top" title="conan 2.0.5 documentation" href="index.html"/>

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand Down Expand Up @@ -621,7 +621,7 @@ <h1>Page Not Found<a class="headerlink" href="#page-not-found" title="Permalink
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'2.0.4',
VERSION:'2.0.5',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
6 changes: 3 additions & 3 deletions 2.0/Page Not Found.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Page not found &mdash; conan 2.0.4 documentation</title>
<title>Page not found &mdash; conan 2.0.5 documentation</title>



Expand Down Expand Up @@ -45,7 +45,7 @@
<link rel="index" title="Index"
href="/en/latest/genindex.html"/>
<link rel="search" title="Search" href="/en/latest/search.html"/>
<link rel="top" title="conan 2.0.4 documentation" href="/en/latest/index.html"/>
<link rel="top" title="conan 2.0.5 documentation" href="/en/latest/index.html"/>

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand Down Expand Up @@ -616,7 +616,7 @@ <h1>Page not found</h1>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'',
VERSION:'2.0.4',
VERSION:'2.0.5',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
Expand Down
24 changes: 24 additions & 0 deletions 2.0/_sources/changelog.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ Changelog

For a more detailed description of the major changes that Conan 2.0 brings, compared with Conan 1.X, please read :ref:`whatsnew`

2.0.5 (18-May-2023)
-------------------

- Fix: Fix XcodeDeps includes skipped dependencies. `#13880 <https://github.com/conan-io/conan/pull/13880>`_
- Fix: Do not allow line feeds into ``pkg/version`` reference fields `#13870 <https://github.com/conan-io/conan/pull/13870>`_
- Fix: Fix ``AutotoolsToolchain`` definition of ``tools.build:compiler_executable`` for Windows subsystems `#13867 <https://github.com/conan-io/conan/pull/13867>`_
- Fix: Speed up the CMakeDeps generation `#13857 <https://github.com/conan-io/conan/pull/13857>`_
- Fix: Fix imported library config suffix. `#13841 <https://github.com/conan-io/conan/pull/13841>`_
- Fix: Fail when defining an unkown conf `#13832 <https://github.com/conan-io/conan/pull/13832>`_
- Fix: Fix incorrect printing of "skipped" binaries in the ``conan install/create`` commands, when they are used by some other dependencies. `#13778 <https://github.com/conan-io/conan/pull/13778>`_
- Fix: Renaming the cache "deploy" folder to "deployers" and allow ``-d, --deployer`` cli arg. ("deploy" folder will not break but will warn as deprecated). `#13740 <https://github.com/conan-io/conan/pull/13740>`_ . Docs `here <https://github.com/conan-io/docs/pull/3209>`__
- Fix: Omit ``-L`` libpaths in ``CMakeDeps`` for header-only libraries. `#13704 <https://github.com/conan-io/conan/pull/13704>`_
- Bugfix: Fix when a ``test_requires`` is also a regular transitive "host" requires and consumer defines components. `#13898 <https://github.com/conan-io/conan/pull/13898>`_
- Bugfix: Fix propagation of options like ``*:shared=True`` defined in recipes `#13855 <https://github.com/conan-io/conan/pull/13855>`_
- Bugfix: Fix ``--lockfile-out`` paths for 'graph build-order' and 'test' commands `#13853 <https://github.com/conan-io/conan/pull/13853>`_
- Bugfix: Ensure backup sources are uploaded in more cases `#13846 <https://github.com/conan-io/conan/pull/13846>`_
- Bugfix: fix ``settings.yml`` definition of ``intel-cc`` ``cppstd=03`` `#13844 <https://github.com/conan-io/conan/pull/13844>`_
- Bugfix: Fix :command:`conan upload` with backup sources for exported-only recipes `#13779 <https://github.com/conan-io/conan/pull/13779>`_
- Bugfix: Fix ``conan lock merge`` of lockfiles containing alias `#13763 <https://github.com/conan-io/conan/pull/13763>`_
- Bugfix: Fix python_requires in transitive deps with version ranges `#13762 <https://github.com/conan-io/conan/pull/13762>`_
- Bugfix: fix CMakeToolchain CMAKE_SYSTEM_NAME=Generic for baremetal `#13739 <https://github.com/conan-io/conan/pull/13739>`_
- Bugfix: Fix incorrect environment scripts deactivation order `#13707 <https://github.com/conan-io/conan/pull/13707>`_
- Bugfix: Solve failing lockfiles when graph has requirements with ``override=True`` `#13597 <https://github.com/conan-io/conan/pull/13597>`_

2.0.4 (11-Apr-2023)
-------------------

Expand Down
2 changes: 2 additions & 0 deletions 2.0/_sources/examples.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ Examples
examples/tools
examples/cross_build
examples/config_files
examples/graph
examples/dev_flow
1 change: 1 addition & 0 deletions 2.0/_sources/examples/conanfile/layout.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ ConanFile layout() examples
layout/conanfile_in_subfolder
layout/third_party_libraries
layout/multiple_subprojects
layout/editable_components
123 changes: 123 additions & 0 deletions 2.0/_sources/examples/conanfile/layout/editable_components.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
.. _examples_conanfile_layout_components_editables:

Using components and editable packages
--------------------------------------

It is possible to define components in the ``layout()`` method, to support the case of ``editable`` packages.
That is, if we want to put a package in ``editable`` mode, and that package defines ``components``, it is
necessary to define the components layout correctly in the ``layout()`` method.
Let's see it in a real example.

Please, first of all, clone the sources to recreate this project. You can find them in the
`examples2.0 repository <https://github.com/conan-io/examples2>`_ in GitHub:

.. code-block:: bash
$ git clone https://github.com/conan-io/examples2.git
$ cd examples2/examples/conanfile/layout/editable_components
There we find a ``greetings`` subfolder and package, that contains 2 libraries, the ``hello`` library and the
``bye`` library. Each one is modeled as a ``component`` inside the package recipe:

.. code-block:: python
:caption: greetings/conanfile.py
class GreetingsConan(ConanFile):
name = "greetings"
version = "0.1"
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps", "CMakeToolchain"
exports_sources = "src/*"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def layout(self):
cmake_layout(self, src_folder="src")
# This "includedirs" starts in the source folder, wich is "src"
# So the components include dirs is the "src" folder (includes are
# intended to be included as ``#include "hello/hello.h"``)
self.cpp.source.components["hello"].includedirs = ["."]
self.cpp.source.components["bye"].includedirs = ["."]
# compiled libraries "libdirs" will be inside the "build" folder, depending
# on the platform they will be in "build/Release" or directly in "build" folder
bt = "." if self.settings.os != "Windows" else str(self.settings.build_type)
self.cpp.build.components["hello"].libdirs = [bt]
self.cpp.build.components["bye"].libdirs = [bt]
def package(self):
copy(self, "*.h", src=self.source_folder,
dst=join(self.package_folder, "include"))
copy(self, "*.lib", src=self.build_folder,
dst=join(self.package_folder, "lib"), keep_path=False)
copy(self, "*.a", src=self.build_folder,
dst=join(self.package_folder, "lib"), keep_path=False)
def package_info(self):
self.cpp_info.components["hello"].libs = ["hello"]
self.cpp_info.components["bye"].libs = ["bye"]
self.cpp_info.set_property("cmake_file_name", "MYG")
self.cpp_info.set_property("cmake_target_name", "MyGreetings::MyGreetings")
self.cpp_info.components["hello"].set_property("cmake_target_name", "MyGreetings::MyHello")
self.cpp_info.components["bye"].set_property("cmake_target_name", "MyGreetings::MyBye")
While the location of the ``hello`` and ``bye`` libraries in the final package is in the final ``lib`` folder,
then nothing special is needed in the ``package_info()`` method, beyond the definition of the components. In
this case, the customization of the CMake generated filenames and targets is also included, but it is not
necessary for this example.

The important part is the ``layout()`` definition. Besides the common ``cmake_layout``, it is necessary to
define the location of the components headers (``self.cpp.source`` as they are source code) and the location
of the locally built libraries. As the location of the libraries depends on the platform, the final
``self.cpp.build.components["component"].libdirs`` depends on the platform.

With this recipe we can put the package in editable mode and locally build it with:

.. code-block:: bash
$ conan editable add greetings
$ conan build greetings
# we might want to also build the debug config
In the ``app`` folder we have a package recipe to build 2 executables, that link with the ``greeting`` package
components. The ``app/conanfile.py`` recipe there is simple, the ``build()`` method builds and runs both ``example``
and ``example2`` executables that are built with ``CMakeLists.txt``:


.. code-block:: cmake
# Note the MYG file name, not matching the package name,
# because the recipe defined "cmake_file_name"
find_package(MYG)
add_executable(example example.cpp)
# Note the MyGreetings::MyGreetings target name, not matching the package name,
# because the recipe defined "cmake_target_name"
# "example" is linking with the whole package, both "hello" and "bye" components
target_link_libraries(example MyGreetings::MyGreetings)
add_executable(example2 example2.cpp)
# "example2" is only using and linking "hello" component, but not "bye"
target_link_libraries(example2 MyGreetings::MyHello)
.. code-block:: bash
$ conan build app
hello: Release!
bye: Release!
If you now go to the ``bye.cpp`` source file and modify the output message, then build ``greetings`` and
``app`` locally, the final output message for the "bye" component library should change:

.. code-block:: bash
$ conan build greetings
$ conan build app
hello: Release!
adios: Release!
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,9 @@ And test the package again:
ERROR: game-engine/1.0 (test package): Error in build() method, line 22
cmake.configure()
ConanException: Error 1 while executing
.. seealso::

If you want to use recipes defining components in ``editable`` mode, check the example in
:ref:`examples_conanfile_layout_components_editables`.
9 changes: 9 additions & 0 deletions 2.0/_sources/examples/dev_flow.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _developer_flow:

Developer tools and flows
=========================

.. toctree::
:maxdepth: 2

dev_flow/debug/step_into_dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@

.. _examples_dev_flow_debug_step_into:


Debugging and stepping into dependencies
========================================

Sometimes, when developing and debugging your own code, it could be useful to be able to step-into the
dependencies source code too. There are a couple of things to take into account:

- Recipes and packages from ConanCenter do not package always all the debug artifacts necessary to debug. For example in Windows, the ``*.pdb`` files are not packaged, because they are very heavy, and in practice barely used. It is possible to have your own packages to package the PDB files if you want, but that still won't solve the next point.
- Debug artifacts are often not relocatable, that means that such artifacts can only be used in the location they were built from sources. But packages that are uploaded to a server and downloaded to a different machine can put those artifacts in a different folder. Then, the debug artifacts might not correctly locate the source code, the symbols, etc.


Building from source
--------------------

The recommended approach for debugging dependencies is building them from source in the local cache. This approach should work out of the box for most recipes, including ConanCenter recipes.

We can reuse the code from the very first example in the tutorial for this use case. Please, first clone the sources to recreate this project, you can find them in the
`examples2.0 repository <https://github.com/conan-io/examples2>`_ in GitHub:

.. code-block:: bash
$ git clone https://github.com/conan-io/examples2.git
$ cd examples2/tutorial/consuming_packages/simple_cmake_project
Then, lets make sure the dependency is built from source:

.. code-block:: bash
$ conan install . -s build_type=Debug --build="zlib/*"
...
Install finished successfully
Assuming that we have CMake>=3.23, we can use the presets (otherwise, please use the ``-DCMAKE_TOOLCHAIN_FILE`` arguments):

.. code-block:: bash
$ cmake . --preset conan-default
This will create our project, that we can start building and debugging.


Step into a dependency with Visual Studio
-----------------------------------------

Once the project is created, in Visual Studio, we can double-click on the ``compressor.sln`` file, or open the file from the open Visual Studio IDE.

Once the project is open, the first step is building it, making sure the ``Debug`` configuration is the active one, going to ``Build -> Build Solution`` will do it. Then we can define ``compressor`` as the "Startup project" in project view.

Going to the ``compressor/main.c`` source file, we can introduce a breakpoint in some line there:

.. code-block:: c++
:caption: main.c

int main(void) {
...

// add a breakpoint in deflateInit line in your IDE
deflateInit(&defstream, Z_BEST_COMPRESSION);
deflate(&defstream, Z_FINISH);

Clicking on the ``Debug -> Start Debugging`` (or F5), the program will start debugging and stop at the ``deflateInit()`` line. Clicking on the ``Debug -> Step Into``, the IDE should be able to navigate to the ``deflate.c`` source code. If we check this file, its path will be inside the Conan cache, like ``C:\Users\<myuser>\.conan2\p\b\zlib4f7275ba0a71f\b\src\deflate.c``

.. code-block:: c++
:caption: deflate.c

int ZEXPORT deflateInit_(strm, level, version, stream_size)
z_streamp strm;
int level;
const char *version;
int stream_size;
{
return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL,
Z_DEFAULT_STRATEGY, version, stream_size);
/* To do: ignore strm->next_in if we use it as window */
}

.. seealso::

- Modifying the dependency source code while debugging is not possible with this approach. If that is the intended flow, the recommended approach is to use :ref:`editable package<editable_packages>`.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Now, you should be able to use the new deployer in both ``conan install`` and ``

.. code-block:: bash
$ conan graph info . -c tools.build:download_source=True --deploy=sources_deploy
$ conan graph info . -c tools.build:download_source=True --deployer=sources_deploy
Inspecting the command output we can see that it copied the sources of our direct dependencies ``zlib`` and ``mcap``,
Expand Down
14 changes: 14 additions & 0 deletions 2.0/_sources/examples/graph.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _examples_graph:

Graph examples
==============

This section contains examples about different types of advanced graphs, using different types of ``requires`` and ``tool_requires``,
advanced usage of requirement traits, etc.


.. toctree::
:maxdepth: 2

graph/tool_requires/different_versions
graph/tool_requires/different_options
Loading

0 comments on commit 9d03c43

Please sign in to comment.