Replace root with config_dir and data_dir#112
Merged
rossmacarthur merged 2 commits intorossmacarthur:masterfrom Oct 14, 2020
Merged
Replace root with config_dir and data_dir#112rossmacarthur merged 2 commits intorossmacarthur:masterfrom
root with config_dir and data_dir#112rossmacarthur merged 2 commits intorossmacarthur:masterfrom
Conversation
rossmacarthur
requested changes
Oct 8, 2020
Comment on lines
+705
to
+706
| ("directory", "dir"), | ||
| ("filename", "file"), |
Owner
There was a problem hiding this comment.
I think it would also be fine to remove the directory and filename functionality and deprecation warnings. They have been logged in four releases now, 0.5.0 to 0.5.4.
Contributor
Author
|
(The branch will be cleaned up once the PR is ready to be merged.) |
rossmacarthur
approved these changes
Oct 12, 2020
Owner
rossmacarthur
left a comment
There was a problem hiding this comment.
I'm happy with these changes, can we get them in soon?
… for configuration and data files, respectively. Using distinct path
variables allows Sheldon to support different directory layouts, such as
the recently implemented XDG base directory specification.
Both `config_dir` and `data_dir` default to the same path as the late
`root`, `$HOME/.sheldon`, making the change transparent to users of
Sheldon's default configuration. However, the change is breaking for
users who relied on any of the following:
- the `--root` flag
- the `SHELDON_ROOT` environment variable
- the `{{root}}` template variable
Namely `directory` and `filename`.
25deb89 to
dd947a5
Compare
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As briefly discussed in #110, it may be time to do away with the notion of a unified Sheldon root and define individual directories for data and configuration, which are a baseline requirement for the support of alternative directory layouts such as XDG .
As implemented, the change cannot be rightfully called a deprecation, as
rootis baldly scraped off the user interface:--rootcauses commands to be refused.$SHELDON_ROOTis silently ignored.{{root}}template variable offers a warning.We may be happy with this, or we may opt for a more cautious approach and implement some simple deprecation mechanism for disused flags and environment variables.
It should be noted that the removal of
rootis not a breaking change for users who retained Sheldon's default directory configuration—a significant majority, I would expect.