haskell / haskell/cabal

Solver tries to solve for unneeded internal libs:

Open
#5,413 9 comments 0 reactions 0 assignees View on GitHub
cabal-install: solver priority: high :fire: re: internal library type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

```
cabal-version: 2.2
name: bug
version: 0

library
build-depends:
, cabal-plan ^>=0.3.0.0
, base-orphans ^>= 0.8
```

cabal-plan has an internal lib, which depends on `base-orphans ^>= 0.7`, but main-library doesn't depend on that component. There's also an *automatic* flag, which could turn out the executable component (which depends on the internal lib).

*EDIT* even explicitly saying `cabal new-build --constraint='cabal-plan -exe'` doesn't help.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the cabal-plan and base-orphans dependency case from the issue, including the automatic flag and the explicit --constraint='cabal-plan -exe' variant. Trace the dependency solver's treatment of internal libraries and component reachability; done means unneeded internal libraries are not solved while required components still resolve correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.