Skip to content

Add the ability to rerun the dependency solver based on the result of the first run #4823

Closed

Description

@sebright

This change would involve modifying the modularResolver function in D.Solver.Modular.hs to return the type of failure, i.e., backjump limit reached or no solution. When the result is "no solution", it could return the final conflict set. Then we could rerun the dependency solver for two reasons:

  1. When the result is "no solution", we could rerun the solver with a goalOrder parameter that prefers all packages in the final conflict set. Then we wouldn't need to filter the log with the p argument in D.Solver.Modular.Message.showMessages, because all goals would be relevant to the conflict. That would handle issues Incorrect error messages for non-existing dependencies #941 and Solver sometimes filters out relevant lines in the summarized log. #4792.
  2. When the result is "backjump limit reached", we could rerun the solver with --reorder-goals (issue Try rerunning the solver with --reorder-goals when it reaches the backjump limit. #4776).

EDIT: I fixed the link to the function that runs the solver.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions