-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
refactor: decouple config names and values #4157
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
base: main
Are you sure you want to change the base?
refactor: decouple config names and values #4157
Conversation
I think we do need a SSoT for the config names, but the refactor is not looking like a gain in maintenance (has more LOCs). @taimoorzaeem As a shorter step towards #4154, how about first solving the duplication problem for the sample config in the CLI? postgrest/src/PostgREST/CLI.hs Lines 126 to 238 in c1eb8af
Then the benefit of the refactor will be clear. |
postgrest/src/PostgREST/CLI.hs Lines 143 to 151 in f295130
The description before each config is understandable but can we afford to lose this trailing My idea is to utilize |
IIRC So the above means that there's an additional field for a type (that has possible values: default or empty), that would translate to those commented out configs. I guess we put It would be just a nicety to keep them as is. |
Agree, these are the ones labeled as "Default: n/a" in the docs (or in the case above when: default = not set). Note that this doesn't seem to be consistent right now, cause there are configs that are commented when they have a default value (like the |
Decouples (or I should say "de-tuple" 🫤 ) the config names and values in config dumping. This opens up space for easier implementation of #4154. Not sure if that is the best way to refactor this. Would love any suggestions.