diff --git a/HISTORY.rst b/HISTORY.rst index 9addc2bf..e9b4990f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,10 +13,11 @@ PlatformIO Core 5 * Significantly speedup PlatformIO Home loading time by migrating to native Python 3 Asynchronous I/O * Improved listing of `multicast DNS services `_ -* Check for debug server's "ready_pattern" in "stderr" +* Check for debugging server's "ready_pattern" in "stderr" * Upgraded build engine to the SCons 4.1 (`release notes `_) -* Fixed a "UnicodeDecodeError: 'utf-8' codec can't decode byte" when using J-Link for a firmware uploading on Linux (`issue #3804 `_) -* Fixed an issue with Python 3.8+ on Windows when network drive is used (`issue #3417 `_) +* 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 Python 3.8+ on Windows when a network drive is used (`issue #3417 `_) +* Fixed an issue when "strict" compatibility mode was not used for a library with custom "platforms" field in `library.json `__ manifest (`issue #3806 `_) 5.0.4 (2020-12-30) ~~~~~~~~~~~~~~~~~~ @@ -25,8 +26,8 @@ PlatformIO Core 5 - 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 + * `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 diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index f6b9824b..97e2637a 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -773,11 +773,14 @@ class PlatformIOLibBuilder(LibBuilderBase): @property def lib_compat_mode(self): + mode = self._manifest.get("build", {}).get( + "libCompatMode", + ) + if not mode and self._manifest.get("platforms"): + mode = "strict" # pylint: disable=no-member return self.validate_compat_mode( - self._manifest.get("build", {}).get( - "libCompatMode", LibBuilderBase.lib_compat_mode.fget(self) - ) + mode or LibBuilderBase.lib_compat_mode.fget(self) ) def is_platforms_compatible(self, platforms):