Should cabal configure recognize changes in cabal.config? #1992

Open
spl opened this Issue Jul 14, 2014 · 5 comments

Projects

None yet

6 participants

@spl
spl commented Jul 14, 2014

Through my experimentation, it seems like cabal.config is not considered for cabal configure. For example, change a version number in cabal.config and configure still thinks you're using the previous version (if it's still available in a package database).

First, is this always true?

Second, is it possible to always reconfigure if cabal.config changes, much like we do when the .cabal file changes?

My use case for the latter is when sharing a cabal.config file among multiple people in a repository for the same project. When somebody updates the cabal.config, it should cause a reconfigure for everybody else.

I suppose an alternative approach would be to put those constraints directly into the .cabal file. But that makes it more difficult to use cabal freeze.

@tibbe
Member
tibbe commented Jul 14, 2014

We should always reconfigure if cabal.config changes, but I don't think that's working correctly now. For example, if you have already configured and the add a cabal.config and run configure again, the cabal.config is not picked up.

We need

  • easily reproduced examples of when things aren't working and
  • someone willing to take a stab at fixing them.

The latter could probably reuse existing logic for .cabal file changes.

@23Skidoo
Member

I thought I've already implemented this check; will try to find time to look into it again. Examples showing when the things don't work are of course welcome.

@23Skidoo 23Skidoo self-assigned this Jul 14, 2014
@tibbe
Member
tibbe commented Jul 14, 2014

@23Skidoo the example I gave, with adding a cabal.config after already having configured once, should trigger a problem.

@spl
spl commented Jul 14, 2014

@23Skidoo Any common change to the cabal.config file (e.g. version change or constraint addition) did not trigger a reconfigure. I was working on a simple example to see what changes mattered, but it turned out that every one I tried produced the same result. Since it was so easy, I didn't include an example in this issue.

@mietek
Contributor
mietek commented Dec 10, 2014

Halcyon includes a workaround for this issue.

@ttuegel ttuegel added this to the cabal-install-1.24 milestone Apr 24, 2015
@23Skidoo 23Skidoo removed their assignment Jul 27, 2016
@ezyang ezyang modified the milestone: cabal-install 2.0 Sep 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment