Refactor Library Dependency Finder

This commit is contained in:
Ivan Kravets
2016-07-28 01:52:18 +03:00
parent 187315fc08
commit be85eb3e4a
6 changed files with 21 additions and 15 deletions

View File

@ -16,7 +16,7 @@ PlatformIO 3.0
* New Intelligent Library Build System
+ `Library Dependency Finder <http://docs.platformio.org/en/latest/faq.html#how-works-library-dependency-finder-ldf>`__
that interprets C Preprocessor conditional macros and nested includes/chain
that interprets C Preprocessor conditional macros with deep search behavior
+ Check library compatibility with project environment before building
(`issue #415 <https://github.com/platformio/platformio/issues/415>`_)
+ Control Library Dependency Finder for compatibility using

View File

@ -42,8 +42,7 @@ Library Dependency Finder is a part of PlatformIO Library Build System. It
operates with the header files (``*.h, *.hpp``) and looks for
``#include <...>`` directives. What is more, LDF interprets C Preprocessor
conditional macros (``#ifdef ...``, etc.). Library Dependency Finder starts
work from analyzing source files from :ref:`projectconf_pio_src_dir`. It
understands "nested includes/chain" by default if they depend on each other.
work from analyzing source files from :ref:`projectconf_pio_src_dir`.
There are different library storages where Library Dependency Finder looks for
dependencies. These storages/folders have priority. LDF operates in the next

View File

@ -650,18 +650,17 @@ Example:
Please make sure to read :ref:`faq_ldf` guides first.
By default, this option is turned OFF (``lib_deep_search = false``) and means
that Library Dependency Finder will analyzes only "nested includes/chain".
By default, this option is turned ON (``lib_deep_search = true``) and means
that Library Dependency Finder will analyze ALL source files from the library
and will try automatically find all dependencies.
Nevertheless, some libraries depend on other libraries and the
If you want to disable deep search, please set this option to ``false``.
Note! Some libraries depend on other libraries and the
``#include <...>`` directives for these libraries are not declared in the
"main" header file that is used by upper library. In this case, LDF will not
handle these libraries automatically because it doesn't analyze "each source
file" of the nested libraries.
If you want to enable deep search, please set this option to ``true``.
Found library will be treated like the new source files and LDF will
search dependencies for it.
"main" header file that is used by upper library. If LDF is turned OFF
(``lib_deep_search = false``), it will not handle these libraries automatically
because it doesn't analyze "each source file" of the nested libraries
(only "nested includes/chain").
For example, there are 2 libraries:

View File

@ -30,6 +30,14 @@ Description
Install new library by specified
`PlatformIO Library Registry ID <http://platformio.org/lib>`_.
Installs the project library dependencies or a specific set of libraries.
[LIBRARY] can have multiple forms: <source>, <source>@<target>,
<id=> or <name>=<source>@<target>
Where, <source> is a registry ID, registry name, repository URL, physical
location, <target> is a valid semantic version/range, commit, branch, etc., and
<name> is the name it should have locally.
Options
-------

View File

@ -14,7 +14,7 @@
import sys
VERSION = (3, 0, "0.dev11")
VERSION = (3, 0, "0.dev12")
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "platformio"

View File

@ -21,7 +21,7 @@ from platformio import (__author__, __description__, __email__, __license__,
install_requires = [
"bottle<0.13",
"click>=3.2,<6",
"click>=5,<6",
"lockfile>=0.9.1,<0.13",
"requests>=2.4.0,<3",
"semantic_version>=2.5.0",