You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Ion text, the Ion Version Marker (IVM) is represented by the following symbol.
$ion_1_0
This stand-alone symbol is recommended at the start of Ion text data. It identifies a specific major/minor version of the Ion notation. It resets the current symbol table to be the corresponding system symbol table, and simultaneously switches the parser into the appropriate mode for parsing the right version of Ion notation.
There is no broader discussion of Ion Version Marker syntax; in particular, no syntax is reserved for future Ion Version Markers. Readers might reasonably assume that IVMs always follow the format $ion_MAJOR_MINOR, but this is not actually provided for by the spec. The System symbols section of the spec says:
Each version of the Ion specification defines the corresponding system symbol table version. Ion 1.0 uses the "$ion" symbol table, version 1, and future versions of Ion will use larger versions of the "$ion" symbol table. $ion_1_1 will probably use version 2, while $ion_2_0 might use version 5.
suggesting that the intent was to formalize $ion_MAJOR_MINOR. However, without an explicit requirement in the spec, it is unclear whether an Ion 1.0 text reader that encountered $ion_2_0 in a stream should treat it as:
An Ion Version Marker indicating that the stream is not readable by a 1.0 reader
OR
A user-level symbol using identifier syntax and the reserved $ion_* prefix
We should clarify the spec and add a test enforcing the expected behavior.
The text was updated successfully, but these errors were encountered:
Agreed. It's also referenced (but not defined! 😬) in the ANTLR grammar.
I think the spec should say it. As a developer, I want to be able to implement Ion by looking at the spec. I don't want to have to take a survey of the spec, ion-tests, and popular implementations to figure out what the Right Thing To Do ™️
is.
The Ion spec's Symbols section description says:
There is no broader discussion of Ion Version Marker syntax; in particular, no syntax is reserved for future Ion Version Markers. Readers might reasonably assume that IVMs always follow the format
$ion_MAJOR_MINOR
, but this is not actually provided for by the spec. The System symbols section of the spec says:suggesting that the intent was to formalize
$ion_MAJOR_MINOR
. However, without an explicit requirement in the spec, it is unclear whether an Ion 1.0 text reader that encountered$ion_2_0
in a stream should treat it as:OR
$ion_*
prefixWe should clarify the spec and add a test enforcing the expected behavior.
The text was updated successfully, but these errors were encountered: