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

Use rls-data crate #40554

Merged
merged 8 commits into from
Mar 20, 2017
Merged

Use rls-data crate #40554

merged 8 commits into from
Mar 20, 2017

Conversation

nrc
Copy link
Member

@nrc nrc commented Mar 15, 2017

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 to Into (because of orphan rules) being the main thing.

r? @alexcrichton

@alexcrichton
Copy link
Member

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 :(

@nrc
Copy link
Member Author

nrc commented Mar 16, 2017

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.

@nrc
Copy link
Member Author

nrc commented Mar 16, 2017

I'm not sure why I didn't hit this locally? Maybe Rustbook is an optional component or something?

@steveklabnik
Copy link
Member

Handlbars is being pulled in for some reason (something to do with Rustbook I think, it is not due to my changes)

Yes, handlebars is a dep of mdbook, which is a dep of rustbook.

@alexcrichton
Copy link
Member

I've applied the fix we talked about on IRC to #40347, now let's just see if that lands...

@nrc
Copy link
Member Author

nrc commented Mar 16, 2017

I made a similar change in the last commit here

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 16, 2017

📌 Commit 1d93a6c has been approved by alexcrichton

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 20, 2017
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
bors added a commit that referenced this pull request Mar 20, 2017
Rollup of 9 pull requests

- Successful merges: #40241, #40281, #40398, #40521, #40532, #40554, #40566, #40581, #40587
- Failed merges:
@bors bors merged commit 1d93a6c into rust-lang:master Mar 20, 2017
@alexcrichton
Copy link
Member

@nrc what happened here?

@nrc
Copy link
Member Author

nrc commented Mar 22, 2017

@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....

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.

4 participants