From bd4d3b914b8f22bf76fabcc49f2a2f8e6173a249 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sun, 24 Jan 2021 15:49:56 +0200 Subject: [PATCH] Revert "lib_compat_mode" changes // Resolve #3811 Resolve #3806 --- HISTORY.rst | 1 - platformio/builder/tools/piolib.py | 14 +++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index c8949179..0d914a36 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,7 +15,6 @@ PlatformIO Core 5 - Upgraded build engine to the SCons 4.1 (`release notes `_) - 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 `_) * **Package Management System** diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index 792d6fab..f6b9824b 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -773,19 +773,11 @@ class PlatformIOLibBuilder(LibBuilderBase): @property def lib_compat_mode(self): - missing = object() - mode = self.env.GetProjectConfig().getraw( - "env:" + self.env["PIOENV"], "lib_compat_mode", missing - ) - if mode == missing: - 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( - mode or LibBuilderBase.lib_compat_mode.fget(self) + self._manifest.get("build", {}).get( + "libCompatMode", LibBuilderBase.lib_compat_mode.fget(self) + ) ) def is_platforms_compatible(self, platforms):