-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Use XDG dirs per spec #2135
Closed
+416
−112
Closed
Use XDG dirs per spec #2135
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d9ba5f8
expose only select paths from loader
mmatous 3c17e68
drop etcetera in favor of directories
mmatous 78e756d
allow setting config location via HELIX_CONFIG
mmatous 1d46f55
support setting paths from config file
mmatous ea4bae0
reorganize project directory structure
mmatous 8f5813a
update docs
mmatous 5683e80
Switch to updated etcetera
mmatous 020182f
Fix docs/impl disparity
mmatous File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ etcetera was specifically chosen because it uses XDG on macOS instead of system directories. For a command line tool it makes more sense to use XDG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
directories
/dirs
is also deprecated in favour of dirs-next (used by etcetera) https://www.reddit.com/r/rust/comments/pps4f0/directories_crate_version_400_broken_on_macos/There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by system directories? Going by directories' README and etcetera code, all paths used on macOS begin with
$HOME/Library
. Both crates behave the same way.directories
crate isn't deprecated. It has more recent release than the *-next forks or etcetera and it's the only cross-platform crate I found that bothered to incorporateXDG_STATE_HOME
. The Reddit link says nothing about deprecation either, just random people recommending directories-next, one without explanation and other saying "might be good alternative". It may have been at the time but now it's *-next that's outdated.I'm open to using whatever, but etcetera and directories-next aren't up-to-date and don't do what's required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of the defining features of etcetera: https://docs.rs/etcetera/latest/etcetera/base_strategy/fn.choose_base_strategy.html
Meanwhile it's not implemented in directories-next: xdg-rs/dirs#45
directories had a minor release last year but it's unmaintained. Most crates switched over to directories-next after original author stopped responding: https://www.reddit.com/r/rust/comments/gli4pc/directoriesnext_dirsnext_the_new_home_for/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I only looked at the Apple strategy. I created a PR lunacookies/etcetera#1 to support state. Etcetera dev seems fairly active so hopefully it'll be merged soon.