-
Notifications
You must be signed in to change notification settings - Fork 697
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
cabal v2-clean does not run pre or postClean nor use the field extra-tmp-files. #6112
Comments
D'oh! My bad, largely because I didn't know that |
Not a problem. I too was not aware of |
An you point to your package and its Setup.hs
I think that `extra-tmp-files` is a misfeature, and you rather should generate files in autogen directory
In other words, we try to avoid having any in-tree build artifacts, temporary or not.
—-
it’s good to fix extra-tmp-files handling for compat reasons, but I’d discourage their usage.
… On 27 Jun 2019, at 14.01, mdgabriel ***@***.***> wrote:
Not a problem. I too was not aware of extra-tmp-files either until my postClean did not work with cabal v2-clean. Actually, for me and for my package extra-tmp-files is the better solution than postClean.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Well ... that is rather obvious. Thank you. I followed this advice since This is to say, I need neither Given my new understanding of how v2 commands work, I would say that I do not have an opinion about |
How should one handle the
So moving the file to a different directory doesn't seem to be an option. EDIT: It might have been a documentation issue, it does seem to work when the buildinfo file isn't at the root |
Describe the bug
For cabal 2.4.1.0, cabal v2-clean does not execute the preClean nor the postClean hooks whereas cabal v1-clean does execute them. Also, cabal v2-clean does not use the field extra-tmp-files in the project.cabal file whereas cabal v1-clean does use it to remove temporary files.
Note that cabal v2-build and cabal v1-build both execute the preBuild and postBuild hooks.
To Reproduce
Setup.hs:
project.cabal:
Essentially, cabal v1-build and cabal v2-build will both print "My preBuild" and "My postBuild" whereas cabal v1-clean will print "My preClean" and "My postClean" but cabal v2-clean will not print these two messages. Finally, cabal v1-clean will remove "aTmpFileToRemoveOnClean" but cabal v2-clean will not remove the file.
Expected behavior
I expect cabal v2-clean to execute the preClean and postClean hooks and to use the field
extra-tmp-files of the package.cabal file as does cabal v1-clean. If this is not the goal for v2, then I need a procedure to clean up after a cabal v2-build with cabal v2-clean.
System informataion
Ubuntu 16.04.6 LTS (Xenial Xerus)
cabal
,ghc
versions$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.6.5
Additional context
The issue was discovered with a cabal package that I am creating that uses
bnfc --haskell
via the hookedPreProcessors record.The text was updated successfully, but these errors were encountered: