Skip to contents

For a given state and session this function will determine the module ids that are dependent as well as any packages the module elements might depend on.

Usage

FM_fetch_deps(state, session)

Arguments

state

Current module state after yaml file has been read

session

Shiny session variable

Value

list with the following elements:

  • mod_ids Dependent module ids.

  • packages List of package dependencies.

  • package_code Library commands to load packages.

Examples

# We need a Shiny session object to use this function:
id="UD"
sess_res = UD_test_mksession(session=list(), id=id)
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.docx")
#> → UD:   dest:   file.path("config","report.docx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.pptx")
#> → UD:   dest:   file.path("config","report.pptx")
#> → UD: including file
#> → UD:   source: file.path(system.file(package="onbrand"), "templates", "report.yaml")
#> → UD:   dest:   file.path("config","report.yaml")
#> → UD: State initialized
#> → UD: module checksum updated:897d952fecbc804999396a96f9df4b20
session  = sess_res$session
state    = sess_res$state
mod_deps = FM_fetch_deps(state, session)