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

Idea: cargo crev expand <crate> [<version>] #89

Open
dpc opened this issue Dec 21, 2018 · 3 comments
Open

Idea: cargo crev expand <crate> [<version>] #89

dpc opened this issue Dec 21, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@dpc
Copy link
Collaborator

dpc commented Dec 21, 2018

We could cargo-expand for allowing reviewing the crate code conveniently without having to cd to a given directory.

We should probably expand build.rs and any other file like this too.

@dpc dpc changed the title Idea: cargo crev expand <crate> [<version] Idea: cargo crev expand <crate> [<version>] Dec 23, 2018
@dpc dpc added the enhancement New feature or request label Dec 23, 2018
@dpc
Copy link
Collaborator Author

dpc commented Feb 14, 2019

@dtolnay
Copy link

dtolnay commented Mar 3, 2019

@dpc
Copy link
Collaborator Author

dpc commented Jan 15, 2022

I have implemented a prototype version of this in d5aec67, but it looks like it will lose all the formatting and comments?

> cargo run --release -- crev crate expand -u foo
    Finished release [optimized] target(s) in 0.12s
     Running `target/release/cargo-crev crev crate expand -u foo`
# [cfg (test)] mod tests { # [test] fn it_works () { assert_eq ! (2 + 2 , 4) ; } }
> cat /home/dpc/.cargo/registry/src/github.com-1ecc6299db9ec823/foo-0.0.0/src/lib.rs 
#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants