Skip to content

Ion CLI fails to parse null symbol tables #213

@popematt

Description

@popematt

The spec says that these two symbol tables are equivalent:

$ion_symbol_table::{}
$ion_symbol_table::null.struct

But Ion CLI fails to parse a null symbol table:

❯ ion inspect --hex="E0 01 00 EA E3 81 83 DF"
Error: input: E0 01 00 EA E3 81 83 DF

Caused by:
    0: expected a(n) struct but found a null.struct
    1: expected a(n) struct but found a null.struct
┌──────────────┬──────────────┬─────────────────────────┬──────────────────────┐
│    Offset    │    Length    │       Binary Ion        │       Text Ion       │
├──────────────┼──────────────┼─────────────────────────┼──────────────────────┘
│            0 │            4 │ e0 01 00 ea             │ $ion_1_0 // Version marker

❯ echo '$ion_symbol_table::null.struct' | ion cat
Error: expected a(n) struct but found a null.struct

Caused by:
    expected a(n) struct but found a null.struct

The empty struct case is handled correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions