From 7033c2616bf8cb4a26ebcfe843332c9d3bbd755a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 31 Oct 2020 12:44:37 +0200 Subject: [PATCH 01/21] Docs: Add info how to access PlatformIO Core CLI in VSCode --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index deae09a8..5d1cc1d3 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit deae09a880822fb8c0b4973c29f75f2343476d6f +Subproject commit 5d1cc1d3b5690788fa9103d1cc2071a213915816 From 2e66c5f807c751a9178151fb1a53b3982f43c831 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 31 Oct 2020 19:07:04 +0200 Subject: [PATCH 02/21] Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode --- HISTORY.rst | 5 +++++ platformio/ide/tpls/vscode/.vscode/launch.json.tpl | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 41b7ab20..b8bc20cd 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,11 @@ PlatformIO Core 5 **A professional collaborative platform for embedded development** +5.0.3 (2020-??-??) +~~~~~~~~~~~~~~~~~~ + +* Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode + 5.0.2 (2020-10-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl index 21e2bb41..75efb06c 100644 --- a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl @@ -19,13 +19,14 @@ "request": "launch", "name": "PIO Debug", "executable": "{{ _escape_path(prog_path) }}", + "projectEnvName": "{{ env_name }}", "toolchainBinDir": "{{ _escape_path(dirname(gdb_path)) }}", % if svd_path: "svdPath": "{{ _escape_path(svd_path) }}", % end "preLaunchTask": { "type": "PlatformIO", - "task": "Pre-Debug" + "task": "Pre-Debug ({{ env_name }})" }, "internalConsoleOptions": "openOnSessionStart" }, @@ -34,6 +35,7 @@ "request": "launch", "name": "PIO Debug (skip Pre-Debug)", "executable": "{{ _escape_path(prog_path) }}", + "projectEnvName": "{{ env_name }}", "toolchainBinDir": "{{ _escape_path(dirname(gdb_path)) }}", % if svd_path: "svdPath": "{{ _escape_path(svd_path) }}", From 950a540df43d30a5e9c0b5d96a6ebd4ba1cad0ec Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 31 Oct 2020 19:07:45 +0200 Subject: [PATCH 03/21] Bump version to 5.0.3a1 --- HISTORY.rst | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index b8bc20cd..a96d3dc2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,7 +11,7 @@ PlatformIO Core 5 5.0.3 (2020-??-??) ~~~~~~~~~~~~~~~~~~ -* Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode +- Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode 5.0.2 (2020-10-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/__init__.py b/platformio/__init__.py index 55813e69..7a3a863a 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (5, 0, 2) +VERSION = (5, 0, "3a1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 0bec4e25c8cf704e2ca9b86c8177acae9394190d Mon Sep 17 00:00:00 2001 From: valeros Date: Sun, 1 Nov 2020 19:03:14 +0200 Subject: [PATCH 04/21] Add support for C++ language standard in QtCreator template Resolve #3719 --- platformio/ide/tpls/qtcreator/platformio.pro.tpl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/platformio/ide/tpls/qtcreator/platformio.pro.tpl b/platformio/ide/tpls/qtcreator/platformio.pro.tpl index 1c1a1adf..89774699 100644 --- a/platformio/ide/tpls/qtcreator/platformio.pro.tpl +++ b/platformio/ide/tpls/qtcreator/platformio.pro.tpl @@ -1,3 +1,13 @@ +% import re +% +% cpp_standards_remap = { +% "0x": "11", +% "1y": "14", +% "1z": "17", +% "2a": "20", +% "2b": "23" +% } + win32 { HOMEDIR += $$(USERPROFILE) } @@ -27,3 +37,9 @@ HEADERS += {{file}} SOURCES += {{file}} % end % end + +% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)") +% cxx_stds = STD_RE.findall(cxx_flags) +% if cxx_stds: +CONFIG += c++{{ cpp_standards_remap.get(cxx_stds[-1], cxx_stds[-1]) }} +% end From 2d9480a6a71fc0cf04b67ee4bc719831c7b988b6 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 1 Nov 2020 21:05:03 +0200 Subject: [PATCH 05/21] Support for GitPod environment --- platformio/app.py | 2 ++ platformio/maintenance.py | 23 +++++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/platformio/app.py b/platformio/app.py index 0196fac4..9b22b638 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -255,6 +255,8 @@ def get_cid(): uid = None if os.getenv("C9_UID"): uid = os.getenv("C9_UID") + elif os.getenv("GITPOD_GIT_USER_NAME"): + uid = os.getenv("GITPOD_GIT_USER_NAME") elif os.getenv("CHE_API", os.getenv("CHE_API_ENDPOINT")): try: uid = json.loads( diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 5fa66bd1..06ca827a 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -73,16 +73,19 @@ def on_platformio_exception(e): def set_caller(caller=None): caller = caller or getenv("PLATFORMIO_CALLER") - if not caller: - if getenv("VSCODE_PID") or getenv("VSCODE_NLS_CONFIG"): - caller = "vscode" - elif is_container(): - if getenv("C9_UID"): - caller = "C9" - elif getenv("USER") == "cabox": - caller = "CA" - elif getenv("CHE_API", getenv("CHE_API_ENDPOINT")): - caller = "Che" + if caller: + return app.set_session_var("caller_id", caller) + if getenv("VSCODE_PID") or getenv("VSCODE_NLS_CONFIG"): + caller = "vscode" + elif getenv("GITPOD_INSTANCE_ID") or getenv("GITPOD_WORKSPACE_URL"): + caller = "gitpod" + elif is_container(): + if getenv("C9_UID"): + caller = "C9" + elif getenv("USER") == "cabox": + caller = "CA" + elif getenv("CHE_API", getenv("CHE_API_ENDPOINT")): + caller = "Che" app.set_session_var("caller_id", caller) From 818a1508a019927c544588a52bb187bae66bbf88 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 1 Nov 2020 21:06:23 +0200 Subject: [PATCH 06/21] Docs: Use native ProjectConfig in the advanced scripting examples --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index 5d1cc1d3..d211a221 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5d1cc1d3b5690788fa9103d1cc2071a213915816 +Subproject commit d211a221e3fb1478de78d3344b76e95919105b7e From 038674835a38b21bb81b5ba3d1647b8a99324f95 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 2 Nov 2020 12:27:17 +0200 Subject: [PATCH 07/21] Workaround for a broken locale --- platformio/commands/project.py | 18 +++++++++++------- platformio/maintenance.py | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/platformio/commands/project.py b/platformio/commands/project.py index 592f3a48..e7809e25 100644 --- a/platformio/commands/project.py +++ b/platformio/commands/project.py @@ -149,15 +149,19 @@ def project_init( ): if not silent: if project_dir == os.getcwd(): - click.secho("\nThe current working directory", fg="yellow", nl=False) - click.secho(" %s " % project_dir, fg="cyan", nl=False) - click.secho("will be used for the project.", fg="yellow") + click.secho("\nThe current working directory ", fg="yellow", nl=False) + try: + click.secho(project_dir, fg="cyan", nl=False) + except UnicodeEncodeError: + click.secho(json.dumps(project_dir), fg="cyan", nl=False) + click.secho(" will be used for the project.", fg="yellow") click.echo("") - click.echo( - "The next files/directories have been created in %s" - % click.style(project_dir, fg="cyan") - ) + click.echo("The next files/directories have been created in ", nl=False) + try: + click.secho(project_dir, fg="cyan") + except UnicodeEncodeError: + click.secho(json.dumps(project_dir), fg="cyan") click.echo( "%s - Put project header files here" % click.style("include", fg="cyan") ) diff --git a/platformio/maintenance.py b/platformio/maintenance.py index 06ca827a..63674ad7 100644 --- a/platformio/maintenance.py +++ b/platformio/maintenance.py @@ -86,7 +86,7 @@ def set_caller(caller=None): caller = "CA" elif getenv("CHE_API", getenv("CHE_API_ENDPOINT")): caller = "Che" - app.set_session_var("caller_id", caller) + return app.set_session_var("caller_id", caller) class Upgrader(object): From bc52e72605af6c80348fd1f9f93d1dfc1d2780df Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 3 Nov 2020 15:11:52 +0200 Subject: [PATCH 08/21] Bump version to 5.0.3a2 --- docs | 2 +- platformio/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs b/docs index d211a221..e87a0f3d 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit d211a221e3fb1478de78d3344b76e95919105b7e +Subproject commit e87a0f3dc5d3f22bfa41a836fd0ef1ac9e8aab21 diff --git a/platformio/__init__.py b/platformio/__init__.py index 7a3a863a..5f7118cd 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (5, 0, "3a1") +VERSION = (5, 0, "3a2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 4f5ad057927d4d46f6545d8d0453ba1baec9c81f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 4 Nov 2020 14:07:40 +0200 Subject: [PATCH 09/21] Docs: Document "Introducing Strict SSL/TLS" in migration --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index e87a0f3d..b701762b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit e87a0f3dc5d3f22bfa41a836fd0ef1ac9e8aab21 +Subproject commit b701762bef10ab52032b32e6721a7675534cb15f From ead99208f2784eb808504e1f388e83be2ec2532a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 9 Nov 2020 11:38:46 +0200 Subject: [PATCH 10/21] Increase example name in manifest to 255 chars --- platformio/package/manifest/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py index f293ba5a..fdf2f4bb 100644 --- a/platformio/package/manifest/schema.py +++ b/platformio/package/manifest/schema.py @@ -141,7 +141,7 @@ class ExampleSchema(StrictSchema): name = fields.Str( required=True, validate=[ - validate.Length(min=1, max=100), + validate.Length(min=1, max=255), validate.Regexp( r"^[a-zA-Z\d\-\_/]+$", error="Only [a-zA-Z0-9-_/] chars are allowed" ), From 5e164493a82c1dcc06eefef0f09c02c439a64559 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 9 Nov 2020 11:39:26 +0200 Subject: [PATCH 11/21] Sync docs --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index b701762b..ab1d4a81 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit b701762bef10ab52032b32e6721a7675534cb15f +Subproject commit ab1d4a8187ca1754511b4c4dcf606e6513324bd5 From 48eca22a00b2c90114bce3a5e78e4a0d8163f54d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 11 Nov 2020 14:19:58 +0200 Subject: [PATCH 12/21] Force VSCode's intelliSenseMode to "gcc-x64" when GCC toolchain is used --- platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl | 4 +++- 1 file changed, 3 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 e99957cb..dee165d4 100644 --- a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl @@ -118,7 +118,9 @@ % end "" ], - "intelliSenseMode": "clang-x64", +% if compiler_type == "gcc": + "intelliSenseMode": "gcc-x64", +% end % if cc_stds: "cStandard": "c{{ cc_stds[-1] }}", % end From 0f5d2d68219a778bccd1466c239feae0ad2cfe42 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 11 Nov 2020 19:44:39 +0200 Subject: [PATCH 13/21] Sync docs --- docs | 2 +- examples | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs b/docs index ab1d4a81..a3209b7f 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit ab1d4a8187ca1754511b4c4dcf606e6513324bd5 +Subproject commit a3209b7fbb442a3f6087116cd3727cbc26ae9cd5 diff --git a/examples b/examples index 84855946..7255d5b8 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 84855946ea09b5e41ddbbae455f00e897060346d +Subproject commit 7255d5b897b402d981b843f88ee001b69c9f1407 From ae7b8f9ecff36c46bc98ad8f684d8d816341c07d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 11 Nov 2020 20:52:23 +0200 Subject: [PATCH 14/21] Fix tests --- docs | 2 +- tests/commands/test_lib_complex.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs b/docs index a3209b7f..0e3e5dd7 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a3209b7fbb442a3f6087116cd3727cbc26ae9cd5 +Subproject commit 0e3e5dd7ebe5daeec27fbe45e052fda5e8dd367a diff --git a/tests/commands/test_lib_complex.py b/tests/commands/test_lib_complex.py index 0014801b..c1314500 100644 --- a/tests/commands/test_lib_complex.py +++ b/tests/commands/test_lib_complex.py @@ -236,7 +236,9 @@ def test_global_lib_update_check(clirunner, validate_cliresult): result = clirunner.invoke(cmd_lib, ["-g", "update", "--dry-run", "--json-output"]) validate_cliresult(result) output = json.loads(result.output) - assert set(["ESPAsyncTCP", "NeoPixelBus"]) == set(lib["name"] for lib in output) + assert set(["Adafruit PN532", "ESPAsyncTCP", "NeoPixelBus"]) == set( + lib["name"] for lib in output + ) def test_global_lib_update(clirunner, validate_cliresult): @@ -256,7 +258,7 @@ def test_global_lib_update(clirunner, validate_cliresult): result = clirunner.invoke(cmd_lib, ["-g", "update"]) validate_cliresult(result) assert result.output.count("[Detached]") == 1 - assert result.output.count("[Up-to-date]") == 15 + assert result.output.count("[Up-to-date]") == 14 # update unknown library result = clirunner.invoke(cmd_lib, ["-g", "update", "Unknown"]) From fc5ce4739cbe66d2bbd0cda4b20bcb5ba226de10 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Nov 2020 15:05:01 +0200 Subject: [PATCH 15/21] Added an error selector for `Sublime Text` build runner // Resolve #3733 --- HISTORY.rst | 2 ++ platformio/ide/tpls/emacs/.ccls.tpl | 2 +- platformio/ide/tpls/sublimetext/.ccls.tpl | 22 ++++++++++++ .../platformio.sublime-project.tpl | 34 ++++++++----------- 4 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 platformio/ide/tpls/sublimetext/.ccls.tpl diff --git a/HISTORY.rst b/HISTORY.rst index a96d3dc2..8ede7429 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,7 +11,9 @@ PlatformIO Core 5 5.0.3 (2020-??-??) ~~~~~~~~~~~~~~~~~~ +- 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 5.0.2 (2020-10-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/emacs/.ccls.tpl b/platformio/ide/tpls/emacs/.ccls.tpl index b6d7d55a..232d2f8d 100644 --- a/platformio/ide/tpls/emacs/.ccls.tpl +++ b/platformio/ide/tpls/emacs/.ccls.tpl @@ -4,7 +4,7 @@ % cxx_stds = STD_RE.findall(cxx_flags) % % -clang +{{ cxx_path }} % if cc_stds: {{"%c"}} -std=c{{ cc_stds[-1] }} diff --git a/platformio/ide/tpls/sublimetext/.ccls.tpl b/platformio/ide/tpls/sublimetext/.ccls.tpl new file mode 100644 index 00000000..232d2f8d --- /dev/null +++ b/platformio/ide/tpls/sublimetext/.ccls.tpl @@ -0,0 +1,22 @@ +% import re +% STD_RE = re.compile(r"\-std=[a-z\+]+(\w+)") +% cc_stds = STD_RE.findall(cc_flags) +% cxx_stds = STD_RE.findall(cxx_flags) +% +% +{{ cxx_path }} + +% if cc_stds: +{{"%c"}} -std=c{{ cc_stds[-1] }} +% end +% if cxx_stds: +{{"%cpp"}} -std=c++{{ cxx_stds[-1] }} +% end + +% for include in filter_includes(includes): +-I{{ include }} +% end + +% for define in defines: +-D{{ define }} +% end diff --git a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl index 160cd6ba..2b5d61d4 100644 --- a/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl +++ b/platformio/ide/tpls/sublimetext/platformio.sublime-project.tpl @@ -5,9 +5,10 @@ "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "run" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "PlatformIO", "variants": [ @@ -15,78 +16,73 @@ "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "run" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "Build" }, { "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "run", "--target", "upload" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "Upload" }, { "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "run", "--target", "clean" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "Clean" }, { "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "test" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "Test" }, { "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", - "run", - "--target", - "program" - ], - "name": "Upload using Programmer" - }, - { - "cmd": - [ - "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "run", "--target", "uploadfs" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "Upload SPIFFS image" }, { "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "update" ], + "file_regex": "^(..[^:\n]*):([0-9]+):?([0-9]+)?:? (.*)$", "name": "Update platforms and libraries" }, { "cmd": [ "{{ platformio_path }}", - "-f", "-c", "sublimetext", + "-c", "sublimetext", "upgrade" ], "name": "Upgrade PlatformIO Core" From 01a32067d5eaedab45de9a1a3589ed302c27b76f Mon Sep 17 00:00:00 2001 From: valeros Date: Thu, 12 Nov 2020 15:22:47 +0200 Subject: [PATCH 16/21] Print ignored environments and test suites in only in verbose mode Resolve #3726 --- HISTORY.rst | 1 + platformio/commands/test/command.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a96d3dc2..bf0f71c6 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,7 @@ PlatformIO Core 5 ~~~~~~~~~~~~~~~~~~ - Generate a working "projectEnvName" for PlatformIO IDE's debugger for VSCode +- Print ignored test suites and environments in the test summary report only in verbose mode (`issue #3726 `_) 5.0.2 (2020-10-30) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/commands/test/command.py b/platformio/commands/test/command.py index 13104bb2..a4b6634f 100644 --- a/platformio/commands/test/command.py +++ b/platformio/commands/test/command.py @@ -177,7 +177,7 @@ def cli( # pylint: disable=redefined-builtin if without_testing: return - print_testing_summary(results) + print_testing_summary(results, verbose) command_failed = any(r.get("succeeded") is False for r in results) if command_failed: @@ -222,7 +222,7 @@ def print_processing_footer(result): ) -def print_testing_summary(results): +def print_testing_summary(results, verbose=False): click.echo() tabular_data = [] @@ -236,6 +236,8 @@ def print_testing_summary(results): failed_nums += 1 status_str = click.style("FAILED", fg="red") elif result.get("succeeded") is None: + if not verbose: + continue status_str = "IGNORED" else: succeeded_nums += 1 From 4a12d1954e8f0d80ea2a7e60f5a93ca1b91a4dc4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Nov 2020 15:27:34 +0200 Subject: [PATCH 17/21] Fixed an issue when the package manager tries to install a built-in library from the registry // Resolve #3662 --- HISTORY.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.rst b/HISTORY.rst index 7ee070c6..600d0b96 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,7 @@ PlatformIO Core 5 - 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 `_) 5.0.2 (2020-10-30) ~~~~~~~~~~~~~~~~~~ From 3dcc189740a177818f372ecd3ffa8003903978e1 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Nov 2020 15:35:19 +0200 Subject: [PATCH 18/21] Use custom Pre-Debug task only for multi-env project --- platformio/ide/tpls/vscode/.vscode/launch.json.tpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl index 75efb06c..4acea135 100644 --- a/platformio/ide/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/launch.json.tpl @@ -26,7 +26,11 @@ % end "preLaunchTask": { "type": "PlatformIO", +% if len(config.envs()) > 1: "task": "Pre-Debug ({{ env_name }})" +% else: + "task": "Pre-Debug" +% end }, "internalConsoleOptions": "openOnSessionStart" }, From 9ff3c758eb6ea0c3286817ffe89eea0e7daffb6a Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Nov 2020 15:35:37 +0200 Subject: [PATCH 19/21] Fix tests --- tests/commands/test_test.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/commands/test_test.py b/tests/commands/test_test.py index a50b9fa7..4543ad92 100644 --- a/tests/commands/test_test.py +++ b/tests/commands/test_test.py @@ -34,9 +34,7 @@ def test_local_env(): if result["returncode"] != 1: pytest.fail(str(result)) # pylint: disable=unsupported-membership-test - assert all([s in result["err"] for s in ("PASSED", "IGNORED", "FAILED")]), result[ - "out" - ] + assert all([s in result["err"] for s in ("PASSED", "FAILED")]), result["out"] def test_multiple_env_build(clirunner, validate_cliresult, tmpdir): From 2817408db32beefc05c4e912a2bded73b292707b Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Nov 2020 16:06:54 +0200 Subject: [PATCH 20/21] Fixed an issue when `pio package pack` ignores some folders // Resolve #3730 --- HISTORY.rst | 3 ++- platformio/package/pack.py | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 600d0b96..adfc71e5 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,11 +11,12 @@ PlatformIO Core 5 5.0.3 (2020-??-??) ~~~~~~~~~~~~~~~~~~ -- Added an error selector for `Sublime Text `__ build runner (`issue #3733 `_) +- 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) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/package/pack.py b/platformio/package/pack.py index ebdca496..164ce96c 100644 --- a/platformio/package/pack.py +++ b/platformio/package/pack.py @@ -46,6 +46,8 @@ class PackagePacker(object): ".git/", ".hg/", ".svn/", + ] + EXCLUDE_EXTRA = [ # Tests "tests?", # Docs @@ -120,7 +122,6 @@ class PackagePacker(object): src = tmp_dir src = self.find_source_root(src) - manifest = self.load_manifest(src) filename = self.get_archive_name( manifest["name"], @@ -188,7 +189,7 @@ class PackagePacker(object): return dst def compute_src_filters(self, src, include, exclude): - exclude_default = self.EXCLUDE_DEFAULT[:] + exclude_extra = self.EXCLUDE_EXTRA[:] # extend with library extra filters if any( os.path.isfile(os.path.join(src, name)) @@ -198,11 +199,15 @@ class PackagePacker(object): ManifestFileType.MODULE_JSON, ) ): - exclude_default.extend(self.EXCLUDE_LIBRARY_EXTRA) + exclude_extra.extend(self.EXCLUDE_LIBRARY_EXTRA) result = ["+<%s>" % p for p in include or ["*", ".*"]] + result += ["-<%s>" % p for p in self.EXCLUDE_DEFAULT] + # exclude items declared in manifest result += ["-<%s>" % p for p in exclude or []] - result += ["-<%s>" % p for p in exclude_default] + # apply extra excludes if no custom "export" field in manifest + if not include and not exclude: + result += ["-<%s>" % p for p in exclude_extra] # automatically include manifests result += ["+<%s>" % p for p in self.INCLUDE_DEFAULT] return result From f4dba7a68c0b04063dbe04d1c485fcd16dd3129f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 Nov 2020 17:56:12 +0200 Subject: [PATCH 21/21] Bump version to 5.0.3 --- 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 adfc71e5..19b9b921 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,7 +8,7 @@ PlatformIO Core 5 **A professional collaborative platform for embedded development** -5.0.3 (2020-??-??) +5.0.3 (2020-11-12) ~~~~~~~~~~~~~~~~~~ - Added an error selector for `Sublime Text `__ build runner (`issue #3733 `_) diff --git a/docs b/docs index 0e3e5dd7..8d9e8ef0 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 0e3e5dd7ebe5daeec27fbe45e052fda5e8dd367a +Subproject commit 8d9e8ef02b730c01c39a6e9355ede0111b3eee81 diff --git a/platformio/__init__.py b/platformio/__init__.py index 5f7118cd..5fa70b0a 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (5, 0, "3a2") +VERSION = (5, 0, 3) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"