-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Problem
In cargo-plumbing, we need Workspace information in almost every command. However, the current Workspace implementation has a limitation in which it requires reading the manifest file from disk during construction. This means that every invocation of a plumbing command is forced to re-read the manifest.
Plumbing commands communicate through stdout/stdin. We have a dedicated command, read-manifest, intended to read the manifests once and pass that information to other command invocations via stdin. However, we are currently blocked because Workspace construction requires reading files from disk and does not accept data already on memory.
Proposed Solution
Provide a way to construct a Workspace using in-memory data and not read from disk.
I wonder what data are needed to replicate a manifest disk read to construct a fully-functioning Workspace. A big obstacle from cargo-plumbing's side is that it works with serializable data, which has limitations on what can be represented.
Would it be fine to have an incomplete Workspace for some specific operation that don't need a full complete Workspace? I have a feeling this would be problematic but am open to ideas.