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

Split trie-db test in a different crate. #111

Merged
merged 4 commits into from
Jan 5, 2021

Conversation

cheme
Copy link
Contributor

@cheme cheme commented Aug 14, 2020

This PR propose to move trie-db test into crate trie-db-test crate to remove the cyclic dependency and reexport from reference-trie.

This is far from being ideal, but seems more extensible (I would like to move some fuzzer code into tests but the cyclic dependency makes it difficult).

@ordian ordian requested a review from dvdplm August 14, 2020 13:00
Copy link
Member

@ordian ordian left a comment

Choose a reason for hiding this comment

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

So the only downside is that we lose some doctests (was this the reason for the cyclic dependency in the first place)?

I think we can bite the bullet here and remove the cyclic dev-dependency.

Comment on lines 36 to 42
use trie_db::{
nibble_ops, NodeCodec,
Trie, TrieConfiguration,
TrieLayout, TrieMut,
};
pub use trie_root::TrieStream;
pub mod node {
use trie_root::TrieStream;
mod node {
Copy link
Member

@ordian ordian Jan 5, 2021

Choose a reason for hiding this comment

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

I'm not a fan of re-exports as well, but this is a test-support crate, and the re-exports improve ergonomics for some tests imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realize I misunderstood your comment (I did not put back the doc tests).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but in fact it would also need to reestablished the cyclic dependency. Nevermind.

@ordian ordian merged commit f72a465 into paritytech:master Jan 5, 2021
ordian added a commit that referenced this pull request Jan 5, 2021
* master:
  Split trie-db test in a different crate. (#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.

3 participants