rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
131 stars 80 forks source link

deployment fails for projects using packages without known Source #521

Closed kevinushey closed 1 year ago

kevinushey commented 3 years ago

Not yet sure of the underlying cause, but a customer saw this issue during a deployment:

Error in if (isSCMSource(source)) { : argument is of length zero
Calls: <Anonymous> ... createAppManifest -> snapshotDependencies -> lapply -> FUN
In addition: Warning message:
Unable to package DESCRIPTION files: subscript out of bounds
Execution halted

The error most likely implies that isSCMSource(source) returned a length-zero vector; source is most likely NULL.

https://github.com/rstudio/rsconnect/blob/e42166e4d0d39ead451165c30a0dd847dc11e639/R/dependencies.R#L159-L164

We should see if we can understand why the value could be NULL here.

hadley commented 1 year ago

The "source" of Source is packrat, https://github.com/rstudio/packrat/blob/v0.9.0/R/pkg.R#L328. I double checked that all the conditions set a non-NULL source, which I think is the best we can do without a reprex.