Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev2] Profiles and Configuration Files #2947

Conversation

franramirez688
Copy link
Contributor

WIP!!

@franramirez688 franramirez688 added this to the 2.0.0-beta10 milestone Feb 2, 2023
@franramirez688 franramirez688 mentioned this pull request Feb 2, 2023
40 tasks
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, just added a few notes of things to remove, being dropped in 2.0.

reference.rst Outdated Show resolved Hide resolved
reference/configuration_files.rst Outdated Show resolved Hide resolved
reference/configuration_files/artifacts.properties.rst Outdated Show resolved Hide resolved
reference/configuration_files/client_certificates.rst Outdated Show resolved Hide resolved
reference/configuration_files/client_certificates.rst Outdated Show resolved Hide resolved
reference/configuration_files/default_profile.rst Outdated Show resolved Hide resolved
reference/configuration_files/default_profile.rst Outdated Show resolved Hide resolved
reference/configuration_files/editable_layout.rst Outdated Show resolved Hide resolved
@franramirez688 franramirez688 changed the base branch from develop2 to release/2.0.0-beta February 6, 2023 17:38
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @franramirez688

Tons of work here, thank you!
However I see some innaccuracies, mistakes, usage of removed 1.X functionality, etc. It would be better to write from scratch, and little by little than trying to migrate Conan 1.X docs, they are too outdated to be ported.

.. _reference_config_files_client_certificates:


Client certificates
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a first level item. It is just 1 config item from global.conf. It is not at the same level as settings, profiles, etc.

@@ -0,0 +1,50 @@
.. _reference_config_files_conandata_yml:

conandata.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm, I'd probably do not put this as config-file. I'd move this section to conanfile.py section.


.. code-block:: bash

$ conan create . demo/testing -pr=myprofile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This demo/testing is not valid syntax anymore

@@ -0,0 +1,519 @@
.. _reference_config_files_default_profile:

profiles/default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is not about profiles/default, it should be just profiles

os=Macos


Use ``$PROFILE_DIR`` in your profile and it will be replaced with the absolute path to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PROFILE_DIR deprecated in 2.0, use jinja injected variable!

Configuration file template
---------------------------

Available since: `1.46.0 <https://github.com/conan-io/conan/releases/tag/1.46.0>`_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Configuration data types
------------------------

Available since: `1.46.0 <https://github.com/conan-io/conan/releases/tag/1.46.0>`_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove


.. _conf_in_recipes:

Configuration in your recipes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better link to somewhere else under conanfile section

As you can see, the possible values ``settings`` can take are restricted in the same file. This is done to ensure matching naming and
spelling as well as defining a common settings model among users and the OSS community.
If a setting is allowed to be set to any value, you can use ``ANY``.
If a setting is allowed to be set to any value or it can also be unset, you can use ``[None, ANY]``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modern syntax is yaml, using null, not None

- It is only used by the new build integrations in :ref:`conan_tools_cmake` and :ref:`conan_tools_microsoft`, but not the previous ones.
- At the moment it implements a ``compatible_packages`` fallback to Visual Studio compiled packages, that is, previous existing binaries
compiled with ``settings.compiler="Visual Studio"`` can be used for the ``msvc`` compiler if no binaries exist for it yet.
This behavior can be opted-out with ``core.package_id:msvc_visual_incompatible`` :ref:`reference_config_files_global_conf` configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LEgacy, remove

Conan supports client TLS certificates. You can configure the path to your existing *Cacert* file and/or your client
certificate (and the key) using the following configuration variables:

* ``core.net.http:cacert_path``: Path containing a custom Cacert file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it expected to be in PEM format, or something else? it's not clear


Conan profiles allows users to set a complete configuration set for **settings**, **options**,
**environment variables** (for build time and runtime context), **requirements** (and build requirements), and
**configuration variables** in a file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's INI file?


Another essential point to mention is the possibility of defining variables as `PATH` ones by simply putting ``(path)`` as
the prefix of the variable. It is useful to automatically get the append/prepend of the `PATH` in different systems
(Windows uses ``;`` as separation, and UNIX ``:``).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how does it work in case of cross-compiling? it's not crystal clear if it just uses os.name or self.settings.os.

Profile includes
----------------

You can include other profiles using the ``include()`` statement. The path can be relative to the current profile, absolute, or a profile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, it's kinda unclear how do nested include() statements work with relative paths, e.g. we have:

cat a.profile
include(../b.profile)

cat b.profile
include(../c.profile)

will it resolve to ../../c.profile or just ../c.profile?

franramirez688 and others added 2 commits February 8, 2023 09:48
Co-authored-by: SSE4 <tomskside@gmail.com>
Co-authored-by: SSE4 <tomskside@gmail.com>
@franramirez688
Copy link
Contributor Author

I'm going to close this one and open several ones to reduce the diff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants