Git Product home page Git Product logo

Comments (6)

qryxip avatar qryxip commented on August 16, 2024 1

I've just noticed the --output json option is not documented at all. Maybe we should write some descriptions.

from cargo-udeps.

est31 avatar est31 commented on August 16, 2024

Might be one of the known false positives? The cli version shows a warning that this is possible.

from cargo-udeps.

nagisa avatar nagisa commented on August 16, 2024

Note that there are no reported unused dependencies, all of the normal, development and build arrays for that crate are empty. Furthermore json contains both success: true and udeps' exit code is 0.

from cargo-udeps.

nagisa avatar nagisa commented on August 16, 2024

All in all it is fairly low prio to fix, just something I noticed and found weird.

from cargo-udeps.

qryxip avatar qryxip commented on August 16, 2024

I've found the cause. It checks if the dependency is ignored after inserting ([], [], []).

cargo-udeps/src/lib.rs

Lines 473 to 485 in 13ea330

if !used_dependencies.contains(&(id, dependency)) {
let outcome = outcome
.unused_deps
.entry(id)
.or_insert(OutcomeUnusedDeps::new(packages[&id].manifest_path())?)
.unused_deps_mut(*kind);
if ignore.map_or(false, |ignore| ignore.contains(*kind, dependency)) {
config.shell().info(format_args!("Ignoring `{}` ({:?})", dependency, kind))?;
} else {
outcome.insert(dependency);
}
}

I don't remember the reason why we pass ([], [], []).

(edit) I mean, why we considered ([], [], []) was possible before #59.

cargo-udeps/src/lib.rs

Lines 489 to 494 in 13ea330

outcome.success = outcome
.unused_deps
.values()
.all(|OutcomeUnusedDeps { normal, development, build, .. }| {
normal.is_empty() && development.is_empty() && build.is_empty()
});

from cargo-udeps.

qryxip avatar qryxip commented on August 16, 2024

Either way this issue is actually weird and should be fixed.

from cargo-udeps.

Related Issues (20)

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.