diff --git a/HISTORY.rst b/HISTORY.rst index ceef275e..d2462c79 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -10,6 +10,7 @@ PlatformIO Core 4.0 ~~~~~~~~~~~~~~~~~~ * Handle project configuration (monitor, test, and upload options) for PIO Remote commands (`issue #2591 `_) +* Warn about about broken library manifest when scanning dependencies (`issue #3268 `_) * Fixed an issue with the broken latest news for PIO Home * Fixed an issue when ``env.BoardConfig()`` does not work for custom boards in extra scripts of libraries (`issue #3264 `_) diff --git a/platformio/builder/tools/piolib.py b/platformio/builder/tools/piolib.py index d5c58ff8..bd4bcf74 100644 --- a/platformio/builder/tools/piolib.py +++ b/platformio/builder/tools/piolib.py @@ -33,7 +33,10 @@ from platformio import exception, fs, util from platformio.builder.tools import platformio as piotool from platformio.compat import WINDOWS, hashlib_encode_data, string_types from platformio.managers.lib import LibraryManager -from platformio.package.manifest.parser import ManifestParserFactory +from platformio.package.manifest.parser import ( + ManifestParserError, + ManifestParserFactory, +) from platformio.project.options import ProjectOptions @@ -108,7 +111,14 @@ class LibBuilderBase(object): self.path = realpath(env.subst(path)) self.verbose = verbose - self._manifest = manifest if manifest else self.load_manifest() + try: + self._manifest = manifest if manifest else self.load_manifest() + except ManifestParserError: + click.secho( + "Warning! Ignoring broken library manifest in " + self.path, fg="yellow" + ) + self._manifest = {} + self._is_dependent = False self._is_built = False self._depbuilders = list()