-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use rls-data crate #40554
Use rls-data crate #40554
Conversation
…rather than its own data structures
And remove a few data structures in favour of rls-data ones
And fix some warnings and borrow errors
Taken from https://github.com/rust-lang/rust/pull/40347/files And update rls-span to a version with the rustbuild boilerplate
Also adds a fixme and does cargo update
Seems reasonable to me, but Travis is uncovering what looks like legitimate errors. Similar to those on #40347, unsure if they're the exact same. Haven't found time to look into this :( |
Theory: Handlbars is being pulled in for some reason (something to do with Rustbook I think, it is not due to my changes) that in turn is pulling in lib log which due to the rustbuild boilerplate, marks itself as unstable, which breaks the rustbook build. |
I'm not sure why I didn't hit this locally? Maybe Rustbook is an optional component or something? |
Yes, handlebars is a dep of mdbook, which is a dep of rustbook. |
I've applied the fix we talked about on IRC to #40347, now let's just see if that lands... |
I made a similar change in the last commit here |
@bors: r+ |
📌 Commit 1d93a6c has been approved by |
Use rls-data crate This basically pulls out a bunch of data structures used by save-analysis for serialization into an external crate, and pulls that crate in using Rustbuild. The RLS can then share these data structures with the compiler which in some cases will allow more efficient communication between the compiler and the RLS (i.e., without serialisation). Along the way, I have to pull in rls-span, which is the RLS's way of defining spans (more type-safe than the compiler's built-in way). This is basically just to convert from compiler spans to RLS spans. I also pull in the crates.io version of rustc-serialize, which is a bit annoying, but seems to be the only way to have serialisable data in an external crate. To make this work, all of the save-analysis crate has to use this version too (cc rust-lang#40527). Finally I pull in a line from rust-lang#40347 to make the unstable crate checking stuff working. There are a lot of changes to save-analysis but they are all mechanical and trivial - changing from using `From` to `Into` (because of orphan rules) being the main thing. r? @alexcrichton
@nrc what happened here? |
Discussion is ongoing on that issue. We should still do it at some point, but it sounds complicated. I expect we leave that FIXME in for a while.... |
This basically pulls out a bunch of data structures used by save-analysis for serialization into an external crate, and pulls that crate in using Rustbuild. The RLS can then share these data structures with the compiler which in some cases will allow more efficient communication between the compiler and the RLS (i.e., without serialisation).
Along the way, I have to pull in rls-span, which is the RLS's way of defining spans (more type-safe than the compiler's built-in way). This is basically just to convert from compiler spans to RLS spans.
I also pull in the crates.io version of rustc-serialize, which is a bit annoying, but seems to be the only way to have serialisable data in an external crate. To make this work, all of the save-analysis crate has to use this version too (cc #40527).
Finally I pull in a line from #40347 to make the unstable crate checking stuff working.
There are a lot of changes to save-analysis but they are all mechanical and trivial - changing from using
From
toInto
(because of orphan rules) being the main thing.r? @alexcrichton