From ceeb9f9451353d8fefb819ac462f38d5b96fdd39 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Sat, 16 Apr 2022 08:08:37 +0200 Subject: [PATCH] docs: update the migration guides for esp_timer Previous commit removes esp_timer from the common requirements. This commit updates the documentation to describe the resulting changes. --- docs/en/migration-guides/build-system.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/en/migration-guides/build-system.rst b/docs/en/migration-guides/build-system.rst index 9d054ddd25..b01fc66729 100644 --- a/docs/en/migration-guides/build-system.rst +++ b/docs/en/migration-guides/build-system.rst @@ -11,7 +11,19 @@ Update fragment file grammar Please follow the :ref:`migrate linker script fragment files grammar` chapter for migrating v3.x grammar to the new one. -Component dependencies that shall be explicit ---------------------------------------------- +Specify component requirements explicitly +----------------------------------------- -In previous versions of ESP-IDF, target components (``components/esp32*``) had a dependency on ``driver`` and ``efuse`` components. Since target components were part of common requirements (:ref:`more info about common requirements `), all components in the project implicitly had a dependency on ``driver`` and ``efuse``. Now that the dependency of target components on these components has been removed, every component depending on ``driver`` or ``efuse`` has to declare this dependency explicitly. This can be done by adding ``REQUIRES `` or ``PRIV_REQUIRES `` in ``idf_component_register`` call inside component's ``CMakeLists.txt``. See :ref:`Component Requirements` for more information on specifying requirements. +In previous versions of ESP-IDF, some components were always added as public requirements (dependencies) to every component in the build, in addition to the :ref:`common requirements`: + +* ``driver`` +* ``efuse`` +* ``esp_timer`` + +This means that it was possible to include header files of those components without specifying them as requirements in ``idf_component_register``. + +This behavior was caused by transitive dependencies of various common components. + +In ESP-IDF v5.0, this behavior is fixed and these components are no longer added as public requirements by default. + +Every component depending on one of the components which isn't part of common requirements has to declare this dependency explicitly. This can be done by adding ``REQUIRES `` or ``PRIV_REQUIRES `` in ``idf_component_register`` call inside component's ``CMakeLists.txt``. See :ref:`Component Requirements` for more information on specifying requirements.