Skip to content

Commit

Permalink
Warn about about broken library manifest when scanning dependencies //
Browse files Browse the repository at this point in the history
…Resolve #3268
  • Loading branch information
ivankravets committed Nov 12, 2019
1 parent f1d20f5 commit 7c48129
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Expand Up @@ -10,6 +10,7 @@ PlatformIO Core 4.0
~~~~~~~~~~~~~~~~~~

* Handle project configuration (monitor, test, and upload options) for PIO Remote commands (`issue #2591 <https://github.com/platformio/platformio-core/issues/2591>`_)
* Warn about about broken library manifest when scanning dependencies (`issue #3268 <https://github.com/platformio/platformio-core/issues/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 <https://github.com/platformio/platformio-core/issues/3264>`_)

Expand Down
14 changes: 12 additions & 2 deletions platformio/builder/tools/piolib.py
Expand Up @@ -33,7 +33,10 @@
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


Expand Down Expand Up @@ -108,7 +111,14 @@ def __init__(self, env, path, manifest=None, verbose=False):
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()
Expand Down

0 comments on commit 7c48129

Please sign in to comment.