forked from platformio/platformio-core
Handle possible NodeList in source files when processing Middlewares // Resolve #3531
env.Object() returns a list of objects that breaks the processing of subsequent middlewares since we only expected File nodes.
This commit is contained in:
@@ -26,6 +26,7 @@ PlatformIO Core 4
|
|||||||
* Added support for "globstar/`**`" (recursive) pattern for the different commands and configuration options (`platformio ci <https://docs.platformio.org/page/core/userguide/cmd_ci.html>`__, `src_filter <https://docs.platformio.org/page/projectconf/section_env_build.html#src-filter>`__, `check_patterns <https://docs.platformio.org/page/projectconf/section_env_check.html#check-patterns>`__, `library.json > srcFilter <https://docs.platformio.org/page/librarymanager/config.html#srcfilter>`__). Python 3.5+ is required.
|
* Added support for "globstar/`**`" (recursive) pattern for the different commands and configuration options (`platformio ci <https://docs.platformio.org/page/core/userguide/cmd_ci.html>`__, `src_filter <https://docs.platformio.org/page/projectconf/section_env_build.html#src-filter>`__, `check_patterns <https://docs.platformio.org/page/projectconf/section_env_check.html#check-patterns>`__, `library.json > srcFilter <https://docs.platformio.org/page/librarymanager/config.html#srcfilter>`__). Python 3.5+ is required.
|
||||||
* Added a new ``-e, --environment`` option to `platformio project init <https://docs.platformio.org/page/core/userguide/project/cmd_init.html#cmdoption-platformio-project-init-e>`__ command that helps to update a PlatformIO project using existing environment
|
* Added a new ``-e, --environment`` option to `platformio project init <https://docs.platformio.org/page/core/userguide/project/cmd_init.html#cmdoption-platformio-project-init-e>`__ command that helps to update a PlatformIO project using existing environment
|
||||||
* Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 <https://github.com/platformio/platformio-core/issues/3523>`_)
|
* Fixed an issue with PIO Unit Testing when running multiple environments (`issue #3523 <https://github.com/platformio/platformio-core/issues/3523>`_)
|
||||||
|
* Fixed an issue with improper processing of source files added via multiple Build Middlewares (`issue #3531 <https://github.com/platformio/platformio-core/issues/3531>`_)
|
||||||
|
|
||||||
4.3.4 (2020-05-23)
|
4.3.4 (2020-05-23)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@@ -20,6 +20,7 @@ import sys
|
|||||||
|
|
||||||
from SCons import Builder, Util # pylint: disable=import-error
|
from SCons import Builder, Util # pylint: disable=import-error
|
||||||
from SCons.Node import FS # pylint: disable=import-error
|
from SCons.Node import FS # pylint: disable=import-error
|
||||||
|
from SCons.Node import NodeList # pylint: disable=import-error
|
||||||
from SCons.Script import COMMAND_LINE_TARGETS # pylint: disable=import-error
|
from SCons.Script import COMMAND_LINE_TARGETS # pylint: disable=import-error
|
||||||
from SCons.Script import AlwaysBuild # pylint: disable=import-error
|
from SCons.Script import AlwaysBuild # pylint: disable=import-error
|
||||||
from SCons.Script import DefaultEnvironment # pylint: disable=import-error
|
from SCons.Script import DefaultEnvironment # pylint: disable=import-error
|
||||||
@@ -285,6 +286,8 @@ def CollectBuildFiles(
|
|||||||
for callback, pattern in env.get("__PIO_BUILD_MIDDLEWARES", []):
|
for callback, pattern in env.get("__PIO_BUILD_MIDDLEWARES", []):
|
||||||
tmp = []
|
tmp = []
|
||||||
for node in sources:
|
for node in sources:
|
||||||
|
if isinstance(node, NodeList):
|
||||||
|
node = node[0]
|
||||||
if pattern and not fnmatch.fnmatch(node.srcnode().get_path(), pattern):
|
if pattern and not fnmatch.fnmatch(node.srcnode().get_path(), pattern):
|
||||||
tmp.append(node)
|
tmp.append(node)
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user