From 0e3aa2968997ac528f28e7ca2d8d6e4c3b5a20a5 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 13 Apr 2022 15:32:05 +0300 Subject: [PATCH] Introduce PlatformIO Core 6.0 --- HISTORY.rst | 297 +---------------------------- docs | 2 +- platformio/__init__.py | 2 +- platformio/commands/lib/command.py | 2 +- platformio/commands/pkg.py | 2 +- platformio/commands/platform.py | 2 +- platformio/commands/update.py | 4 +- platformio/commands/upgrade.py | 2 +- platformio/platform/base.py | 6 +- 9 files changed, 22 insertions(+), 297 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index e89158bf..e1cc411e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,16 +1,18 @@ Release Notes ============= -.. _release_notes_5: +.. _release_notes_6: -PlatformIO Core 5 +PlatformIO Core 6 ----------------- **A professional collaborative platform for embedded development** -5.3.0 (2022-??-??) +6.0.0 (2022-??-??) ~~~~~~~~~~~~~~~~~~ +Please check `Migration guide from 5.x to 6.0 `__. + * **Package Management** - New unified Package Management CLI (``pio pkg``): @@ -66,293 +68,12 @@ PlatformIO Core 5 - Better handling of the failed tests using the `Unit Testing `__ solution - Finally removed all tracks to the Python 2.7, the Python 3.6 is the minimum supported version. -5.2.5 (2022-02-10) -~~~~~~~~~~~~~~~~~~ +.. _release_notes_5: -- Improved support for private packages in `PlatformIO Registry `__ -- Improved checking of available Internet connection for IPv6-only workstations (`pull #4151 `_) -- Better detecting of default PlatformIO project directory on Linux OS (`pull #4158 `_) -- Respect disabling debugging server from "platformio.ini" passing an empty value to the `debug_server `__ option -- Fixed a "module 'asyncio' has no attribute 'run'" error when launching PIO Home using Python 3.6 (`issue #4169 `_) +PlatformIO Core 5 +----------------- -5.2.4 (2021-12-15) -~~~~~~~~~~~~~~~~~~ - -- Added support for a new ``headers`` field in `library.json `__ (declare a list of header files that can be included in a project source files using ``#include <...>`` directive) -- Improved tab completion support for Bash, ZSH, and Fish shells (`issue #4114 `_) -- Improved support for projects located on a network share (`issue #3417 `_, `issue #3926 `_, `issue #4099 `_) -- Upgraded build engine to the SCons 4.3 (`release notes `__) -- Fixed an issue with the CLion project generator when a macro contains a space (`issue #4102 `_) -- Fixed an issue with the NetBeans project generator when the path to PlatformIO contains a space (`issue #4096 `_) -- Fixed an issue when the system environment variable does not override a project configuration option (`issue #4125 `_) -- Fixed an issue when referencing ``*_dir`` option from a custom project configuration environment (`issue #4110 `_) -- Fixed an issue with the CLion template that generated a broken CMake file if user's home directory contained an unescaped backslash (`issue #4071 `_) -- Fixed an issue with wrong detecting Windows architecture when Python 32bit is used (`issue #4134 `_) - -5.2.3 (2021-11-05) -~~~~~~~~~~~~~~~~~~ - -- Automatically synchronize active projects between IDE and `PlatformIO Home `__ -- Added support for custom `device monitor filters `__ (`issue #3924 `_) -- Show human-readable message when infinite recursion is detected while processing `Interpolation of Values `__ (`issue #3883 `_) -- Improved directory interpolation (``${platformio.***_dir}``) in `"platformio.ini" `__ configuration file (`issue #3934 `_) -- Ignore resolving of SCons variables (e.g., ``${(SOURCE.get_abspath())}``) when preprocessing interpolations (`issue #3933 `_) -- Added "inc" as a sign that it's the root of the library (`issue #4093 `_) -- Fixed an issue when the ``$PROJECT_DIR`` variable was not properly replaced in the `debug_server `__ option (`issue #4086 `_) -- Fixed an issue when `PIO Remote `__ device monitor crashes on the first keypress (`issue #3832 `_) -- Fixed "Do not know how to make File target 'debug'" issue when debugging project using `CLion IDE `__ (`pull #4089 `_) -- Fixed "UnicodeEncodeError" when a build output contains non-ASCII characters (`issue #3971 `_) -- Fixed an issue when VSCode's debugger does not the honor default environment (`issue #4098 `_) - -5.2.2 (2021-10-20) -~~~~~~~~~~~~~~~~~~ - -- Override debugging firmware loading mode using ``--load-mode`` option for `pio debug `__ command -- Added support for CLion IDE 2021.3 (`pull #4085 `_) -- Removed debugging "legacy Click" message from CLI (`issue #4083 `_) -- Fixed a "TypeError: sequence item 1: expected str instance, list found" issue when extending configuration option in `"platformio.ini" `__ with the multi-line default value (`issue #4082 `_) - -5.2.1 (2021-10-11) -~~~~~~~~~~~~~~~~~~ - -- Clean a build environment and installed library dependencies using a new ``cleanall`` target (`issue #4062 `_) -- Override a default library builder via a new ``builder`` field in a ``build`` group of `library.json `__ manifest (`issue #3957 `_) -- Updated `Cppcheck `__ v2.6 with new checks, increased reliability of advanced addons (MISRA/CERT) and various improvements -- Handle the "test" folder as a part of CLion project (`issue #4005 `_) -- Improved handling of a library root based on "Conan" or "CMake" build systems (`issue #3887 `_) -- Fixed a "KeyError: Invalid board option 'build.cpu'" when using a precompiled library with a board that does not have a CPU field in the manifest (`issue #4056 `_) -- Fixed a "FileExist" error when the `platformio ci `__ command is used in pair with the ``--keep-build-dir`` option (`issue #4011 `_) -- Fixed an issue with draft values of C++ language standards that broke static analysis via Cppcheck (`issue #3944 `_) - -5.2.0 (2021-09-13) -~~~~~~~~~~~~~~~~~~ - -* **PlatformIO Debugging** - - - Boosted `PlatformIO Debugging `__ performance thanks to migrating the codebase to the pure Python 3 Asynchronous I/O stack - - `Debug unit tests `__ created with `PlatformIO Unit Testing `__ solution (`issue #948 `_) - - Debug native (desktop) applications on a host machine (`issue #980 `_) - - Support debugging on Windows using Windows CMD/CLI (`pio debug `__) (`issue #3793 `_) - - Configure a custom pattern to determine when debugging server is started with a new `debug_server_ready_pattern `__ option - - Fixed an issue with silent hanging when a custom debug server is not found (`issue #3756 `_) - -* **Package Management** - - - Improved a package publishing process: - - * Show package details - * Check for conflicting names in the PlatformIO Trusted Registry - * Check for duplicates and used version - * Validate package manifest - - - Added a new option ``--non-interactive`` to `pio package publish `__ command - -* **Build System** - - - Process "precompiled" and "ldflags" properties of the "library.properties" manifest (`issue #3994 `_) - - Upgraded build engine to the SCons 4.2 (`release notes `__) - - Fixed an issue with broken binary file extension when a custom ``PROGNAME`` contains dot symbols (`issue #3906 `_) - - Fixed an issue when PlatformIO archives a library that does not contain C/C++ source files (`issue #4019 `_) - -* **Static Code Analysis** - - - Updated analysis tools: - - * `Clang-Tidy `__ v12.0.1 with new modules and extended checks list - * `Cppcheck `__ v2.5.0 with improved code analysis and MISRA improvements - * `PVS-Studio `__ v7.14 with support for intermodular analysis, improved MISRA support and new diagnostics - -* **Miscellaneous** - - - Ensure that a serial port is ready before running unit tests on a remote target (`issue #3742 `_) - - Fixed an error "Unknown development platform" when running unit tests on a clean machine (`issue #3901 `_) - - Fixed an issue when "main.cpp" was generated for a new project for 8-bit development platforms (`issue #3872 `_) - -5.1.1 (2021-03-17) -~~~~~~~~~~~~~~~~~~ - -* Fixed a "The command line is too long" issue with a linking process on Windows (`issue #3827 `_) -* Fixed an issue with `device monitor `__ when the "send_on_enter" filter didn't send EOL chars (`issue #3787 `_) -* Fixed an issue with silent mode when unwanted data is printed to stdout (`issue #3837 `_) -* Fixed an issue when code inspection fails with "Bad JSON" (`issue #3790 `_) -* Fixed an issue with overriding user-specified debugging configuration information in VSCode (`issue #3824 `_) - -5.1.0 (2021-01-28) -~~~~~~~~~~~~~~~~~~ - -* **PlatformIO Home** - - - Boosted `PlatformIO Home `__ performance thanks to migrating the codebase to the pure Python 3 Asynchronous I/O stack - - Added a new ``--session-id`` option to `pio home `__ command that helps to keep PlatformIO Home isolated from other instances and protect from 3rd party access (`issue #3397 `_) - -* **Build System** - - - Upgraded build engine to the SCons 4.1 (`release notes `_) - - Refactored a workaround for a maximum command line character limitation (`issue #3792 `_) - - Fixed an issue with Python 3.8+ on Windows when a network drive is used (`issue #3417 `_) - -* **Package Management** - - - New options for `pio system prune `__ command: - - + ``--dry-run`` option to show data that will be removed - + ``--core-packages`` option to remove unnecessary core packages - + ``--platform-packages`` option to remove unnecessary development platform packages (`issue #923 `_) - - - Added new `check_prune_system_threshold `__ setting - - Disabled automatic removal of unnecessary development platform packages (`issue #3708 `_, `issue #3770 `_) - - Fixed an issue when unnecessary packages were removed in ``update --dry-run`` mode (`issue #3809 `_) - - Fixed a "ValueError: Invalid simple block" when uninstalling a package with a custom name and external source (`issue #3816 `_) - -* **Debugging** - - - Configure a custom debug adapter speed using a new `debug_speed `__ option (`issue #3799 `_) - - Handle debugging server's "ready_pattern" in "stderr" output - -* **Miscellaneous** - - - Improved listing of `multicast DNS services `_ - - Fixed a "UnicodeDecodeError: 'utf-8' codec can't decode byte" when using J-Link for firmware uploading on Linux (`issue #3804 `_) - - Fixed an issue with a compiler driver for ".ccls" language server (`issue #3808 `_) - - Fixed an issue when `pio device monitor --eol `__ and "send_on_enter" filter do not work properly (`issue #3787 `_) - -5.0.4 (2020-12-30) -~~~~~~~~~~~~~~~~~~ - -- Added "Core" suffix when showing PlatformIO Core version using ``pio --version`` command -- Improved ".ccls" configuration file for Emacs, Vim, and Sublime Text integrations -- Updated analysis tools: - - * `Cppcheck `__ v2.3 with improved C++ parser and several new MISRA rules - * `PVS-Studio `__ v7.11 with new diagnostics and updated mass suppression mechanism - -- Show a warning message about deprecated support for Python 2 and Python 3.5 -- Do not provide "intelliSenseMode" option when generating configuration for VSCode C/C++ extension -- Fixed a "git-sh-setup: file not found" error when installing project dependencies from Git VCS (`issue #3740 `_) -- Fixed an issue with package publishing on Windows when Unix permissions are not preserved (`issue #3776 `_) - -5.0.3 (2020-11-12) -~~~~~~~~~~~~~~~~~~ - -- Added an error selector for `Sublime Text `__ build runner (`issue #3733 `_) -- Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode -- Force VSCode's intelliSenseMode to "gcc-x64" when GCC toolchain is used -- Print ignored test suites and environments in the test summary report only in verbose mode (`issue #3726 `_) -- Fixed an issue when the package manager tries to install a built-in library from the registry (`issue #3662 `_) -- Fixed an issue when `pio package pack `__ ignores some folders (`issue #3730 `_) - -5.0.2 (2020-10-30) -~~~~~~~~~~~~~~~~~~ - -- Initialize a new project or update the existing passing working environment name and its options (`issue #3686 `_) -- Automatically build PlatformIO Core extra Python dependencies on a host machine if they are missed in the registry (`issue #3700 `_) -- Improved "core.call" RPC for PlatformIO Home (`issue #3671 `_) -- Fixed a "PermissionError: [WinError 5]" on Windows when an external repository is used with `lib_deps `__ option (`issue #3664 `_) -- Fixed a "KeyError: 'versions'" when dependency does not exist in the registry (`issue #3666 `_) -- Fixed an issue with GCC linker when "native" dev-platform is used in pair with library dependencies (`issue #3669 `_) -- Fixed an "AssertionError: ensure_dir_exists" when checking library updates from simultaneous subprocesses (`issue #3677 `_) -- Fixed an issue when `pio package publish `__ command removes original archive after submitting to the registry (`issue #3716 `_) -- Fixed an issue when multiple `pio lib install `__ command with the same local library results in duplicates in ``lib_deps`` (`issue #3715 `_) -- Fixed an issue with a "wrong" timestamp in device monitor output using `"time" filter `__ (`issue #3712 `_) - -5.0.1 (2020-09-10) -~~~~~~~~~~~~~~~~~~ - -- Added support for "owner" requirement when declaring ``dependencies`` using `library.json `__ -- Fixed an issue when using a custom git/ssh package with `platform_packages `__ option (`issue #3624 `_) -- Fixed an issue with "ImportError: cannot import name '_get_backend' from 'cryptography.hazmat.backends'" when using `Remote Development `__ on RaspberryPi device (`issue #3652 `_) -- Fixed an issue when `pio package unpublish `__ command crashes (`issue #3660 `_) -- Fixed an issue when the package manager tries to install a built-in library from the registry (`issue #3662 `_) -- Fixed an issue with incorrect value for C++ language standard in IDE projects when an in-progress language standard is used (`issue #3653 `_) -- Fixed an issue with "Invalid simple block (semantic_version)" from library dependency that refs to an external source (repository, ZIP/Tar archives) (`issue #3658 `_) -- Fixed an issue when can not remove update or remove external dev-platform using PlatformIO Home (`issue #3663 `_) - -5.0.0 (2020-09-03) -~~~~~~~~~~~~~~~~~~ - -Please check `Migration guide from 4.x to 5.0 `__. - -* Integration with the new **PlatformIO Trusted Registry** - - - Enterprise-grade package storage with high availability (multi replicas) - - Secure, fast, and reliable global content delivery network (CDN) - - Universal support for all packages: - - * Libraries - * Development platforms - * Toolchains - - - Built-in fine-grained access control (role-based, teams, organizations) - - New CLI commands: - - * `pio package `__ – manage packages in the registry - * `pio access `__ – manage package access for users, teams, and maintainers - -* Integration with the new **Account Management System** - - - `Manage organizations `__ - - `Manage teams and team memberships `__ - -* New **Package Management System** - - - Integrated PlatformIO Core with the new PlatformIO Registry - - Support for owner-based dependency declaration (resolves name conflicts) (`issue #1824 `_) - - Automatically save dependencies to `"platformio.ini" `__ when installing using PlatformIO CLI (`issue #2964 `_) - - Follow SemVer complaint version constraints when checking library updates `issue #1281 `_) - - Dropped support for "packageRepositories" section in "platform.json" manifest (please publish packages directly to the registry) - -* **Build System** - - - Upgraded build engine to the `SCons 4.0 - a next-generation software construction tool `__ - - * `Configuration files are Python scripts `__ – use the power of a real programming language to solve build problems - * Built-in reliable and automatic dependency analysis - * Improved support for parallel builds - * Ability to `share built files in a cache `__ to speed up multiple builds - - - New `Custom Targets `__ - - * Pre/Post processing based on dependent sources (another target, source file, etc.) - * Command launcher with own arguments - * Launch command with custom options declared in `"platformio.ini" `__ - * Python callback as a target (use the power of Python interpreter and PlatformIO Build API) - * List available project targets (including dev-platform specific and custom targets) with a new `pio run --list-targets `__ command (`issue #3544 `_) - - - Enable "cyclic reference" for GCC linker only for the embedded dev-platforms (`issue #3570 `_) - - Automatically enable LDF dependency `chain+ mode (evaluates C/C++ Preprocessor conditional syntax) `__ for Arduino library when "library.property" has "depends" field (`issue #3607 `_) - - Fixed an issue with improper processing of source files added via multiple Build Middlewares (`issue #3531 `_) - - Fixed an issue with the ``clean`` target on Windows when project and build directories are located on different logical drives (`issue #3542 `_) - -* **Project Management** - - - Added support for "globstar/`**`" (recursive) pattern for the different commands and configuration options (`pio ci `__, `src_filter `__, `check_patterns `__, `library.json > srcFilter `__). Python 3.5+ is required - - Added a new ``-e, --environment`` option to `pio project init `__ command that helps to update a PlatformIO project using the existing environment - - Dump build system data intended for IDE extensions/plugins using a new `pio project data `__ command - - Do not generate ".travis.yml" for a new project, let the user have a choice - -* **Unit Testing** - - - Updated PIO Unit Testing support for Mbed framework and added compatibility with Mbed OS 6 - - Fixed an issue when running multiple test environments (`issue #3523 `_) - - Fixed an issue when Unit Testing engine fails with a custom project configuration file (`issue #3583 `_) - -* **Static Code Analysis** - - - Updated analysis tools: - - * `Cppcheck `__ v2.1 with a new "soundy" analysis option and improved code parser - * `PVS-Studio `__ v7.09 with a new file list analysis mode and an extended list of analysis diagnostics - - - Added Cppcheck package for ARM-based single-board computers (`issue #3559 `_) - - Fixed an issue with PIO Check when a defect with a multiline error message is not reported in verbose mode (`issue #3631 `_) - -* **Miscellaneous** - - - Display system-wide information using a new `pio system info `__ command (`issue #3521 `_) - - Remove unused data using a new `pio system prune `__ command (`issue #3522 `_) - - Show ignored project environments only in the verbose mode (`issue #3641 `_) - - Do not escape compiler arguments in VSCode template on Windows - - Drop support for Python 2 and 3.5 +See `PlatformIO Core 5.0 history `__. .. _release_notes_4: diff --git a/docs b/docs index ae9af9e8..385efbf6 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ae9af9e83309ca0ea49641b655f66be8328c683b +Subproject commit 385efbf611ffd4b5c95de9bd88281d0d3d4365f0 diff --git a/platformio/__init__.py b/platformio/__init__.py index 6b30af2a..0067693c 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (5, 3, "0b5") +VERSION = (6, 0, "0a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/commands/lib/command.py b/platformio/commands/lib/command.py index e9f5feb2..54a58031 100644 --- a/platformio/commands/lib/command.py +++ b/platformio/commands/lib/command.py @@ -43,7 +43,7 @@ def get_project_global_lib_dir(): return ProjectConfig.get_instance().get("platformio", "globallib_dir") -@click.group(short_help="Library manager") +@click.group(short_help="Library manager", hidden=True) @click.option( "-d", "--storage-dir", diff --git a/platformio/commands/pkg.py b/platformio/commands/pkg.py index 1ef3978d..b2df9b6a 100644 --- a/platformio/commands/pkg.py +++ b/platformio/commands/pkg.py @@ -42,7 +42,7 @@ from platformio.package.commands.update import package_update_cmd package_unpublish_cmd, package_update_cmd, ], - short_help="Package Manager", + short_help="Unified Package Manager", ) def cli(): pass diff --git a/platformio/commands/platform.py b/platformio/commands/platform.py index 02e096a4..038c8a22 100644 --- a/platformio/commands/platform.py +++ b/platformio/commands/platform.py @@ -29,7 +29,7 @@ from platformio.platform.exception import UnknownPlatform from platformio.platform.factory import PlatformFactory -@click.group(short_help="Platform manager") +@click.group(short_help="Platform manager", hidden=True) def cli(): pass diff --git a/platformio/commands/update.py b/platformio/commands/update.py index 7d4e64b5..a33edeb4 100644 --- a/platformio/commands/update.py +++ b/platformio/commands/update.py @@ -23,7 +23,9 @@ from platformio.package.manager.library import LibraryPackageManager @click.command( - "update", short_help="Update installed platforms, packages and libraries" + "update", + short_help="Update installed platforms, packages and libraries", + hidden=True, ) @click.option("--core-packages", is_flag=True, help="Update only the core packages") @click.option( diff --git a/platformio/commands/upgrade.py b/platformio/commands/upgrade.py index 228f996c..0cba9e74 100644 --- a/platformio/commands/upgrade.py +++ b/platformio/commands/upgrade.py @@ -27,7 +27,7 @@ from platformio.proc import exec_command, get_pythonexe_path from platformio.project.helpers import get_project_cache_dir -@click.command("upgrade", short_help="Upgrade PlatformIO to the latest version") +@click.command("upgrade", short_help="Upgrade PlatformIO Core to the latest version") @click.option("--dev", is_flag=True, help="Use development branch") def cli(dev): update_core_packages() diff --git a/platformio/platform/base.py b/platformio/platform/base.py index 75cf6f24..49db0df4 100644 --- a/platformio/platform/base.py +++ b/platformio/platform/base.py @@ -108,8 +108,10 @@ class PlatformBase( # pylint: disable=too-many-instance-attributes,too-many-pub core_spec = semantic_version.SimpleSpec(self.engines["platformio"]) if self.CORE_SEMVER in core_spec: return True - # PIO Core 5 is compatible with dev-platforms for PIO Core 2.0, 3.0, 4.0 - if any(semantic_version.Version.coerce(str(v)) in core_spec for v in (2, 3, 4)): + # PIO Core 6 is compatible with dev-platforms for PIO Core 2.0, 3.0, 4.0 + if any( + semantic_version.Version.coerce(str(v)) in core_spec for v in (2, 3, 4, 5) + ): return True raise IncompatiblePlatform(self.name, str(self.CORE_SEMVER), str(core_spec))