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

RLS and cargo check run sometimes unnecesary build.rs steps #6834

Closed
robmv opened this issue Apr 9, 2019 · 3 comments
Closed

RLS and cargo check run sometimes unnecesary build.rs steps #6834

robmv opened this issue Apr 9, 2019 · 3 comments
Labels
A-build-scripts Area: build.rs scripts C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@robmv
Copy link

robmv commented Apr 9, 2019

When running an IDE using RLS or just running cargo check, some large projects using crates that have big static builds of non Rust based native libraries, the build.rs of those dependencies run a complete build of the non Rust code.

One example is openssl, when using it in vendored mode, takes a lot of time to get feedback on an IDE because it will build openssl entirely, something it isn't needed for getting the information RLS or cargo check needs, they don't need a complete build of those crates.

Maybe standardizing some kind of environment variable passed to the build.rs program could tell these dependencies that the build is being run for RLS or cargo check, and these scripts could be updated to be smarter, avoiding the native build in these circumstances.

This will require cooperation of build.rs users but it is better than than the current status where an IDE takes too much time to give some feedback.

@ehuss ehuss added A-build-scripts Area: build.rs scripts C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` labels Apr 10, 2019
@nox
Copy link
Contributor

nox commented Oct 20, 2019

This is also a big issue for Servo, where we have to build SpiderMonkey, osmesa, skia, angle, and a bunch of other C++ projects, which takes a lot of time.

I worked around the issue for RLS by checking that $CARGO --version starts with "rls ", but I can't do that for cargo check.

@jyn514
Copy link
Member

jyn514 commented Dec 25, 2020

I think this is the same as #4001.

@ehuss
Copy link
Contributor

ehuss commented Jan 7, 2021

Yea, I'm going to close as a duplicate of #4001.

@ehuss ehuss closed this as completed Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-scripts Area: build.rs scripts C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

4 participants