The Web IDE at https://ide.kaitai.io/devel/ has recently seen a number of improvements! They address a few common issues and imperfections of the Web IDE you may have encountered.
These improvements were made thanks to the financial support from the NLnet Foundation.
The new feature we’re most excited about is the ability to show partial results in the object tree even if the parsing failed (as suggested in #156). Previously, a parsing error caused that only the error message was shown, while the object tree still displayed the last successful parsing. This meant you were left with the little information contained in the error text when trying to figure out what caused the problem. Considering the complexity of binary formats, this is often impossible — for efficient debugging you need as much context as possible, which includes the values of all fields parsed before the error occurred.
That’s exactly what this feature gives you. On top of that, it uses several icons to indicate which fields are incomplete, which helps you pinpoint the exact location of the error. Hover over the icons for more information on what each icon indicates.
The following screenshots show what it looks like in action. In the first example below, the parsing was interrupted by an EOF error, as stated in the “Errors” pane at the bottom. The object tree displays all fields up to the source of the EOF error. We can see two types of icons: the yellow warning triangle and a red circle with an exclamation mark. The yellow warning triangle warns us that even though the object has some content, its parsing was interrupted due to an error, so some fields may be missing. The red circle with an exclamation mark indicates a field that has no value, because its parsing failed. Therefore, it is usually the source of the parsing error.
In the second example below, we can see a new icon: a cross mark. It indicates a failed field validation. The field was parsed fine, but the parsed value violates the field’s contents
or valid
constraint as defined in the .ksy specification (see sections 4.3 and 4.4 in the User Guide for explanation of these keys). Therefore, a validation error was thrown and no more fields were parsed.
We can also notice the same circle with an exclamation mark icon as before, but this time in blue. Blue icons only appear for instances and indicate that this instance was not invoked from the .ksy specification itself, but was first invoked explicitly by the Web IDE when displaying the object tree and this invocation raised an error.
You can display the full error message in the “Errors” pane by selecting a field with a cross mark or any blue icon.
This was perhaps the most visible change, but not the only one!
Other improvements include:
TypeError: {ImportedType} is not a constructor
when loading a .ksy specification with imports for the first time since loading the Web IDE, support circular imports (#169)0x..
is no longer incorrectly parsed as a constant (e.g. pos: 0x1 + offset
is not interpreted as pos: 0x1ffe
), binary notation 0b..
is no longer parsed as 0
and duplicate keys are rejected instead of silently overwriting each other (see #165 for more details)-webide-representation
on imported types (#163)Head over to https://ide.kaitai.io/devel/ and try it out for yourself!
If you find any issues, please report them to the Web IDE issue tracker so we can fix them in the future.