Skip to content
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

change the default of cabal v2-configure #6016

Closed
phadej opened this issue Apr 26, 2019 · 8 comments
Closed

change the default of cabal v2-configure #6016

phadej opened this issue Apr 26, 2019 · 8 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Apr 26, 2019

It says:

The 'cabal.project.local' file persists across 'clean' but is overwritten
on the next use of the 'configure' command. The intention is that the
'cabal.project' file should be kept in source control but the
'cabal.project.local' should not.

but I often have non-trivial configuration there, e.g.

package Cabal
  ghc-options: -Werror

and if I accidentally cabal v2-configure, that setup is gone. As cabal.project.local files aren't checked into VCS, overwriting them is destructive, and irreversible operation.

I suggest v2-configure to abort if cabal.project.local exists. And possibly have a --force flag.

@23Skidoo
Copy link
Member

package Cabal
  ghc-options: -Werror

Why not put this stuff in cabal.project?

@phadej
Copy link
Collaborator Author

phadej commented Apr 26, 2019 via email

@23Skidoo
Copy link
Member

OK. May be easier to introduce a new local config file (cabal.project.user or cabal.project.extra) file for such customisations.

@hvr
Copy link
Member

hvr commented Apr 26, 2019

btw, in order to address this very issue we already implemented a failsafe when this came up some time ago already: when you v2-configure a backup of the old file is created at cabal.project.local~; see #3943

and therefore

As cabal.project.local files aren't checked into VCS, overwriting them is destructive, and irreversible operation.

is not fully accurate.

@ulysses4ever
Copy link
Collaborator

Not much activity here: I take it people have been satisfied with the current behavior of configure, where it backs up an existing cabal.project.local, if any. Maybe this could be closed?

@Mikolaj
Copy link
Member

Mikolaj commented Jul 18, 2022

Also, there's been some major activity about it in #7402 (and minor in #6877), so this is probably quite obsolete. Closing. Thank you, everybody.

@Mikolaj Mikolaj closed this as completed Jul 18, 2022
@fgaz
Copy link
Member

fgaz commented Jul 18, 2022

There's also the --enable-append option that can be set globally in ~/.cabal/config

@andreasabel
Copy link
Member

I take it people have been satisfied with the current behavior of configure, where it backs up an existing cabal.project.local,

I am not, see #8408.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants