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

reuse cargo check/build build.rs results? #753

Closed
Dushistov opened this Issue Mar 6, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@Dushistov
Copy link

Dushistov commented Mar 6, 2018

One of crate that I use inside workspace is fork of servo skia.

Ok, workspace looks like is not really supported (I mean idea to build crates only once per workspace), according to #730 .

But even if I use servo skia as standalone crate,
without any workspace, then rls actually rebuild huge c++ library again:

target/rls/debug/build/servo-skia-6107f1eccc85d461/out/lib/libskia.a
target/rls/debug/build/servo-skia-6107f1eccc85d461/out/build/libskia.a
target/debug/build/servo-skia-6107f1eccc85d461/out/lib/libskia.a
target/debug/build/servo-skia-6107f1eccc85d461/out/build/libskia.a

as can you see cargo check / cargo build shares one directory: target/debug,
and rls use another one target/rls and rebuild c++ library again, because of building of skia is part of build.rs.

Is it possible to reuse results of build.rs from target/debug?

@nrc

This comment has been minimized.

Copy link
Member

nrc commented Mar 8, 2018

We basically can't share data between RLS and non-RLS because the RLS builds are done with a custom compiler and with different flags. Even if we did try to unify the two, it could mean that a user could cause there CLI use of Cargo to rebuild due to the RLS needing to rebuild or vice versa (and also there mightbe changes that the RLS doesn't know about so doesn't rebuild when it should). All in all, it seems much simpler if we keep builds separate. It is pretty annoying when it means artefacts like this can't be shared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.