-
Notifications
You must be signed in to change notification settings - Fork 110
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
Requiring re-build after removing ~/.cargo/registry/src
#178
Comments
I think it may related to the way we vendor the duckdb source code, which is the change we made in libduckdb-sys/build.rs I'll look into that. How should be verify it works if I make any change? I haven't used cargo cache before |
https://github.com/wangfenjin/duckdb-rs/blob/main/libduckdb-sys/build.rs You mentioned it delete the src/ folder, so as long as we put the file outside src folder it should work fine? |
Thanks @wangfenjin !
It would need to be in a path that is kept by the cache. The main paths that are retained are paths such as:
(I'm less familiar with the differences between the paths in the build; let me know if that's insufficient and I can look further) |
To test one-off, you can do what I did and remove the To test systematically I think is difficult — it requires having a project with |
Thanks for the great analysis, and sorry for the delay here. I believe this might be an effect of cargo rebuilding things purely based on file timestamps. I assume cargo just considers the It might be the case that cargo will look at the file timestamps of those Thats just some speculation on my part though. I have seen in particular |
Thanks for replying @Swatinem
Would you mind clarifying "go to definition"? I'm familiar with this in an IDE context, but these are tests running in CI? |
yes, that was just an observation from local development. In my experience, changing files on disk in the |
@max-sixty I deleted > rm -rf ~/.cargo/registry/src
> ls ~/.cargo/registry/src
ls: /Users/bytedance/.cargo/registry/src: No such file or directory
> cargo build --features=modern-full,extensions-full
Finished dev [unoptimized + debuginfo] target(s) in 3.18s |
OK, I still don't quite get the logic here (I imagine it's me misunderstanding). The issue is that the cache created in CI requires recompilation when it's loaded on the next build. So there are no local files here / no interference from the IDE. Though maybe that's an explanation of how it doesn't require recompiling locally, only in CI? |
Sorry, I realize my instructions weren't specific enough — this indeed doesn't reproduce when in the
...causes only |
This is fixed upstream in Swatinem/rust-cache#150, closing. |
(fyi I misspoke when I said it was fixed, but will leave this closed regardless) |
Over at PRQL/prql#2870, we're hitting an issue with how duckdb 0.8.0 uses the cargo cache.
Specifically, the standard cargo cache GHA deletes
~/.cargo/registry/src
when it's uploading the cache. But if that's removed, thenduckdb-rs
requires recompiling. This is the only dependency of ours where this occurs, and it is new after 0.7.1. It also seems to occur in 0.8.1. It's possible to test locally bycargo build
, removing the path, and thencargo build
again.It's probably less visible in this repo, since the cargo cache GHA only caches dependencies.
I don't have much context for why this happens — it's very possible it's a dependency of
duckdb-rs
. It is quite disruptive for our CI — it takes 2-3x longer across most of our jobs.Would you have any idea for what's causing it? Thank you!
The text was updated successfully, but these errors were encountered: