You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, even if you have all your dependencies compiled already via "cargo build", doing "cargo check" re-builds all of them. That seems somewhat redundant, and it is certainly frustrating given that the expectation for check is to be fast -- but because of this, it can actually be much slower than "build". (This is even more true if you stick to nightly, where all your dependencies are re-built daily anyway because your toolchain keeps changing.)
I asked about this on #rust, and from what I understood, fixing this requires two pieces. (But this may be entirely wrong! Please correct me.)
Change rustc so that when it does --emit=metadata, it can handle both an rlib and an rmeta for dependencies. (Or maybe that's already the case?)
Change cargo to tell rustc re-use an up-to-date rlib if there is no rmeta, rather than building a new rmeta.
The text was updated successfully, but these errors were encountered:
Actually, the first part seems to already be the case. I took the command given by cargo check -v, replaced some of the rmeta by rlib (had to change the hash for some of them), and things still seemed to work.
I believe this is a dupe of #3501 so closing in favor of that, but thanks for the report!
Unfortunately it's pretty tricky to share the implementation details here today, but it's definitely possible and I hope to implement it one day in Cargo! I believe we've got all the compiler support necessary and we just need changes on the Cargo side of things.
Right now, even if you have all your dependencies compiled already via "cargo build", doing "cargo check" re-builds all of them. That seems somewhat redundant, and it is certainly frustrating given that the expectation for check is to be fast -- but because of this, it can actually be much slower than "build". (This is even more true if you stick to nightly, where all your dependencies are re-built daily anyway because your toolchain keeps changing.)
I asked about this on #rust, and from what I understood, fixing this requires two pieces. (But this may be entirely wrong! Please correct me.)
--emit=metadata
, it can handle both anrlib
and anrmeta
for dependencies. (Or maybe that's already the case?)The text was updated successfully, but these errors were encountered: