haskell / haskell/cabal

Remove PackageId from componentPackageDeps

Open
#4,189 0 comments 0 reactions 0 assignees View on GitHub
type: refactor
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Historically, every dependency we recorded in `componentPackageDeps` corresponded both to (1) an actual package that we needed to pass via a `-package` flag to GHC, as well as (2) a package that we picked to dependency solve one of the dependencies of our current package with.

With the advent of more interesting dependencies (e.g., executable dependencies) as well as multiple libraries per package, this coupling is not really what we want. Instead, we want to distinguish between:

1. The set of libraries which a component depends on (the `UnitId` component of `componentPackageDeps`)
2. The packages that the dependency solver solved this package against (the `PackageId` component of `componentPackageDeps`).

Unfortunately, everyone and their dog uses `componentPackageDeps` to pull out `PackageId`, so a bit of work will need to be done to maintain backwards compatibility.

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.