-
Notifications
You must be signed in to change notification settings - Fork 15
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
[RFC] configuration file? #4
Comments
LocationHierarchical configuration like this is great. Usually I'd expect to also see beyond what you already have:
I like https://rust-cli-recommendations.sunshowers.io/hierarchical-config.html for this. |
By |
Is there is hierarchical configuration, it would be very useful to be able to ask the tool to display the config values it’s landed on, and ideally to report where each value is set. Can help with debugging when you expect the value to be one thing and it’s something else instead. |
Currently, DotSlash does not support any sort of configuration file. The only thing that is really "configurable" is the location of the DotSlash cache folder, which defaults to the
dotslash
subfolder under the operating system's cache dir, but can be overridden via theDOTSLASH_CACHE
environment variable.An important advantage of this approach is that the "fast path" in the DotSlash execution flow (i.e., a cache hit):
https://dotslash-cli.com/docs/execution/
does not have to read any files other than the DotSlash file itself. Ideally, in adding support for a DotSlash config file, we would maintain this invariant. That is, the "fast path" should not have to read a config file, but the "slow path" is allowed to.
Config Options
Ideas we have kicked around in the past include:
curl
configuration (whichcurl
executable to use, proxy info, etc.)Location
We probably want some sort of "cascading set" of config files were one can override another, such as:
.dotslashconfig
in a parent folder / repo root?<CONFIG DIR>
/dotslash
/etc/dotslash/config
File Format
To avoid an undue increase on the size of the DotSlash binary, we should use "jsonrc" as the config file format.
The text was updated successfully, but these errors were encountered: