Mingun

Results 226 issues of Mingun

This PR changes the errors reported by `rustc` when signature of function specified in - `#[serde(with = "...")]` - `#[serde(deserialize_with = "...")]` - `#[serde(serialize_with = "...")]` - `#[serde(default = "...")]`...

Unit variant of externally tagged enum can be deserialized when enum is flatten, [but cannot be serialized]( https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=67545ca025699ac9894f464ad1dc2405) -- `ser` test failed: ```rust #![cfg(test)] use serde::{Deserialize, Serialize}; // 1.0.204; use...

This is continuation of #2520 expanded for enums. Create a draft PR just to see how it could look. It implements suggestions from #2520. It is still unfinished, I want...

In was introduced in the first god commit 8e6866f43a3f6b4de782b44c5c0d72a15994f63c. The implementation of `copy` just calls `clone` on both struct fields which is what derived `Clone` implementation already do.

Example of the current error: ```yaml # enum_unknown_inst_value.ksy: /instances/should_fail/enum: # error: unable to find enum 'animal', searching from enum_unknown_inst_value # meta: id: enum_unknown_inst_value instances: should_fail: value: 1 enum: animal ```...

bug found

As was observed in #857, sometimes `--ksc-exceptions` flag does not produce exceptions as it should and instead only writes user-friendly message. It seems that exception is not printed when the...

Reference to enum that includes absolute path (like `::path::to::enum`) will be parsed to `DataType.EnumType(List(,path,to,enum))` (note the first empty string in [`EnumType.name`](https://github.com/kaitai-io/kaitai_struct_compiler/blob/542b24124a95f5308df625d667f8776dd023c696/shared/src/main/scala/io/kaitai/struct/datatype/DataType.scala#L255)) Creation of `EnumType` instance: https://github.com/kaitai-io/kaitai_struct_compiler/blob/542b24124a95f5308df625d667f8776dd023c696/shared/src/main/scala/io/kaitai/struct/datatype/DataType.scala#L486-L497 The same will happen...

Following KSY failed to compile in web-IDE: ```yaml meta: id: type_resolution_bugs #endian: be seq: - id: field type: ::u2 types: u2: seq: - size: 10 ``` with ``` Parse error:...

Kaitais struct allows to define enum key either as number, or as string which value is number. https://github.com/kaitai-io/kaitai_struct_compiler/blob/c23ec2ca88d84042edba76f70c1f003d062b7585/shared/src/main/scala/io/kaitai/struct/format/EnumSpec.scala#L33-L35 Numbers are extracted using `ParseUtils.asLong` method... https://github.com/kaitai-io/kaitai_struct_compiler/blob/c23ec2ca88d84042edba76f70c1f003d062b7585/shared/src/main/scala/io/kaitai/struct/format/ParseUtils.scala#L186-L194 ...which uses `Utils.strToLong` which uses...

question

Currently I only check `.instances..if`, but I have feeling that the same problem exists for other fields where expression is allowed. Below the comparison between parse instance and value instance....

bug found