rough-minister-58256
03/27/2017, 10:14 PMrough-minister-58256
03/27/2017, 10:15 PMwitty-crayon-22786
03/27/2017, 10:15 PMbut that actually creates the `File` object on your behalf (and requires external parent dir creation)
witty-crayon-22786
03/27/2017, 10:15 PMrough-minister-58256
03/27/2017, 10:15 PMwitty-crayon-22786
03/27/2017, 10:16 PMwitty-crayon-22786
03/27/2017, 10:17 PMrough-minister-58256
03/27/2017, 10:20 PMwitty-crayon-22786
03/27/2017, 10:20 PMrough-minister-58256
03/27/2017, 10:20 PMTempDir::new_in
thowitty-crayon-22786
03/27/2017, 10:20 PMcompile clean-all test
or something though =/rough-minister-58256
03/27/2017, 10:20 PMrough-minister-58256
03/27/2017, 10:22 PMNamedTempFile
doing random # gen for every temp file we create vs doing it once per tmpdir rootwitty-crayon-22786
03/27/2017, 10:24 PMwitty-crayon-22786
03/27/2017, 10:24 PMrough-minister-58256
03/27/2017, 10:24 PMwitty-crayon-22786
03/27/2017, 10:24 PMwitty-crayon-22786
03/27/2017, 10:25 PMrough-minister-58256
03/27/2017, 10:28 PMTempDir
keying to the same randomized dir name across a clean-all
seems low to me - and we can minimize syscalls by just doing a singular mkdir
each time and checking the result of that - but I do agree the more correct approach is to recreate the TempDir
each time guarded with a stat
- then mkdir
- iff needed.witty-crayon-22786
03/27/2017, 10:30 PMwitty-crayon-22786
03/27/2017, 10:46 PM#native
label in github, as it was mostly synonymous with #engine
at this point.rough-minister-58256
03/27/2017, 10:47 PMwitty-crayon-22786
03/28/2017, 12:40 AMwitty-crayon-22786
03/28/2017, 1:54 AMwitty-crayon-22786
03/28/2017, 3:12 AMwitty-crayon-22786
03/28/2017, 3:12 AMrough-minister-58256
03/28/2017, 3:30 AMrough-minister-58256
03/28/2017, 4:22 AMerror[E0495]: cannot infer an appropriate lifetime for autoref due to conflicting requirements
--> src/rust/engine/src/fs.rs:816:26
|
816 | let temp_path = self.next_temp_path().expect("Couldnt get the next temp path.");
| ^^^^^^^^^^^^^^
|
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the body at 813:90...
--> src/rust/engine/src/fs.rs:813:91
|
813 | pub fn create(&self, fs: &PosixFS, paths: Vec<PathStat>) -> CpuFuture<Snapshot, String> {
| ^
note: ...so that reference does not outlive borrowed content
--> src/rust/engine/src/fs.rs:816:21
|
816 | let temp_path = self.next_temp_path().expect("Couldnt get the next temp path.");
| ^^^^
= note: but, the lifetime must be valid for the static lifetime...
note: ...so that the type `[closure@src/rust/engine/src/fs.rs:818:24: 835:6 temp_path:&std::path::Path, paths:std::vec::Vec<fs::PathStat>, build_root:fs::Dir, dest_dir:std::path::PathBuf]` will meet its required lifetime bounds
--> src/rust/engine/src/fs.rs:818:15
|
818 | fs.pool().spawn_fn(move || {
| ^^^^^^^^
rough-minister-58256
03/28/2017, 4:26 AMrough-minister-58256
03/28/2017, 5:38 AM