From 532759c0c6e87b087f1ff4871dc3475d4e686ab0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Aug 2023 13:21:44 +0300 Subject: [PATCH 01/16] Bump version to 6.1.11a1 --- HISTORY.rst | 3 +++ platformio/__init__.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 882860c3d2..3925720382 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,6 +17,9 @@ Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success. +6.1.11 (2023-??-??) +~~~~~~~~~~~~~~~~~~~ + 6.1.10 (2023-08-11) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index b07d2bdc8d..40edef0572 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, 10) +VERSION = (6, 1, "11a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 99224d7d4e831061dd48450b7e3f42a5bddadb7f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Aug 2023 13:49:03 +0300 Subject: [PATCH 02/16] Remove CLion from tests --- tests/commands/test_init.py | 80 ------------------------------------- 1 file changed, 80 deletions(-) diff --git a/tests/commands/test_init.py b/tests/commands/test_init.py index 80ef0d9194..651cf579f5 100644 --- a/tests/commands/test_init.py +++ b/tests/commands/test_init.py @@ -16,7 +16,6 @@ import os from platformio.commands.boards import cli as cmd_boards -from platformio.package.commands.exec import package_exec_cmd from platformio.project.commands.init import project_init_cmd from platformio.project.config import ProjectConfig from platformio.project.exception import ProjectEnvsNotAvailableError @@ -216,82 +215,3 @@ def test_init_incorrect_board(clirunner): assert result.exit_code == 2 assert "Error: Invalid value for" in result.output assert isinstance(result.exception, SystemExit) - - -def test_init_ide_clion(clirunner, validate_cliresult, tmpdir): - project_dir = tmpdir.join("project").mkdir() - # Add extra libraries to cover cases with possible unwanted backslashes - lib_extra_dirs = tmpdir.join("extra_libs").mkdir() - extra_lib = lib_extra_dirs.join("extra_lib").mkdir() - extra_lib.join("extra_lib.h").write(" ") - extra_lib.join("extra_lib.cpp").write(" ") - - with project_dir.as_cwd(): - result = clirunner.invoke( - project_init_cmd, - [ - "-b", - "uno", - "--ide", - "clion", - "--project-option", - "framework=arduino", - "--project-option", - "platform_packages=platformio/tool-ninja", - "--project-option", - "lib_extra_dirs=%s" % str(lib_extra_dirs), - ], - ) - - validate_cliresult(result) - assert all( - os.path.isfile(f) for f in ("CMakeLists.txt", "CMakeListsPrivate.txt") - ) - - project_dir.join("src").join("main.cpp").write( - """#include -#include "extra_lib.h" -void setup(){} -void loop(){} -""" - ) - project_dir.join("build_dir").mkdir() - result = clirunner.invoke( - package_exec_cmd, - [ - "-p", - "tool-cmake", - "--", - "cmake", - "-DCMAKE_BUILD_TYPE=uno", - "-DCMAKE_MAKE_PROGRAM=%s" - % os.path.join( - ProjectConfig().get("platformio", "packages_dir"), - "tool-ninja", - "ninja", - ), - "-G", - "Ninja", - "-S", - str(project_dir), - "-B", - "build_dir", - ], - ) - validate_cliresult(result) - - # build - result = clirunner.invoke( - package_exec_cmd, - [ - "-p", - "tool-cmake", - "--", - "cmake", - "--build", - "build_dir", - "--target", - "Debug", - ], - ) - validate_cliresult(result) From ce735c0ae5200585e0571f65aad1dc90dafed420 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 10:59:43 +0300 Subject: [PATCH 03/16] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 295991a9c2..6b2af96f74 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 295991a9c228ab9b1509fbaf41c30d4df7fec553 +Subproject commit 6b2af96f74d1c99f934a6975d9c26a4325abd172 From 5cfaea91d6a5838833bdd666f9d0eab0680ff074 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 11:45:31 +0300 Subject: [PATCH 04/16] Docs: Update docs to use `curl` or `wget` on Unix when installing PlatformIO Core --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 6b2af96f74..eca1ad5259 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 6b2af96f74d1c99f934a6975d9c26a4325abd172 +Subproject commit eca1ad5259b39553bbbab4d7c71902089fd9a87e From 6972c9c1006b0a97d9e972af8c1b5c2973d78692 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 13:05:30 +0300 Subject: [PATCH 05/16] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index eca1ad5259..a39c5ed3ee 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit eca1ad5259b39553bbbab4d7c71902089fd9a87e +Subproject commit a39c5ed3ee19b2c96c36f4dafa4a46b9d8faab44 From 7e89e551ae1f0853f6a2dcbc01b2e400c5a1b155 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 14:04:09 +0300 Subject: [PATCH 06/16] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index a39c5ed3ee..051ad34aa4 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a39c5ed3ee19b2c96c36f4dafa4a46b9d8faab44 +Subproject commit 051ad34aa475b63bdb5db0f21999e778ee762d8d From 2ee8214485348685d26ea44e68ba0086ad942252 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 14 Aug 2023 15:57:00 +0300 Subject: [PATCH 07/16] Use CC location for resolving toolchain path in VSCode template VSCode uses the "packagetoolchainBinDir" option to find the objdump binary and if GDB is shipped separately from the toolchain package then VSCode will fail to launch a debug session due to missing objdump --- HISTORY.rst | 2 ++ .../project/integration/tpls/vscode/.vscode/launch.json.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 3925720382..d97b9b9eab 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,8 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.11 (2023-??-??) ~~~~~~~~~~~~~~~~~~~ +* Resolved a possible issue that may cause generated projects for `PlatformIO IDE for VSCode `__ to fail to launch a debug session because of a missing objdump binary when GDB is not part of the toolchain package + 6.1.10 (2023-08-11) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl b/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl index c419d27ed7..4bd188d2fd 100644 --- a/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl @@ -17,7 +17,7 @@ % "name": "PIO Debug (skip Pre-Debug)", % "executable": _escape_path(prog_path), % "projectEnvName": env_name if forced_env_name else default_debug_env_name, -% "toolchainBinDir": _escape_path(os.path.dirname(gdb_path)), +% "toolchainBinDir": _escape_path(os.path.dirname(cc_path)), % "internalConsoleOptions": "openOnSessionStart", % } % From c94661301935fb85575f3d85c44f1615043a120c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 16:18:28 +0300 Subject: [PATCH 08/16] Improve docs for the Installer Script --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 051ad34aa4..8a54fd2415 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 051ad34aa475b63bdb5db0f21999e778ee762d8d +Subproject commit 8a54fd24151d43c0b1c787bd6aea692101c5066e From a0f8def61682b576ed65f764e3a633df7d74e548 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 19:02:58 +0300 Subject: [PATCH 09/16] Resolved a regression issue with Memory Inspection in PIO Home --- HISTORY.rst | 3 ++- platformio/home/rpc/handlers/project.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index d97b9b9eab..251c7b8059 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,7 +20,8 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.11 (2023-??-??) ~~~~~~~~~~~~~~~~~~~ -* Resolved a possible issue that may cause generated projects for `PlatformIO IDE for VSCode `__ to fail to launch a debug session because of a missing objdump binary when GDB is not part of the toolchain package +* Resolved a possible issue that may cause generated projects for `PlatformIO IDE for VSCode `__ to fail to launch a debug session because of a missing "objdump" binary when GDB is not part of the toolchain package +* Resolved a regression issue that resulted in the malfunction of the Memory Inspection feature within `PIO Home `__ 6.1.10 (2023-08-11) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/home/rpc/handlers/project.py b/platformio/home/rpc/handlers/project.py index 90b3ab78fe..2c03a7c980 100644 --- a/platformio/home/rpc/handlers/project.py +++ b/platformio/home/rpc/handlers/project.py @@ -42,9 +42,9 @@ def config_call(init_kwargs, method, *args): project_dir = init_kwargs["path"] init_kwargs["path"] = os.path.join(init_kwargs["path"], "platformio.ini") elif os.path.isfile(init_kwargs["path"]): - project_dir = get_project_dir() - else: project_dir = os.path.dirname(init_kwargs["path"]) + else: + project_dir = get_project_dir() with fs.cd(project_dir): return getattr(ProjectConfig(**init_kwargs), method)(*args) From b75bdbd320bd807e6a58535a22b14d31cf4386b1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 14 Aug 2023 19:03:19 +0300 Subject: [PATCH 10/16] Bump version to 6.1.11a2 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 40edef0572..4a563660f7 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "11a1") +VERSION = (6, 1, "11a2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 00409fc096d80e17ebc6d7290e9bcb90232b7293 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 16 Aug 2023 17:44:37 +0300 Subject: [PATCH 11/16] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 8a54fd2415..1c8479f3d0 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 8a54fd24151d43c0b1c787bd6aea692101c5066e +Subproject commit 1c8479f3d0af2b9ac6f3a2b7f9405bd9a4cdac3f From 897844ebc172bd8a2e313bdb9011fc7d986863c2 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 18 Aug 2023 14:39:03 +0300 Subject: [PATCH 12/16] Docs: Sync dev-platforms --- docs | 2 +- examples | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs b/docs index 1c8479f3d0..fb5dbb92e5 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 1c8479f3d0af2b9ac6f3a2b7f9405bd9a4cdac3f +Subproject commit fb5dbb92e5865de7f96b49704ea8383e877ab99a diff --git a/examples b/examples index 4bed26fd0d..28c58d3b7c 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 4bed26fd0d0b559dcf52f6088c9c2b4ebffd5fd6 +Subproject commit 28c58d3b7c4b88d3b1e0c1d2f7d99119a9c89c39 From b88c393b4e974ff571e867944a0acf4c50d48e89 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Aug 2023 15:53:29 +0300 Subject: [PATCH 13/16] Ensure SCons is installed on "project init" --- platformio/package/commands/install.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/package/commands/install.py b/platformio/package/commands/install.py index 82c377d024..d297664408 100644 --- a/platformio/package/commands/install.py +++ b/platformio/package/commands/install.py @@ -20,6 +20,7 @@ from platformio import fs from platformio.package.exception import UnknownPackageError +from platformio.package.manager.core import get_core_package_dir from platformio.package.manager.library import LibraryPackageManager from platformio.package.manager.platform import PlatformPackageManager from platformio.package.manager.tool import ToolPackageManager @@ -120,7 +121,7 @@ def install_project_env_dependencies(project_env, options=None): # custom tools if options.get("tools"): installed_conds.append(_install_project_env_custom_tools(project_env, options)) - # custom ibraries + # custom libraries if options.get("libraries"): installed_conds.append( _install_project_env_custom_libraries(project_env, options) @@ -152,6 +153,8 @@ def _install_project_env_platform(project_env, options): skip_dependencies=options.get("skip_dependencies"), force=options.get("force"), ) + # ensure SCons is installed + get_core_package_dir("tool-scons") return not already_up_to_date From f1c445be150fa5af9030cdeec16efe92a38af9cc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Aug 2023 17:54:11 +0300 Subject: [PATCH 14/16] Bump version to 6.1.11 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 2 +- tests/commands/pkg/test_install.py | 6 ++++-- tests/commands/pkg/test_uninstall.py | 3 ++- tests/commands/pkg/test_update.py | 4 +++- 6 files changed, 12 insertions(+), 7 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 251c7b8059..6a5b2a0b3c 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -17,7 +17,7 @@ Unlock the true potential of embedded software development with PlatformIO's collaborative ecosystem, embracing declarative principles, test-driven methodologies, and modern toolchains for unrivaled success. -6.1.11 (2023-??-??) +6.1.11 (2023-08-31) ~~~~~~~~~~~~~~~~~~~ * Resolved a possible issue that may cause generated projects for `PlatformIO IDE for VSCode `__ to fail to launch a debug session because of a missing "objdump" binary when GDB is not part of the toolchain package diff --git a/docs b/docs index fb5dbb92e5..fb83b09c41 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit fb5dbb92e5865de7f96b49704ea8383e877ab99a +Subproject commit fb83b09c415516ec37018b10d801ddf5c946d794 diff --git a/platformio/__init__.py b/platformio/__init__.py index 4a563660f7..c0226cf359 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "11a2") +VERSION = (6, 1, 11) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/tests/commands/pkg/test_install.py b/tests/commands/pkg/test_install.py index ea995c6810..edcbc241eb 100644 --- a/tests/commands/pkg/test_install.py +++ b/tests/commands/pkg/test_install.py @@ -18,7 +18,7 @@ import pytest -from platformio import fs +from platformio import __core_packages__, fs from platformio.package.commands.install import package_install_cmd from platformio.package.manager.library import LibraryPackageManager from platformio.package.manager.platform import PlatformPackageManager @@ -148,7 +148,7 @@ def test_skip_dependencies( ), PackageSpec("ESPAsyncWebServer-esphome@2.1.0"), ] - assert len(ToolPackageManager().get_installed()) == 0 + assert len(ToolPackageManager().get_installed()) == 1 # SCons def test_baremetal_project( @@ -177,6 +177,7 @@ def test_baremetal_project( ), ] assert pkgs_to_specs(ToolPackageManager().get_installed()) == [ + PackageSpec("tool-scons@%s" % __core_packages__["tool-scons"][1:]), PackageSpec("toolchain-atmelavr@1.70300.191015"), ] @@ -209,6 +210,7 @@ def test_project( ] assert pkgs_to_specs(ToolPackageManager().get_installed()) == [ PackageSpec("framework-arduino-avr-attiny@1.5.2"), + PackageSpec("tool-scons@%s" % __core_packages__["tool-scons"][1:]), PackageSpec("toolchain-atmelavr@1.70300.191015"), ] assert config.get("env:devkit", "lib_deps") == [ diff --git a/tests/commands/pkg/test_uninstall.py b/tests/commands/pkg/test_uninstall.py index d776b142e8..73e2179aeb 100644 --- a/tests/commands/pkg/test_uninstall.py +++ b/tests/commands/pkg/test_uninstall.py @@ -198,6 +198,7 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path): assert pkgs_to_names(lm.get_installed()) == ["DallasTemperature", "OneWire"] assert pkgs_to_names(ToolPackageManager().get_installed()) == [ "framework-arduino-avr-attiny", + "tool-scons", "toolchain-atmelavr", ] assert config.get("env:devkit", "lib_deps") == [ @@ -224,7 +225,7 @@ def test_project(clirunner, validate_cliresult, isolated_pio_core, tmp_path): os.path.join(config.get("platformio", "libdeps_dir"), "devkit") ) assert not pkgs_to_names(lm.get_installed()) - assert not pkgs_to_names(ToolPackageManager().get_installed()) + assert pkgs_to_names(ToolPackageManager().get_installed()) == ["tool-scons"] assert config.get("env:devkit", "lib_deps") == [ "milesburton/DallasTemperature@^3.9.1" ] diff --git a/tests/commands/pkg/test_update.py b/tests/commands/pkg/test_update.py index 06ab92a7ca..5656daac04 100644 --- a/tests/commands/pkg/test_update.py +++ b/tests/commands/pkg/test_update.py @@ -16,7 +16,7 @@ import os -from platformio import fs +from platformio import __core_packages__, fs from platformio.package.commands.install import package_install_cmd from platformio.package.commands.update import package_update_cmd from platformio.package.exception import UnknownPackageError @@ -172,6 +172,7 @@ def test_project( ] assert pkgs_to_specs(ToolPackageManager().get_installed()) == [ PackageSpec("framework-arduino-avr-attiny@1.3.2"), + PackageSpec("tool-scons@%s" % __core_packages__["tool-scons"][1:]), PackageSpec("toolchain-atmelavr@1.50400.190710"), ] assert config.get("env:devkit", "lib_deps") == [ @@ -201,6 +202,7 @@ def test_project( ] assert pkgs_to_specs(ToolPackageManager().get_installed()) == [ PackageSpec("framework-arduino-avr-attiny@1.3.2"), + PackageSpec("tool-scons@%s" % __core_packages__["tool-scons"][1:]), PackageSpec("toolchain-atmelavr@1.70300.191015"), PackageSpec("toolchain-atmelavr@1.50400.190710"), ] From bd34c0f4377b23d5e73a66d3a0401be7a79a9c30 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Aug 2023 17:55:04 +0300 Subject: [PATCH 15/16] Bump version to 6.1.12a1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index c0226cf359..d8e1515b29 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, 11) +VERSION = (6, 1, "12a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 5cac6d8b88aed99a002284778662ba5241dd955b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 31 Aug 2023 19:31:37 +0300 Subject: [PATCH 16/16] Bump version to 6.1.11 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index d8e1515b29..c0226cf359 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = (6, 1, "12a1") +VERSION = (6, 1, 11) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"