Skip to content

Commit

Permalink
Resolved an issue where the |LDF| couldn't locate a library dependenc…
Browse files Browse the repository at this point in the history
…y declared via version control system repository // Resolve #4885
  • Loading branch information
ivankravets committed Mar 26, 2024
1 parent 2bad42e commit c475578
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Unlock the true potential of embedded software development with
PlatformIO's collaborative ecosystem, embracing declarative principles,
test-driven methodologies, and modern toolchains for unrivaled success.

6.1.15 (2024-??-??)
~~~~~~~~~~~~~~~~~~~

* Resolved an issue where the |LDF| couldn't locate a library dependency declared via version control system repository (`issue #4885 <https://github.com/platformio/platformio-core/issues/4885>`_)

6.1.14 (2024-03-21)
~~~~~~~~~~~~~~~~~~~

Expand Down
16 changes: 12 additions & 4 deletions platformio/builder/tools/piolib.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
ManifestParserError,
ManifestParserFactory,
)
from platformio.package.meta import PackageCompatibility, PackageItem
from platformio.package.meta import PackageCompatibility, PackageItem, PackageSpec
from platformio.project.options import ProjectOptions


Expand Down Expand Up @@ -332,9 +332,17 @@ def is_dependency_compatible(self, dependency):
qualifiers = {"name": pkg.metadata.name, "version": pkg.metadata.version}
if pkg.metadata.spec and pkg.metadata.spec.owner:
qualifiers["owner"] = pkg.metadata.spec.owner
return PackageCompatibility.from_dependency(
{k: v for k, v in dependency.items() if k in ("owner", "name", "version")}
).is_compatible(PackageCompatibility(**qualifiers))
dep_qualifiers = {
k: v for k, v in dependency.items() if k in ("owner", "name", "version")
}
if (
"version" in dep_qualifiers
and not PackageSpec(dep_qualifiers["version"]).requirements
):
del dep_qualifiers["version"]
return PackageCompatibility.from_dependency(dep_qualifiers).is_compatible(
PackageCompatibility(**qualifiers)
)

def get_search_files(self):
return [
Expand Down

0 comments on commit c475578

Please sign in to comment.