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

Don't re-export items from the traits submodule in the storage module #751

Closed
wants to merge 5 commits into from

Conversation

james-chf
Copy link
Contributor

@james-chf james-chf commented Nov 7, 2022

This PR will be redone after #733

The motivation for this PR is to make it so that Sha256Hasher and StorageHasher are only importable in exactly one way outside of the crate::ledger::storage module. Currently, these two types are importable directly from crate::ledger::storage::traits but also re-exported in crate::ledger::storage as well, meaning they are arbitrarily imported throughout the codebase in different ways which can lead to merge conflicts. i.e.

pub use crate::ledger::storage::traits::{Sha256Hasher, StorageHasher};

This PR is currently changing the imports to work like so:

  • Sha256Hasher moved from crate::ledger::storage::traits to crate::ledger::storage (so now only importable via crate::ledger::storage)
  • StorageHasher is now only importable via crate::ledger::storage::traits

@james-chf james-chf force-pushed the james/mainline/fix-storage-imports branch from f1ee8b3 to 5d4fa05 Compare November 7, 2022 15:18
This should get rid of merge conflicts in imports in the future
regarding these items, as they will only be importable from one place.
@james-chf james-chf force-pushed the james/mainline/fix-storage-imports branch from 5d4fa05 to b31c0b6 Compare November 7, 2022 15:24
@james-chf
Copy link
Contributor Author

pls update wasm

@james-chf james-chf marked this pull request as ready for review November 7, 2022 18:27
@james-chf james-chf marked this pull request as draft November 8, 2022 10:27
@james-chf
Copy link
Contributor Author

pls update wasm

@james-chf james-chf marked this pull request as ready for review November 10, 2022 11:43
@james-chf james-chf marked this pull request as draft November 17, 2022 11:28
@james-chf james-chf closed this Dec 1, 2022
@james-chf james-chf deleted the james/mainline/fix-storage-imports branch December 1, 2022 16:57
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.

1 participant