From fedf3162f1edb37f0c0699e854d15089a1b03876 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 26 Jul 2018 20:46:21 +0300 Subject: [PATCH 1/2] Fix "test_lib" test --- tests/commands/test_lib.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/commands/test_lib.py b/tests/commands/test_lib.py index e4db2e7e0d..4c9705fd01 100644 --- a/tests/commands/test_lib.py +++ b/tests/commands/test_lib.py @@ -166,14 +166,12 @@ def test_global_lib_list(clirunner, validate_cliresult): assert sorted(items1) == sorted(items2) versions1 = [ - "{name}@{version}".format(**item) - for item in json.loads(result.output) + "{name}@{version}".format(**item) for item in json.loads(result.output) ] versions2 = [ 'ArduinoJson@5.8.2', 'ArduinoJson@5.10.1', 'AsyncMqttClient@0.8.2', - 'AsyncTCP@1.0.1', 'ESPAsyncTCP@1.1.3', 'NeoPixelBus@2.2.4', - 'PJON@07fe9aa', 'PJON@1fb26fd', 'PubSubClient@bef5814', - 'RFcontrol@77d4eb3f8a', 'RadioHead-1.62@0.0.0' + 'AsyncTCP@1.0.1', 'NeoPixelBus@2.2.4', 'PJON@07fe9aa', 'PJON@1fb26fd', + 'PubSubClient@bef5814', 'RFcontrol@77d4eb3f8a', 'RadioHead-1.62@0.0.0' ] assert set(versions1) >= set(versions2) From 9191ea97feb80e66698842c723854027a7151cb9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 27 Jul 2018 01:27:05 +0300 Subject: [PATCH 2/2] Fix an issue when "srcFilter" field in "library.json" breaks a library build // Resolve #1735 --- HISTORY.rst | 4 ++++ platformio/builder/tools/piolib.py | 9 --------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 34bddd26e9..4fd6b0989f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,10 @@ PlatformIO 3.0 - Force building of project source code using `test_build_project_src `__ option - Fixed missed ``UNIT_TEST`` macro for unit test components/libraries +* Fixed an issue when ``srcFilter`` field in `library.json `__ + breaks a library build + (`issue #1735 `_) + 3.5.4 (2018-07-03) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 787b3bdff4..04d595b040 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -586,15 +586,6 @@ def load_manifest(self): def _is_arduino_manifest(self): return isfile(join(self.path, "library.properties")) - @property - def src_dir(self): - if all([ - "srcFilter" in self._manifest.get("build", {}) - or self.env['SRC_FILTER'], not self._is_arduino_manifest() - ]): - return self.path - return LibBuilderBase.src_dir.fget(self) - @property def src_filter(self): if "srcFilter" in self._manifest.get("build", {}):