You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What's the use case for the state folder? If it's for storing log files then renaming it to logs or similar would be reasonable. Otherwise the value $HOME/Library/Logs on macos for a state folder does not make sense.
What's the use case for the state folder? If it's for storing log files then renaming it to logs or similar would be reasonable. Otherwise the value $HOME/Library/Logs on macos for a state folder does not make sense.
The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:
actions history (logs, history, recently used files, …)
current state of the application that can be reused on a restart (view, layout, open files, undo history, …)
It's not only related to logs, as an example it's also used to store swap files by neovim. Should I change the name nonetheless?
I know that $XDG_STATE_HOME can be used for more than log files. This is not the issue. The issue is that requesting the state folder on macos will return $HOME/Library/Logs which is bad. What if the application wants to store swap files as you mentioned? Obviously that shouldn't be stored $HOME/Library/Logs.
If the folder name would be renamed to logs then the defaults on all platforms are reasonable and there is no longer an issue:
On windows, storing log files in %LOCALAPPDATA%\Temp is reasonable
On macos, storing log files in $HOME/Library/Logs is reasonable
On unix, storing log files in $XDG_STATE_HOME is reasonable
Otherwise, a better directory for macos needs to be found.
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
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.
No description provided.