kaitai_struct icon indicating copy to clipboard operation
kaitai_struct copied to clipboard

Path in warnings related to ids of instances is wrong

Open KOLANICH opened this issue 2 years ago • 4 comments

it says /id, but instances have no /id in YAML DAG, it confuses tools relying on these paths.

KOLANICH avatar Nov 18 '21 16:11 KOLANICH

Can you please provide full example of error message?

GreyCat avatar Nov 18 '21 20:11 GreyCat

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.

KOLANICH avatar Nov 18 '21 23:11 KOLANICH

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

Mingun avatar Nov 19 '21 05:11 Mingun

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

KOLANICH avatar Nov 19 '21 06:11 KOLANICH