[GHC] #15540: GHCi does not follow the XDG Base Directory Specification

#15540: GHCi does not follow the XDG Base Directory Specification -------------------------------------+------------------------------------- Reporter: rszibele | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.0.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Hello, GHCi does not follow the XDG Base Directory Specification by default on GNU/Linux based operating systems. It creates for instance the file $HOME/.ghc/ghci_history which belongs in $XDG_CACHE_HOME/ghc/ , or $HOME/.cache/ghc/ if $XDG_CACHE_HOME is not set. $ ghci --version The Glorious Glasgow Haskell Compilation System, version 8.0.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15540 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15540: GHCi does not follow the XDG Base Directory Specification -------------------------------------+------------------------------------- Reporter: rszibele | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.0.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * keywords: => newcomer Comment: For the record, the specification says the following:
`$XDG_CACHE_HOME` defines the base directory relative to which user specific non-essential data files should be stored. If `$XDG_CACHE_HOME` is either not set or empty, a default equal to `$HOME/.cache` should be used.
Indeed `.ghci_history` is rather non-essential. However, what is the argument for singling out `.ghci_history`? GHC puts all kinds of things in `~/.ghc`, including the user package database. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15540#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15540: GHCi does not follow the XDG Base Directory Specification -------------------------------------+------------------------------------- Reporter: rszibele | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.0.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rszibele): The package database would also belong in `$XDG_CACHE_HOME/ghc`, I used `.ghci_history` as an example. Supporting the XDG Base Directory Specification would allow users to easily back up their configuration files while at the same time not including cache in the backup. It also allows for deleting the cache of a user without having to check which files are essential and which files aren't, as one could simply delete all files in `$XDG_CACHE_HOME/`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15540#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15540: GHCi does not follow the XDG Base Directory Specification -------------------------------------+------------------------------------- Reporter: rszibele | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.0.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by potato44):
The package database would also belong in `$XDG_CACHE_HOME/ghc`
I don't think this is quite right, I believe you are meant to be able to delete the cache directory without ill effect. I believe the correct directory would be `$XDG_DATA_HOME/ghc`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15540#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15540: GHCi does not follow the XDG Base Directory Specification -------------------------------------+------------------------------------- Reporter: rszibele | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.0.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #6077 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by potato44): * related: => #6077 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15540#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15540: GHCi does not follow the XDG Base Directory Specification -------------------------------------+------------------------------------- Reporter: rszibele | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: GHCi | Version: 8.0.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #6077 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by gueux): * cc: gueux (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15540#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC