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):