Expand description
PM.7: the resolve → build → stage pipeline behind a require.
Design: plugin-manager.md
§2, §5, §6. The host records require specs during a guest’s
register-plugins export (lattice_plugin_host::plugin_manager_host) and
drains them afterwards; each drained spec comes here.
The body is short because PM.5 and PM.6 are the parts with behaviour:
[crate::resolve] turns a source into either a tree or a finished
artifact, and crate::build_plugin turns a tree into a cached artifact.
A Prebuilt short-circuits the build entirely — that is the whole reason
Resolved is an enum.
What this module adds is the failure policy. Every step can fail for reasons outside the editor’s control (no network, no toolchain, a bad revision), and none of them may take the editor down:
- a spec that fails to resolve or build becomes
Install::Skipped, logged and reportable, and the next spec is still attempted; - a stale rebuild that fails still yields an artifact
(
crate::BuildOutcome::StaleKept) and is installed, carrying its error forward so:pluginscan show that it is running old code.
Blocking throughout — clone, download, compile. Callers run it on
spawn_blocking (paramount goal #1 / #4).
Structs§
- Required
Spec - One plugin a guest declared. The loader-side mirror of the host’s
RequiredPlugin.
Enums§
- Install
- What happened to one required plugin.
Functions§
- install_
all - Run every required spec, in declaration order.
- install_
required - Resolve, build and stage one required plugin.
- to_
required_ spec - Convert a host-side
RequiredPlugininto the loader’s mirror.