-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
give this project some more care #52
Conversation
This ensures that `zig fetch --save` will work properly.
The older lookup used a inline for instead of a simple switch
`OpenDirOptions` has been deprecated.
0b903fe
to
a3f6185
Compare
This switches from to `goto-bus-stop/setup-zig` to `mlugg/setup-zig`
This removes the arena allocator and prepares the code for the next commit that will also remove some allocations
…for testing purposes This also allows us to `std.posix.getenv` instead of `std.process.getEnvVarOwned` on linux.
Thanks to the "System" abstraction, all possible environment variables and `user-dirs.dirs` can be tested.
gyro has been archived
Anyone out here who would like to review this? |
Looks okay overall, but pretty large to review. I assume it works on your machine? |
Yes, I have tested this locally on Linux. The windows specific code is mostly unchanged. The tests that I have added run for linux, macos and wasi. See 515e1f5. They even contain some macos specific tests that I never ran locally. Should I split up this PR to make it easier to review? The whole diff looks very messy but I tried to make the individual commit readable as possible. With limited success. Please let me know if there is anything I can do to make this easier to review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty happy with it as-is for :)
@Techatrix shall we merge? |
No clue what I should name this PR so please forgive me.
The individual commits should give a good overview of everything I have changed but here are some of the highlights:
KnownFolder
enumxdg-user-dir-lookup.c
from xdg-user-dirs to Zig which takes care of properly parsing theuser-dirs.dirs
file.I have abstracted away all OS interactions to test different environment variables and
user-dirs.dirs
files. It can also test different comptime configs (KnownFolderConfig
).The public API remains unchanged.