-
Notifications
You must be signed in to change notification settings - Fork 389
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
[xdg] provide macOS known directories #10413
base: main
Are you sure you want to change the base?
Conversation
- disabled by default, ?macos argument is used to enable it Signed-off-by: Allan Blanchard <allan.blanchard0@gmail.com>
853d27e
to
dd339fb
Compare
@rgrinberg I let you decide of the default, or even whether you want to introduce the feature or not. |
environment variables, typically {!Sys.getenv_opt}. *) | ||
val create : ?win32:bool -> env:(string -> string option) -> unit -> t | ||
val create : | ||
?win32:bool -> ?macos:bool -> |
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.
It's weird to allow passing ~win32:true
and ~macos:true
at the same. Could you add a separate function for macos 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.
Ok, I just realize that I didn't understand at all how the library is meant to be used 😅 . Now I get it, I'll change that. Thank you.
While I understand the appeal of using the macOS standard directories and it might be sensible for Dune itself, it seems incorrect in the context of XDG specifically. Quoting the specification:
Thus if we return |
I get @Leonidas-from-XIV 's concern, although I think the use of this library has been to map to the conventions on the operating systems. If not, you could not use the XDG library on Windows. Maybe we could disambiguate: use a I am really interested in the conventional macOS directories; it is 74 apps+variants in |
"strict" I think is too vague and open to interpretation. I wouldn't mind constructors for |
Fix #10398
Add
?macos:bool
argument toXdg.create
. When enabled,Xdg
uses known macos directories, that is:~/Library/Caches
for cache,~/Application Support
otherwise.Implication of each default:
?win32
default behavior,?win32
default, but macOS users of packages that useXdg
will potentially lose their config.