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

Check for component included without installing toolchain? #1676

Closed
brackleian opened this issue Mar 2, 2019 · 6 comments
Closed

Check for component included without installing toolchain? #1676

brackleian opened this issue Mar 2, 2019 · 6 comments

Comments

@brackleian
Copy link

I guess this is a feature request rather than a bug; it may already be doable but I can't find out how.

Is it possible to check for a given component being included in a given toolchain, without actually downloading the whole toolchain? E.g. I'm using 'rls', which is in some nightly builds but not all. To get the latest, I have to work backwards from today's date. Installing the whole toolchain takes significant time, after which I have to uninstall it if it wasn't the right one.

Perhaps a textual list of included components could be stored on the toolchain host alongside each build; I don't mind having to query it with wget.

@ehuss
Copy link
Contributor

ehuss commented Mar 2, 2019

I'm not sure if this will help for your case, but you can check https://rust-lang-nursery.github.io/rust-toolstate/ or https://mexus.github.io/rustup-components-history/ to find when the last working build was.

@norru
Copy link

norru commented Mar 2, 2019

Hello,

I think it would be useful to have a look at the discussion at rust-lang/rls#1221. There have been reports of users finding the current rustup behaviour not friendly in this use case, with a couple of suggestions of how this could be easily solved.

Here's an excerpt from that conversation, hope it helps:

we do expect RLS to be sometimes unavailable on the nightly channel

This user experience is not good. IMHO it would be better if either rustup only downloaded nightlies with all components I have installed or if rustup told me I'm "up-to-date". But failing is really quite bad.
@alexheretic
Member
alexheretic commented on Jan 8 •

This user experience is not good. IMHO it would be better if either rustup only downloaded nightlies with all components I have installed or if rustup told me I'm "up-to-date". But failing is really quite bad.

When the latest nightly is missing components you have installed, rustup will fail the update and tell you this, is that what you're talking about? This protects rustup users from RLS, etc disappearing and it's quite useful.

If that's working for you, do you just disagree with the message and exit code? If you have bugs/ideas for rustup I'd suggest raising an issue or looking over the discussion in rust-lang/rustup.rs.

rustup does the former and if it were to do the second it would be lying (it would be telling you you're up to date when you aren't).

Currently rustup does nothing as far as I understood. Does it actually download the latest possible version? In that case I was simply confused by the error message.

rustup update --with-existing-components would have to figure out which components I have installed in nightly, figure out which ones are available in the latest N nightlies, detect, say nightly-2019-01-01 matches the criteria, then "transparently" sync the nightly "head" to that version.

This sounds like the least surprising behavior for rustup update. This is what cargo update would do with my project for example. Find the latest possible working configuration and update to that.

@norru
Copy link

norru commented Mar 2, 2019

@kinnison
Copy link
Contributor

kinnison commented Mar 3, 2019

This is a feature request, certainly. I think that @nrc's profiles stuff (#1673) might be a step toward a good mechanism for this.

@RalfJung
Copy link
Member

RalfJung commented Jun 4, 2019

This is subsumed by #1501.

jonhoo added a commit to jonhoo/rustup.rs that referenced this issue Sep 16, 2019
Previously, if the user had components installed on `nightly` which were
not available for the latest nightly, `rustup update` would not update
the user's nightly at all. With this patch, rustup will try
progressively older nightlies until it finds a nightly that supports all
the components the user has installed for their current nightly.

Fixes rust-lang#1628.
Makes progress towards rust-lang#1501.
Fixes the underlying issue in rust-lang#1676.
jonhoo added a commit to jonhoo/rustup.rs that referenced this issue Sep 16, 2019
Previously, if the user had components installed on `nightly` which were
not available for the latest nightly, `rustup update` would not update
the user's nightly at all. With this patch, rustup will try
progressively older nightlies until it finds a nightly that supports all
the components the user has installed for their current nightly.

Fixes rust-lang#1628.
Makes progress towards rust-lang#1501.
Fixes the underlying issue in rust-lang#1676.
@jonhoo
Copy link
Contributor

jonhoo commented Sep 16, 2019

The underlying issue you're experiencing should be fixed by #1997 :)

jonhoo added a commit to jonhoo/rustup.rs that referenced this issue Sep 17, 2019
Previously, if the user had components installed on `nightly` which were
not available for the latest nightly, `rustup update` would not update
the user's nightly at all. With this patch, rustup will try
progressively older nightlies until it finds a nightly that supports all
the components the user has installed for their current nightly.

Fixes rust-lang#1628.
Makes progress towards rust-lang#1501.
Fixes the underlying issue in rust-lang#1676.
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

No branches or pull requests

6 participants