commercialhaskell / commercialhaskell/stack

Prevent extra-deps / local packages from overriding wired-in packages (only when ghc is a dep?)

Open
#1,530 6 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Similarly to #1486, we need to treat GHC's wired-in packages specially when it comes to overriding the version in the global DB. Not checking for these cases leads to confusing error messages such as the ones described in #1522 and #1025. I **think** that this is only necessary when ghc is a transitive dependency, but I'm not sure about that, so part of the work here is to check this.

Since #1486 also deals with similar additional checking, it should probably get implemented along with this ticket. Note that the situation is a bit different for GHCJS, though. The two checks differ in the following ways:

1) GHC's wired-in packages are only special if we have a transitive dependency on GHC. GHCJS's boot packages are always special, because they are patched.

2) It's potentially acceptable to override a GHCJS boot package with a local package. There should probably be a warning letting the user know that it should be a patched version of the package, though.

Also, note that the checks for GHC's wired-in packages also apply when using GHCJS. Does GHCJS have extra wired-in packages? This is another thing that would be good to check.

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.