-
Notifications
You must be signed in to change notification settings - Fork 49
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
Audit requirements may be overly strong when dealing with multiple root crates in a workspace #626
Comments
I've experimented a bit and it looks like using |
Unfortunately it does look like if you run the Does seem like |
`neqo-udp` is used in Firefox. Firefox uses `cargo vet` to audit its dependencies. `tokio`, the dependency of `neqo-udp`, is not audited as `safe-to-deploy`. `cargo vet` will require `safe-to-deploy` for `tokio` even when behind a feature flag. To work around this limitation in `cargo vet`, drop `tokio` dependency in `neqo-udp`, moving `tokio` specific logic into `neqo-bin`. See details in: - mozilla/cargo-vet#626 - https://bugzilla.mozilla.org/show_bug.cgi?id=1907810 - https://phabricator.services.mozilla.com/D212959#inline-1194604
`neqo-udp` is used in Firefox. Firefox uses `cargo vet` to audit its dependencies. `tokio`, the dependency of `neqo-udp`, is not audited as `safe-to-deploy`. `cargo vet` will require `safe-to-deploy` for `tokio` even when behind a feature flag. To work around this limitation in `cargo vet`, drop `tokio` dependency in `neqo-udp`, moving `tokio` specific logic into `neqo-bin`. See details in: - mozilla/cargo-vet#626 - https://bugzilla.mozilla.org/show_bug.cgi?id=1907810 - https://phabricator.services.mozilla.com/D212959#inline-1194604
* chore(neqo-udp): drop tokio dependency `neqo-udp` is used in Firefox. Firefox uses `cargo vet` to audit its dependencies. `tokio`, the dependency of `neqo-udp`, is not audited as `safe-to-deploy`. `cargo vet` will require `safe-to-deploy` for `tokio` even when behind a feature flag. To work around this limitation in `cargo vet`, drop `tokio` dependency in `neqo-udp`, moving `tokio` specific logic into `neqo-bin`. See details in: - mozilla/cargo-vet#626 - https://bugzilla.mozilla.org/show_bug.cgi?id=1907810 - https://phabricator.services.mozilla.com/D212959#inline-1194604 * Fix clippy & doc @mxinden please double-check --------- Co-authored-by: Lars Eggert <lars@eggert.org>
* chore(neqo-udp): drop tokio dependency `neqo-udp` is used in Firefox. Firefox uses `cargo vet` to audit its dependencies. `tokio`, the dependency of `neqo-udp`, is not audited as `safe-to-deploy`. `cargo vet` will require `safe-to-deploy` for `tokio` even when behind a feature flag. To work around this limitation in `cargo vet`, drop `tokio` dependency in `neqo-udp`, moving `tokio` specific logic into `neqo-bin`. See details in: - mozilla/cargo-vet#626 - https://bugzilla.mozilla.org/show_bug.cgi?id=1907810 - https://phabricator.services.mozilla.com/D212959#inline-1194604 * Fix clippy & doc @mxinden please double-check --------- Co-authored-by: Lars Eggert <lars@eggert.org>
This was noticed in https://bugzilla.mozilla.org/show_bug.cgi?id=1907810, specifically because of the changes in https://phabricator.services.mozilla.com/D212959#inline-1194604.
If we have multiple crates in the local workspace which have different audit requirements, it is possible for an overly strong requirement to be placed on an indirect dependency.
Specifically if we have a dependency graph like the following, where
W1
andW2
are toplevel workspace crates,D1
andD2
are third-party dependencies, whereD1
optionally depends onD2
.W1
does not enable this dependency butW2
does. IfW1
has stronger audit requirements thanW2
does, those stronger requirements can end up applying toD2
, as the twoD1
nodes are unified when runningcargo metadata
to have the combined feature set.Unfortunately, I don't think that the output of
cargo metadata
really provides a way to solve this ambiguity and get what the resolution would be for each workspace crate independently, such that we could treat the twoD1
dependencies as separate "nodes", to not propagate the same audit requirements to their dependencies.It might be possible if we didn't trust the dependency resolution done by cargo and implemented feature resolution ourselves, but that seems like it'd be both a lot of work, and likely to break as cargo updates and changes how feature resolution is handled.
The text was updated successfully, but these errors were encountered: