From ae964fa7292439da8899cac54478591791b8ccd9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 30 Jul 2018 14:26:24 +0300 Subject: [PATCH] Fixed an issue with PIO Remote when upload process depends on the source code of a project framework --- HISTORY.rst | 2 ++ platformio/builder/tools/platformio.py | 3 ++- platformio/managers/platform.py | 13 +++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4fd6b098..5d42a5d5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,8 @@ 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 with `PIO Remote `__ + when upload process depends on the source code of a project framework * Fixed an issue when ``srcFilter`` field in `library.json `__ breaks a library build (`issue #1735 `_) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index a3677e26..b8e17fcd 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -306,7 +306,8 @@ def BuildFrameworks(env, frameworks): if f in ("arduino", "energia"): # Arduino IDE appends .o the end of filename Builder.match_splitext = scons_patched_match_splitext - env.ConvertInoToCpp() + if "nobuild" not in COMMAND_LINE_TARGETS: + env.ConvertInoToCpp() if f in board_frameworks: SConscript(env.GetFrameworkScript(f), exports="env") diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 5a947c4c..210dd5f5 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -604,12 +604,13 @@ class PlatformBase( # pylint: disable=too-many-public-methods # enable upload tools for upload targets if any(["upload" in t for t in targets] + ["program" in targets]): - for _name, _opts in self.packages.iteritems(): - if _opts.get("type") == "uploader": - self.packages[_name]['optional'] = False - elif "nobuild" in targets: - # skip all packages, allow only upload tools - self.packages[_name]['optional'] = True + for name, opts in self.packages.iteritems(): + if opts.get("type") == "uploader": + self.packages[name]['optional'] = False + # skip all packages in "nobuild" mode + # allow only upload tools and frameworks + elif "nobuild" in targets and opts.get("type") != "framework": + self.packages[name]['optional'] = True def get_lib_storages(self): storages = []