Windows: engine/render's canonicalize goes through dunce, the sweep's last

The last of the sweep (57f3ef8db3, e388258bff): engine/render's texture folder uses dunce::canonicalize, which gives C:\... on Windows and is std's own call on the Mac and Linux. It takes engine/render/src/lib.rs off tools/windows-paths.sh's WAITING list, so the check holds at zero with no exception.
This commit is contained in:
shinyobjectz committed 2026-11-17 11:19:38 -08:00
1 parent c188cf8bd7
commit 450d873984
4 files changed
+4 -16

No files matched your search

Generated
+1
View File
@@ -14851,6 +14851,7 @@ version = "0.1.0"
dependencies = [
"bevy",
"bytemuck",
"dunce",
"image",
"raea-core-program",
"raea-core-shape",
+1
View File
@@ -7,6 +7,7 @@ publish = false
description = "raea's render engine: an edit's rows drawn by Bevy (3D) or the direct GPU path, its sound mixed, its video encoded"
[dependencies]
dunce = "1"
# a frame's rows as the passes read them (FrameRows, the edit, the clock, row helpers, bevy_api)
raea-sys-frame = { path = "../../systems/frame" }
# a part held where a hand has it, and wireframe (the app's scene inspector)
+1 -1
View File
@@ -29,7 +29,7 @@ pub fn inserted_of(p: &Program) -> Vec<Tup> {
}
pub fn dir_of(path: &str) -> PathBuf {
std::fs::canonicalize(Path::new(path).parent().filter(|d| !d.as_os_str().is_empty()).unwrap_or(Path::new("."))).unwrap_or_else(|_| PathBuf::from("."))
dunce::canonicalize(Path::new(path).parent().filter(|d| !d.as_os_str().is_empty()).unwrap_or(Path::new("."))).unwrap_or_else(|_| PathBuf::from("."))
}
pub fn save_png(path: &Path, rgba: &[u8], w: u32, h: u32) -> Result<(), String> {
+1 -15
View File
@@ -13,11 +13,6 @@
#
# Comment lines don't count. Not checked: vendored crates (not ours), and for the home folder two test tools for the
# Mac and Unix only, each its own workspace (Unix PATH strings, ~/Library/Caches): sdk/ui/conformance and sdk/ui/parity.
#
# WAITING: a file whose fix is on a branch of its own that hasn't landed yet, so the check holds at zero everywhere
# else meanwhile. A waiting file with nothing left to fix fails, so the list only shrinks:
# engine/render/src/lib.rs the texture folder's canonicalize (windows-paths-render)
WAITING=(engine/render/src/lib.rs)
set -u
ROOT=$(cd "$(dirname "$0")/.." && pwd)
cd "$ROOT" || exit 2
@@ -27,15 +22,6 @@ code() { grep -v -E '^[^:]+:[0-9]+:[[:space:]]*//'; }
canon=$(git grep -n -E '\.canonicalize\(\)|(^|[^A-Za-z0-9_:])(std::)?fs::canonicalize\(|tokio::fs::canonicalize\(' -- '*.rs' "${NOT_OURS[@]}" | code)
home=$(git grep -n -E 'env::var(_os)?\("HOME"\)' -- '*.rs' "${NOT_OURS[@]}" "${MAC_TOOLS[@]}" | code | grep -v USERPROFILE)
status=0
waits=()
for w in ${WAITING[@]+"${WAITING[@]}"}; do
if grep -q "^$w:" <<< "$canon"$'\n'"$home"; then
canon=$(grep -v "^$w:" <<< "$canon"); home=$(grep -v "^$w:" <<< "$home"); waits+=("$w")
else
echo "windows-paths: $w has nothing left to fix; take it off WAITING (tools/windows-paths.sh)"
status=1
fi
done
if [ -n "$canon" ]; then
echo "windows-paths: canonicalize() through std gives \\\\?\\C:\\... on Windows; use dunce::canonicalize(&path):"
printf ' %s\n' "${canon//$'\n'/$'\n' }"
@@ -46,5 +32,5 @@ if [ -n "$home" ]; then
printf ' %s\n' "${home//$'\n'/$'\n' }"
status=1
fi
[ $status = 0 ] && echo "windows-paths: ok (every canonicalize through dunce, every home folder through user_home${waits[0]+; waiting: ${waits[*]}})"
[ $status = 0 ] && echo "windows-paths: ok (every canonicalize through dunce, every home folder through user_home)"
exit $status