-
Notifications
You must be signed in to change notification settings - Fork 3
perf: Only install dependencies instead of build the package from source when checking #2
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
Conversation
@jeroen Could you take a look at this? Thanks! |
Let's try it |
I don't think that works: https://github.com/r-universe/eitsupi/actions/runs/13803060730/job/38770525533
|
Sorry for the mistake, I misunderstood the function of that function. |
I checked again and the following works, resolving dependencies and displaying them as a table. pak::local_dev_deps('./neopolars_0.0.0.9000.tar.gz') |
Something like this could be good. R -e "pak::pak('deps::${SOURCEPKG}', dependencies = TRUE)" |
OK can you send another PR? |
Sure, #3 |
Actually I am not sure anymore that there is a problem. The first This is needed for the next step, where we cross compile the package to wasm using emscripten compilers. In your case compiling the package for regular native Linux already failed, and then it failed again building it for wasm. |
Surely it is possible that simply removing this line is sufficient? |
AFAIR we do need to first build the R package + dependencies for the native platform, before we can build the wasm version. So I think we can't remove it. |
The following workflow seems to only build once, so I suspect that a pre-build installation is unnecessary. |
I think it depends on the package. Some R packages need to run something while they are built. In this case a working local version of the package must be available first, as we cannot execute wasm binary code on linux. It could be something has changed, but I need to look into it more carefully. |
Thanks for the clarification. I'll think of a different way to deal with the problem of the Rust toolchain being outdated. |
How about not terminating the job when the first build fails? |
That seems like a different problem? Can we just update it? |
I'm sorry I didn't give you any background information. I've made the configure script exec rustup to install a new toolchain when it detects Emscripten in the configure script, but here the first build is not Emscripten so it's not enough and the build fails. In other words, during a normal Linux build on R-universe, rustc that continues to be updated is used, but rustc in the container is frozen, so if the MSRV is newer, the build will fail. |
After an update requesting a new Rust version, I noticed that this workflow builds the package twice (and failed).
https://github.com/r-universe/eitsupi/actions/runs/13803060730
I have added a workaround to the package to install the new Rust version using rustup during the Emscripten build1, but obviously there is a normal Linux package build going on here that is difficult to detect.
Perhaps the purpose of this line is to make sure that the dependencies are installable from the R-universe, so isn't this enough?
Footnotes
https://github.com/eitsupi/neo-r-polars/blob/5520c5c3e533ca48b27583e4deae320600f104de/configure#L3-L16 ↩