feat!: Store logs under XDG_STATE_HOME#12051
Conversation
| --- | ||
|
|
||
| - before: logs are stored under `${XDG_CACHE_HOME:-$HOME/.cache}/cabal/logs` | ||
| - after: logs are stored under `${XDG_STATE_HOME:-$HOME/.local/state}/cabal/logs` |
There was a problem hiding this comment.
There is related documentation that would need to be changed alongside this *.hs change.
Line 744 in e4d6c7c
There was a problem hiding this comment.
The location can be varied with this option marked as "Not implemented yet".
cabal/doc/cabal-project-description-file.rst
Lines 1854 to 1863 in e4d6c7c
| "cabal-version": "3.14.1.0", | ||
| "compiler": { | ||
| "flavour": "ghc", | ||
| "id": "ghc-9.8.2", | ||
| "path": "/home/alice/.ghcup/bin/ghc" | ||
| }, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
I expect cabal/cabal-install/src/Distribution/Client/Config.hs Lines 826 to 828 in d1fc7dc but $ ghcup install cabal -u https://github.com/haskell/cabal/releases/download/cabal-head/cabal-head-Linux-x86_64.tar.gz head
$ cabal-head --version
cabal-install version 3.17.0.0
compiled using version 3.17.0.0 of the Cabal library
$ cabal-head user-config init --force
$ cabal-head path | grep -F /.local/state
Warning: this is a debug build of cabal-install with assertions enabled.I failed to build cabal locally, so I’m not confident if this patch change the location. |
If you make sure CI succeeded, you can get binaries in the artifacts section |
|
@ulysses4ever Thank you for your suggestion. |
https://specifications.freedesktop.org/basedir/0.8/#variables: > 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, …)
https://specifications.freedesktop.org/basedir/0.8/#variables:
Please read Github PR Conventions and then fill in one of these two templates.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.