You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I might have stumbled over an unexpected quirk of the "Build Website" button in Rstudio server (actually, the build pipeline in general). I think I have nailed down the issue to these particular lines in build_dir():
bases = with_ext(files, '')
files = files[!i & bases == bases[i]] # files with same basename as f (Rmd)
if (length(files) == 0 || any(older_than(files, f))) render_it()
It just so happens, in my case, that my blog post folders (coming from Jekyll) are named like 2018-06-28-cool-project, with both the Rmd and Rproj file always using the same basename (2018-06-28-cool-project.Rmd, 2018-06-28-cool-project.Rproj). I don't remember where I picked up this convention, but in any case, it succesfully manages to trick the older_than check to always detect an older "output" file, since (in this case) the Rproj file is indeed older and always shares the same basename with the Rmd file.
Which naturally causes any(older_than(files, f)) to always return TRUE.
This causes much longer rebuilds than necessary (although I must say the Hugo step really is a bullet train compared to Jekyll's horsecart!).
A simple solution for me would be to just change the names of my Rproj files to something other than the basename of my Rmd files. But I thought perhaps this situation might affect others and warrant a different approach?
The text was updated successfully, but these errors were encountered:
I think I might have stumbled over an unexpected quirk of the "Build Website" button in Rstudio server (actually, the build pipeline in general). I think I have nailed down the issue to these particular lines in
build_dir()
:It just so happens, in my case, that my blog post folders (coming from Jekyll) are named like
2018-06-28-cool-project
, with both the Rmd and Rproj file always using the same basename (2018-06-28-cool-project.Rmd
,2018-06-28-cool-project.Rproj
). I don't remember where I picked up this convention, but in any case, it succesfully manages to trick theolder_than
check to always detect an older "output" file, since (in this case) the Rproj file is indeed older and always shares the same basename with the Rmd file.A simple demonstration:
Which naturally causes
any(older_than(files, f))
to always returnTRUE
.This causes much longer rebuilds than necessary (although I must say the Hugo step really is a bullet train compared to Jekyll's horsecart!).
A simple solution for me would be to just change the names of my Rproj files to something other than the basename of my Rmd files. But I thought perhaps this situation might affect others and warrant a different approach?
The text was updated successfully, but these errors were encountered: