-
Notifications
You must be signed in to change notification settings - Fork 19
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
Drop actual_path? #33
Comments
If no one has a preference/feels like it is useful, I am leaning towards dropping it as I'm not sure the added complexity is worth it. |
Hit the wrong button. |
One option might be to keep the file descriptor in This solution would help avoid the allocation issue while still maintaining the current functionality. The downsides are that writing utilities remains less ergonomic than normal binaries and that we'd need to either use |
No preference for me. I think we can drop it to keep the the code clean and simple. |
Only thing about this that needs consideration really is what to do with My line of thought right now is that we should avoid forking until we see Another solution might be to change the directory and then change it back once the "subshell" exits, but this could cause issues if (Note that currently |
I am considering removing
util::actual_path()
and just making all the utilities assume that the current working directory that we should operate in is the current working directory of the binary. The original point ofutil::actual_path()
was to support the testing framework, but we won't need it for that once #24 is merged.I can see it still being useful in some cases where
mesabox
is used as a library within another program as it allows operating in different directories without modifying the arguments or changing the host program's current working directory (which could be problematic if that program were to be multi-threaded). At the same time, removingutil::actual_path()
makes the utilities simpler and reduces the number of allocations we need to perform.The text was updated successfully, but these errors were encountered: