RootDir unused / Writing to zefs config
Context
The documentation explains a mechanism of how the config file is chosen. That mechanism seems not to be implemented. (A search for RootDir in the zef sources yields no relevant results).
I stumbled upon this while looking at a fez bug where fez tries to write to the zef config and fails because of missing permissions. In general I would consider this a valid use case. So I would favour a solution that will always allow changing the configuration. The first thing that comes to mind is a configuration hierarchy, where a config key in $*HOME/.zef/config.json would overwrite one in zefs default config which is part of it's installation. Then one could always create (should it not already exist) a config file in $*HOME/.zef/config.json and add the keys one wishes to override. The other keys would still be read from the default config.
Expected Behavior
Documentation and implementation match.
Actual Behavior
Documentation and implementation don't match up.
Looks like RootDir support was removed in https://github.com/ugexe/zef/commit/c5635d74fe18538770842517c024577f20310929#diff-0b87bf9585ac7013f75b9ed789159ff7023c204e52596ff6670d06bbda3d9787
and now its just using https://github.com/ugexe/zef/blob/3c756183d9490cf6ffe8a854e09b526aab22cd65/lib/Zef/Config.pm6#L21-L24
The original RootDir behavior could be revived, but it might be worth considering adding a subdir that is the current zef version (via $?DISTRIBUTION.meta<version>). Reason being so 1) breaking config changes don't break possibly installed older versions of zef, and 2) so upgrading zef doesn't automatically use the new config (although maybe also having a central location to allow that would be good too).
I'm not objected to a versioning of configuration files. I do think we should make sure that custom configuration options are not silently disabled on a zef upgrade though.
If I understand the RootDir approach correctly, it would not allow setting a single configuration value individually (by creating a configuration file in $*HOME/.zef/v123/config.json) without disabling the options specified in the default configuration and as a result probably breaking zef. Thus I am interested in your opinion on an override / fallback / layering mechanism for configuration files where values in a user configuration file in $*HOME/.zef/... would override values in the repo installed config file, but not disable it entirely.
Ah right. At the very least there needs to be a way to append and replace. I liked the NuGet way other than being XML.