Completely mystified... Is there a file cache in RStudio..or Shiny?


the most confounding thing is happening to me today (I've working on shiny for close to year, deploying company internal tools).
I have a module's UI function, it's in its own _module.name__ui.R file

  • If comment it entirely, app still runs fine,
  • if I rename the module's function, app still runs fine, (how could it even start the function???)
  • If I comment a line of the function, then I get the usual related error, (eg : label missing for the ui element whose label line I commented out)
  • if I run the all commented out, after uncommenting the line mentione at previous point, I get the error of that label missing,
  • if I then run once properly without that label missing, and recomment out everthing, we're back to everything working fine...even though the whole UI is commented out.

Basically, it feels just like's there a cache system that Rstudio / Shiny is using to use the last working file for this function. But I know it's not the case. I'm just completely mystified here. I fear i'm turning mad.

Please herd me back into sanity.

Show your code, otherwise it's hard to tell where the bug from .

Thank you for the request.
Trying to build my reprex, I narrowed down on rlang::as_function which I use to call my module's ui.
So even though before posting I made sure I cleared the workspace before starting the shiny app and make my tests, I must have missed something.
The behaviour I'm now understanding is that when rlang wouldn't find the function (I renamed it, commented it out) it would look for it in the workspace.

I really need to find how to setup shiny so that everytime I start it with runApp(port = xxxx) it clears the workspace.