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

Add a component "analysis" #935

Closed
KalitaAlexey opened this issue Jan 27, 2017 · 15 comments
Closed

Add a component "analysis" #935

KalitaAlexey opened this issue Jan 27, 2017 · 15 comments

Comments

@KalitaAlexey
Copy link

KalitaAlexey commented Jan 27, 2017

Hi.

Currently RLS is under development.
It uses analysis from https://static.rust-lang.org/dist/index.html
It would be cool if I could execute rustup component add analysis
and each time I do rustup update it would update analysis's files.

How hard is it to implement?

Thanks

@Arnavion
Copy link

Arnavion commented Feb 3, 2017

If I'm reading this correctly, rustup can install anything that's listed in the channel manifest without needing any change. But the channel manifests currently don't list the analysis files.

@KalitaAlexey
Copy link
Author

@Arnavion,
I am sorry, but I don't understand you.

Could you write what steps I should do to make rustup install analysis files please?

@Arnavion
Copy link

Arnavion commented Feb 3, 2017

I'm saying you can't do anything in rustup to fix it. The list of components rustup can install comes from multirust-channel-manifest.toml and currently this file doesn't list the analysis files. So something probably needs to change in rust packaging to include the analysis files in this file.

Edit: Here, I think.

Edit 2: This commit seems to have added support for it. Not sure why latest nightly's manifest doesn't have it still. Maybe next one will have it.

@KalitaAlexey
Copy link
Author

@nrc,
Hi.
I have read Arnavion's comment, but I still don't get it.

@Arnavion
Copy link

Arnavion commented Feb 3, 2017

2017-02-03's nightly's manifest contains rust-analysis, but it's associated with the wrong target - all the entries are associated with x86_64-unknown-netbsd. Once that's fixed, rustup component add rust-analysis will start working.

@KalitaAlexey
Copy link
Author

@Arnavion,
That's cool.

@Arnavion
Copy link

Arnavion commented Feb 3, 2017

@KalitaAlexey For now, you can do this:

  1. rustup update nightly to get a nightly >= 2017-02-03
  2. Find ~/.rustup/toolchains/nightly-$triple/lib/rustlib/multirust-channel-manifest.toml
  3. Find the line for pkg = "rust-analysis" inside the section for your triple. Eg: I'm on x86_64-pc-windows-msvc so I found the one in the section named [[pkg.rust.target.x86_64-pc-windows-msvc.extensions]]. Change it from target = "x86_64-unknown-netbsd" to target = "$triple". Eg: I changed it to target = "x86_64-pc-windows-msvc"
  4. rustup component add rust-analysis. Now you should have the JSON files unpacked to ~/.rustup/toolchains/nightly-$triple/lib/rustlib/$triple/analysis

We'll also need to update RLS to use this path instead of its custom one.

@nrc
Copy link
Member

nrc commented Feb 6, 2017

This is work in progress, but I don't think there is anything left to do on the Rustup side (just RLS stuff to address).

@nrc nrc closed this as completed Feb 6, 2017
@KalitaAlexey
Copy link
Author

KalitaAlexey commented Feb 20, 2017

Hello @nrc,
Why does multirust-channel-manifest.toml have wrong target (x86_64-unknown-netbsd)?
I suppose it is the only problem between RLS and rustup.
I want to help.
Could you provide any guidance?

@nrc
Copy link
Member

nrc commented Feb 21, 2017

@KalitaAlexey this should be fixed now, I think there was a PR a while ago which addressed it.

@KalitaAlexey
Copy link
Author

@nrc,
To check that I should reinstall rustup and check the manifest, right?

@nrc
Copy link
Member

nrc commented Feb 21, 2017

I'm not entirely sure, I wouldn't think you need to reinstall Rustup, but perhaps?

@Arnavion
Copy link

Arnavion commented Feb 21, 2017

It was fixed for some time after my PR, but newer nightlies' manifests don't have the extension at all.

Edit: I assume this is because of the new release infra that doesn't use buildbot.

@Arnavion
Copy link

<Arnavion> acrichto or anyone else: With the new travis-based release infrastructure, is it that everything that used to be done by buildbot should now be done by `x.py dist` ?
<@acrichto> Arnavion: correct

So @nrc's change needs to be ported to x.py

@Arnavion
Copy link

rust-lang/rust#40082

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

3 participants