You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Normalize relative paths to canonical form for CMake compatibility
CMake and some build tools prefer canonical relative paths like
'../dir/file' over equivalent but non-canonical forms like 'dir/../file'.
The pathdiff crate can generate non-canonical paths when calculating
relative paths between directories. This commit adds lexical path
normalization by processing path components: when we encounter a
ParentDir (..) component, we pop the previous component instead of
keeping both.
Example transformation:
- Before: cpp/../generated/file.cpp
- After: ../cpp/generated/file.cpp
This ensures better compatibility with CMake and other build tools
that may not handle non-canonical paths correctly.
Discovered while testing the RustBuffer 32-bit ARM fix on Android.
0 commit comments