Unverified Commit 8421a971 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

output filesystem without watching (#62340)

### What?

Use an output filesystem without watching to allow external changes to
output files


Closes PACK-2566
parent e7ff4c02
......@@ -383,13 +383,12 @@ impl Project {
Ok(Vc::upcast(virtual_fs))
}
// #[turbo_tasks::function]
// pub async fn node_fs(self: Vc<Self>) -> Result<Vc<Box<dyn FileSystem>>> {
// let this = self.await?;
// let disk_fs = DiskFileSystem::new("node".to_string(),
// this.project_path.clone(), vec![]); disk_fs.await?.
// start_watching_with_invalidation_reason()?; Ok(Vc::upcast(disk_fs))
// }
#[turbo_tasks::function]
pub async fn output_fs(self: Vc<Self>) -> Result<Vc<Box<dyn FileSystem>>> {
let this = self.await?;
let disk_fs = DiskFileSystem::new("output".to_string(), this.project_path.clone(), vec![]);
Ok(Vc::upcast(disk_fs))
}
#[turbo_tasks::function]
pub async fn dist_dir(self: Vc<Self>) -> Result<Vc<String>> {
......@@ -399,7 +398,7 @@ impl Project {
#[turbo_tasks::function]
pub async fn node_root(self: Vc<Self>) -> Result<Vc<FileSystemPath>> {
let this = self.await?;
Ok(self.project_path().join(this.dist_dir.to_string()))
Ok(self.output_fs().root().join(this.dist_dir.to_string()))
}
#[turbo_tasks::function]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment