Giter Site home page Giter Site logo

cargo-trim's Introduction

Namaste ๐Ÿ™


I am Saurav Sharma from Gaindakot, Nepal. I'm currently working as Software Engineer for Nepware

cargo-trim's People

Contributors

bors[bot] avatar dependabot-preview[bot] avatar dependabot-support avatar iamsauravsharma avatar mergify[bot] avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

fossabot sasanj

cargo-trim's Issues

error: failed to compile `cargo-trim v0.12.0`, intermediate artifacts can be found at `/tmp`

Compiling cargo-trim v0.12.0
Running CARGO=/usr/bin/cargo CARGO_BIN_NAME=cargo-trim CARGO_CRATE_NAME=cargo_trim CARGO_MANIFEST_DIR=/home/ui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-trim-0.12.0 CARGO_PKG_AUTHORS='Saurav Sharma <[email protected]>' CARGO_PKG_DESCRIPTION='Binary application to cleanup $CARGO_HOME cache' CARGO_PKG_HOMEPAGE='https://github.com/iamsauravsharma/cargo-trim' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cargo-trim CARGO_PKG_README=README.MD CARGO_PKG_REPOSITORY='https://github.com/iamsauravsharma/cargo-trim' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.12.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=12 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/tmp/release/deps:/usr/lib:/usr/local/lib' rustc --crate-name cargo_trim --edition=2021 /home/ui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-trim-0.12.0/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=82 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=c381750adbe784ee -C extra-filename=-c381750adbe784ee --out-dir /tmp/release/deps -L dependency=/tmp/release/deps --extern anyhow=/tmp/release/deps/libanyhow-a60fb1c10ff5107b.rlib --extern clap=/tmp/release/deps/libclap-0ed15af9cb751074.rlib --extern dirs_next=/tmp/release/deps/libdirs_next-965eb41931c35a33.rlib --extern owo_colors=/tmp/release/deps/libowo_colors-c6f764e0f0f49356.rlib --extern semver=/tmp/release/deps/libsemver-3d1f1c4b91246217.rlib --extern serde=/tmp/release/deps/libserde-0243c3ffa1f81bb7.rlib --extern serde_json=/tmp/release/deps/libserde_json-4c42410bf014b1d1.rlib --extern toml=/tmp/release/deps/libtoml-a7db627d3af50577.rlib --extern url=/tmp/release/deps/liburl-763bbeee4420d1ee.rlib --cap-lints warn
error: environment variable CARGO_HOME not defined at compile time
--> /home/ui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-trim-0.12.0/src/dir_path.rs:35:34
|
35 | let home_dir = Path::new(env!("CARGO_HOME")).to_path_buf();
| ^^^^^^^^^^^^^^^^^^
|
= help: Cargo sets build script variables at run time. Use std::env::var("CARGO_HOME") instead
= note: this error originates in the macro env (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile cargo-trim (bin "cargo-trim") due to previous error

Caused by:
process didn't exit successfully: CARGO=/usr/bin/cargo CARGO_BIN_NAME=cargo-trim CARGO_CRATE_NAME=cargo_trim CARGO_MANIFEST_DIR=/home/ui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-trim-0.12.0 CARGO_PKG_AUTHORS='Saurav Sharma <[email protected]>' CARGO_PKG_DESCRIPTION='Binary application to cleanup $CARGO_HOME cache' CARGO_PKG_HOMEPAGE='https://github.com/iamsauravsharma/cargo-trim' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=cargo-trim CARGO_PKG_README=README.MD CARGO_PKG_REPOSITORY='https://github.com/iamsauravsharma/cargo-trim' CARGO_PKG_RUST_VERSION='' CARGO_PKG_VERSION=0.12.0 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=12 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' CARGO_PRIMARY_PACKAGE=1 LD_LIBRARY_PATH='/tmp/release/deps:/usr/lib:/usr/local/lib' rustc --crate-name cargo_trim --edition=2021 /home/ui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-trim-0.12.0/src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=82 --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no -C metadata=c381750adbe784ee -C extra-filename=-c381750adbe784ee --out-dir /tmp/release/deps -L dependency=/tmp/release/deps --extern anyhow=/tmp/release/deps/libanyhow-a60fb1c10ff5107b.rlib --extern clap=/tmp/release/deps/libclap-0ed15af9cb751074.rlib --extern dirs_next=/tmp/release/deps/libdirs_next-965eb41931c35a33.rlib --extern owo_colors=/tmp/release/deps/libowo_colors-c6f764e0f0f49356.rlib --extern semver=/tmp/release/deps/libsemver-3d1f1c4b91246217.rlib --extern serde=/tmp/release/deps/libserde-0243c3ffa1f81bb7.rlib --extern serde_json=/tmp/release/deps/libserde_json-4c42410bf014b1d1.rlib --extern toml=/tmp/release/deps/libtoml-a7db627d3af50577.rlib --extern url=/tmp/release/deps/liburl-763bbeee4420d1ee.rlib --cap-lints warn (exit status: 1)
error: failed to compile cargo-trim v0.12.0, intermediate artifacts can be found at /tmp.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

Invalid symlinks in `git/checkouts` cause `cargo-trim` to quit, with a cryptic message.

Hi.
There was an invalid symlink in one of the projects in the git/checkouts:

> la $CARGO_HOME/git/checkouts/surfman-a5c700867c3db833/fb78226/android-example/app/src/main/jniLibs/arm64-v8a/

lrwxrwxrwx 82 10 Mar  2020 libsurfman_android_threads.so -> ../../../../../../target/aarch64-linux-android/debu/libsurfman_android_threads.so

This caused cargo-trim refusing to work:

> cargo trim list -a
Error: failed to get folder size

Caused by:
    No such file or directory (os error 2)

Of course removing the symlink, solved the problem.
As an after thought, I don't think there would any need to check for a symlink size.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.