Skip to content

Vendoring a project with no dependencies leads to misleading output #7473

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

Closed
Firstyear opened this issue Oct 3, 2019 · 1 comment · Fixed by #10161
Closed

Vendoring a project with no dependencies leads to misleading output #7473

Firstyear opened this issue Oct 3, 2019 · 1 comment · Fixed by #10161
Labels

Comments

@Firstyear
Copy link
Contributor

Problem
When using cargo vendor on a project with no deps, the output is misleading:

 cargo vendor
To use vendored sources, add this to your .cargo/config for this project:

[source.vendored-sources]
directory = "/Users/william/development/389ds/ds/src/libsds/vendor"

Possible Solution(s)
This should state:

  • No dependencies were found
  • Suggest no changes to .cargo/config

Output of cargo version:
1.38, 1.38

@Firstyear
Copy link
Contributor Author

Firstyear commented Oct 7, 2019

To help explain - because there were no dependencies no vendor directory was created, but it looked like cargo vendor had "done something" suggesting to add a vendor dir to your configuration. This mislead me to thinking cargo vendor was "not working" until I realised that the reason was the single sub-projects lack of dependencies.

What also then would help is if the output says what command flags are needed to cargo build to use the vendored sources, because I'm using --offline --locked, but still not sure that's correct ....

edit: hit update too soon.

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

Successfully merging a pull request may close this issue.

2 participants