Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes incorrect handling of SID 0 as symbol text #515

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

popematt
Copy link
Contributor

Issue #, if available:

None.

Description of changes:

  • Changes the system symbol constants to be Option<&str> and changes SID $0 to None rather than "$0"
  • Propagate SID $0 through the text writers as a RawSymbolToken or RawSymbolTokenRef rather than forcing all symbols to be converted to text.
  • Updates round_trip_skip_list() in element_test_vector.rs to no longer skip SID 0 test cases.

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

@popematt popematt requested a review from zslayton April 21, 2023 13:39
@codecov
Copy link

codecov bot commented Apr 21, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.20 🎉

Comparison is base (049da35) 88.69% compared to head (86f3336) 88.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #515      +/-   ##
==========================================
+ Coverage   88.69%   88.90%   +0.20%     
==========================================
  Files          81       81              
  Lines       12888    12885       -3     
==========================================
+ Hits        11431    11455      +24     
+ Misses       1457     1430      -27     
Impacted Files Coverage Δ
src/symbol_table.rs 91.66% <100.00%> (+13.33%) ⬆️
src/system_reader.rs 85.42% <100.00%> (ø)
src/text/raw_text_writer.rs 96.75% <100.00%> (+0.54%) ⬆️
src/text/text_formatter.rs 58.86% <100.00%> (+0.24%) ⬆️
src/text/text_writer.rs 95.45% <100.00%> (+3.14%) ⬆️

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@zslayton zslayton left a comment

Choose a reason for hiding this comment

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

Excellent! I see a couple of other things that would be nice to address while you're making changes to this code if you don't mind.

src/symbol_table.rs Outdated Show resolved Hide resolved
src/text/text_writer.rs Outdated Show resolved Hide resolved
src/text/text_writer.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@zslayton zslayton left a comment

Choose a reason for hiding this comment

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

🚀

@popematt popematt merged commit 4ccb027 into amazon-ion:main Apr 21, 2023
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.

2 participants