mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
Merge branch 'esp8266-native-library-backend' into esp8266-native-build-spec
This commit is contained in:
@@ -994,7 +994,10 @@ def convert_libraries(
|
||||
dep_name = dependency.get("name")
|
||||
if (
|
||||
isinstance(dep_name, str)
|
||||
and _node_key(dep_name, None, None)[0] in nodes
|
||||
# _node_key raises for a malformed URL-ish name; that
|
||||
# entry belongs to the warning below, not a traceback
|
||||
and "://" not in dep_name
|
||||
and _node_key(dep_name, None, None)[0] in top_level_keys
|
||||
):
|
||||
# Already requested top-level: present in the build, not
|
||||
# a drop (a false warning teaches users to ignore the
|
||||
|
||||
@@ -665,3 +665,17 @@ def test_versionless_dependency_requested_top_level_stays_quiet(
|
||||
_backend(),
|
||||
)
|
||||
assert "has no version to resolve" not in caplog.text
|
||||
|
||||
|
||||
def test_versionless_url_ish_dependency_name_warns_cleanly(
|
||||
tmp_path, monkeypatch, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""A malformed URL-ish dependency name falls to the drop warning, never
|
||||
a RuntimeError out of the key parser."""
|
||||
_patch_download_with_manifests(
|
||||
monkeypatch,
|
||||
tmp_path,
|
||||
{"esphome/A": {"name": "A", "dependencies": [{"name": "file://"}]}},
|
||||
)
|
||||
convert_libraries([Library("esphome/A", None, None)], _backend())
|
||||
assert "'file://' of esphome/A has no version to resolve" in caplog.text
|
||||
|
||||
Reference in New Issue
Block a user