rust-lang / rls

Repository for the Rust Language Server (aka RLS)
Other
3.51k stars 257 forks source link

Don't serialise error data #25

Open nrc opened 8 years ago

nrc commented 8 years ago

We are running the compiler in-process, so we should just pass the data, rather than serialising it to JSON and then back again.

nrc commented 7 years ago

I'll look into this in the beta timeframe, but I don't think this should block necessarily. I'm not convinced we will see a meaningful perf improvement.

Xanewok commented 7 years ago

@nrc Is FIXME(#25) still relevant?

If so, how should it be implemented?

nrc commented 7 years ago

Yeah, the error message stuff is still relevant. I haven't thought in details how to fix it. I think that plan sounds reasonable. I'd prefer if we could just move the diagnostics to the RLS, rather that store them in an Arc-Mutex, but I suppose the threading causes issues.

Xanewok commented 7 years ago

I was thinking of returning owned Vec<Diagnostics> upwards, but use the Arc-Mutex only to share data across the RLS and rustc threads.

Xanewok commented 7 years ago

Looking at https://github.com/rust-lang/rust/issues/18579 now, should the Diagnostics be in the save-analysis data also?

nrc commented 7 years ago

I don't think they should - we have the information in JSON form, and they are a different kind of data made in a different place in the compiler, so there doesn't seem to be much benefit in combining them for now.

Xanewok commented 6 years ago

I worked mostly on the rls-analysis front to support multiple packages, but will get back to in a free moment. If someone wants to work on this before I get to it, ping me

ishitatsuyuki commented 6 years ago

Bump: RLS sets RUSTFLAGS just because this, and is causing rebuild for me.

Xanewok commented 5 years ago

As a note, if we decide to compile out-of-process this wouldn't be a problem anymore.