haskell / haskell/cabal

Use fine-grained dependencies to eliminate stanza from FlaggedDeps?

Open
#3,263 4 comments 0 reactions 0 assignees View on GitHub
cabal-install: solver priority: low type: discussion
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

@edsko, I'd quite like to know what you think about this.

In a5a823d47b44802e535dbdf3d225da706b78f3bf, 6b77ea23129f8c91d3f1a3dd5d7103b2bbe811b9 and 87a79be901c47d40a972566cbed010feee78e3cc you modified the solver to keep track of which component a dependency came from. However, as far as I can tell, the solver doesn't actually use this information; it just makes sure it gets passed along.

At the same time, there is an orthogonal mechanism, Stanza in FlaggedDep, which lets you conditionalize a dependency tree on whether or not a stanza is enabled. This code substantially predates fine-grained dependencies, and I am now wondering whether or not we need it anymore: why can't we just look at the stored `Component` when building the search tree to decide how to branch? In this way, we automatically get the ability to conditionalize on executables too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.