r-universe-org / help

Support and bug tracker for R-universe
https://docs.r-universe.dev/
8 stars 2 forks source link

Source build checking out submodules on branch? #411

Closed andrjohns closed 1 month ago

andrjohns commented 1 month ago

Hello! When StanHeaders is being built, the source build is failing in a way that I can only replicate if the submodules aren't also recursively checked out to the chosen branch (experimental).

Is it possible that the source build isn't handling submodules correctly? Is there a way I can replicate the build locally to debug?

Universe config here for reference.

Thanks!

jeroen commented 1 month ago

We can't change the default to always checkout all submodules, because that breaks or slows down other projects.

One solution is to add a .prepare or bootstrap.R script to your project, in which you initiate the required submodules. These scripts will be executed after the checkout: https://github.com/r-universe-org/build-source/blob/master/entrypoint.sh#L45-L51

andrjohns commented 1 month ago

We can't change the default to always checkout all submodules, because that breaks or slows down other projects.

One solution is to add a .prepare or bootstrap.R script to your project, in which you initiate the required submodules. These scripts will be executed after the checkout: https://github.com/r-universe-org/build-source/blob/master/entrypoint.sh#L45-L51

Brilliant thanks, that did the trick!

If it's possible, would you be able to trigger a re-run for the rstan build action? It should build now (or at least fail differently) with the newly-built StanHeaders.

Thanks again!

andrjohns commented 1 month ago

Ah just saw the button for triggering the rebuild myself, sorry for the noise