det-lab / kaitai_struct_awkward_runtime

Kaitai Struct: runtime for Awkward Arrays
MIT License
2 stars 2 forks source link

`scdms_v8.ksy` does not compile #27

Closed zonca closed 8 months ago

zonca commented 8 months ago

If I try to compile scdms_v8.ksy with:

java -cp kaitai_struct_compiler/jvm/target/scala-2.12/kaitai-struct-compiler_2.12-0.11-SNAPSHOT.jar:/usr/share/kaitai-struct-compiler/lib/* io.kaitai.struct.JavaMain -t awkward --outdir test_artifacts example_data/schemas/scdms_v8.ksy

I get some warnings but no error:

 example_data/schemas/scdms_v8.ksy: /seq/2/id:
        warning: use `len_odb` instead of `odb_size`, given that it's only used as a byte size of `odb` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id)

example_data/schemas/scdms_v8.ksy: /types/sdu_channel_block/seq/1/id:
        warning: use `num_sdu_channel_sample` instead of `sdu_num_samples`, given that it's only used as repeat count of `sdu_channel_sample` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id)

example_data/schemas/scdms_v8.ksy: /types/sdu_block/instances/num_sdu_channels/id:
        warning: use `num_sdu_channel_blk` instead of `num_sdu_channels`, given that it's only used as repeat count of `sdu_channel_blk` (see https://doc.kaitai.io/ksy_style_guide.html#attr-id)

example_data/schemas/scdms_v8.ksy: /types/midas_header/seq/7/encoding:
        warning: use canonical encoding name `UTF-8` instead of `utf-8` (see https://doc.kaitai.io/ksy_style_guide.html#encoding-name)

However, the scdms_v8.cpp file is not created.

zonca commented 8 months ago

scdms.ksy instead compiles fine.

ManasviGoyal commented 8 months ago

@zonca The warnings are expected, you can ignore them. The warnings are due to the id names in the scdms_v8 file and we can't change it.

The name of the .cpp file is the id in the meta section of the ksy file and not the ksy file name. For this file, it should be test.cpp

zonca commented 8 months ago

ok, is it a problem if I modify the meta section in this file? So I can keep the scripting simpler

ManasviGoyal commented 8 months ago

ok, is it a problem if I modify the meta section in this file? So I can keep the scripting simpler

I think it should be okay to do that for testing purpose.