Resolved an issue where multiple targets were not executed sequentially // Resolve #4604

This commit is contained in:
Ivan Kravets
2023-04-25 22:32:18 +03:00
parent c8eea40dd0
commit 6f0b1fbb91
4 changed files with 11 additions and 5 deletions

View File

@ -32,6 +32,7 @@ PlatformIO Core 6
* Resolved an issue where the incorrect debugging environment was generated for VSCode in "Auto" mode (`issue #4597 <https://github.com/platformio/platformio-core/issues/4597>`_)
* Resolved an issue where native tests would fail if a custom program name was specified (`issue #4546 <https://github.com/platformio/platformio-core/issues/4546>`_)
* Resolved an issue where the PlatformIO |DEBUGGING| solution was not escaping the tool installation process into MI2 correctly (`issue #4565 <https://github.com/platformio/platformio-core/issues/4565>`_)
* Resolved an issue where multiple targets were not executed sequentially (`issue #4604 <https://github.com/platformio/platformio-core/issues/4604>`_)
6.1.6 (2023-01-23)
~~~~~~~~~~~~~~~~~~

View File

@ -250,3 +250,9 @@ if "sizedata" in COMMAND_LINE_TARGETS:
)
Default("sizedata")
# issue #4604: process targets sequentially
for index, target in enumerate(
[t for t in COMMAND_LINE_TARGETS if not t.startswith("__")][1:]
):
env.Depends(target, COMMAND_LINE_TARGETS[index])

View File

@ -93,6 +93,9 @@ class PlatformRunMixin:
args.append("PIOVERBOSE=%d" % int(self.verbose))
# pylint: disable=protected-access
args.append("ISATTY=%d" % int(click._compat.isatty(sys.stdout)))
# encode and append variables
for key, value in variables.items():
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
if set(KNOWN_CLEAN_TARGETS + KNOWN_FULLCLEAN_TARGETS) & set(targets):
args.append("--clean")
@ -103,10 +106,6 @@ class PlatformRunMixin:
elif targets:
args.extend(targets)
# encode and append variables
for key, value in variables.items():
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
# force SCons output to Unicode
os.environ["PYTHONIOENCODING"] = "utf-8"

View File

@ -68,7 +68,7 @@ class EnvironmentProcessor:
build_vars = self.get_build_variables()
is_clean = set(KNOWN_ALLCLEAN_TARGETS) & set(self.targets)
build_targets = list(set(self.targets) - set(KNOWN_ALLCLEAN_TARGETS))
build_targets = [t for t in self.targets if t not in KNOWN_ALLCLEAN_TARGETS]
# pre-clean
if is_clean: