Automatic package reconfiguration and ConfigExFlags
ttuegel at gmail.com
Fri Aug 17 04:32:45 CEST 2012
On Thu, Aug 16, 2012 at 9:19 PM, Mikhail Glushenkov
<the.dead.shall.rise at gmail.com> wrote:
> On Tue, Aug 14, 2012 at 12:29 AM, Thomas Tuegel <ttuegel at gmail.com> wrote:
>> ConfigExFlags affect dependency
>> resolution during configuration, so automatic reconfiguration that
>> ignores them may silently and unexpectedly change how the package is
>> linked. I'm concerned this could (hypothetically) lead to linking to a
>> different version of a dependency, causing build failure (or worse, if
>> different versions of the dependency have different behaviours).
> The obvious solution is to save ConfigureExFlags between runs, just
> like is done with LocalBuildInfo, but in a separate, cabal-install
> specific, file (e.g., dist/cabal-install-setup-config). From a brief
> glance at the code, this requires changing only 'reconfigure' in
> cabal-install/Main.hs. Are there reasons to prefer merging
> ConfigExFlags with ConfigFlags instead?
You will need to change 'reconfigure' to load and reuse the
ConfigExFlags, but you would also need to change 'configureAction' to
save them in the first place.
There's no particular reason _not_ to save the ConfigExFlags in a
separate file, except this: At one time (and this may still be true,
I'm not the authority on this) there was a plan to move all the Simple
build system stuff out of Cabal and into cabal-install, at which time
the ConfigFlags and ConfigExFlags would presumably be merged, solving
the problem "for free," essentially.
If this is no longer the plan, or if the desired time frame for fixing
this bug is shorter than this plan's time-to-completion, then we
should probably do as you suggest.
More information about the cabal-devel