Skip to content

Conversation

@pbcornell
Copy link

Resolves #94

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@pbcornell pbcornell requested review from tgregg and zslayton October 17, 2019 16:21
@pbcornell pbcornell merged commit 3908afc into master Oct 17, 2019
@pbcornell pbcornell deleted the pcornell-omit_version_marker branch October 17, 2019 16:38
writer = blocking_writer(raw_writer, fp)
from_type = _FROM_TYPE_TUPLE_AS_SEXP if tuple_as_sexp else _FROM_TYPE
writer.send(ION_VERSION_MARKER_EVENT) # The IVM is emitted automatically in binary; it's optional in text.
if not binary and not omit_version_marker:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be if binary or not omit_version_marker:?

I mean, the tests pass so the current logic clearly works, but it looks weird to me. Are we relying on the fact that under the hood the binary writer always writes the ION_VERSION_MARKER_EVENT without being explicitly told to?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, thanks for catching this. Fixing in #111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Omit Ion identifier for pretty printing text

3 participants