Skip to content

Allow using cabal program itself as the external setup method - #2633

Merged
dcoutts merged 1 commit into
haskell:masterfrom
tibbe:act-as-setup
Jun 3, 2015
Merged

dcoutts merged 1 commit into
haskell:masterfrom
tibbe:act-as-setup

Conversation

@tibbe

@tibbe tibbe commented Jun 1, 2015

Copy link
Copy Markdown
Contributor

This fixes issues when the version of Cabal that cabal-install was built
against differs from the one registered in the local package DB. Normally
we compile an external setup against the local Cabal library, which could
lead to failures or inconsistent results compared to using the internal
method.

@dcoutts

dcoutts commented Jun 1, 2015

Copy link
Copy Markdown
Contributor

Just a -Werror issue.

@23Skidoo

23Skidoo commented Jun 1, 2015

Copy link
Copy Markdown
Member

getExecutablePath is not available on GHC 7.4.2, we'll need to add it to one of the D.C.Compat modules.

@dcoutts

dcoutts commented Jun 1, 2015

Copy link
Copy Markdown
Contributor

Right, will have to do that.

@dcoutts

dcoutts commented Jun 1, 2015

Copy link
Copy Markdown
Contributor

BTW, @tibbe and I did this together, so the design has my +1 already. Needs some testing though.

@tibbe

tibbe commented Jun 1, 2015

Copy link
Copy Markdown
Contributor Author

I believe I fixed the -Werror issue (and closed to old pull request due to a restriction on not using git push -f on haskell/cabal). Will look into getExecutablePath tonight.

@tibbe

tibbe commented Jun 1, 2015

Copy link
Copy Markdown
Contributor Author

I've addressed the backwards compat issue with getExecutablePath. Turn out we already had a compat version for it in the repo.

@dcoutts

dcoutts commented Jun 2, 2015

Copy link
Copy Markdown
Contributor

I guess we ought to try and reproduce #2438 or #1938 and check this fixes it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a comment that explains the logic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the logic is a bit subtle. Could put in a comment here based on my explanation here #1938 (comment)

In particular we need to say that forceExternalSetupMethod is really about using an external process, due to parallel build concerns, since that's not totally clear.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth renaming it then.

@23Skidoo

23Skidoo commented Jun 2, 2015

Copy link
Copy Markdown
Member

LGTM.

@tibbe

tibbe commented Jun 2, 2015

Copy link
Copy Markdown
Contributor Author

I've verified that this fixes #2438 and #1938. I've also added some comments based on @dcoutts explanation.

This fixes issues when the version of Cabal that cabal-install was built
against differs from the one registered in the local package DB. Normally
we compile an external setup against the local Cabal library, which could
lead to failures or inconsistent results compared to using the internal
method.

This fixes haskell#2438 and fixes haskell#1938.
@23Skidoo

23Skidoo commented Jun 2, 2015

Copy link
Copy Markdown
Member

Let's merge!

@tibbe

tibbe commented Jun 2, 2015

Copy link
Copy Markdown
Contributor Author

@dcoutts?

dcoutts added a commit that referenced this pull request Jun 3, 2015
Allow using cabal program itself as the external setup method
@dcoutts
dcoutts merged commit 70600e9 into haskell:master Jun 3, 2015
@dcoutts

dcoutts commented Jun 3, 2015

Copy link
Copy Markdown
Contributor

Yarr!

nomeata added a commit to nomeata/ghc-heap-view that referenced this pull request Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants