Skip to content

Intermittent "failed to load packages, cannot satisfy -package <main-lib>" from components other than <main-lib> #735

Closed
@googleson78

Description

@googleson78

I "randomly" get errors like ghcide compiled by GHC 8.8 failed to load packages: <command line>: cannot satisfy -package main-lib-name-0.1.0.0 when trying to use ghcide/hls on a component that isn't the main library.

Yes, I am using a matching version.

The component I'm currently trying to use has some compilation errors (redundant imports + -Werror), that did indeed pop up when I tried to run hls(/ghcide) from the command-line, however after them, the error from above pops up also, seemingly overwriting the previous errors from when trying to use hls/ghcide from within an IDE (nvim + LanguageClient-neovim). When I fix these errors I can load the component/file just fine.

I'm using stack.

Here's a version of the hls log, with concrete names edited out: https://gist.github.com/googleson78/bb431e4cdd791ddafed36200fdbc2a16

Is there anything I can do while in this "state" to provide more debug info/attempt some kind of fix?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions