You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import("env")
print('---')
defmiddleware(node):
override=env.Object(node, CPPFLAGS=env["CPPFLAGS"] + [("-DFOO","-DBAR")])
print(type(node), node)
print(type(override), override)
returnoverridedefdummy(node):
print('this will never happen because of the crash')
returnnodeenv.AddBuildMiddleware(middleware, "*/src/main.cpp")
env.AddBuildMiddleware(dummy, "*/src/main.h")
Additional info
The text was updated successfully, but these errors were encountered:
When we get NodeList's [0] element, src node result will no longer match the main.cpp but main.cpp.o, so the dummy() function like above will never be called b/c we middleware modified it
Configuration
Operating system:
PlatformIO Version (
platformio --version
):PlatformIO, version 4.3.5a1
Description of problem
Following the documentation at https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#build-middlewares
When extra script defines multiple build middewares and one of them changes Node object via
env.Object(node, ...)
, build will crash because it does not expect a different type of object.Steps to Reproduce
Just
pio run
Actual Results
Build crashes on the second iteration of the middleware handler:
Expected Results
I'd guess
NodeList
should be expected somehow?If problems with PlatformIO Build System:
The content of
platformio.ini
:Source file to reproduce issue:
src/main.cpp
script.py
Additional info
The text was updated successfully, but these errors were encountered: