Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deterministic iteration order for reproducible codegen (#846)
Python set's do not have a deterministic iteration order (unlike dicts), therefore replace usage of set with OrderedDict's for the `includes` variable in `full__description.c.em` to make codegen reproducible. The `include_directives` set is used by the nested templates to prevent generation of duplicate include directives, but is not iterated over by those nested templates. In `idl__type_support.c.em` rather that iterating over the `include_directives` set (which introduces non-determinism) to generate the includes for top level header files, we iterate over those top level includes as a list and seperately construct the `include_directives` set from the list. This ensures deterministic codegen. Signed-off-by: Harry Sarson <harry.sarson@codethink.co.uk>
- Loading branch information