haskell / haskell/cabal

Add unit tests for the solver's "rejecting" message with multiple versions

Open
#11,012 1 comment 0 reactions 0 assignees View on GitHub
attention: pr-welcome cabal-install: solver type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Tests of the solver's current "rejecting" message would help us track progress on #4251. These tests could go in [cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs](https://github.com/haskell/cabal/blob/master/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs), where we already have tests for other messages, such as https://github.com/haskell/cabal/blob/d958545e9cc745aef2db467d21f0802fee3f158e/cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs#L603-L634

Here are some cases to test:
- Rejecting multiple versions
- Rejecting versions that aren't in order, using preferences
- Rejecting source and installed versions
- Rejecting linked instances, using setup or build-tool dependencies

Contributor guide

Open the contributing guide

Research direction

Start in cabal-install/tests/UnitTests/Distribution/Solver/Modular/Solver.hs, especially the existing message tests around lines 603-634. Run the solver unit tests and add coverage for multiple rejected versions, unordered preferred versions, source and installed versions, and linked instances from setup or build-tool dependencies. Done means these rejecting-message cases are asserted in the unit test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.