Add a flag to allow for several versions of the same package to co-exist in an install plan #1115

Open
23Skidoo opened this Issue Nov 15, 2012 · 5 comments

Projects

None yet

6 participants

@23Skidoo
Haskell member

In this Reddit discussion, Simon Marlow mentions that it would be nice (and presumably not very difficult) to add a flag to allow several versions of the same package to co-exist in an install plan. Since GHC already versions all symbols, conflicts will be discovered at compilation time.

/cc @kosmikus

@kosmikus

This is much less trivial than it might sound. First of all, it means that we move from solving a constraint problem where the goals (packages) can be solved by assigning one instance over to a constraint problem where the goals are supposed to be solved by assigning a set of instances. Secondly, there are a number of places where the solver shortcuts and reports failure which are no longer valid optimizations if multi-assignments are possible. Consider, for example, that we have constraints for foo < 3 and foo > 4. The current implementation will stop at this point without even looking at foo, because the constraint set is inconsistent under the assumption that we have single assignments. If we relax this condition, we could no longer use the assumption.

We might still be able to do this. But it's a considerable amount of work.

@dcoutts: I think the old solver makes similar assumptions. Or am I wrong?

@23Skidoo
Haskell member

@kosmikus Thanks for the explanation.

@kosmikus

I'll nevertheless assign to myself. This doesn't mean I'm actively working on it right now; but it will make it easier for me not to forget about it. It's perhaps possible to reuse the "private dependencies" infrastructure that was never fully used until now to implement the requested feature.

@kosmikus kosmikus was assigned Nov 16, 2012
@simonmar
Haskell member
@mr-

Would this feature be a suitable GSoC project?

@ttuegel ttuegel added this to the _|_ milestone Apr 23, 2015
@grayjay grayjay added the solver label May 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment