Inconsistent behavior between custom and simple build types #707

Open
bos opened this Issue May 24, 2012 · 6 comments

Comments

Projects
None yet
4 participants
Contributor

bos commented May 24, 2012

(Imported from Trac #716, reported by @j3h on 2010-07-23)

If a Custom build-type is used, Setup.hs may be built with a different version of Cabal than the one that cabal-install was built with. This can cause hard-to-find (seemingly random) build failures.

Perhaps cabal-install should warn when it runs Setup.hs with a different version of Cabal than the one that it was built with. Alternatively, it could fail if the version of Cabal that cabal-install was built with is not available when compiling the Setup script.

Contributor

bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-07-23)

I guess we could warn. In general we do need to be able to build using a different Cabal version, even for build-type Simple.

The current behaviour is to use a Cabal lib version that is the same major version as the version that cabal-install was built with, and otherwise to use whatever is the latest available version that meets the version constraints specified in the .cabal file.

@ttuegel ttuegel modified the milestone: Cabal-1.24, _|_ Feb 25, 2015

ttuegel added the easy label Feb 25, 2015

Member

ttuegel commented Feb 25, 2015

It should be easy to add a warning, and we've seen an uptick in issues related to this, so I'm changing the milestone.

@23Skidoo 23Skidoo modified the milestone: Cabal 1.24, Cabal 1.26 Feb 21, 2016

@ezyang ezyang modified the milestone: Cabal 2.0, 2.0 Sep 6, 2016

Contributor

ezyang commented Sep 6, 2016

@ttuegel is your reconfigure branch going to fix this? If not, are you planning to fix it? (O/w I'm going to unmilestone this.)

ttuegel was assigned by ezyang Sep 6, 2016

Member

ttuegel commented Sep 6, 2016

I can't fix it per se because it's a collection of known and unknown issues, but we can throw out a warning when we fall back to an external setup using an older Cabal library. Actually, that's something I can do in my SetupWrapper refactor...

Contributor

ezyang commented Sep 6, 2016

OK, so let's aim this for 2.0 :)

Member

23Skidoo commented Sep 6, 2016

but we can throw out a warning when we fall back to an external setup using an older Cabal library.

Oh yes, we should have done this long ago.

@ttuegel ttuegel pushed a commit to ttuegel/cabal that referenced this issue Sep 7, 2016

Thomas Tuegel Warn when external Setup uses old Cabal
Fixes #707.
96f0f94

@ttuegel ttuegel pushed a commit to ttuegel/cabal that referenced this issue Sep 9, 2016

Thomas Tuegel Warn when external Setup uses old Cabal
Fixes #707.
9707798

@23Skidoo 23Skidoo modified the milestone: 2.0.1, 2.0 Feb 17, 2017

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