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
#423 introduced the comment event on StreamParser. In #439, I realized that comment emitted by StreamParser is not guaranteed to be synchronized. That is, there is no guarantee that an event timeline of "data" "comment" "data" means that the comment in question was actually positioned in between the two quads in the source file.
Similarly, the prefix event is also not reliable.
This is inherently unfixable with ReadStream<Quad> (only fixable with ReadStream<Quad|Prefix|Comment>), so we should document this. Consumers MUST NOT rely on synchronization, because there is none.
This is less harmful for usage of prefix and comment for non-location-specific information purposes (as would nearly always be the case for prefixes). If any prefix or comment handling pertains to a specific position, StreamParser usage must be replaced by Parser, which does provide order guarantees.
The text was updated successfully, but these errors were encountered:
RubenVerborgh
changed the title
Add warning that StreamParser prexied and comment events are not synchronized to data
Add warning that StreamParser prefix and comment events are not synchronized to data
Sep 6, 2024
#423 introduced the
comment
event onStreamParser
. In #439, I realized thatcomment
emitted byStreamParser
is not guaranteed to be synchronized. That is, there is no guarantee that an event timeline of"data" "comment" "data"
means that the comment in question was actually positioned in between the two quads in the source file.Similarly, the
prefix
event is also not reliable.This is inherently unfixable with
ReadStream<Quad>
(only fixable withReadStream<Quad|Prefix|Comment>
), so we should document this. Consumers MUST NOT rely on synchronization, because there is none.This is less harmful for usage of
prefix
andcomment
for non-location-specific information purposes (as would nearly always be the case for prefixes). If anyprefix
orcomment
handling pertains to a specific position,StreamParser
usage must be replaced byParser
, which does provide order guarantees.The text was updated successfully, but these errors were encountered: