Skip to content

[minor] confusing output when vendored dependencies are outdated #14320

Open
@Firstyear

Description

Problem

Attempting to build a project lately I got the error:

# cargo test
error: no matching package named `autotools` found
location searched: registry `crates-io`
required by package `tss-esapi-sys v0.5.0 (/home/.../rust-tss-esapi/tss-esapi-sys)`

This confused me for quite some time, and eventually I realised it was because I had vendored the project in the past, and so the vendor directory didn't contain autotools as needed.

Steps

  1. vendor into a project
  2. add a dependency
  3. cargo test

Possible Solution(s)

I think a minor text change here would make it clearer to the user that vendoring is in use and is the reason why the dependency can't be found. For example:

# cargo test
error: no matching package named `autotools` found in vendored dependencies.
location searched: registry `crates-io` (vendored)
required by package `tss-esapi-sys v0.5.0 (/home/.../rust-tss-esapi/tss-esapi-sys)`

This might help indicate to the user that vendoring could be involved.

Notes

No response

Version

# cargo version --verbose
cargo 1.80.0 (376290515 2024-07-16)
release: 1.80.0
commit-hash: 37629051518c3df9ac2c1744589362a02ecafa99
commit-date: 2024-07-16
host: x86_64-unknown-linux-gnu
libgit2: 1.7.2 (sys:0.18.3 vendored)
libcurl: 8.6.0-DEV (sys:0.4.72+curl-8.6.0 vendored ssl:OpenSSL/1.1.1w)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: openSUSE 20240716.0.0 [64-bit]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-bugCategory: bugCommand-vendorS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions