Skip to content

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

Closed
kosmikus wants to merge 1 commit into
haskell:masterfrom
kosmikus:ks-extensions
Closed

kosmikus wants to merge 1 commit into
haskell:masterfrom
kosmikus:ks-extensions

Conversation

@kosmikus

Copy link
Copy Markdown
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

hvr commented Jul 24, 2015

Copy link
Copy Markdown
Member

have some 🍰 & many 🍻 =)

@dcoutts

dcoutts commented Jul 25, 2015

Copy link
Copy Markdown
Contributor

Good stuff.

@23Skidoo

Copy link
Copy Markdown
Member

Good stuff indeed!

@hvr

hvr commented Aug 4, 2015

Copy link
Copy Markdown
Member

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

@23Skidoo

23Skidoo commented Aug 4, 2015

Copy link
Copy Markdown
Member

@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

ezyang commented Sep 24, 2015

Copy link
Copy Markdown
Contributor

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.
@sebright

Copy link
Copy Markdown
Collaborator

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