Closed magicant closed 2 months ago
The recent changes to the yash_builtin
and yash_env
modules significantly improve error handling and path management by standardizing the use of Unix-specific string types and replacing standard library paths with custom implementations. This transition enhances compatibility, particularly in Unix-like environments, and consolidates error types for better robustness across the codebase.
Files | Change Summary |
---|---|
yash-builtin/... |
Updated error handling to use yash_env::system::Errno and paths to yash_env::path::Path . |
yash-env/... |
Introduced new exports for unix_path and unix_str , re-exporting existing types to improve usability. |
yash-builtin/src/cd/... |
Transitioned from std::path to yash_env::path for all path-related functionality. |
yash-semantics/... |
Adjusted path handling to utilize UnixString and UnixStr for Unix-specific string operations. |
In the land of code, where paths intertwine,
A rabbit hops forth, with changes so fine.
From standard to custom, the strings now align,
Unix-style handling, oh how they shine! πβ¨
With errors now clear, and paths that are bright,
Letβs celebrate progress, in day and in night!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
The OsStr type in std behaves differently depending on the target platform. Since yash is a Unix shell, we should use types that have consistent behaviors across platforms. This pull request introduces
unix_str
andunix_path
as dependencies that are used in place of OsStr(ing) and Path(Buf) from std.Summary by CodeRabbit
New Features
yash_builtin
module, improving consistency and robustness.Bug Fixes
Documentation
Refactor