Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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 · 5 comments

5 participants

@23Skidoo
Collaborator

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
Collaborator

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
Collaborator

@kosmikus Thanks for the explanation.

@kosmikus
Collaborator

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
@simonmar
Owner
@mr-

Would this feature be a suitable GSoC project?

@ttuegel ttuegel added this to the _|_ milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.