-
Notifications
You must be signed in to change notification settings - Fork 257
Easy to use indexing of std libs #88
Comments
Why you can't just use an |
The metadata in the rlib is technically what we need but it is hard to read (we'd basically need to link the compiler to decode it) and is an implementation detail and thus can change at any moment. The save-analysis metadata is basically the same information but with a layer of abstraction, thus easy to read and fundamentally stable. |
Hm, you already are using an in-process rustc?
If it is more or less stable in practice, then perhaps it is possible to write a translator from rlib to save-analysis format. I don't know the amount of work here, but it will be the most convenient form for the users, because they won't need to download/install additional stuff. Custom build stdlibs would also work, which is a nice little benefit, as well as an ability to work with hypothetical closed source binary only crates. |
Only when we don't have the save-analysis data already
It is not
I don't think there is much more convenience for users - they have to wait for a translation step vs waiting for a download - either is just a wait, everything else should be automatic. Long term, the save-analysis data should be distrbuted with the libs, so there would not even be an extra download.
If custom building then you can just output save-analysis, no issue there |
planning:
|
Changing milestone since we've now done everything intended for the alpha |
Working on rustup distribution of data. Hopefully, we don't actually need to modify rustup at all, just provide the right manifests. Unfortunately, we need to do that for the current (Buildbot) and future (Travis) systems. rust-lang-deprecated/rust-buildbot#150 should address the current system. When rust-lang/rust#39284 lands, we'll need to add a line for the analysis data. |
@nrc Both of the mentioned pull requests have merged. |
Changes for the new system: rust-lang/rust#40026 |
Rustup now downloads the data and rls-analysis manages it. We are done for alpha 2 (modulo any bugs discovered). Remaining:
|
Rustup can now fetch and install the rls, rust-analysis, and rust-src. Good enough for beta. |
This means building and distributing save-analysis info for std libs and making RLS find and use that info. The tricky part if that it must exactly match the installed libraries. I expect this will need Rustup or Cargo integration.
I don't think we necessarily need all of this to work for the alpha release, but we it should be easier than it is now (we can't require users to build their own compiler and libs) and we should have a good plan for the long term solution.
The text was updated successfully, but these errors were encountered: