orium / rpds

Rust persistent data structures
Mozilla Public License 2.0
1.28k stars 58 forks source link

Implement serde for rpds types (optional dependency) #2

Closed idupree closed 6 years ago

idupree commented 6 years ago

This patch set adds serde as an optional dependency; serialization/deserialization code isn't compiled if it's not used. Addresses issue #1

You can run tests that include serialization/deserialization code using

cargo test --features serde

or more likely if you want the tests to finish somewhat promptly,

cargo test --release --features serde
codecov-io commented 6 years ago

Codecov Report

Merging #2 into master will increase coverage by 0.74%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #2      +/-   ##
==========================================
+ Coverage   93.84%   94.58%   +0.74%     
==========================================
  Files          11       11              
  Lines        1949     1940       -9     
==========================================
+ Hits         1829     1835       +6     
+ Misses        120      105      -15
Impacted Files Coverage Δ
src/set/red_black_tree_set/mod.rs 95.23% <ø> (ø) :arrow_up:
src/set/hash_trie_set/mod.rs 95.08% <ø> (ø) :arrow_up:
src/lib.rs 100% <ø> (ø) :arrow_up:
src/queue/mod.rs 90% <ø> (+0.83%) :arrow_up:
src/stack/mod.rs 96.72% <ø> (ø) :arrow_up:
src/map/red_black_tree_map/mod.rs 93.3% <ø> (+1.28%) :arrow_up:
src/map/hash_trie_map/mod.rs 96.36% <ø> (+0.47%) :arrow_up:
src/sequence/vector/mod.rs 95.79% <ø> (+0.81%) :arrow_up:
src/sequence/list/mod.rs 92.96% <ø> (+0.05%) :arrow_up:
... and 4 more

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 7382032...7b476c3. Read the comment docs.

orium commented 6 years ago

Great work! Just a couple things missing: Make travis test the serialization. Also add --features serde to tools/codecov.sh.

idupree commented 6 years ago

Thanks! Do you have any preference between me adding more commits or rebasing to fix my existing commits?

orium commented 6 years ago

Yes. Rebase so that the history is all nice and clean.

idupree commented 6 years ago

Should travis run cargo build/test/bench/doc both with and without serde, or with serde only?

idupree commented 6 years ago

Creating a new pull request with fixed version

idupree commented 6 years ago

See pull request #3 for the second submission of this patch set

idupree commented 6 years ago

closing because superseded by #3