Skip to content
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

let ATP_PLC_HOST override default plc host #823

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lun-4
Copy link

@lun-4 lun-4 commented Nov 19, 2024

I've been working on spinning up my own bluesky stack (including the did:plc reference server) and found out that only some commands on goat support a -plc-directory setting, but most don't because they just use DefaultDirectory() instead (via resolveIdent). this led me to making a patch to support ATP_PLC_HOST globally so all goat commands or other atproto tooling can operate consistently without requiring a rebuild-from-source to change defaults

@bnewbold
Copy link
Collaborator

I personally don't like the pattern of having env vars impact libraries in a way which is not legible or explicit to the overall process (eg, does not show up in manpage or CLI docs). This goes doubly when adding/removing/updating the behavior.

In this case I think there is a clear path for how commands can configure their own directory.

One way to make it easier to "override" inner defaults like this would be to have the default directory return a concrete type, instead of interface. Eg, DefaultBaseDirectory() which returns a BaseDirectory that can be mutated (and simply wrapped with a caching directory if desired).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants