Skip to content

Commit 137c3af

Browse files
Warn about mixin overriding default values (#106)
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
1 parent 3353a68 commit 137c3af

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

reference/mixin-arguments.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@ In all other cases the latter value replaces the former value.
5050
But passing these arguments to CMake would result in the latter value of
5151
``CMAKE_C_FLAGS`` overwriting the former even though the user likely wanted
5252
both compiler options to be used.
53+
54+
Furthermore, the option values of a mixin used through the CLI override the default values of a :ref:`default file <configuration_defaults-yaml>`.

user/configuration.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,12 @@ The following are a few examples (see e.g. ``colcon build --help``):
9191

9292
The default value for the environment variable ``COLCON_HOME`` is pointing to the directory ``.colcon`` within the users home directory.
9393

94+
.. _configuration_defaults-yaml:
95+
9496
defaults.yaml
9597
-------------
9698

97-
Default files are used to configure ``colcon`` behavior for all packages being operated on.
99+
Default files are used to configure the **default** ``colcon`` behavior for all packages being operated on.
98100
Multiple configuration files can be used to modify verb behavior without using the CLI:
99101

100102
* If the configuration file ``$COLCON_HOME/defaults.yaml`` exists it is used to customize the default behavior of the CLI.
@@ -110,6 +112,10 @@ In the case of more than one nested verbs the key is the names separated by dots
110112
To specify configuration options *before* the first verb use an empty string key.
111113
The value is another dictionary containing the verb specific configuration.
112114

115+
.. note::
116+
117+
When using a :doc:`mixin <../reference/mixin-arguments>` through the CLI, the mixin's option values override default values from a default file.
118+
113119
Verb specific configuration
114120
~~~~~~~~~~~~~~~~~~~~~~~~~~~
115121

0 commit comments

Comments
 (0)