From 48a823d39e54c2a1509ad22f0b8fe8c15e70f4cb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 4 Aug 2023 20:15:14 +0300 Subject: [PATCH 1/7] Do not check internet connection on the postponed telemetry // Resolve #4706 --- platformio/telemetry.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platformio/telemetry.py b/platformio/telemetry.py index ceb0929610..5b0734c9a2 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -27,7 +27,7 @@ from platformio import __title__, __version__, app, exception, fs, util from platformio.cli import PlatformioCLI from platformio.debug.config.base import DebugConfigBase -from platformio.http import HTTPSession, ensure_internet_on +from platformio.http import HTTPSession from platformio.proc import is_ci KEEP_MAX_REPORTS = 100 @@ -363,8 +363,6 @@ def postpone_events(events): def process_postponed_logs(): - if not ensure_internet_on(): - return None events = load_postponed_events() if not events: return None @@ -378,4 +376,5 @@ def process_postponed_logs(): timestamp=event["timestamp"], instant_sending=False, ) + telemetry.send() return True From 65397fe0591eb3d37056effcb015f5c1893a7206 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 4 Aug 2023 20:16:49 +0300 Subject: [PATCH 2/7] Bump version to 6.1.10b1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 643dcc2e49..ccdc412801 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, "10a4") +VERSION = (6, 1, "10b1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From a733f3c868b259c64985c9474b41074413986d27 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Aug 2023 12:07:16 +0300 Subject: [PATCH 3/7] Update slogan --- HISTORY.rst | 4 +++- README.rst | 6 ++++-- docs | 2 +- platformio/__init__.py | 14 +++++--------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index c66f136ca6..f6681b5446 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,7 +13,9 @@ Release Notes PlatformIO Core 6 ----------------- -**A professional collaborative platform for declarative, safety-critical, and test-driven embedded development.** +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.10 (2023-??-??) ~~~~~~~~~~~~~~~~~~~ diff --git a/README.rst b/README.rst index cd3454f52d..df73525eab 100644 --- a/README.rst +++ b/README.rst @@ -36,9 +36,11 @@ PlatformIO Core .. image:: https://raw.githubusercontent.com/platformio/platformio-web/develop/app/images/platformio-ide-laptop.png :target: https://platformio.org?utm_source=github&utm_medium=core -`PlatformIO `_ is a professional collaborative platform for embedded development. +`PlatformIO `_: Your Gateway to Embedded Software Development Excellence. -**A place where Developers and Teams have true Freedom! No more vendor lock-in!** +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. * Open source, maximum permissive Apache 2.0 license * Cross-platform IDE and Unified Debugger diff --git a/docs b/docs index 5ae4fa7e89..43c21e4fa9 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5ae4fa7e895f5d3a04514314b1af31b37469d274 +Subproject commit 43c21e4fa971739c448b4d6b07b00083b3a3aa2f diff --git a/platformio/__init__.py b/platformio/__init__.py index ccdc412801..55313ba94b 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -17,15 +17,11 @@ __title__ = "platformio" __description__ = ( - "A professional collaborative platform for embedded development. " - "Cross-platform IDE and Unified Debugger. " - "Static Code Analyzer and Remote Unit Testing. " - "Multi-platform and Multi-architecture Build System. " - "Firmware File Explorer and Memory Inspection. " - "IoT, Arduino, CMSIS, ESP-IDF, FreeRTOS, libOpenCM3, mbedOS, Pulp OS, SPL, " - "STM32Cube, Zephyr RTOS, ARM, AVR, Espressif (ESP8266/ESP32), FPGA, " - "MCS-51 (8051), MSP430, Nordic (nRF51/nRF52), NXP i.MX RT, PIC32, RISC-V, " - "STMicroelectronics (STM8/STM32), Teensy" + "Your Gateway to Embedded Software Development Excellence. " + "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." ) __url__ = "https://platformio.org" From 6e75dc0d577ad3f49990f7e423631b4a6ff91a2b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Aug 2023 12:46:19 +0300 Subject: [PATCH 4/7] Remove unnecessary files --- .../integration/tpls/clion/.gitignore.tpl | 2 - .../integration/tpls/clion/CMakeLists.txt.tpl | 33 ----- .../tpls/clion/CMakeListsPrivate.txt.tpl | 127 ------------------ 3 files changed, 162 deletions(-) delete mode 100644 platformio/project/integration/tpls/clion/CMakeLists.txt.tpl delete mode 100644 platformio/project/integration/tpls/clion/CMakeListsPrivate.txt.tpl diff --git a/platformio/project/integration/tpls/clion/.gitignore.tpl b/platformio/project/integration/tpls/clion/.gitignore.tpl index 3fe18ad479..03f4a3c192 100644 --- a/platformio/project/integration/tpls/clion/.gitignore.tpl +++ b/platformio/project/integration/tpls/clion/.gitignore.tpl @@ -1,3 +1 @@ .pio -CMakeListsPrivate.txt -cmake-build-*/ diff --git a/platformio/project/integration/tpls/clion/CMakeLists.txt.tpl b/platformio/project/integration/tpls/clion/CMakeLists.txt.tpl deleted file mode 100644 index ca3099eefc..0000000000 --- a/platformio/project/integration/tpls/clion/CMakeLists.txt.tpl +++ /dev/null @@ -1,33 +0,0 @@ -# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE -# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags -# -# If you need to override existing CMake configuration or add extra, -# please create `CMakeListsUser.txt` in the root of project. -# The `CMakeListsUser.txt` will not be overwritten by PlatformIO. - -cmake_minimum_required(VERSION 3.13) -set(CMAKE_SYSTEM_NAME Generic) -set(CMAKE_C_COMPILER_WORKS 1) -set(CMAKE_CXX_COMPILER_WORKS 1) - -project("{{project_name}}" C CXX) - -include(CMakeListsPrivate.txt) - -if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsUser.txt) -include(CMakeListsUser.txt) -endif() - -add_custom_target( - Production ALL - COMMAND platformio -c clion run "$<$>:-e${CMAKE_BUILD_TYPE}>" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_custom_target( - Debug ALL - COMMAND platformio -c clion debug "$<$>:-e${CMAKE_BUILD_TYPE}>" - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} -) - -add_executable(Z_DUMMY_TARGET ${SRC_LIST}) diff --git a/platformio/project/integration/tpls/clion/CMakeListsPrivate.txt.tpl b/platformio/project/integration/tpls/clion/CMakeListsPrivate.txt.tpl deleted file mode 100644 index c65848f6b9..0000000000 --- a/platformio/project/integration/tpls/clion/CMakeListsPrivate.txt.tpl +++ /dev/null @@ -1,127 +0,0 @@ -# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE -# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags -# -# If you need to override existing CMake configuration or add extra, -# please create `CMakeListsUser.txt` in the root of project. -# The `CMakeListsUser.txt` will not be overwritten by PlatformIO. - -% import os -% import re -% -% from platformio.compat import shlex_join -% from platformio.project.helpers import load_build_metadata -% -% def _normalize_path(path): -% if project_dir in path: -% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}") -% elif user_home_dir in path: -% if "windows" in systype: -% path = path.replace(user_home_dir, "${ENV_HOME_PATH}") -% else: -% path = path.replace(user_home_dir, "$ENV{HOME}") -% end -% end -% return path -% end -% -% def _fix_lib_dirs(lib_dirs): -% result = [] -% for lib_dir in lib_dirs: -% if not os.path.isabs(lib_dir): -% lib_dir = os.path.join(project_dir, lib_dir) -% end -% result.append(to_unix_path(os.path.normpath(lib_dir))) -% end -% return result -% end -% -% def _escape(text): -% return to_unix_path(text).replace('"', '\\"') -% end -% -% def _get_lib_dirs(envname): -% env_libdeps_dir = os.path.join(config.get("platformio", "libdeps_dir"), envname) -% env_lib_extra_dirs = config.get("env:" + envname, "lib_extra_dirs", []) -% return _fix_lib_dirs([env_libdeps_dir] + env_lib_extra_dirs) -% end -% -% envs = config.envs() - - -% if len(envs) > 1: -set(CMAKE_CONFIGURATION_TYPES "{{ ";".join(envs) }};" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE) -% else: -set(CMAKE_CONFIGURATION_TYPES "{{ env_name }}" CACHE STRING "Build Types reflect PlatformIO Environments" FORCE) -% end - -# Convert "Home Directory" that may contain unescaped backslashes on Windows -% if "windows" in systype: -file(TO_CMAKE_PATH $ENV{HOMEDRIVE}$ENV{HOMEPATH} ENV_HOME_PATH) -% end - -% if svd_path: -set(CLION_SVD_FILE_PATH "{{ _normalize_path(svd_path) }}" CACHE FILEPATH "Peripheral Registers Definitions File" FORCE) -% end - -SET(CMAKE_C_COMPILER "{{ _normalize_path(cc_path) }}") -SET(CMAKE_CXX_COMPILER "{{ _normalize_path(cxx_path) }}") -SET(CMAKE_CXX_FLAGS {{ _normalize_path(to_unix_path(shlex_join(cxx_flags))) }}) -SET(CMAKE_C_FLAGS {{ _normalize_path(to_unix_path(shlex_join(cc_flags))) }}) - -% cc_stds = [arg for arg in cc_flags if arg.startswith("-std=")] -% cxx_stds = [arg for arg in cxx_flags if arg.startswith("-std=")] -% if cc_stds: -SET(CMAKE_C_STANDARD {{ cc_stds[-1][-2:] }}) -% end -% if cxx_stds: -set(CMAKE_CXX_STANDARD {{ cxx_stds[-1][-2:] }}) -% end - -if (CMAKE_BUILD_TYPE MATCHES "{{ env_name }}") -% for define in defines: - add_definitions(-D{{!re.sub(r"([\"\(\)\ #])", r"\\\1", define)}}) -% end - -% for include in filter_includes(includes): - include_directories("{{ _normalize_path(include) }}") -% end - - FILE(GLOB_RECURSE EXTRA_LIB_SOURCES -% for dir in _get_lib_dirs(env_name): - {{ _normalize_path(dir) + "/*.*" }} -% end - ) -endif() - -% leftover_envs = list(set(envs) ^ set([env_name])) -% -% ide_data = {} -% if leftover_envs: -% ide_data = load_build_metadata(project_dir, leftover_envs) -% end -% -% for env, data in ide_data.items(): -if (CMAKE_BUILD_TYPE MATCHES "{{ env }}") -% for define in data["defines"]: - add_definitions(-D{{!re.sub(r"([\"\(\)\ #])", r"\\\1", define)}}) -% end - -% for include in filter_includes(data["includes"]): - include_directories("{{ _normalize_path(to_unix_path(include)) }}") -% end - - FILE(GLOB_RECURSE EXTRA_LIB_SOURCES -% for dir in _get_lib_dirs(env): - {{ _normalize_path(dir) + "/*.*" }} -% end - ) -endif() -% end - -FILE(GLOB_RECURSE SRC_LIST -% for path in (project_src_dir, project_lib_dir, project_test_dir): - {{ _normalize_path(path) + "/*.*" }} -% end -) - -list(APPEND SRC_LIST ${EXTRA_LIB_SOURCES}) From 8b6a4b8ce8d26598321b842a68d0861e56dccd94 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Aug 2023 13:18:41 +0300 Subject: [PATCH 5/7] Bump version to 6.1.10 --- HISTORY.rst | 2 +- docs | 2 +- platformio/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f6681b5446..882860c3d2 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.10 (2023-??-??) +6.1.10 (2023-08-11) ~~~~~~~~~~~~~~~~~~~ * Resolved an issue that caused generated projects for `PlatformIO IDE for VSCode `__ to break when the ``-iprefix`` compiler flag was used diff --git a/docs b/docs index 43c21e4fa9..295991a9c2 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 43c21e4fa971739c448b4d6b07b00083b3a3aa2f +Subproject commit 295991a9c228ab9b1509fbaf41c30d4df7fec553 diff --git a/platformio/__init__.py b/platformio/__init__.py index 55313ba94b..b07d2bdc8d 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, "10b1") +VERSION = (6, 1, 10) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 532759c0c6e87b087f1ff4871dc3475d4e686ab0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 11 Aug 2023 13:21:44 +0300 Subject: [PATCH 6/7] 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 7/7] 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)