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

Track language extensions and language flavours in the solver. #2732

Closed
wants to merge 1 commit into from

Conversation

kosmikus
Copy link
Contributor

This should fix #2644.

Every package now "depends" on all language extensions
(default-extensions and other-extensions) and language flavours
(default-language and other-languages) it declares in its cabal file.

During solving, we verify that the compiler we use actually
supports selected extensions and languages. This has to be done
during solving, because flag choices can influence the declared
extensions and languages being used.

There currently is no equivalent check performed on the generated
install plans. In general, cabal-install performs a sanity check
on the solver output, checking that the solver e.g. indeed includes
all the declared dependencies of a package. There is no such
double-checking for language extensions. This is not really
problematic, as all that this change does is to make the solver
more conservative rather than less. However, having a sanity check
available might ultimately be nice to have.

I'll also look into adding tests for this. So don't merge just yet, the PR
is mainly here already to make it possible for others to test and give
feedback.

Every package now "depends" on all language extensions
(default-extensions and other-extensions) and language flavours
(default-language and other-languages) it declares in its cabal file.

During solving, we verify that the compiler we use actually
supports selected extensions and languages. This has to be done
during solving, because flag choices can influence the declared
extensions and languages being used.

There currently is no equivalent check performed on the generated
install plans. In general, cabal-install performs a sanity check
on the solver output, checking that the solver e.g. indeed includes
all the declared dependencies of a package. There is no such
double-checking for language extensions. This is not really
problematic, as all that this change does is to make the solver
more conservative rather than less. However, having a sanity check
available might ultimately be nice to have.
@hvr
Copy link
Member

hvr commented Jul 24, 2015

have some 🍰 & many 🍻 =)

@dcoutts
Copy link
Contributor

dcoutts commented Jul 25, 2015

Good stuff.

@23Skidoo
Copy link
Member

Good stuff indeed!

@hvr
Copy link
Member

hvr commented Aug 4, 2015

@23Skidoo so... what's keeping this from being merged? :-)

@23Skidoo
Copy link
Member

23Skidoo commented Aug 4, 2015

@hvr

Quoting @kosmikus:

I'll also look into adding tests for this. So don't merge just yet, the PR
is mainly here already to make it possible for others to test and give
feedback.

@ezyang
Copy link
Contributor

ezyang commented Sep 24, 2015

Remove action-required when tests are pushed.

jdnavarro added a commit to jdnavarro/cabal that referenced this pull request Oct 14, 2015
The tests now build successfully but still fail. See haskell#2732.
jdnavarro added a commit to jdnavarro/cabal that referenced this pull request Oct 15, 2015
jdnavarro added a commit to jdnavarro/cabal that referenced this pull request Oct 15, 2015
This also includes modifications to the solver testing DSL and the
testing functions.

See haskell#2732.
jdnavarro added a commit to jdnavarro/cabal that referenced this pull request Oct 15, 2015
This also includes modifications to the solver testing DSL and the
testing functions.

This is ready for review at PR haskell#2732.
jdnavarro added a commit to jdnavarro/cabal that referenced this pull request Oct 29, 2015
This also includes modifications to the solver testing DSL and the
testing functions.

This is necessary for merging PR haskell#2732.
jdnavarro added a commit to jdnavarro/cabal that referenced this pull request Nov 25, 2015
This also includes modifications to the solver testing DSL and the
testing functions.

This is necessary for merging PR haskell#2732.
@grayjay
Copy link
Collaborator

grayjay commented Nov 27, 2015

I think this can be closed because the commit was contained in #2873.

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.

Cabal solver shall consider *-extensions
6 participants