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

Does not minify or remove tests and comments, regardless of command line parameters. #203

Open
bcmpinc opened this issue Sep 17, 2023 · 0 comments

Comments

@bcmpinc
Copy link

bcmpinc commented Sep 17, 2023

I tried using cargo-equip but no matter what I do it does not remove tests or comments.

I created a small test project, cargo-equip-bug.zip. When I run cargo equip --bin cargo-equip-bug --minify --remove docs the output I get is:

     Running `/home/bauke/.cargo/bin/rustup run nightly cargo udeps --output json -p cargo-equip-bug --bin cargo-equip-bug`
    Checking cargo-equip-bug v0.1.0 (/tmp/cargo-equip-bug)
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
info: Loading depinfo from "/tmp/cargo-equip-bug/target/debug/deps/cargo_equip_bug-fff717856e616173.d"
    Bundling the code
    Checking cargo-equip-check-output-v9rub87eoq2lw19m v0.0.0 (/tmp/cargo-equip-check-output-v9rub87eoq2lw19m)
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
#[allow(dead_code)]
pub mod a {
    pub struct A;

    #[cfg(test)]
    mod tests {
        #[test]
        fn it_works() {
            assert_eq!(2 + 2, 4);
        }
    }
}

// Comment
fn main() {
    println!("Hello, world!");
}

I would expect the output to not contain tests and comments.

Version info:

> rustup +nightly --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.74.0-nightly (7d9bce327 2023-09-16)`
> cargo equip --version
cargo-equip 0.20.2-alpha.1

I've tried with cargo-equip versions 0.15 to 0.20.1 as well, but get the same results.

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

No branches or pull requests

1 participant