Skip to content

Commit decbfcd

Browse files
committed
Auto merge of #141229 - tgross35:builtins-josh-subtree, r=Kobzol
Merge `compiler-builtins` as a Josh subtree Use the Josh [1] utility to add `compiler-builtins` as a subtree, which will allow us to stop using crates.io for updates. This is intended to help resolve some problems when unstable features change and require code changes in `compiler-builtins`, which sometimes gets trapped in a bootstrap cycle. This was done using `josh-filter` built from the r24.10.04 tag: git fetch https://github.com/rust-lang/compiler-builtins.git 233434412fe7eced8f1ddbfeddabef1d55e493bd josh-filter ":prefix=library/compiler-builtins" FETCH_HEAD git merge --allow-unrelated FILTERED_HEAD The HEAD in the `compiler-builtins` repository is 233434412f ("fix an if statement that can be collapsed"). [1]: https://github.com/josh-project/josh
2 parents 99e783d + ea26272 commit decbfcd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

build_system/utils.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,13 @@ pub(crate) fn copy_dir_recursively(from: &Path, to: &Path) {
213213
if filename == "." || filename == ".." {
214214
continue;
215215
}
216+
let src = from.join(&filename);
217+
let dst = to.join(&filename);
216218
if entry.metadata().unwrap().is_dir() {
217-
fs::create_dir(to.join(&filename)).unwrap();
218-
copy_dir_recursively(&from.join(&filename), &to.join(&filename));
219+
fs::create_dir(&dst).unwrap_or_else(|e| panic!("failed to create {dst:?}: {e}"));
220+
copy_dir_recursively(&src, &dst);
219221
} else {
220-
fs::copy(from.join(&filename), to.join(&filename)).unwrap();
222+
fs::copy(&src, &dst).unwrap_or_else(|e| panic!("failed to copy {src:?}->{dst:?}: {e}"));
221223
}
222224
}
223225
}

0 commit comments

Comments
 (0)