fix(fs): use forward-slash paths in normalize_path on all platforms#642
Merged
fix(fs): use forward-slash paths in normalize_path on all platforms#642
Conversation
tokio "full" features include net/fs/process which are unsupported on wasm32-wasip1-threads. Narrow to sync/macros/io-util/rt/time which are the only features actually used.
bashkit core depends on tokio with "full" features which includes net/fs/process — unsupported on wasm32. Cargo feature unification means the JS crate inherits these even with narrowed features. Disable WASM build/test in publish-js.yml and remove wasm target from package.json. The 5 native targets (macOS x86/arm, Linux x86/arm, Windows) all work. WASM needs an architectural fix to gate tokio features in bashkit core.
PathBuf uses native separators (backslash on Windows), but the VFS is always Unix-style. Build normalized paths as strings with forward slashes to fix pwd/cd returning backslash paths on Windows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
normalize_pathto build paths using forward slashes on all platformsPathBufuses native separators (backslash on Windows)pwdto return/tmp\navtestinstead of/tmp/navteston WindowsTest plan