Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

RLS folder *very* large #706

Closed
Diggsey opened this issue Feb 8, 2018 · 6 comments
Closed

RLS folder *very* large #706

Diggsey opened this issue Feb 8, 2018 · 6 comments

Comments

@Diggsey
Copy link

Diggsey commented Feb 8, 2018

For a single project (stdweb) my target/rls/debug/incremental folder is 3 gigabytes. This is slightly ridiculous as the actual build folder is only 40 megabytes.

@alexheretic
Copy link
Member

I think this could be related to an issue I've noticed with how cargo can only clean everything or nothing. As I update nightly each new toolchain build grows the ./target without cleaning the older, now incompatible, artifacts.

Do you have multiple copies of the same dependencies in your ./target/rls/debug/deps/ dir?

libserde-c16b0598a5624a93.rlib
libserde_derive_internals-203237d4f98c1e3e.rlib
libserde-91d14d384fd088f6.rlib
libserde_derive_internals-dd6dec978df7e0fe.rlib

In general this may mean multiple versions are required to build the crate, but otherwise they're leftover from previous build toolchains.

I raised rust-lang/cargo#5026 to ask about improving the situation.

In the meantime the only option is to remove the ./target/rls directory (or cargo clean) and restart Rls, letting it rebuild to the size required by a single toolchain.

@Diggsey
Copy link
Author

Diggsey commented Feb 9, 2018

No my deps folder is only 16mb.

My target\rls\debug\incremental\stdweb-1fr38zfxlj5fd on the other hand contains 130 subfolders of about 20mb each.

@alexheretic
Copy link
Member

I guess it's a similar issue, if they are a range of different access times.

@nrc
Copy link
Member

nrc commented Feb 11, 2018

Hmm, it seems like the RLS is not doing some of the tidying up which either rustc or Cargo usually does for incremental compilation.

cc @michaelwoerister any idea what we're doing wrong here?

@michaelwoerister
Copy link
Member

Maybe the RLS driver somehow skips the garbage collection step?

@nrc
Copy link
Member

nrc commented Feb 16, 2018

Should be fixed by rust-lang/rust#48181

@nrc nrc closed this as completed Feb 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants