Skip to content

Commit e6fe88b

Browse files
committed
Logging for CI bug with headers coming from multiple folders
1 parent f122084 commit e6fe88b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

modules/python/generator/visp_python_bindgen/generator_config.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ def is_forbidden_function_name(name: str) -> bool:
156156

157157
@staticmethod
158158
def update_from_main_config_file(path: Path) -> None:
159-
assert path.exists()
159+
assert path.exists(), f'Main config file {path} was not found'
160160
with open(path, 'r') as main_config_file:
161161
main_config = json.load(main_config_file)
162+
print(json.dumps(main_config, indent=2))
162163
logging.info('Updating the generator config from dict: ', main_config)
163164
GeneratorConfig.pcpp_config.include_directories = main_config['include_dirs']
164165

@@ -176,6 +177,7 @@ def update_from_main_config_file(path: Path) -> None:
176177
for module_name in modules_dict:
177178
headers = map(lambda s: Path(s), modules_dict[module_name].get('headers'))
178179
deps = modules_dict[module_name].get('dependencies')
180+
179181
# Include only headers that are in the VISP source directory
180182
headers = list(filter(lambda h: source_dir in h.parents, headers))
181183
headers_log_str = '\n\t'.join([str(header) for header in headers])

modules/python/generator/visp_python_bindgen/submodule.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ def get_submodules(config_path: Path, generate_path: Path) -> List[Submodule]:
284284
headers = module_data.headers
285285
if len(headers) == 0:
286286
print(f'Module {module_data.name} has no input headers, skipping!')
287-
288287
continue
288+
# The headers are already filtered: they should all come from the ViSP source folder (no vpConfig, etc.)
289289
include_dir = headers[0].parent
290290
hh = "\n".join(map(lambda s: str(s), headers))
291291
assert all(map(lambda header_path: header_path.parent == include_dir, headers)), f'Found headers in different directory, this case is not yet handled. Headers = {hh}'

0 commit comments

Comments
 (0)