Skip to content

Commit 0b64c9c

Browse files
author
Jimmy Brisson
committed
Filter resources by included libraries
1 parent c5a721c commit 0b64c9c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tools/config/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,8 +1311,17 @@ def load_resources(self, resources):
13111311
for name, missing in missing_requirements.items()
13121312
)
13131313
raise ConfigException(message)
1314-
1315-
1314+
all_json_paths = [
1315+
cfg["__config_path"] for cfg in self.lib_config_data.values()
1316+
]
1317+
included_json_files = [
1318+
ref for ref in resources.get_file_refs(FileType.JSON)
1319+
if (
1320+
not ref.name.endswith(self.__mbed_lib_config_name)
1321+
or ref.path in all_json_paths
1322+
)
1323+
]
1324+
resources.filter_by_libraries(included_json_files)
13161325
if (hasattr(self.target, "release_versions") and
13171326
"5" not in self.target.release_versions and
13181327
"rtos" in self.lib_config_data):

0 commit comments

Comments
 (0)