-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
not download and build artifacts again, example: arch linux, cosmic desktop #14278
Comments
@saethlin you are on arch, and know rustup / cargo best, you d have an idea what build variables we should put into the cosmic readme to ease the compile a little? |
This seems more Arch specific than Cargo. For example
is not because of anything Cargo does but because the PKGBUILD's are setup to counter Cargo's caching features, e.g.
We're looking at adding more caching (#5931) but that would also be ignored by Arch. At this is more of an Arch thing and not Cargo, I am inclined to close this. Open to input on what is being asked of Cargo here, feature or bug fix. For user support, we generally recommend https://users.rust-lang.org/. |
Agreed with @epage. Since these are individual Arch packages, and Arch's PKGBUILD is isolating builds from each other, Cargo can't re-use the build artifacts between packages. If there are specific ideas about what Cargo could do to help for this type of situation, please open a new issue. |
@soloturn the PKGBUILD is controlling |
i am controlling PKGBUILD, what parameter you suggest to add so it caches things @epage ? |
Remove export CARGO_HOME="$srcdir/cargo-home" that will help with download, extraction, and storage of dependencies. This won't help with caching intermediate build artifacts. #5931 would be the main way to do that. |
ok, will try. @epage i read the per user cache dir proposal and got a chicken skin about the complexities mentioned there :) if i could specify a directory where all build files end up this would be perfect, and just ignoring all edge cases and complexities mentioned in #5931. kind of a "build-dir" ? if the build gives problems i can drop this directory any time and we have status quo, build from scratch. no necessity for cargo to have some complicated logic or am i seeing this too simplistic? |
@epage the arch linux packages have default CARGO_HOME now, and download is reused, which is a pleasant speedup already. thanks for the hint, and thanks @yochananmarqos for putting that in everywhere. but - the build still is VERY slow on older hardware, as download is not done any more, but still for every COSMIC compnent it builds 600 or so crates, times 20. mostly the same. what paramteer to specify to not recompile? |
The work to track re-using compiled artifacts between multiple compilations is covered by #5931. |
@soloturn as we've said, #5931 is the real solution. A "hack" some people do is to share a |
I don't use sccache and can't speak to its behavior and how it interacts with cargo. |
@soloturn Please don't post the same comment twice in different issues. I'll hide the other one. Also, while epage and arlosi are so nice to respond to your questions in a timely manner, but they also need time for rest (it's Friday).
Please use the forum or https://rust-lang.zulipchat.com if you want to reach out to a wider audience, or discuss specific issues in cosmic. |
@weihanglo thank you, the cargo poeople indeed are very nice :) let me open a bug for sccache in cargo: #14313 , as RUSTC_WRAPPER=sccache is a CARGO flag |
Problem
on arch linux cosmic desktop is now split into 10 or more components. all of the components have similar dependencies. building takes forever, as the dependency git repositories are downloaded again, built again, crates are downloaded again, vendored again, built again. this ticket is to get ans answer to properly configure the environment so all of this happens only one time.
the links of the build scripts:
for every component this is done in the components directory, and thus downloaded and ocmpiled 10 times minimum.
The text was updated successfully, but these errors were encountered: