pub struct PluginConfigDiagnostic {
pub config_path: PathBuf,
pub plugin: String,
pub key: String,
pub reason: String,
pub effect: PluginConfigEffect,
}Expand description
One advisory about a config file a plugin read, before it becomes a
fallow_config::WorkspaceDiagnostic.
A plugin knows the fact (which config file, which key, why) but not the root
the message renders against: in a workspace run its own root is the package
root, while the diagnostic’s path and message are project-root-relative. The
conversion therefore happens once, where every plugin result has converged on
the project root, and config_path is kept ABSOLUTE until then so the
registry’s canonical dedupe and the serialized root-relative form both work
from one value (issue #2736).
Fields§
§config_path: PathBufAbsolute path of the config file that was read.
plugin: StringThe plugin that read it, as it labels itself. Module Federation options reach four bundler plugins inline, and each names itself rather than the reader, because the config file the user must edit is the bundler’s.
key: StringThe config key the advisory is about (exposes, remotes,
components, imports).
reason: StringWhy, as a kebab-case token from the resulting kind’s open set.
effect: PluginConfigEffectWhich workspace diagnostic kind this becomes.
Implementations§
Source§impl PluginConfigDiagnostic
impl PluginConfigDiagnostic
Sourcepub fn into_workspace_diagnostic(self, root: &Path) -> WorkspaceDiagnostic
pub fn into_workspace_diagnostic(self, root: &Path) -> WorkspaceDiagnostic
Render this advisory against the PROJECT root, which is the root every consumer’s paths are relative to.
Trait Implementations§
Source§impl Clone for PluginConfigDiagnostic
impl Clone for PluginConfigDiagnostic
Source§impl Debug for PluginConfigDiagnostic
impl Debug for PluginConfigDiagnostic
impl Eq for PluginConfigDiagnostic
Source§impl PartialEq for PluginConfigDiagnostic
impl PartialEq for PluginConfigDiagnostic
impl StructuralPartialEq for PluginConfigDiagnostic
Auto Trait Implementations§
impl Freeze for PluginConfigDiagnostic
impl RefUnwindSafe for PluginConfigDiagnostic
impl Send for PluginConfigDiagnostic
impl Sync for PluginConfigDiagnostic
impl Unpin for PluginConfigDiagnostic
impl UnsafeUnpin for PluginConfigDiagnostic
impl UnwindSafe for PluginConfigDiagnostic
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more