Open eitsupi opened 4 months ago
Maybe because it was compiled for the first time?
I don't think this is because it is the first build, as it appears to build every time, even though it has been built many times in the main branch. https://github.com/pola-rs/polars/actions/runs/8108721415/job/22162464498#step:5:16
@Swatinem Sorry for tagging you, but any thoughts on this?
Might be related to some build scripts, or there is a naming problem that my cache does not pick up correctly.
I would advise to enable --verbose
cargo output, as well as actions debugging (my README should tell you how), and then take another look.
I would advise to enable
--verbose
cargo output, as well as actions debugging (my README should tell you how), and then take another look.
@Swatinem Thanks, I tried to do that in pola-rs/r-polars#879, but could not figure out how to set --verbose
. Sorry.
I’m actually not sure if that would work, or if you would have to set that ENV somewhere in the github settings UI.
I also can’t figure out where you are calling cargo build
/ cargo test
in your workflow? It looks like hidden behind some other actions or scripts? Just doing a cargo build --verbose
will show you the exact reason why cargo wants to rebuild something.
@Swatinem Thanks, I saw this:
Dirty jsonpath_lib_polars_vendor v0.0.1: stale, unknown reason
Compiling jsonpath_lib_polars_vendor v0.0.1
https://github.com/pola-rs/r-polars/actions/runs/8122433401/job/22201862255?pr=879#step:9:210
well, looks like cargo
doesn’t know itself either. Its also surprising that it does not report any path directory. so is it a git or crates.io depedency?
It should exist on crate.io.
[[package]]
name = "jsonpath_lib_polars_vendor"
version = "0.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4bd9354947622f7471ff713eacaabdb683ccb13bba4edccaab9860abf480b7d"
dependencies = [
"log",
"serde",
"serde_json",
]
It comes from here.
@Swatinem Sorry to bother you, but would you take a look at this again? Thanks.
There isn’t really much I can say with whatever info there is. Cargo itself does not really provide any info. And I believe you haven’t enabled the actions debugging.
@Swatinem Thanks for your reply. Unfortunately, I think I have enable action's debug mode. See pola-rs/r-polars#879
I checked with a minimal example to see what was causing it, and found that renaming the lib made the cache work. (eitsupi/rust-cashe-test#1)
[lib]
-name = "jsonpath_lib"
+name = "jsonpath_lib_polars_vendor"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]
...to this file https://github.com/ritchie46/jsonpath/blob/653d3cb84217217dc925aded7cac6b3efd39c7f1/Cargo.toml
@Swatinem Is this a bug that can be solved in Swatinem/rust-cache
? Or maybe it's a bug of cargo or something?
@ritchie46 Is it possible to rename the lib?
This repository only rebuilds one more crate, so there is no major impact, but in downstream projects that have polars
as a dependency, polars
itself will be rebuilt every time, which may increase the build time by several minutes.
If this issue can be resolved, I think it's great.
Thanks all.
I think this should be something thats fixable in the action, hopefully :-) Now I just have to find some time to actually do that :-D
After updating to polars 0.38.0, I noticed that it now takes longer to build on GitHub Actions.
This also occurs in this repository, but the new dependency,
jsonpath_lib_polars_vendor
, does not seem to be cached. Do you have any idea what the cause might be?https://github.com/pola-rs/polars/actions/runs/8101996808/job/22143496368#step:5:16