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

Replace external dependencies with re-exports when possible #1145

Open
SantiagoPittella opened this issue Feb 12, 2025 · 2 comments
Open

Replace external dependencies with re-exports when possible #1145

SantiagoPittella opened this issue Feb 12, 2025 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@SantiagoPittella
Copy link
Collaborator

SantiagoPittella commented Feb 12, 2025

What should be done?

In several places, we import dependencies that are already re-exported within our crate. For example, in crates/miden-objects/src/batch/note_tree.rs:

use miden_crypto::{
    hash::rpo::RpoDigest,
    merkle::{MerkleError, SimpleSmt},
};

Similarly, in crates/miden-objects/src/account/account_id/id_prefix.rs:

use miden_crypto::utils::ByteWriter;
use vm_core::{
    utils::{ByteReader, Deserializable, Serializable},
    Felt,
};
use vm_processor::DeserializationError;

These imports could be replaced with crate:: references where applicable.

How should it be done?

Wherever possible, external dependency imports should be replaced with their re-exported equivalents using crate::???. This helps maintain consistency and may allow us to remove unnecessary dependencies.

Once the replacements are made, tools like cargo-machete can help identify and remove unused dependencies.

When is this task done?

  • All eligible imports are replaced with crate:: references.
  • Any redundant dependencies are removed where possible.

Additional context

No response

@varun-doshi
Copy link
Contributor

I'd like to take this

@bobbinth
Copy link
Contributor

Thank you! It is yours!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants