Skip to content

Commit d80a9c8

Browse files
committed
Merge branch 'release/v4.3.0'
2 parents 80acd52 + 6414e1d commit d80a9c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+894
-883
lines changed

.appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ environment:
77
matrix:
88
- TOXENV: "py27"
99
PLATFORMIO_BUILD_CACHE_DIR: C:\Temp\PIO_Build_Cache_P2_{build}
10+
PYTHON_DIRS: C:\Python27-x64;C:\Python27-x64\Scripts
1011

1112
- TOXENV: "py36"
1213
PLATFORMIO_BUILD_CACHE_DIR: C:\Temp\PIO_Build_Cache_P3_{build}
14+
PYTHON_DIRS: C:\Python36-x64;C:\Python36-x64\Scripts
1315

1416
install:
1517
- cmd: git submodule update --init --recursive
16-
- cmd: SET PATH=C:\MinGW\bin;%PATH%
18+
- cmd: SET PATH=%PYTHON_DIRS%;C:\MinGW\bin;%PATH%
1719
- cmd: SET PLATFORMIO_CORE_DIR=C:\.pio
1820
- cmd: pip install --force-reinstall tox
1921

.style.yapf

Lines changed: 0 additions & 3 deletions
This file was deleted.

HISTORY.rst

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ Release Notes
66
PlatformIO Core 4
77
-----------------
88

9+
4.3.0 (2020-03-19)
10+
~~~~~~~~~~~~~~~~~~
11+
12+
* Initial support for an official `PlatformIO for CLion IDE <https://docs.platformio.org/page/integration/ide/clion.html>`__ plugin:
13+
14+
- Smart C and C++ editor
15+
- Code refactoring
16+
- On-the-fly code analysis
17+
- "New PlatformIO Project" wizard
18+
- Building, Uploading, Testing
19+
- Integrated debugger (inline variable view, conditional breakpoints, expressions, watchpoints, peripheral registers, multi-thread support, etc.)
20+
21+
* `Device Monitor 2.0 <https://docs.platformio.org/page/core/userguide/device/cmd_monitor.html>`__
22+
23+
- Added **PlatformIO Device Monitor Filter API** (dev-platforms can extend base device monitor with a custom functionality, such as exception decoding) (`pull #3383 <https://github.com/platformio/platformio-core/pull/3383>`_)
24+
- Configure project device monitor with `monitor_filters <https://docs.platformio.org/page/projectconf/section_env_monitor.html#monitor-filters>`__ option
25+
- `Capture device monitor output to a file <https://docs.platformio.org/page/core/userguide/device/cmd_monitor.html#capture-output-to-a-file>`__ with ``log2file`` filter (`issue #670 <https://github.com/platformio/platformio-core/issues/670>`_)
26+
- Show a timestamp for each new line with ``time`` filter (`issue #981 <https://github.com/platformio/platformio-core/issues/981>`_)
27+
- Send a text to device on ENTER with ``send_on_enter`` filter (`issue #926 <https://github.com/platformio/platformio-core/issues/926>`_)
28+
- Show a hexadecimal representation of the data (code point of each character) with ``hexlify`` filter
29+
30+
* New standalone (1-script) `PlatformIO Core Installer <https://github.com/platformio/platformio-core-installer>`_
31+
* Initial support for `Renode <https://docs.platformio.org/page/plus/debug-tools/qemu.html>`__ simulation framework (`issue #3401 <https://github.com/platformio/platformio-core/issues/3401>`_)
32+
* Added support for Arm Mbed "module.json" ``dependencies`` field (`issue #3400 <https://github.com/platformio/platformio-core/issues/3400>`_)
33+
* Improved support for Arduino "library.properties" ``depends`` field
34+
* Fixed an issue when quitting from PlatformIO IDE does not shutdown PIO Home server
35+
* Fixed an issue "the JSON object must be str, not 'bytes'" when PIO Home is used with Python 3.5 (`issue #3396 <https://github.com/platformio/platformio-core/issues/3396>`_)
36+
* Fixed an issue when Python 2 does not keep encoding when converting ".ino" (`issue #3393 <https://github.com/platformio/platformio-core/issues/3393>`_)
37+
* Fixed an issue when ``"libArchive": false`` in "library.json" does not work (`issue #3403 <https://github.com/platformio/platformio-core/issues/3403>`_)
38+
* Fixed an issue when not all commands in `compilation database "compile_commands.json" <https://docs.platformio.org/page/integration/compile_commands.html>`__ use absolute paths (`pull #3415 <https://github.com/platformio/platformio-core/pull/3415>`_)
39+
* Fixed an issue when unknown transport is used for `PIO Unit Testing <https://docs.platformio.org/page/plus/unit-testing.html>`__ engine (`issue #3422 <https://github.com/platformio/platformio-core/issues/3422>`_)
40+
941
4.2.1 (2020-02-17)
1042
~~~~~~~~~~~~~~~~~~
1143

@@ -34,7 +66,7 @@ PlatformIO Core 4
3466
- Show computed project configuration with a new `platformio project config <https://docs.platformio.org/page/userguide/project/cmd_config.html>`_ command or dump to JSON with ``platformio project config --json-output`` (`issue #3335 <https://github.com/platformio/platformio-core/issues/3335>`_)
3567
- Moved ``platformio init`` command to `platformio project init <https://docs.platformio.org/page/userguide/project/cmd_init.html>`_
3668

