kaitai_struct_compiler icon indicating copy to clipboard operation
kaitai_struct_compiler copied to clipboard

Fix type and enum leaking from one imported KSY to another

Open Mingun opened this issue 1 year ago • 1 comments

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

Mingun avatar Apr 17 '24 17:04 Mingun