Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tapeinosyne
Copy link
Contributor

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 root is baldly scraped off the user interface:

  • --root causes commands to be refused.
  • $SHELDON_ROOT is silently ignored.
  • the {{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 root is not a breaking change for users who retained Sheldon's default directory configuration—a significant majority, I would expect.

src/config.rs Outdated
Comment on lines 705 to 706
("directory", "dir"),
("filename", "file"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tapeinosyne tapeinosyne marked this pull request as draft October 8, 2020 12:25
@tapeinosyne
Copy link
Contributor Author

(The branch will be cleaned up once the PR is ready to be merged.)

Copy link
Owner

@rossmacarthur rossmacarthur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`.
@tapeinosyne tapeinosyne marked this pull request as ready for review October 12, 2020 17:31
@rossmacarthur rossmacarthur merged commit fc7be5e into rossmacarthur:master Oct 14, 2020
@rossmacarthur
Copy link
Owner

Thanks!

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