-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Create location directory recursively #6
Conversation
Just more convenient.
Maybe this was discussed 🤔 I think I'm against this as it breaks with expectations. If you want to create a file somewhere, if the parent directory doesn't exist you receive an error. I can't think about a particular example but I think APIs should follow the law of least surprise. If anything I think we could add this as an option, but then people could just use their own recursive directory making tooling instead. |
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.
Nitpick.
@juliangruber My motivations:
As for breaking expectations, the Windows behavior and current lack of documentation shows that there are either no expectations, or conflicting expectations. Most importantly, if I'm doing |
@juliangruber I'm merging, because this aligns behavior between platforms. If you feel strongly about it we can revert later, at which point we'll need to fix the Windows C++ (perhaps by upgrading LevelDB) which would be semver-major anyway. I do realize that user expectations may have changed by then, and that not waiting for your response is therefor not entirely fair. If need be we'll doc-deprecate the behavior. |
Ok, if we release this it'll be a major change on mac/linux |
Do you mean semver-major? Because I don't see why it should be. Which goes back to our conflicting expectations, but even if you expect an error, what code would actually break by this change? Or do you mean that it warrants documentation in a special place? Like an upgrade guide. |
I mean semver major, yeah, since code can rely on it not recursively creating directories. Like, consumer code could |
I just found the issue where this was discussed before, my memory served me right :D |
OK. Considering where we are - |
Just more convenient. Any reason we haven't added this before?