Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell the user that a boot package was pruned #4897

Closed
Rufflewind opened this issue Jun 23, 2019 · 2 comments · Fixed by #4922
Closed

Tell the user that a boot package was pruned #4897

Rufflewind opened this issue Jun 23, 2019 · 2 comments · Fixed by #4922

Comments

@Rufflewind
Copy link
Contributor

I use Stack on CI and sometimes override dependencies intentionally. Recently, they started failing, but the error message isn't particularly descriptive:

Error: While constructing the build plan, the following exceptions were
encountered:
In the dependencies for directory-1.3.3.2:
    time must match >=1.4 && <1.10, but the stack configuration has no specified
         version  (latest matching version is 1.9.3)
needed since directory is a build target.

stack ls dependencies shows time 1.6.0.1, and similarly on Stackage. Therefore, I was left very confused why Stack suddenly forgot time existed.

It took me a while but I eventually figured I should check the release notes in case it was intentional. I saw this:

Overriding GHC boot packages results in any other GHC boot
packages depending on it being no longer available as a dependency,
such packages need to be added explicitly when needed. See
[#4510] (#4510).

So that explained a lot, but figuring this out wasted a lot of time. Could the error message be made a little more detailed? It at least state that a package was pruned behind the scenes, and preferably include a reason for doing so and/or link to #4510 for rationale.

@dbaynard
Copy link
Contributor

Could the error message be made a little more detailed?

Yeah, that's a good idea. I knew about the issue and still got bitten yesterday (at least I was able to identify the solution quickly). There might be a straightforward way to indicate in that error that a boot package has been overriden. @Rufflewind would you be interested in implementing such a change?

@simonmichael
Copy link
Contributor

simonmichael commented Aug 27, 2021

Sorry to tell you @Rufflewind, but the newer error message is not much clearer. Here's a newcomer hitting it: https://www.reddit.com/r/haskell/comments/pcf9be/i_cant_find_a_solution_to_this_problem_involving/

Instead of "this GHC boot package has been pruned (issue #4510)", how about:
"this GHC boot package has been overridden, which in effect hides any other GHC boot packages depending on it; usually this is something you should not do. See stack issue #4897 for more." (or, less future proof but much more friendly, provide the full url: https://github.com/commercialhaskell/stack/issues/4897).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants