[PATCH] D113645: [clangd] Allow Unix config paths on Darwin

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 12 01:26:42 PST 2021

kadircet added a subscriber: sammccall.
kadircet added a comment.

I got a couple of concerns about the general ideas in the change. Even though the convenience of using ~/.config/clangd/config.yaml seems nice, I think it'll just end up creating confusion in the long run.

According to various macOS developer documentation & QAs, canonical user config directory for applications are `~/Library/Preferences` (see https://developer.apple.com/library/archive/qa/qa1170/_index.html#//apple_ref/doc/uid/DTS10001702-CH1-SECTION3 and various others).
Regarding XDG_CONFIG_HOME, AFAICT macOS doesn't really implement `XDG Base Directory Specification`, so querying its existence in that platform seems controversial.

Another concern is around multiple user config files. Clangd's config mechanism actually implements overriding of previous config options, and user config file is the most authoritative one and in the case of multiple such config files it's unclear which one should have precedence. So i don't think we should ever use "multiple" user config files.

cc @sammccall as he was the one that introduced this.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list