Conversation
|
I fill uneasy by this. What So I'd assume that I think we should not move generation of If there's some problem to be solved, it should take into account the preprocessors. EDIT: if we need a separate step to call preprocessors, then we should add one. |
|
I share your uneasienss, since I myself do not understand the big image. |
|
One idea is to generate EDIT: good opportunity to revisit what all the |
|
maybe, as a first step of a more integral solution like the suggested one by @phadej could be activate the generation of files with a flag (the next step?) so |
I don't disagree: most functionality of And the information is a bit like producing |
|
... however. So I would leave configure :: (GenericPackageDescription, HookedBuildInfo)
-> ConfigFlags -> IO LocalBuildInfoas is, and consider generation of |
|
We never followed this idea, so closing |
Please include the following checklist in your PR:
[ci skip]is used to avoid triggering the build bots.Please also shortly describe how you tested your change. Bonus points for added tests!
Aims to fix #2209. Generates
Paths_*.hsandcabal_macros.hin configure phase.We do that by moving the function
writeAutogenFilesinto theConfigure.hsfile and generating the files after theLocalBuildInfohas been created.This PR has only been manually tested. Deleted
dist-newstylein a project.Then made sure that
cabal build --only-configuregenerates bothPaths_*.hsandcabal_macros.h.Roughly, the following tree was generated:
`dist-newstyle` after `cabal build --only-configure`
Afterwards, we executed
cabal buildand dist-newstyle had the following structure:`dist-newstyle` after `cabal build --only-configure` followed by `cabal build`
In comparison, the dist-newstyle is identical when
cabal buildis invoked directly without invokingcabal build --only-configurefirst.I was unable to prove that the
configurefunction inCabalis actually called bycabal v2-build, therefore we still call the functionwriteAutogenFilestransitively inbuild.Ifconfigureis called bycabal v2-buildthen we could omit this call.EDIT: removing the call to
writeAutogenFilesinbuildseems to work as expected.cc @jneira