From 676c87d081093183f4cb56179ac64eb356568a5f Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 30 Nov 2018 01:36:50 +0200 Subject: [PATCH 1/9] Allow to override platform "package_repositories" --- platformio/managers/platform.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 35e842db..5f7e0adc 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -460,8 +460,7 @@ class PlatformBase( # pylint: disable=too-many-public-methods self._manifest = util.load_json(manifest_path) self.pm = PackageManager( - join(util.get_home_dir(), "packages"), - self._manifest.get("packageRepositories")) + join(util.get_home_dir(), "packages"), self.package_repositories) self.silent = False self.verbose = False @@ -516,6 +515,10 @@ class PlatformBase( # pylint: disable=too-many-public-methods def engines(self): return self._manifest.get("engines") + @property + def package_repositories(self): + return self._manifest.get("packageRepositories") + @property def manifest(self): return self._manifest From afdfaeec6887620a620e219074cf81a01d6cb011 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 3 Dec 2018 18:31:12 -0800 Subject: [PATCH 2/9] Check if "_lockfile" attribute exists --- platformio/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/app.py b/platformio/app.py index 57c126a9..14c4de22 100644 --- a/platformio/app.py +++ b/platformio/app.py @@ -122,7 +122,7 @@ class State(object): raise exception.HomeDirPermissionsError(dirname(self.path)) def _unlock_state_file(self): - if self._lockfile: + if hasattr(self, "_lockfile") and self._lockfile: self._lockfile.release() def __del__(self): From f5395133767c9d5f0c7f0d703965006c981a8334 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 01:28:37 +0200 Subject: [PATCH 3/9] Fixed spurious project's "Problems" for PlatformIO IDE for VSCode when ARM mbed framework is used --- HISTORY.rst | 5 +++++ platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 120c45cb..4fb214d8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,11 @@ Release Notes PlatformIO 3.0 -------------- +3.6.3 (2018-12-??) +~~~~~~~~~~~~~~~~~~ + +* Fixed spurious project's "Problems" for `PlatformIO IDE for VSCode `__ when ARM mbed framework is used + 3.6.2 (2018-11-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 c90ca667..5f0343de 100644 --- a/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl +++ b/platformio/ide/tpls/vscode/.vscode/c_cpp_properties.json.tpl @@ -54,13 +54,16 @@ % cc_stds = STD_RE.findall(cc_flags) % cxx_stds = STD_RE.findall(cxx_flags) % +% # pass only architecture specific flags +% cc_m_flags = " ".join([f.strip() for f in cc_flags.split(" ") if f.strip().startswith("-m")]) +% % if cc_stds: "cStandard": "c{{ cc_stds[-1] }}", % end % if cxx_stds: "cppStandard": "c++{{ cxx_stds[-1] }}", % end - "compilerPath": "{{! _escape(cc_path) }} {{! _escape(STD_RE.sub("", cc_flags)) }}" + "compilerPath": "{{! _escape(cc_path) }} {{! _escape(cc_m_flags) }}" } ] } \ No newline at end of file From 3ca9527da40c29679add1eeb5d0fe3196d7b1d74 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 01:29:43 +0200 Subject: [PATCH 4/9] Bump version to 3.6.3b1 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index e4a8ed38..234f7144 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, 2) +VERSION = (3, 6, "3b1") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From 3a18e668c2d287b1982ffb649c75bb33771566d3 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 01:55:54 +0200 Subject: [PATCH 5/9] Docs: Better explanation about "PlatformIO IDE" --- docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs b/docs index cfdb7d89..3161e115 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit cfdb7d89681470706bb6bb2c5ea8e9356475f1cd +Subproject commit 3161e115ec58d566156160319985f264d9082334 From b87435948237998b2b39f60dda1faf2875a0fede Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 02:49:42 +0200 Subject: [PATCH 6/9] Ignore *.asm and *.ASM files when building Arduino-based library (compatibility with Arduino builder) --- HISTORY.rst | 1 + platformio/builder/tools/piolib.py | 22 ++++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 4fb214d8..518daddf 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 3.0 3.6.3 (2018-12-??) ~~~~~~~~~~~~~~~~~~ +* Ignore *.asm and *.ASM files when building Arduino-based library (compatibility with Arduino builder) * Fixed spurious project's "Problems" for `PlatformIO IDE for VSCode `__ when ARM mbed framework is used 3.6.2 (2018-11-29) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 574c9ed9..9259a8ac 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -488,11 +488,29 @@ class ArduinoLibBuilder(LibBuilderBase): @property def src_filter(self): - if isdir(join(self.path, "src")): - return LibBuilderBase.src_filter.fget(self) + src_dir = join(self.path, "src") + if isdir(src_dir): + src_filter = LibBuilderBase.src_filter.fget(self) + for root, _, files in os.walk(src_dir, followlinks=True): + found = False + for fname in files: + if fname.lower().endswith("asm"): + found = True + break + if not found: + continue + rel_path = root.replace(src_dir, "") + if rel_path.startswith(sep): + rel_path = rel_path[1:] + sep + src_filter.append("-<%s*.[aA][sS][mM]>" % rel_path) + return src_filter + src_filter = [] is_utility = isdir(join(self.path, "utility")) for ext in piotool.SRC_BUILD_EXT + piotool.SRC_HEADER_EXT: + # arduino ide ignores files with .asm or .ASM extensions + if ext.lower() == "asm": + continue src_filter.append("+<*.%s>" % ext) if is_utility: src_filter.append("+" % (sep, ext)) From a690b8c085115dc17be5368e6282f5a694c8f1df Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 02:51:24 +0200 Subject: [PATCH 7/9] Bump version to 3.6.3b2 --- platformio/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index 234f7144..231445fc 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "3b1") +VERSION = (3, 6, "3b2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" From d8cbe99f2c7e09fa129336479915a06dd060b8a8 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 15:50:34 +0200 Subject: [PATCH 8/9] Fix an issue with a broken headers list when generating ".clang_complete" for Emacs // Resolve #1960 --- HISTORY.rst | 2 ++ platformio/ide/tpls/emacs/.clang_complete.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 518daddf..adff885e 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,8 @@ PlatformIO 3.0 * Ignore *.asm and *.ASM files when building Arduino-based library (compatibility with Arduino builder) * Fixed spurious project's "Problems" for `PlatformIO IDE for VSCode `__ when ARM mbed framework is used +* Fixed an issue with a broken headers list when generating ".clang_complete" for `Emacs `__ + (`issue #1960 `_) 3.6.2 (2018-11-29) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/ide/tpls/emacs/.clang_complete.tpl b/platformio/ide/tpls/emacs/.clang_complete.tpl index c00763c8..3b137e31 100644 --- a/platformio/ide/tpls/emacs/.clang_complete.tpl +++ b/platformio/ide/tpls/emacs/.clang_complete.tpl @@ -1,5 +1,5 @@ % for include in includes: --I"{{include}}" +-I{{include}} % end % for define in defines: -D{{!define}} From 6f8b9d70bc09899ec9e25602e444f8fd1cc5f75e Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 12 Dec 2018 16:19:14 +0200 Subject: [PATCH 9/9] Bump version to 3.6.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 adff885e..6f0b02f1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,7 +4,7 @@ Release Notes PlatformIO 3.0 -------------- -3.6.3 (2018-12-??) +3.6.3 (2018-12-12) ~~~~~~~~~~~~~~~~~~ * Ignore *.asm and *.ASM files when building Arduino-based library (compatibility with Arduino builder) diff --git a/docs b/docs index 3161e115..c0dc8357 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 3161e115ec58d566156160319985f264d9082334 +Subproject commit c0dc83570a14489da4e887215b08035a503b9d95 diff --git a/platformio/__init__.py b/platformio/__init__.py index 231445fc..3f6bf3af 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (3, 6, "3b2") +VERSION = (3, 6, 3) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio"