Optionalplugins: readonly FlowrAnalyzerPackageVersionsPlugin[]Protected ReadonlyctxThe linked full project context, allowing plugins to modify and access it.
ReadonlyfunctionsThe functions context associated with this dependencies-context.
ReadonlynameA human-readable name of the context. Try to make it unique to avoid confusion in the logs.
Protected ReadonlypluginsThe plugins registered for this context. These build the foundation for applyPlugins.
Mount an additional signature database/source by path (a plain .sigs.ndjson, a .br, or a manifest).
Register a dependency declared by a project metadata file (DESCRIPTION, renv.lock, rv.lock). Gated by
solver.sigdb.loadProjectDependencies: when project-dependency loading is disabled this is a no-op, so the
declared deps never enter the context (unlike addDependency, used for on-demand signature-database
resolution).
Register a resolver consulted by getDependency to fill in a package's exports lazily.
ProtectedapplyRun all registered plugins on the given args, please be aware that if they are async, it is up to you to await them.
The identifying names (scopes, e.g. base/current/history) of the signature databases currently
available, deduplicated. A simple view over loadedSignatureDatabases for checking what a project
can resolve against; empty when the signature database is disabled or none is loaded.
Cheap fingerprint of only the base-R-providing databases, so base-R-derived caches survive unrelated database changes.
Eagerly mount every version plugin's signature database up front (see solver.sigdb.eagerlyLoad).
Runs the static plugins once. They fill this context and the project metadata, so both gate their reads on it.
Returns the project context this sub-context is attached to
Get all dependencies known to this context.
Get the dependency with the given name, if it exists.
If the static dependencies have not yet been loaded, this may trigger a resolution step.
Pass version to pin the resolution to a constraint (an exact version string, or a Range; uncached;
versionOverrides config still wins, base-R stays tied to the assumed R version); otherwise the version
comes from the declared constraints.
The name of the dependency to get.
Optionalversion: string | RangeOptional version constraint to pin the resolution to (exact version string or a Range).
The dependency with the given name, or undefined if it does not exist.
Whether any version plugin can resolve the base-R packages (a versioned signature source is available).
Whether at least one signature database is available (i.e., availableSignatureDatabases is non-empty). Cheaper than materializing the list when only the presence matters.
The versions a dependency can possibly have, combining everything declared for it (a DESCRIPTION range,
an rproject.toml entry, a lockfile pin, ...). undefined if the dependency is unknown, if nothing
constrains it, or if the sources contradict each other -- then no version is possible at all.
For why it is what it is (the individual constraints, or the version the database resolved to), take the Package from getDependency.
The name of the dependency.
Metadata of the signature databases the version plugins currently have loaded.
The names of known packages that export name (from the version plugins' signature databases). Used to
hint which library()/:: might be missing for an otherwise-undefined symbol. Empty if no database is
available or the signature database is disabled.
Reset the context to its initial state.
The signature-database entry for the qualified call id (a pkg::fn Identifier) from the first
source that has it, resolving the package version from the project's dependency info
unless version overrides it. This is the easy way to obtain a function's parameters from a context: pass
fn.signature (or signatureParameterNames) to RFunctionCall.matchArgsToParams. undefined
if id is unqualified or no loaded source defines it.
Optionalversion: stringThe signature sources the version plugins currently have loaded (backs the signature query).
Manages the project's dependencies, their versions, and their interplay with FlowrAnalyzerPackageVersionsPlugins.