rstudio / rsconnect

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

Output object can't share the same name (with different capitalization) with file in app folder #201

Closed mine-cetinkaya-rundel closed 1 year ago

mine-cetinkaya-rundel commented 7 years ago

This issue is related to https://github.com/rstudio/rsconnect/blob/5565386d2de92f50cc3c8b4a56f0146d88609ec0/R/linters.R#L136.

Here is a MWE Shiny app:

library(shiny)

ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(),
    mainPanel( 
      textOutput(outputId = "description") 
    )
  )
)

server <- function(input, output) {
  output$description <- renderText({ "hello" })
}

shinyApp(ui = ui, server = server)

In the same folder as this app.R file is also a DESCRIPTION file, where the name of the file is in capital letters.

The app runs fine locally, however when deploying to shinyapps.io I get the warning "Filepaths are case-sensitive on deployment server". And it points to the line with textOutput(outputId = "description").

Changing the name of the output to something other than description, or writing it in all capital letters to match the filename gets rid of the issue, but neither of these seem ideal.

rmccombie commented 4 years ago

Additional vote: 47848

kevinushey commented 4 years ago

Perhaps a simple fix would be to only include strings that include at least one slash in the linter?

For future reference, the lint rule is here: https://github.com/rstudio/rsconnect/blob/40c162bf3c4cd9b10deed82e1df9ec1b0c107c1f/R/linters.R#L40-L123

hadley commented 1 year ago

Closely related to #611

hadley commented 1 year ago

And now tracking there.