Skip to content
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

No indication of cargo metadata being run #3300

Closed
lnicola opened this issue Feb 24, 2020 · 1 comment · Fixed by #7193
Closed

No indication of cargo metadata being run #3300

lnicola opened this issue Feb 24, 2020 · 1 comment · Fixed by #7193

Comments

@lnicola
Copy link
Member

lnicola commented Feb 24, 2020

When we open a project, we run cargo metadata, then do something with its output, but there's no progress being shown before the "workspace loaded" notification. Loading the project is usually fast (a couple of seconds or less), but cargo metadata will sometimes want to update the registry index and download the dependencies.

Updating the registry can be especially slow, so we should put up a progress indicator just in case. As for knowing the current status, it prints text, not JSON:

warning: please specify `--format-version` flag explicitly to avoid compatibility problems
    Updating crates.io index
  Downloaded fuchsia-zircon v0.3.3
  Downloaded digest v0.8.1
  Downloaded time-macros-impl v0.1.0
[snip]
  Downloaded proc-macro-error v0.4.9
  Downloaded winapi v0.3.8
  Downloaded 168 crates (16.0 MB) in 1.67s (largest was `winapi-x86_64-pc-windows-gnu` at 2.9 MB)
{"packages":[{"name":"thread_local","version":"1.0.1","id":"thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)","license":"Apache-2.0/MIT","license_file":null,"description":"Per-object thread-local storage","source":"registry+https://github.com/rust-lang/crates.io-index","

Related to #3283.

@lnicola
Copy link
Member Author

lnicola commented Jul 13, 2020

Triage: this still happens. Nuke ~/.cargo/registry and load a project to reproduce.

bors bot added a commit that referenced this issue Jan 7, 2021
7191: Adjust vfs crate documentation r=matklad a=arnaudgolfouse

This removes an outdated comment, and uses intra-doc links

7193: Show progress for fetching workspace (cargo-metadata and loadOutDirsFromCheck) r=matklad a=edwin0cheng


![Peek 2021-01-07 21-57](https://user-images.githubusercontent.com/11014119/103902132-0db4c780-5135-11eb-94d3-32429445be87.gif)


Fixes #7188 
Fixes #3300

Co-authored-by: Arnaud <arnaud.golfouse@free.fr>
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
@bors bors bot closed this as completed in 4ddf075 Jan 7, 2021
@bors bors bot closed this as completed in #7193 Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant