[Hackage] #542: installing cabal-install refers to editing nonexistent file $HOME/.cabal/config

#542: installing cabal-install refers to editing nonexistent file $HOME/.cabal/config ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: minor | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ {{{cabal --help}}} invites me to edit a file that doesn't exist, and I can't easily find documentation for the file: {{{ : nr@homedog 5520 ; cabal --help This program is the command line interface to the Haskell Cabal infrastructure. ... You can edit the cabal configuration file to set defaults: /home/nr/.cabal/config : nr@homedog 5521 ; ls -l /home/nr/.cabal/config ls: cannot access /home/nr/.cabal/config: No such file or directory }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/542 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#542: installing cabal-install refers to editing nonexistent file $HOME/.cabal/config ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: minor | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): The config file gets created the first time you run any interesting command, like update or install. What do you think we should do about this situation? I updated the README recently so that it's a bit clearer that one should run update before editing the config file. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/542#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#542: installing cabal-install refers to editing nonexistent file $HOME/.cabal/config ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: minor | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment (by nr): I think the config file should be created at install time. It's a reasonable expectation and will prevent you from having to change documentation. If you can find no other way, it's better to run 'cabal update' at install time than it is to leave things as they are now. But it would be still better to have a cabal command just to create the config file and to run that. After all, code to 'create config if it does not already exist' has got to be right handy someplace... -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/542#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#542: installing cabal-install refers to editing nonexistent file $HOME/.cabal/config ---------------------------------+------------------------------------------ Reporter: nr | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: minor | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): Replying to [comment:2 nr]:
I think the config file should be created at install time. It's a reasonable expectation and will prevent you from having to change documentation. If you can find no other way, it's better to run 'cabal update' at install time than it is to leave things as they are now.
Unfortunately we cannot do anything at install time, only the first time the program is used.
But it would be still better to have a cabal command just to create the config file and to run that. After all, code to 'create config if it does not already exist' has got to be right handy someplace...
Right but the problem is you're not going to know that you should run that. Perhaps cabal --help should check if the config file exists before saying you can edit it. If it doesn't exist, perhaps it should suggest running cabal update. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/542#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage