ThinkR-open / golem

A Framework for Building Robust Shiny Apps
https://thinkr-open.github.io/golem/
Other
908 stars 132 forks source link

[BUG] tests are currently warn in dev #1147

Closed ColinFay closed 1 month ago

ColinFay commented 3 months ago
> devtools::test()

[...]

[ FAIL 0 | WARN 2 | SKIP 2 | PASS 439 ]
ColinFay commented 3 months ago
Warning (test-zreload.R:18:5): test document_and_reload
-- Conflicts ------------------------------------------- xlojfmrips conflicts --
x `run_app` masks `xlojfmrips::run_app()`.
i Did you accidentally source a file rather than using `load_all()`?
  Run `rm(list = c("run_app"))` to remove the conflicts.
Backtrace:
     ▆
  1. ├─withr::with_dir(...) at test-zreload.R:11:3
  2. │ └─base::force(code)
  3. └─golem::document_and_reload(pkg = ".") at test-zreload.R:18:5
  4.   ├─base::try(...)
  5.   │ └─base::tryCatch(...)
  6.   │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  7.   │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8.   │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  9.   └─golem:::roxygen2_roxygenise(...)
 10.     └─roxygen2::roxygenise(...)
 11.       └─roxygen2 (local) load_code(base_path)
 12.         └─pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
 13.           └─pkgload:::warn_if_conflicts(package, out$env, globalenv())
 14.             └─cli::cli_warn(c(header, bullets, directions), class = "pkgload::conflict")

Warning (test-zreload.R:18:5): test document_and_reload
-- Conflicts ------------------------------------------- xlojfmrips conflicts --
x `run_app` masks `xlojfmrips::run_app()`.
i Did you accidentally source a file rather than using `load_all()`?
  Run `rm(list = c("run_app"))` to remove the conflicts.
Backtrace:
     ▆
  1. ├─withr::with_dir(...) at test-zreload.R:11:3
  2. │ └─base::force(code)
  3. └─golem::document_and_reload(pkg = ".") at test-zreload.R:18:5
  4.   ├─base::try(...)
  5.   │ └─base::tryCatch(...)
  6.   │   └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  7.   │     └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  8.   │       └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  9.   └─golem:::pkgload_load_all(...)
 10.     └─pkgload::load_all(...)
 11.       └─pkgload:::warn_if_conflicts(package, out$env, globalenv())
 12.         └─cli::cli_warn(c(header, bullets, directions), class = "pkgload::conflict")
───────────────────────────────────────
ColinFay commented 1 month ago
📁 golem 🔨 dev 
> devtools::test()
ℹ Testing golem
✔ | F W  S  OK | Context
✔ |          4 | add_dockerfiles_renv [1.6s]                                                                                                                                                                      
✔ |          5 | add_dockerfiles                                                                                                                                                                                  
✔ |          9 | add_files                                                                                                                                                                                        
✔ |          9 | add_r_files                                                                                                                                                                                      
✔ |          2 | add_resource_path                                                                                                                                                                                
✔ |          6 | add_rstudio_files                                                                                                                                                                                
✔ |          1 | addins                                                                                                                                                                                           
✔ |          1 | after_creation_msg                                                                                                                                                                               
✔ |          1 | browser_button                                                                                                                                                                                   
✔ |          4 | bundle_resources                                                                                                                                                                                 
✔ |          1 | cats                                                                                                                                                                                             
✔ |          4 | config                                                                                                                                                                                           
✔ |          1 | create_golem                                                                                                                                                                                     
✔ |          6 | desc                                                                                                                                                                                             
✔ |          1 | disable_autoload                                                                                                                                                                                 
✔ |          4 | enable_roxygenize                                                                                                                                                                                
✔ |          8 | file_endings [1.3s]                                                                                                                                                                              
✔ |          1 | get_sysreqs                                                                                                                                                                                      
✔ |          2 | globals                                                                                                                                                                                          
✔ |          4 | golem_welcome_page                                                                                                                                                                               
✔ |          4 | golem-yaml-get                                                                                                                                                                                   
✔ |          5 | golem-yaml-set                                                                                                                                                                                   
✔ |          5 | golem-yaml-utils                                                                                                                                                                                 
✔ |         14 | install_dev_deps                                                                                                                                                                                 
✔ |          2 | is_golem                                                                                                                                                                                         
✔ |          2 | is_running                                                                                                                                                                                       
✔ |          3 | js                                                                                                                                                                                               
✔ |          2 | maintenance_page                                                                                                                                                                                 
✔ |         13 | make_dev                                                                                                                                                                                         
✔ |          8 | modules_fn                                                                                                                                                                                       
✔ |          4 | pkg_tools                                                                                                                                                                                        
✔ |          5 | reload [1.4s]                                                                                                                                                                                    
✔ |          3 | run_dev                                                                                                                                                                                          
✔ |          1 | sanity_check                                                                                                                                                                                     
✔ |          2 | set_golem_options                                                                                                                                                                                
✔ |          7 | templates                                                                                                                                                                                        
✔ |          6 | test_helpers                                                                                                                                                                                     
✔ |         10 | use_favicon                                                                                                                                                                                      
✔ |         11 | use_files                                                                                                                                                                                        
✔ |         10 | use_readme                                                                                                                                                                                       
✔ |          3 | use_recommended                                                                                                                                                                                  
✔ |         10 | use_utils                                                                                                                                                                                        
✔ |         31 | utils                                                                                                                                                                                            
✔ |          8 | with_opt                                                                                                                                                                                         

══ Results ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 7.3 s

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 243 ]
📁 golem 🔨 dev