Store the native version floor as a Version and tidy the dependency skip

This commit is contained in:
J. Nick Koston
2026-08-20 05:25:25 -05:00
parent ff7161d7eb
commit 2483117648
4 changed files with 25 additions and 14 deletions
+7 -5
View File
@@ -160,9 +160,13 @@ def resolve_libraries(framework_path: Path) -> list[ArduinoLibrary]:
# it cannot be resolved from the registry.
for dep in normalize_dependencies(component.data.get("dependencies")):
name = dep.get("name")
if not name or dep.get("owner") or "version" in dep:
continue
if name in bundled_names:
if (
not name
or dep.get("owner")
or "version" in dep
or name in bundled_names
or is_lib_ignored(name, lib_ignore)
):
continue
if not (framework_path / "libraries" / name).is_dir():
# The shared converter skips version-less deps too, so this
@@ -175,8 +179,6 @@ def resolve_libraries(framework_path: Path) -> list[ArduinoLibrary]:
component.name,
)
continue
if is_lib_ignored(name, lib_ignore):
continue
try:
check_library_data(dep, ESP8266_PLATFORM, "arduino")
except InvalidLibrary as err:
+1 -1
View File
@@ -75,7 +75,7 @@ def get_arduino8266_tools_path() -> Path:
# 3.1.1 rather than 3.1.0: the registry has no package for 3.1.0
MIN_FRAMEWORK_VERSION = "3.1.1"
MIN_FRAMEWORK_VERSION = cv.Version(3, 1, 1)
def framework_package_version(ver: cv.Version) -> str:
+1 -1
View File
@@ -133,7 +133,7 @@ def _validate_native_toolchain(config: ConfigType) -> ConfigType:
conf = config[CONF_FRAMEWORK]
version = cv.Version.parse(conf[CONF_VERSION])
if version < cv.Version.parse(MIN_FRAMEWORK_VERSION):
if version < MIN_FRAMEWORK_VERSION:
raise cv.Invalid(
"'toolchain: arduino' requires framework version "
f"{MIN_FRAMEWORK_VERSION} or newer"