Using load_all() on posit connect for 2 different apps in the same repository (can we share manifest.json?)

I built my shiny app {myapp} following the {golem} framework. I built my app as a package and there is an /app.R file currently deployed to posit connect. I also created a Rmarkdown document located in /inst/rmd/publishme.Rmd . This is rmarkdown generates some of the "main plots" using the functions in the package and will email them to me on a schedule.

The shiny app works fine, but deploying this Rmd turns out to be quite troublesome . I can't give easily give it access to the functions in the {myapp} package.

My company uses RSPM, so in theory could deploy the package to RSPM and have myapp somewhere in my renv.lock file. However, the process to update our packages installed in the RSPM is manual and cumbersome, it involves jira tickets and waiting for another team to deploy the updated package in a few days. Not fun. So for the shiny app I kept the package {myapp} outside the renv.lock and the manifest.json and just use load_all():

(content of app.R) :

pkgload::load_all(export_all = FALSE, helpers = FALSE, attach_testthat = FALSE)
options("" = TRUE)
myapp::run_app() # add parameters here (if any)

However, this approach doesnt work for my /inst/rmd/publishme.Rmd on posit connect. I also put devtools::load_all() at the top of publishme.Rmd. This works fine on my computer, but when I deploy to posit connect it doesnt have access to the parent directories containing the /DESCRIPTION and the function in /R .

It think that is because I am deploying from /inst/rmd/manifest.json. . I believe the publishme.Rmd file would work if I deployed it from /manifest.json , but that json already points to the shiny app.

I think I cannot have 2 jsons with custom names in the root directory, so I am not sure how to proceed.

Do you have any workaround for this that doesnt involve adding {myapp} to the renv.lock and manifest.json and updating the package on RSPM all the time I modify a function?

edit: crossposted here

and here

edit2: error looks like this:

2024/05/29 2:54:49 PM: Quitting from lines at lines 85-86 [load_all] (publishme.Rmd)
2024/05/29 2:54:49 PM: Error in `value[[3L]]()`:
2024/05/29 2:54:49 PM: ! Could not find a root 'DESCRIPTION' file that starts with '^Package'
2024/05/29 2:54:49 PM: in '/opt/rstudio-connect/mnt/app'.
2024/05/29 2:54:49 PM: ℹ Are you in your project directory and does your project have a 'DESCRIPTION'
2024/05/29 2:54:49 PM: file?

edit 3: found this solution. I'm afraid git backed RSPM is not a priority for the team that manages our posit connect server.