You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rationalize locations where dbc configs are stored #230
I suggested XDG_DATA_DIR and @zeroshade told me exactly where the credentials were going to go based on that (~/Library/dbc) and it didn't immediately strike me as odd. Looking around, it's not odd and it's even recommended,
Note: The ~/Library/Application Support directory is reserved for non-essential application resources like templates or plug-ins which may be changed by the user. It should not be used to store irreplaceable user data.
But I kept researching and we can make a pretty good argument that all of this guidance we're pulling from Apple is talking about Applications and we can further make the argument that dbc isn't an Application (for various reasons), so we're kind of making stuff up here even with using ~/Library at all. By some argument, we should've used ~/.config/dbc which is more common for CLI tools on macOS in my sampling. The reality is that no one is consistent about any of this.
If I were to do it again, I think I'd suggest we follow XDG more literally on macOS and use (1) ~/.config/dbc for config and (2) ~/.local/share/dbc for data/credentials which is how I interpret XDG.
Do you have any thoughts on this @ianmcook? I see an advantage to just having one folder on all platforms for all of dbc's files. I might sit on this for a couple of days and come at it with fresh eyes.
We closed #231 without merging since it wasn't really clear a change was needed. My latest thoughts are in #231 (comment). Still would appreciate feedback @ianmcook or @esadek if either of you want to read up.
I'm fine doing that but what I found suggests against it more than suggests for it. Even though it's technically wrong, I don't think it will ever come up for us as a problem. i.e., leaving it as-is will lead to the same outcome as changing it.
So here's the summary of where we'll store stuff with this new proposal:
The link in your comment above which suggests not using ~/Library/Application Support to store "irreplaceable user data" is outdated. Apple gave different guidance in more recent docs. For example, this more recent one says that the Application Support subdirectory:
Contains all app-specific data and support files. These are the files that your app creates and manages on behalf of the user and can include files that contain user data.
Activity
amoeba commentedon Dec 12, 2025
Yes. That was missed during review. These two categories of file use different code paths so we should refactor them into a common one too.
amoeba commentedon Dec 12, 2025
I'll put a PR up for this later today.
amoeba commentedon Dec 13, 2025
The actual bug was me here, sorry @zeroshade.
I suggested
XDG_DATA_DIRand @zeroshade told me exactly where the credentials were going to go based on that (~/Library/dbc) and it didn't immediately strike me as odd. Looking around, it's not odd and it's even recommended,See https://developer.apple.com/library/archive/qa/qa1170/_index.html. Credentials could fall under this category, I'm not sure. Applications having a
~/Library/$appfolder is not universal but it's not rare.But I kept researching and we can make a pretty good argument that all of this guidance we're pulling from Apple is talking about Applications and we can further make the argument that dbc isn't an Application (for various reasons), so we're kind of making stuff up here even with using ~/Library at all. By some argument, we should've used
~/.config/dbcwhich is more common for CLI tools on macOS in my sampling. The reality is that no one is consistent about any of this.If I were to do it again, I think I'd suggest we follow XDG more literally on macOS and use (1)
~/.config/dbcfor config and (2)~/.local/share/dbcfor data/credentials which is how I interpret XDG.Do you have any thoughts on this @ianmcook? I see an advantage to just having one folder on all platforms for all of dbc's files. I might sit on this for a couple of days and come at it with fresh eyes.
amoeba commentedon Jan 17, 2026
We closed #231 without merging since it wasn't really clear a change was needed. My latest thoughts are in #231 (comment). Still would appreciate feedback @ianmcook or @esadek if either of you want to read up.
ianmcook commentedon Jan 17, 2026
After looking at this again, I think we should just put the
credentialssubdirectory in~/Library/Application Support/Columnar/dbcalongsideuid.uuid.Using
~/Library/Application Supportlike this is extremely common across macOS apps today, and everyone seems to agree that it's fine.amoeba commentedon Jan 17, 2026
I'm fine doing that but what I found suggests against it more than suggests for it. Even though it's technically wrong, I don't think it will ever come up for us as a problem. i.e., leaving it as-is will lead to the same outcome as changing it.
So here's the summary of where we'll store stuff with this new proposal:
UUIDs, other config, etc:
$HOME/Library/Application Support/Columnar/dbc$XDG_CONFIG_HOMEor$HOME/.config/dbc%APPDATA%($HOME/AppData/Roaming)Credentials:
$HOME/Library/Application Support/Columnar/dbc$XDG_DATA_DIRor$HOME/.local/share/dbc%LOCALAPPDATA%($HOME/AppData/Local)Which means:
ianmcook commentedon Jan 17, 2026
I'm confused about why it's "technically wrong."
The link in your comment above which suggests not using
~/Library/Application Supportto store "irreplaceable user data" is outdated. Apple gave different guidance in more recent docs. For example, this more recent one says that the Application Support subdirectory:The former is from 2010; the latter is from 2018.
ianmcook commentedon Jan 17, 2026
I think this is the correct approach despite the superficial discordance
chore: change credentials path on macos, centralize path logic (#250)
chore: change credentials path on macos, centralize path logic (#250)