kaitai_struct
kaitai_struct copied to clipboard
Path in warnings related to ids of instances is wrong
it says /id
, but instances have no /id
in YAML DAG, it confuses tools relying on these paths.
Can you please provide full example of error message?
Warnings emitted while compiling https://github.com/KOLANICH-specs/kaitai_struct_formats/blob/d3c02f8ed80059f0113c6d6784f087588c921437/hardware/eink_wbf.ksy . Not exposed via JSON when used via CLI, but when used via JPype I have to detect them and distinguishnfrom errors. Since I detect them, I implemented conversion of them into python warnings instead of just ignoring. Since line is not exposed, I have written some code that uses the path to get the line. But the path is invalid.
If you have a tool that sensitive to paths in errors, you would be interested in https://github.com/kaitai-io/kaitai_struct_compiler/pull/229 which fixes many of them
Thanks, @Mingun. BTW I have looked into the patch, it seems it doesn't fix this issue. Its source is likely here: https://github.com/kaitai-io/kaitai_struct_compiler/blob/0acfa60452a10b770a2c2e746f3de057f8ab76d9/shared/src/main/scala/io/kaitai/struct/precompile/StyleCheckIds.scala#L48