Skip to content

Commit 7576c25

Browse files
committed
fix: ignore if clauses with kconfig options with unsupported idf version
1 parent 68e5b6b commit 7576c25

File tree

1 file changed

+12
-1
lines changed
  • idf_component_manager/prepare_components

1 file changed

+12
-1
lines changed

idf_component_manager/prepare_components/prepare.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from idf_component_manager.core import ComponentManager
1515
from idf_component_tools import error, setup_logging, warn
16+
from idf_component_tools.build_system_tools import get_idf_version
1617
from idf_component_tools.debugger import KCONFIG_CONTEXT
1718
from idf_component_tools.errors import FatalError
1819
from idf_component_tools.manifest import ComponentRequirement
@@ -52,8 +53,18 @@ def debug_message(req: ComponentRequirement) -> str:
5253
debug_strs.add(f' {key}, {debug_message(req)}')
5354

5455
_nl = '\n'
56+
if args.interface_version < 4:
57+
warn(
58+
f'The following Kconfig variables were used in "if" clauses, '
59+
f'but not supported by your ESP-IDF version {get_idf_version()}. '
60+
f'Ignoring these if-clauses:\n'
61+
f'{_nl.join(sorted(debug_strs))}\n'
62+
)
63+
return
64+
5565
warn(
56-
f'The following Kconfig variables were used in "if" clauses, but not found in any Kconfig file:\n'
66+
f'The following Kconfig variables were used in "if" clauses, '
67+
f'but not found in any Kconfig file:\n'
5768
f'{_nl.join(sorted(debug_strs))}\n'
5869
)
5970
exit(10)

0 commit comments

Comments
 (0)