Fixed an issue with PIO Remote when upload process depends on the source code of a project framework

This commit is contained in:
Ivan Kravets
2018-07-30 14:26:24 +03:00
parent 2f2cfc2d84
commit ae964fa729
3 changed files with 11 additions and 7 deletions

View File

@ -13,6 +13,8 @@ PlatformIO 3.0
- Force building of project source code using `test_build_project_src <http://docs.platformio.org/page/projectconf/section_env_test.html#test_build_project_src>`__ option
- Fixed missed ``UNIT_TEST`` macro for unit test components/libraries
* Fixed an issue with `PIO Remote <http://docs.platformio.org/page/plus/pio-remote.html>`__
when upload process depends on the source code of a project framework
* Fixed an issue when ``srcFilter`` field in `library.json <http://docs.platformio.org/page/librarymanager/config.html>`__
breaks a library build
(`issue #1735 <https://github.com/platformio/platformio-core/issues/1735>`_)

View File

@ -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")

View File

@ -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 = []