Open milahu opened 1 year ago
as a noob, im tempted to confuse value and type
types: some_type: instances: # bad: # test.ksy: /: # error: Name(identifier(some_other_type)) (of class io.kaitai.struct.exprlang.Ast$expr$Name) some_instance_bad: value: 'some_other_type(some_index)' # good: some_instance: io: _root._io pos: some_index size: _root.header.page_size type: some_other_type(some_index)
error is not helpful
$ kaitai-struct-compiler -t python test.ksy test.ksy: /: error: Name(identifier(some_other_type)) (of class io.kaitai.struct.exprlang.Ast$expr$Name)
because the yaml key path / is wrong, should be /types/some_type/instances/some_instance_bad/value because yaml position is missing, tracked in #229 because it should be more verbose, like error: not found: Name(identifier(some_other_type))
/
/types/some_type/instances/some_instance_bad/value
error: not found: Name(identifier(some_other_type))
as a noob, im tempted to confuse value and type
error is not helpful
because the yaml key path
/
is wrong, should be/types/some_type/instances/some_instance_bad/value
because yaml position is missing, tracked in #229 because it should be more verbose, likeerror: not found: Name(identifier(some_other_type))
test.ksy
```yaml meta: id: test types: some_type: params: - id: some_index type: u4 seq: - id: some_bytes size: 10 instances: # bad: # test.ksy: /: # error: Name(identifier(some_other_type)) (of class io.kaitai.struct.exprlang.Ast$expr$Name) some_instance_bad: value: 'some_other_type(some_index)' # good: some_instance: io: _root._io pos: some_index size: _root.header.page_size type: some_other_type(some_index) some_other_type: params: - id: some_index type: u4 seq: - id: some_bytes size: 10 ```