Closed themighty1 closed 2 months ago
$ cargo tree -e normal,dev -i mio
mio v0.8.11
└── tokio v1.38.0
├── h2 v0.3.26
│ └── hyper v0.14.29
│ └── tls-server-fixture v0.0.0 (/home/epage/src/personal/dump/tlsn/components/tls/tls-server-fixture)
│ [dev-dependencies]
│ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
├── hyper v0.14.29 (*)
├── tls-server-fixture v0.0.0 (/home/epage/src/personal/dump/tlsn/components/tls/tls-server-fixture) (*)
├── tlsn-utils-aio v0.1.0 (https://github.com/tlsnotary/tlsn-utils?rev=51f313d#51f313d1)
│ ├── mpz-garble v0.1.0 (https://github.com/privacy-scaling-explorations/mpz?rev=9f7403b#9f7403be)
│ │ ├── tlsn-aead v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/aead)
│ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ ├── tlsn-block-cipher v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/cipher/block-cipher)
│ │ │ ├── tlsn-aead v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/aead) (*)
│ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ ├── tlsn-hmac-sha256 v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/prf/hmac-sha256)
│ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ ├── tlsn-key-exchange v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/key-exchange)
│ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ ├── tlsn-stream-cipher v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/cipher/stream-cipher)
│ │ │ ├── tlsn-aead v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/aead) (*)
│ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ ├── mpz-ot v0.1.0 (https://github.com/privacy-scaling-explorations/mpz?rev=9f7403b#9f7403be)
│ │ ├── mpz-garble v0.1.0 (https://github.com/privacy-scaling-explorations/mpz?rev=9f7403b#9f7403be) (*)
│ │ ├── mpz-share-conversion v0.1.0 (https://github.com/privacy-scaling-explorations/mpz?rev=9f7403b#9f7403be)
│ │ │ ├── tlsn-point-addition v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/point-addition)
│ │ │ │ ├── tlsn-key-exchange v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/key-exchange) (*)
│ │ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ │ ├── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ │ └── tlsn-universal-hash v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/universal-hash)
│ │ │ ├── tlsn-aead v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/aead) (*)
│ │ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ │ └── tlsn-key-exchange v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/key-exchange) (*)
│ │ [dev-dependencies]
│ │ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ ├── mpz-share-conversion v0.1.0 (https://github.com/privacy-scaling-explorations/mpz?rev=9f7403b#9f7403be) (*)
│ ├── tlsn-aead v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/aead) (*)
│ ├── tlsn-hmac-sha256 v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/prf/hmac-sha256) (*)
│ ├── tlsn-key-exchange v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/key-exchange) (*)
│ ├── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
│ └── uid-mux v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/uid-mux)
│ [dev-dependencies]
│ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
└── tokio-util v0.7.11
├── h2 v0.3.26 (*)
├── tls-server-fixture v0.0.0 (/home/epage/src/personal/dump/tlsn/components/tls/tls-server-fixture) (*)
├── tlsn-tls-client-async v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-client-async)
│ [dev-dependencies]
│ └── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
└── tlsn-utils-aio v0.1.0 (https://github.com/tlsnotary/tlsn-utils?rev=51f313d#51f313d1) (*)
[dev-dependencies]
└── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
[dev-dependencies]
└── tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
mio
is an optional dependency of tokio
if net
, process
, or signal
features are enabled
Helps if I look at the most basic output
❯ cargo tree -e dev
tlsn-tls-mpc v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-mpc)
[dev-dependencies]
├── mpz-ot v0.1.0 (https://github.com/privacy-scaling-explorations/mpz?rev=9f7403b#9f7403be)
├── tls-server-fixture v0.0.0 (/home/epage/src/personal/dump/tlsn/components/tls/tls-server-fixture)
├── tlsn-tls-client v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-client)
├── tlsn-tls-client-async v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/tls/tls-client-async)
├── tokio v1.38.0
├── tokio-util v0.7.11
├── tracing-subscriber v0.3.18
└── uid-mux v0.1.0-alpha.5 (/home/epage/src/personal/dump/tlsn/components/uid-mux)
Notice that this doesn't go any deeper. It looks like -e dev
doesn't show "what are my dependencies when I do a dev build" but include the dev edges". To see all of your dev-dependencies, you also have to look at their normal dependencies.
@epage , thanks for looking into this. I just want to make sure: are you confirming that this is a bug or is this the expected behaviour?
Note that if you run
cargo tree -e normal,dev,features | grep mio -A10 -B10
you will see this snippet
│ │ │ │ │ ├── tokio feature "default"
│ │ │ │ │ │ └── tokio v1.38.0
│ │ │ │ │ │ ├── mio v0.8.11
which shows that cargo thinks that mio
is a dep of tokio
with the default
feature.
This is wrong - mio
is an optional dep.
I don't know if this is a separate bug or whether it is related to this one.
I just want to make sure: are you confirming that this is a bug or is this the expected behaviour?
@ehuss, any thoughts on this? I can see both an argument for -e dev
only showing you direct dependencies, because that is literally what you asked for, but most likely the user intended to see the normal and build dependencies associated with their dev-dependencies.
Sorry I don't have a particularly good answer. In short, this is expected behavior. "Show dev-dependencies and their normal dependencies, but not my normal dependencies" wasn't a use case I think we considered (or at least seemed important).
Thanks for trying to resolve this but it seems to me like we started to talk past each other at some point, maybe because I didn't articulate my question precisely.
My question can be distilled into:
When comparing the output of -e normal,dev
and the concatenation of outputs from -e normal
and -e dev
, I can see that -e normal,dev
outputs some extra information (as per my OP).
So far I understood that:
-e dev
-> show my dev dependencies and don't go any deeper. (i.e. don't show the deps of my dev deps)
-e normal
-> show my normal deps and also the deps of my normal deps.
-e normal,dev
-> show my normal+dev deps and also the deps of all the normal+dev deps
So, the extra info shown by -e normal,dev
(which is not shown by concatenating -e normal
and -e dev
) is the deps of my dev deps?
Is that correct?
Yes, that sounds correct to me.
Thank you, it's all clear now.
Seems like the fact that mio
shows as a dependency of tokio
with the default
feature is an unrelated issue. I'll open a new issue for that.
Problem
The dependency is listed only when running
cargo tree -e normal,dev
. When running eithercargo tree -e normal
orcargo tree -e dev
it is not listed.Steps
To reproduce:
You will only see that the dependency was found on the first invocation of
cargo tree
but not found on the 2nd or the 3rd.Possible Solution(s)
No response
Notes
No response
Version