-
Notifications
You must be signed in to change notification settings - Fork 704
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
Repeated v2-configure floods working directory with cabal.project.local files. #7180
Comments
The backup logic is introduced in #6877, because when Alternatively you may introduce a flag to not backup. I won't accept changing the default. |
Justified, yes. But it makes no sense to litter the directory with identical files, no matter if human runs the configure or machine.
That just means we're basically reverting #6877 and if someone did change cabal.project.local before machine ran, it gets deleted… Anyway, I'm not suggesting changing the default, just would love a flag that stops the file from being output all together. When making backups, it shouldn't make identical copies, this just seems like oversight. |
It always create a backup. It's simple and predictable behavior. If you don't want/need backups, add a flag. |
I may want backups. I don't want same file 50 times. The whole point of the backup was to not lose any custom user stuff that may have been added, not to make a new file for the sake of it. |
My two cents: dont copy again if contents are exactly the same seems quite predictable to me and only slightly less simple. |
Adding a flag to not do backup at all is independent of "smarter backup" . This issue is about former, as far as I understand. I'm not confident of making backup smarter, as that's an issue where bugs shouldn't exist (otherwise a user may be very angry). |
I suffer from this feature too. I think making backups is an obsolete approach predating version control system. If this file is really important to developer he would commit/stash current state. |
So why not autocommit this file before changing instead of make backups?! |
EDIT: I don't see why you would do repeated |
I see. Did anybody suggest to keep backups in a sub folder? |
There was one given in the OP: getting up to date |
|
Hm. If this works then great. Indeed I'm looking at
So if |
This is correct. If necessary, |
@emilypi could you describe how #7402 addresses this particular issue? I'm not saying it doesn't – but it's a big MR and it's hard to tell: at first glance, one might think that this issue getting closed means that cabal v2-configure won't make spurious back-ups anymore but I don't think that's what #7402 actually does. |
#7402 changes |
Awesome, thank you! |
Describe the bug
Every time
cabal v2-configure --verbose=0
is ran, a newcabal.project.local
file is created with the old one being moved to a new filename. This can very quickly flood the current directory which is especially annoying in IDE file explorers and such.To Reproduce
Go to any cabal-capable Haskell project. Run
The problem is made worse by the fact that the contents of each of these files is the same
I have tried adding
verbose: 0
(not what I actually want though) andignore-project
intocabal.project
file but the file is made regardless.Expected behavior
My wishlist:
System information
I'm using the 3.4-rc4 commit of cabal-install: 81fd8d9
Additional context
My use-case for running configure so many times is that we use a Shake-based build system to build our code but use cabal to provide all the dependencies. This means that we need the
plan.json
file to be present and up to date and so runv2-configure
for it. Likewise, this file is needed forcabal-cache
to work. I want to pass--verbose=0
in configure stage only as I don't want to see the full configure output in middle of other messages from the build system. I can try to limit how often the configure is ran but the problem remains in that very quickly working directory ends up full ofcabal.project.local~N
files. I could remove these after running configure but that seems potentially wrong lest we do actually want to put some extra flags in there.The text was updated successfully, but these errors were encountered: