nats-architecture-and-design icon indicating copy to clipboard operation
nats-architecture-and-design copied to clipboard

ADR-22: Client file locations

Open philpennock opened this issue 2 years ago • 2 comments

In discussion, it became clear that folks are more comfortable using a common directory holding things if there's some way to avoid multiple tools claiming the same files. There was also debate about how to manage migration safely, how to manage Windows, etc. I volunteered to write an ADR documenting a proposal.

At heart, we're using XDG on Unix with the https://github.com/adrg/xdg rules for mapping these locations to "native" locations on macOS and Windows.

This ADR has a proposal as a stake in the ground which folks can evaluate.

(Also, fixed the ADR template and parser to be a little more consistent, after I went wrong while following the template).

philpennock avatar Jan 24 '22 22:01 philpennock

it would be great if @derekcollison could comment on this. As I understand as I understand his comments (he can elaborate) most unix tools don't use these locations. On my environment the only clis that I can find in OS X that store under ~/Library/Application Support are termshark and mkcert all other tools have an UI type component with the exception of the demon/services in OS X.

aricart avatar Jan 26 '22 00:01 aricart

I have reverted the main.go changes and adjusted the README and template, per @ripienaar's feedback above.

In a meeting with @derekcollison, @aricart and @scottf we settled on the approach documented now: we use the adrg/xdg locations, because particularly on Windows the XDG locations do not work. For darwin/macOS we compromise and want both the XDG location and the system-native paths to work. Tools should mostly use the system native path, the .config/nats works better for humans exploring. We think.

Suggestions on better phrasing welcome.

philpennock avatar Feb 03 '22 00:02 philpennock