kaitai_struct_compiler
kaitai_struct_compiler copied to clipboard
Fix type and enum leaking from one imported KSY to another
This PR implements solution from my comment. Each top-level ClassSpec now have a list of other top-level ClassSpecs which is explicitly import it. When resolve types and enums now checked if spec with the type/enum was explicitly imported or not and if not, it does not resolves.
Related links:
- https://github.com/kaitai-io/kaitai_struct_compiler/pull/303 -- this PR
- https://github.com/kaitai-io/kaitai_struct_tests/pull/124 -- tests
- Closes https://github.com/kaitai-io/kaitai_struct/issues/534