From f182a6dcaed44a385273da30c0d3e6d8990cf3b6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Mar 2019 12:46:24 +0200 Subject: [PATCH 01/12] Bump version to 3.6.7a1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 6b913ff6..0b432099 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, 6) +VERSION = (3, 6, "7a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 7746f7eeee9e01dd353377698d61533c93049c0d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 29 Mar 2019 21:26:45 +0200 Subject: [PATCH 02/12] Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist --- HISTORY.rst | 5 +++++ .../ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index f244ded7..a6543f30 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Release Notes PlatformIO 3.0 -------------- +3.6.7 (2019-??-??) +~~~~~~~~~~~~~~~~~~ + +* Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist + 3.6.6 (2019-03-29) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl index 75d77ffd..c91ab548 100644 --- a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl @@ -5,7 +5,7 @@ }, { % import platform -% from os.path import commonprefix, dirname +% from os.path import commonprefix, dirname, isdir % % systype = platform.system().lower() % @@ -15,7 +15,7 @@ % % cleaned_includes = [] % for include in includes: -% if "toolchain-" not in dirname(commonprefix([include, cc_path])): +% if "toolchain-" not in dirname(commonprefix([include, cc_path])) and isdir(include): % cleaned_includes.append(include) % end % end @@ -65,7 +65,7 @@ % if cxx_stds: "cppStandard": "c++{{ cxx_stds[-1] }}", % end - "compilerPath": "{{! _escape(cc_path) }} {{! _escape(cc_m_flags) }}" + "compilerPath": "\"{{! _escape(cc_path) }}\" {{! _escape(cc_m_flags) }}" } ] } \ No newline at end of file From 7d9e10095e2cca481ba4778304fe6da101b2439e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 30 Mar 2019 13:00:10 +0200 Subject: [PATCH 03/12] Set manifest version of VSCode C/C++ configuration file --- platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl index c91ab548..1658bcb4 100644 --- a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl @@ -67,5 +67,6 @@ % end "compilerPath": "\"{{! _escape(cc_path) }}\" {{! _escape(cc_m_flags) }}" } - ] + ], + "version": 4 } \ No newline at end of file From 29cf1c85965e5fb50d263c7ad1a7493663e9f386 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 5 Apr 2019 19:48:04 +0300 Subject: [PATCH 04/12] Fix "ValueError: invalid literal for int() with base 10" for click.get_terminal_size --- platformio/telemetry.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platformio/telemetry.py b/platformio/telemetry.py index 7394654c..d0f4c468 100644 --- a/platformio/telemetry.py +++ b/platformio/telemetry.py @@ -66,7 +66,11 @@ class MeasurementProtocol(TelemetryBase): self['tid'] = self.TID self['cid'] = app.get_cid() - self['sr'] = "%dx%d" % click.get_terminal_size() + try: + self['sr'] = "%dx%d" % click.get_terminal_size() + except ValueError: + pass + self._prefill_screen_name() self._prefill_appinfo() self._prefill_custom_data() From 4edfb8f6ccad1237f4c67d772189042df1b8e04f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 17 Apr 2019 20:05:51 +0300 Subject: [PATCH 05/12] Cleanup PING_INTERNET_IPS --- platformio/util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/platformio/util.py b/platformio/util.py index 777314f6..c04cd949 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -680,7 +680,6 @@ def get_api_result(url, params=None, data=None, auth=None, cache_valid=None): PING_INTERNET_IPS = [ "192.30.253.113", # github.com - "18.195.111.75", # dl.bintray.com "193.222.52.25" # dl.platformio.org ] From be24c6ab4d802143fa9295a276777d50208af780 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 18 Apr 2019 14:17:22 +0300 Subject: [PATCH 06/12] Fix an issue when invalid "env_default" results into unhandled errors // Resolve #2265 --- HISTORY.rst | 4 ++++ platformio/commands/init.py | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a6543f30..d34f4555 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,10 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist +* Fixed an "IndexError: list index out of range" for Arduino sketch preprocessor + (`issue #2268 `_) +* Fixed an issue when invalid "env_default" in `"platformio.ini" (Project Configuration File) `__ results into unhandled errors + (`issue #2265 `_) 3.6.6 (2019-03-29) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/init.py b/platformio/commands/init.py index e90bc2fd..e7127313 100644 --- a/platformio/commands/init.py +++ b/platformio/commands/init.py @@ -23,6 +23,7 @@ import click from platformio import exception, util from platformio.commands.platform import \ platform_install as cli_platform_install +from platformio.commands.run import check_project_envs from platformio.ide.projectgenerator import ProjectGenerator from platformio.managers.platform import PlatformManager @@ -130,10 +131,11 @@ def get_best_envname(project_dir, boards=None): config = util.load_project_config(project_dir) env_default = None if config.has_option("platformio", "env_default"): - env_default = config.get("platformio", - "env_default").split(", ")[0].strip() + env_default = util.parse_conf_multi_values( + config.get("platformio", "env_default")) + check_project_envs(config, env_default) if env_default: - return env_default + return env_default[0] section = None for section in config.sections(): if not section.startswith("env:"): From 4d615416f3a1c6adbc6cdda1087ec1e09bcb46ef Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Apr 2019 00:49:53 +0300 Subject: [PATCH 07/12] Improve debugging in `debug_load_mode = modified` and fix an issue with useless project rebuilding --- HISTORY.rst | 1 + platformio/builder/tools/piomisc.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index d34f4555..361b49c5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 3.0 3.6.7 (2019-??-??) ~~~~~~~~~~~~~~~~~~ +* `PIO Unified Debugger `__: improved debugging in ``debug_load_mode = modified`` and fixed an issue with useless project rebuilding * Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist * Fixed an "IndexError: list index out of range" for Arduino sketch preprocessor (`issue #2268 `_) diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index c2173bd2..52df8b61 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -296,8 +296,7 @@ def ProcessDebug(env): if not env.subst("$PIODEBUGFLAGS"): env.Replace(PIODEBUGFLAGS=["-Og", "-g3", "-ggdb3"]) env.Append( - PIODEBUGFLAGS=["-D__PLATFORMIO_DEBUG__"], - BUILD_FLAGS=env.get("PIODEBUGFLAGS", [])) + BUILD_FLAGS=list(env['PIODEBUGFLAGS']) + ["-D__PLATFORMIO_DEBUG__"]) unflags = ["-Os"] for level in [0, 1, 2]: for flag in ("O", "g", "ggdb"): From e6a7cc2036d78b1da6a8a57f58204264f10316ed Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Apr 2019 01:05:11 +0300 Subject: [PATCH 08/12] Update core package dependencies --- platformio/managers/core.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platformio/managers/core.py b/platformio/managers/core.py index 34831b48..ec48ef07 100644 --- a/platformio/managers/core.py +++ b/platformio/managers/core.py @@ -24,9 +24,10 @@ from platformio import __version__, exception, util from platformio.managers.package import PackageManager CORE_PACKAGES = { - "contrib-piohome": "^2.0.0", - "contrib-pysite": "~2.%d%d.0" % (sys.version_info[0], sys.version_info[1]), - "tool-pioplus": "^2.0.0", + "contrib-piohome": "^2.0.1", + "contrib-pysite": + "~2.%d%d.190418" % (sys.version_info[0], sys.version_info[1]), + "tool-pioplus": "^2.1.4", "tool-unity": "~1.20403.0", "tool-scons": "~2.20501.7" } From 20f28383a0abec7c0ed9f066cf62054866aa11b0 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Apr 2019 01:07:21 +0300 Subject: [PATCH 09/12] Fix links in changelog --- HISTORY.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 361b49c5..17628a17 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,7 +7,7 @@ PlatformIO 3.0 3.6.7 (2019-??-??) ~~~~~~~~~~~~~~~~~~ -* `PIO Unified Debugger `__: improved debugging in ``debug_load_mode = modified`` and fixed an issue with useless project rebuilding +* `PIO Unified Debugger `__: improved debugging in ``debug_load_mode = modified`` and fixed an issue with useless project rebuilding * Project Generator: fixed a VSCode C/C++'s "Cannot find" warning when CPPPATH folder does not exist * Fixed an "IndexError: list index out of range" for Arduino sketch preprocessor (`issue #2268 `_) @@ -22,7 +22,7 @@ PlatformIO 3.0 * Fixed an issue when PlatformIO Build System does not pick up "mbed_lib.json" files from libraries (`issue #2164 `_) * Fixed an error with conflicting declaration of a prototype (Arduino sketch preprocessor) -* Fixed "FileExistsError" when `platformio ci `__ command is used in pair with ``--keep-build-dir`` option +* Fixed "FileExistsError" when `platformio ci `__ command is used in pair with ``--keep-build-dir`` option * Fixed an issue with incorrect order of project "include" and "src" paths in ``CPPPATH`` (`issue #1914 `_) @@ -32,7 +32,7 @@ PlatformIO 3.0 * Project Generator: added new targets for CLion IDE "BUILD_VERBOSE" and "MONITOR" (serial port monitor) (`issue #359 `_) * Fixed an issue with slow updating of PlatformIO Core packages on Windows -* Fixed an issue when `platformio ci `__ recompiles project if ``--keep-build-dir`` option is passed +* Fixed an issue when `platformio ci `__ recompiles project if ``--keep-build-dir`` option is passed (`issue #2109 `_) * Fixed an issue when ``$PROJECT_HASH`` template was not expanded for the other directory ``***_dir`` options in `"platformio.ini" (Project Configuration File) `__ (`issue #2170 `_) @@ -80,9 +80,9 @@ PlatformIO 3.0 * Generate an `include `__ and `test `__ directories with a README file when initializing a new project * Support in-line comments for multi-line value (``lib_deps``, ``build_flags``, etc) in `"platformio.ini" (Project Configuration File) `__ -* Added ``$PROJECT_HASH`` template variable for `build_dir `__. One of the use cases is setting a global storage for project artifacts using `PLATFORMIO_BUILD_DIR `__ system environment variable. For example, ``/tmp/pio-build/$PROJECT_HASH`` (Unix) or ``$[sysenv.TEMP}/pio-build/$PROJECT_HASH`` (Windows) +* Added ``$PROJECT_HASH`` template variable for `build_dir `__. One of the use cases is setting a global storage for project artifacts using `PLATFORMIO_BUILD_DIR `__ system environment variable. For example, ``/tmp/pio-build/$PROJECT_HASH`` (Unix) or ``$[sysenv.TEMP}/pio-build/$PROJECT_HASH`` (Windows) * Improved a loading speed of PIO Home "Recent News" -* Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables +* Improved `PIO Unified Debugger `__ for "mbed" framework and fixed issue with missed local variables * Introduced `"Release" and "Debug" Build Configurations `__ * Build project in "Debug Mode" including debugging information with a new ``debug`` target using `platformio run `__ command or `targets `__ option in ``platformio.ini``. The last option allows avoiding project rebuilding between "Run/Debug" modes. (`issue #1833 `_) @@ -140,7 +140,7 @@ PlatformIO 3.0 build environment (`issue #1665 `_) * Handle "architectures" data from "library.properties" manifest in - `lib_compat_mode = strict `__ + `lib_compat_mode = strict `__ * Added workaround for Python SemVer package's `issue #61 `_ with caret range and pre-releases * Replaced conflicted "env" pattern by "sysenv" for `"platformio.ini" Dynamic Variables" `__ (`issue #1705 `_) @@ -168,7 +168,7 @@ PlatformIO 3.0 (`issue #1612 `_) * Configure a custom path to SVD file using `debug_svd_path `__ option -* Custom project `description `_ +* Custom project `description `_ which will be used by `PlatformIO Home `_ * Updated Unity tool to 2.4.3 * Improved support for Black Magic Probe in "uploader" mode @@ -194,9 +194,9 @@ PlatformIO 3.0 - Multiple themes (Dark & Light) - Ability to specify a name for new project -* Control `PIO Unified Debugger `__ +* Control `PIO Unified Debugger `__ and its firmware loading mode using - `debug_load_mode `__ option + `debug_load_mode `__ option * Added aliases (off, light, strict) for `LDF Compatibility Mode `__ * Search for a library using PIO Library Registry ID ``id:X`` (e.g. ``pio lib search id:13``) From d49d91269df966ad7edc549c8a9b8aabeb7609d9 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Apr 2019 12:29:16 +0300 Subject: [PATCH 10/12] Update history with upcoming 3.6.7 release --- HISTORY.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 17628a17..2c61d00d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release Notes PlatformIO 3.0 -------------- -3.6.7 (2019-??-??) +3.6.7 (2019-04-23) ~~~~~~~~~~~~~~~~~~ * `PIO Unified Debugger `__: improved debugging in ``debug_load_mode = modified`` and fixed an issue with useless project rebuilding From ee420cc35eec885c07589cc13fef44cb96c3dcde Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Apr 2019 12:31:58 +0300 Subject: [PATCH 11/12] Bump version to 3.6.7 --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 3a6c69a1..0c29f967 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 3a6c69a1ae227479321de75184aa8678104fc37f +Subproject commit 0c29f9671f44b5221e7cac15e93ebb40f9db88c1 From 9ca53c57f49a2d138cffe2c8720b320244e065ee Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 23 Apr 2019 12:32:18 +0300 Subject: [PATCH 12/12] Bump version to 3.6.7 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 0b432099..d1d58c48 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "7a1") +VERSION = (3, 6, 7) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"