-
Notifications
You must be signed in to change notification settings - Fork 67
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
Conversation
There was a problem hiding this 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.
use trie_db::{ | ||
nibble_ops, NodeCodec, | ||
Trie, TrieConfiguration, | ||
TrieLayout, TrieMut, | ||
}; | ||
pub use trie_root::TrieStream; | ||
pub mod node { | ||
use trie_root::TrieStream; | ||
mod node { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
* master: Split trie-db test in a different crate. (#111)
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).