1
Fork 0

Fix dependency tracking for debugger visualizers

This commit is contained in:
Michael Woerister 2023-05-16 13:37:46 +02:00
parent 72b2716246
commit 7f01893900
16 changed files with 133 additions and 117 deletions

View file

@ -1272,11 +1272,21 @@ pub struct DebuggerVisualizerFile {
pub src: Lrc<[u8]>,
/// Indicates which visualizer type this targets.
pub visualizer_type: DebuggerVisualizerType,
// FIXME: Docs
pub path: Option<PathBuf>,
}
impl DebuggerVisualizerFile {
pub fn new(src: Lrc<[u8]>, visualizer_type: DebuggerVisualizerType) -> Self {
DebuggerVisualizerFile { src, visualizer_type }
pub fn new(src: Lrc<[u8]>, visualizer_type: DebuggerVisualizerType, path: PathBuf) -> Self {
DebuggerVisualizerFile { src, visualizer_type, path: Some(path) }
}
pub fn path_erased(&self) -> Self {
DebuggerVisualizerFile {
src: self.src.clone(),
visualizer_type: self.visualizer_type,
path: None,
}
}
}