Move histfile to the system's "state" folder#362
Move histfile to the system's "state" folder#362exorcist365 wants to merge 17 commits intoocaml-community:masterfrom
Conversation
|
I'm not exactly sure how to create the directory if it doesn't exist, I'm still new to OCaml and not yet familiar with most libraries. |
|
I'm not sure that adding If it's OK to have it, then, you should probably match on the result and print a warning/fail if the dir hasn't been created - and not use If it's not, you could just reimplement the part of |
|
Adding more dependencies for something very small is probably not optimal, no. |
|
The code below can be used to create a directory, including parent directories. If this is what you need. |
|
Thanks for making this PR ! This is a detail but shouldn't the file be in XDG_STATE_HOME instead of XDG_CACHE_HOME ? At least that's what the specification (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) mentions. |
|
Oh, I didn't know about it thanks ! It's been introduced in the latest basedir spec. I'll add it to directories. :) |
|
Done, should be available soon, see ocaml/opam-repository#20409. |
|
Thanks @exorcist365. I believe the PR can be merged but I don't have the rights to do it... |
|
Hi! I feel like adding a transitive dependency to |
|
Note that some effort has been made not to depend on |
|
Sure, I understand. To give you some context, we're making sure that a selection of packages (including utop) are available as soon as new versions of the ocaml compiler are released. Adding ctypes on windows to the mix seems difficult but I'll check with the rest of the team. |
|
It looks like |
|
Well, in the current state the PR doesn't look correct to me (I commented there), but if it ends up providing a proper way to get the cache directory without ctypes it's great. |
|
I'm not willing to take a dependency on ctypes at the moment, but please reopen if you're willing to implement this on top of |
|
|
No description provided.