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

fix incorrect serialization of some concrete types #193

Merged
merged 1 commit into from
Feb 27, 2022

Conversation

neveritt
Copy link
Contributor

@neveritt neveritt commented Jan 9, 2022

This PR addresses #191.

Changes

  • TheFixedSizeNumber or SignedNumber are now handled correctly in both readproto and writeprotoby converting based onattrib.ptyp`.
  • To keep the speedup of Make wiretypes into julia types and specialize methods on these types #188, I converted attrib.ptyp to the corresponding Julia type.
  • I added tests for a known value of concrete types (Int64, SignedNumber{Int64}...) and arrays of concrete types.

A minor fix of conversions of FixedSizeNumber and SignedNumber is also in this PR.

Notes

Note that the meta for dictionaries seem not to support FixedSizeNumber or SignedNumber

function mapentry_meta(typ::Type{Dict{K,V}}) where {K,V}

due to mapentry_meta being called with the julia type as argument, and only use that to set ProtoMetaAttribs, an issue that predates the issue introduced in #188.
Because of that I have not added tests for maps but I tried to ensure that readproto and writeproto can handle those cases once ProtoMetaAttribs is set correctly.

@codecov
Copy link

codecov bot commented Jan 9, 2022

Codecov Report

Merging #193 (7287f30) into master (0428aee) will increase coverage by 1.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
+ Coverage   67.95%   69.10%   +1.14%     
==========================================
  Files          19       19              
  Lines        2684     2690       +6     
==========================================
+ Hits         1824     1859      +35     
+ Misses        860      831      -29     
Impacted Files Coverage Δ
src/codec.jl 94.80% <100.00%> (+6.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0428aee...7287f30. Read the comment docs.

@tanmaykm tanmaykm merged commit d3b7140 into JuliaIO:master Feb 27, 2022
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