Skip to content

node.pyx: _SYNTHETIC_FILE_INDEX must not be module-private

It's declared in node.pxd and used by _yaml.pyx.

This fixes the following error when running individual tests:

src/buildstream/testing/runcli.py:563: in run_project_config
    base_config = _yaml.load_data(config)
src/buildstream/_yaml.pyx:293: in buildstream._yaml.load_data
    cpdef MappingNode load_data(str data, int file_index=node._SYNTHETIC_FILE_INDEX, str file_name=None, bint copy_tree=False):
src/buildstream/_yaml.pyx:324: in buildstream._yaml.load_data
    node._set_root_node_for_file(file_index, contents)

>   f_info = <__FileInfo> __FILE_LIST[file_index]
E   IndexError: list index out of range

src/buildstream/node.pyx:1550: IndexError

Fixes: 97b8ab7d ("node: Mark module-private functions and classes...")

Merge request reports

Loading