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

Warn when tools are missing and allow to override #1337

Merged
merged 3 commits into from Jan 16, 2018

Conversation

nrc
Copy link
Member

@nrc nrc commented Jan 11, 2018

Closes #1277

Idea here is to not update if the RLS is missing (for example). There was actually functionality to do this already, but it was not catching the RLS and Rustfmt since they were missing in an unexpected way.

The second commit adds rustup update --force to update even if some components are missing

r? @alexcrichton

There is a lot of refactoring here too.

There was a check to ensure that if there are components that we plan to install (or update) that are missing from the manifest, then we error out. However, this only worked for components that had an entry in the manifest under the Rust package, but were missing components of their own. For tools like the RLS, when they are missing, they are completely missing from the manifest. They therefore didn't get picked up by the check. This patch adds an extra Vec to track such components and then warns about them.
@alexcrichton
Copy link
Member

Looks good to me! I think though that the added test may be failing?

This adds a new test and removes test `update_removes_components_that_dont_exist`

Historically, this test was added before the check that aborts update on missing
components (which is tested by the new test in the previous commit, as well as
elsewhere), so I think this test was only testing a bug.

Note that the new behaviour is the same as the ancient behviour when the user
uses `--force`
@nrc
Copy link
Member Author

nrc commented Jan 15, 2018

OK, looks like we're passing tests now (I guess Travis is stuck or got bored or something).

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 15, 2018

📌 Commit dcf0f9d has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Jan 15, 2018

⌛ Testing commit dcf0f9d with merge 22f1569...

bors added a commit that referenced this pull request Jan 15, 2018
Warn when tools are missing and allow to override

Closes #1277

Idea here is to not update if the RLS is missing (for example). There was actually functionality to do this already, but it was not catching the RLS and Rustfmt since they were missing in an unexpected way.

The second commit adds `rustup update --force` to update even if some components are missing

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Jan 16, 2018

💥 Test timed out

@alexcrichton
Copy link
Member

alexcrichton commented Jan 16, 2018 via email

@bors
Copy link
Contributor

bors commented Jan 16, 2018

⌛ Testing commit dcf0f9d with merge afbeeaf...

bors added a commit that referenced this pull request Jan 16, 2018
Warn when tools are missing and allow to override

Closes #1277

Idea here is to not update if the RLS is missing (for example). There was actually functionality to do this already, but it was not catching the RLS and Rustfmt since they were missing in an unexpected way.

The second commit adds `rustup update --force` to update even if some components are missing

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Jan 16, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing afbeeaf to master...

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

Successfully merging this pull request may close these issues.

None yet

3 participants