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

Add no_std + alloc support, refactoring persistence #48

Merged
merged 3 commits into from
May 3, 2018

Conversation

ZackPierce
Copy link
Contributor

@ZackPierce ZackPierce commented Apr 25, 2018

Pursuant to #47

Three related kinds of changes were necessary:

  • The failure seed persistence system was made into a generic trait, FailurePersistence, of which FileFailurePersistence (the legacy enum of file-lookup-related-variants) is one available option.
  • Innumerable uses of standard library code were either replaced with core-based alternatives, often conditionally.
  • New features were added to manage conditional compilation and dependency features: "std", "nightly", and "alloc". Currently the only sensible combinations are either "std" (the default) or "nightly" and "alloc" but not "std."

I'm not a fan of the verbosity necessary to manage all the conditional uses, but I didn't see any non-magical alternative.

A few nonessential changes may have snuck in due to auto-rustfmt'ing. If any are problematic, I'd be happy to roll them back.

CC: @AltSysrq

Copy link
Collaborator

@AltSysrq AltSysrq left a comment

Choose a reason for hiding this comment

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

I have one question, but other than that this looks great! Thanks for taking the time to make this contribution.

use std::collections::{BTreeMap, BTreeSet};

/// Failure persistence option that loads and saves seeds in memory
/// on the heap.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you expand in the docs on how this would be useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing! Updated in an additional commit.

@ZackPierce
Copy link
Contributor Author

Some additional fixes had to be made to account for changes in nightly that removed access to some float-related methods (see: rust-lang/rust#49896 ) . All checks are green now.

@ZackPierce
Copy link
Contributor Author

@AltSysrq Ping for prospective approval/merge/version-bump/glory.

@AltSysrq
Copy link
Collaborator

AltSysrq commented May 3, 2018

Sorry for the delay. Latest changes look good, so I'll see about getting this out now.

@AltSysrq AltSysrq merged commit be8e86b into proptest-rs:master May 3, 2018
@ZackPierce
Copy link
Contributor Author

Awesome, thank you!

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.

None yet

2 participants