37-
* Generate `compilation database "compile_commands.json" <https://docs.platformio.org/page/faq.html#compilation-database-compile-commands-json>`_ (`issue #2990 <https://github.com/platformio/platformio-core/issues/2990>`_)
69+
* Generate `compilation database "compile_commands.json" <https://docs.platformio.org/page/integration/compile_commands.html>`__ (`issue #2990 <https://github.com/platformio/platformio-core/issues/2990>`_)
3870
* Control debug flags and optimization level with a new `debug_build_flags <https://docs.platformio.org/page/projectconf/section_env_debug.html#debug-build-flags>`__ option
3971
* Install a dev-platform with ALL declared packages using a new ``--with-all-packages`` option for `pio platform install <https://docs.platformio.org/page/userguide/platforms/cmd_install.html>`__ command (`issue #3345 <https://github.com/platformio/platformio-core/issues/3345>`_)
4072
* Added support for "pythonPackages" in `platform.json <https://docs.platformio.org/page/platforms/creating_platform.html#manifest-file-platform-json>`__ manifest (PlatformIO Package Manager will install dependent Python packages from PyPi registry automatically when dev-platform is installed)

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Instruments
5858
* `Continuous Integration <https://docs.platformio.org/page/ci/index.html?utm_source=github&utm_medium=core>`_
5959
* `Advanced Scripting API <https://docs.platformio.org/page/projectconf/advanced_scripting.html?utm_source=github&utm_medium=core>`_
6060

61-
PIO Plus
62-
--------
61+
Professional
62+
------------
6363

6464
* `PIO Check <https://docs.platformio.org/page/plus/pio-check.html?utm_source=github&utm_medium=core>`_
6565
* `PIO Remote <https://docs.platformio.org/page/plus/pio-remote.html?utm_source=github&utm_medium=core>`_

docs

Submodule docs updated 163 files

platformio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
VERSION = (4, 2, 1)
15+
VERSION = (4, 3, 0)
1616
__version__ = ".".join([str(s) for s in VERSION])
1717

1818
__title__ = "platformio"

platformio/builder/tools/compilation_db.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ def EmitCompilationDbEntry(target, source, env):
7676
:return: target(s), source(s)
7777
"""
7878

79+
# Resolve absolute path of toolchain
80+
for cmd in ("CC", "CXX", "AS"):
81+
if cmd not in env:
82+
continue
83+
if os.path.isabs(env[cmd]):
84+
continue
85+
env[cmd] = where_is_program(
86+
env.subst("$%s" % cmd), env.subst("${ENV['PATH']}")
87+
)
88+
7989
dbtarget = __CompilationDbNode(source)
8090

8191
entry = env.__COMPILATIONDB_Entry(
@@ -195,14 +205,6 @@ def generate(env, **kwargs):
195205
)
196206

197207
def CompilationDatabase(env, target):
198-
# Resolve absolute path of toolchain
199-
for cmd in ("CC", "CXX", "AS"):
200-
if cmd not in env:
201-
continue
202-
env[cmd] = where_is_program(
203-
env.subst("$%s" % cmd), env.subst("${ENV['PATH']}")
204-
)
205-
206208
result = env.__COMPILATIONDB_Database(target=target, source=[])
207209

208210
env.AlwaysBuild(result)

platformio/builder/tools/piolib.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from __future__ import absolute_import
1919

2020
import hashlib
21+
import io
2122
import os
2223
import re
2324
import sys
@@ -82,7 +83,8 @@ def get_used_frameworks(env, path):
8283
fname, piotool.SRC_BUILD_EXT + piotool.SRC_HEADER_EXT
8384
):
8485
continue
85-
content = fs.get_file_contents(join(root, fname))
86+
with io.open(join(root, fname), errors="ignore") as fp:
87+
content = fp.read()
8688
if not content:
8789
continue
8890
if "Arduino.h" in content and include_re.search(content):
@@ -716,9 +718,11 @@ def extra_script(self):
716718

717719
@property
718720
def lib_archive(self):
719-
unique_value = "_not_declared_%s" % id(self)
720-
global_value = self.env.GetProjectOption("lib_archive", unique_value)
721-
if global_value != unique_value:
721+
missing = object()
722+
global_value = self.env.GetProjectConfig().getraw(
723+
"env:" + self.env["PIOENV"], "lib_archive", missing
724+
)
725+
if global_value != missing:
722726
return global_value
723727
return self._manifest.get("build", {}).get(
724728
"libArchive", LibBuilderBase.lib_archive.fget(self)

platformio/builder/tools/piomaxlen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from os import makedirs
1919
from os.path import isdir, isfile, join
2020

21-
from platformio import fs
2221
from platformio.compat import WINDOWS, hashlib_encode_data
2322

2423
# Windows CLI has limit with command length to 8192
@@ -67,7 +66,8 @@ def _file_long_data(env, data):
6766
)
6867
if isfile(tmp_file):
6968
return tmp_file
70-
fs.write_file_contents(tmp_file, data)
69+
with open(tmp_file, "w") as fp:
70+
fp.write(data)
7171
return tmp_file
7272

7373

0 commit comments

Comments
 (0)