Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Doesn't detect inverse tree when sub crate of workspace is the leaf #43

Open
Boscop opened this issue Jul 25, 2018 · 0 comments
Open

Doesn't detect inverse tree when sub crate of workspace is the leaf #43

Boscop opened this issue Jul 25, 2018 · 0 comments

Comments

@Boscop
Copy link

Boscop commented Jul 25, 2018

I tried running cargo-tree on my workspace's top level crate:

> cargo tree -i -p fs2
error: There are multiple `fs2` packages in your project, and the specification `fs2` is ambiguous.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
  fs2:0.2.5
  fs2:0.4.3


> cargo tree -i -p fs2:0.2.5
thread 'main' panicked at 'no entry found for key', libcore\option.rs:914:5
stack backtrace:


> cargo tree -i -p fs2:0.4.3
fs2 v0.4.3
└── rustbreak v1.3.0 (https://github.com/TheNeikos/rustbreak?rev=561c203#561c2031)
    ├── db v0.1.0 (file:///D:/projects/myproject/db)
    │   ├── core_types v0.1.0 (file:///D:/projects/myproject/core_types)
    │   │   ├── myproject v0.1.0 (file:///D:/projects/myproject)
    │   │   ├── webui v0.1.0 (file:///D:/projects/myproject/webui)
    │   │   │   └── myproject v0.1.0 (file:///D:/projects/myproject) (*)
    │   │   └── window v0.1.0 (file:///D:/projects/myproject/window)
    │   │       └── myproject v0.1.0 (file:///D:/projects/myproject) (*)
    │   ├── similar_tracks v0.1.0 (file:///D:/projects/myproject/similar_tracks)
    │   │   └── myproject v0.1.0 (file:///D:/projects/myproject) (*)
    │   ├── myproject v0.1.0 (file:///D:/projects/myproject) (*)
    │   └── window v0.1.0 (file:///D:/projects/myproject/window) (*)
    └── myproject v0.1.0 (file:///D:/projects/myproject) (*)

But in Cargo.lock, I have:

[[package]]
name = "window"
version = "0.1.0"
dependencies = [
 "bidir-map 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "core_types 0.1.0",
 "db 0.1.0",
 "derive-new 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "escapi 0.1.0 (git+https://github.com/Boscop/escapi-rs)",
 "fps-loop 0.1.0",
 "glium 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
 "mozjpeg-sys 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)",
 "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
 "palette 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
 "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)",
 "shortmsg 0.1.0",
 "smart-default 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "type-name 0.1.0",
]

[[package]]
name = "glium"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
 "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "gl_generator 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "glutin 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
 "smallvec 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "glutin"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "cocoa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "core-graphics 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "dwmapi-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "gdi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "gl_generator 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
 "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "osmesa-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
 "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "user32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "wayland-client 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 "winit 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "x11-dl 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "winit"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "cocoa 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "core-graphics 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "dwmapi-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "gdi32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
 "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
 "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "tempfile 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "user32-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "wayland-client 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
 "wayland-kbd 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "wayland-protocols 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
 "wayland-window 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
 "x11-dl 2.18.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "wayland-kbd"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "dlib 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
 "memmap 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "wayland-client 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "memmap"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "fs2 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]

So clearly, fs2 0.2.5 is used by winit, glutin, glium etc.!
Btw, glium is used by the window sub crate, not by the workspace's top level crate (myproject).
So why can't cargo-tree detect this tree? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant