-
Notifications
You must be signed in to change notification settings - Fork 33
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
What's the difference between state_dir and data_local_dir? #70
Comments
In ocamlpro/directories I made the choice to have |
The state dir has some very specific requirements and guarantees compared to the cache dir. My reasoning was that filling in cache dir for state dir on Windows/macOS feels wrong:
(All the above applies the same if you replace "cache dir" with "data local dir".) |
I don't believe these
It says should and not must. They're just some nice things to have when possible. Thus:
A basic use case is an interpreter (e.g. |
Ah sorry, I had state dir switched with runtime dir in my head. That makes my argument weaker in that regard, as the runtime dir has higher requirements.
I think this would be fine for this use-case, but I'm not sure it applies to every use-case of the state dir though. In your case, writing code that picks the state dir on Linux and the cache dir on Windows/macOS would be a perfectly valid solution. |
Indeed, they're different. 😄 Let's say you have to use But if you find a use case where this is not true, I'll be interested ! :) |
On Windows, data_local_dir is LocalAppData which AIUI is like RoamingAppData but not synchronised across machines. The docs for state_dir say that it's not synchronised across machines. Are they not the same thing? If they are, could data_local_dir's behaviour on Linux be changed to match state_dir? Currently state_dir is only useful on Linux, and to me it would make sense to merge it into the existing data_local_dir function.
The text was updated successfully, but these errors were encountered: