Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstall add-source deps even when LBI can't be loaded. #3138

Conversation

23Skidoo
Copy link
Member

But only if it happens due to version mismatch. Fixes #3136.

@23Skidoo
Copy link
Member Author

/cc @ttuegel

@23Skidoo
Copy link
Member Author

This bites me quite often when working on cabal-install, BTW, now that it uses build-type: Custom.

@23Skidoo 23Skidoo force-pushed the reinstall-add-source-before-loading-lbi branch from 9f91a7c to ff86ffa Compare February 12, 2016 15:12
@23Skidoo
Copy link
Member Author

Replaced calls to die with notice.

@23Skidoo 23Skidoo force-pushed the reinstall-add-source-before-loading-lbi branch from ff86ffa to b26e52f Compare February 13, 2016 16:30
@23Skidoo
Copy link
Member Author

This is somewhat fragile when you're using multiple compilers inside the same sandbox because we can't tell which compiler the project was configured with (since we couldn't load the LBI). Fixing this properly will be a bit more involved, so I'm postponing this for after 1.24.

@23Skidoo 23Skidoo force-pushed the reinstall-add-source-before-loading-lbi branch 3 times, most recently from 71c457a to 7a0ea82 Compare February 20, 2016 21:13
But only if it happens due to version mismatch. Fixes haskell#3136.
@23Skidoo 23Skidoo force-pushed the reinstall-add-source-before-loading-lbi branch from 7a0ea82 to 354757c Compare February 21, 2016 16:31
@23Skidoo
Copy link
Member Author

This is somewhat fragile when you're using multiple compilers inside the same sandbox because we can't tell which compiler the project was configured with (since we couldn't load the LBI). Fixing this properly will be a bit more involved, so I'm postponing this for after 1.24.

Having thought a bit more about this, I now believe we should make the case of unreadable LBI an error and just always compile setup scripts with the same Cabal version that cabal-install was built with, installing it automatically if necessary. Now that we have setup dependencies (thanks, @edsko!) this should be easier to implement. The only potentially problematic case is when an old cabal-install tries to compile a setup script that doesn't support old versions of Cabal, but then we should just advise the user to upgrade (and the error shouldn't preclude upgrading cabal-install itself).

Also, we should get better at bumping version numbers of development snapshots when the LBI format is changed (#3181).

@ttuegel
Copy link
Member

ttuegel commented Feb 23, 2016

Having thought a bit more about this, I now believe we should make the case of unreadable LBI an error and just always compile setup scripts with the same Cabal version that cabal-install was built with, installing it automatically if necessary. Now that we have setup dependencies (thanks, @edsko!) this should be easier to implement. The only potentially problematic case is when an old cabal-install tries to compile a setup script that doesn't support old versions of Cabal, but then we should just advise the user to upgrade (and the error shouldn't preclude upgrading cabal-install itself).

I strongly agree. I would never expect an old cabal-install to work with a newer Cabal, or if it did, I would consider it a happy accident. Not only does this simplify things for us, it will be easier for users to understand what's gone wrong and how to correct it ("Your cabal-install is too old, please upgrade.")

@23Skidoo
Copy link
Member Author

I now believe we should make the case of unreadable LBI an error and just always compile setup scripts with the same Cabal version that cabal-install was built with

This will also make life a bit harder for developers, but with #3181 fixed, I think we'll cope.

@23Skidoo
Copy link
Member Author

23Skidoo commented Mar 26, 2019

This PR has bitrotted and was obsoleted by new-build, closing.

@23Skidoo 23Skidoo closed this Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants