Release 0.4.2: cross-platform env expansion fixes#7
Merged
Conversation
Surfaced by a Windows port of the pipe. Three bugs and two builtins:
- ~/ expansion now runs at every path-segment boundary, not only at the
start of a value. Path-list values like `~/USD/bin;~/USD/lib` were
leaving the second `~` literal, breaking PYTHONPATH / PXR plug paths.
- ~/ expansion uses dirs::home_dir() so PowerShell sessions on Windows
fall back to %USERPROFILE% when $HOME is unset.
- ${PATHSEP} and ${EXE_SUFFIX} builtins so a single yaml line can
compose path lists or binary names without forking under variants:
for every platform.
- `anvil run -v` now logs the resolved argv before exec, so "file not
found" errors actually tell you what anvil tried to run.
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
Surfaced by a Windows port of the pipe — three bugs in
expand_env_valueand two new platform-aware builtins, plus a--verboseaid inanvil run.~/expands at every segment boundary, not only at the start of a value. Path-list values like~/USD/bin;~/USD/libwere leaving the second~literal, silently breakingPYTHONPATH/PXR_USD_WINDOWS_DLL_PATHand friends.~/resolves viadirs::home_dir()so PowerShell sessions on Windows fall back to%USERPROFILE%when$HOMEis unset.${PATHSEP}builtin (:on Unix,;on Windows) so a single yaml line can compose path lists without forking undervariants:per platform.${EXE_SUFFIX}builtin (""on Unix,".exe"on Windows) so command aliases can name binaries without per-platform forks.anvil run -vnowinfo!-logs the resolved argv before exec, so "file not found" errors actually tell you what anvil tried to run.Pure bug-fix + backwards-compatible additions, hence
0.4.2(no semver-breaking changes).Test plan
cargo test— 85 tests pass (was 81; +4 new for the new behaviors)~/a${PATHSEP}~/b${PATHSEP}/literal→/Users/me/a:/Users/me/b:/literalanvil -v run …printsINFO exec: <prog> [<args>]before execubuntu-latestandmacos-latest