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

Libraries are having trouble with implicit --enable-multi-repl enabled (by HLS?) #9860

Closed
Kleidukos opened this issue Apr 1, 2024 · 6 comments

Comments

@Kleidukos
Copy link
Member

Sometimes HLS fails to start with the following error:

1. Failed to run ["cabal","v2-repl","--keep-temp-files","--enable-multi-repl","/home/hecate/Projects/boreal/compiler/Driver.hs","/home/hecate/Projects/boreal/compiler/Boreal/Backend/Lua.hs"] in directory "/home/hecate/Projects/boreal". Consult the logs for full command and error.
   Failed command: cabal --builddir=/home/hecate/.cache/hie-bios/dist-boreal-809f41798c33e5e4cb7671c6809e1de6 v2-repl --with-compiler /home/hecate/.cache/hie-bios/wrapper-b54f81dea4c0e6d1626911c526bc4e36 --with-hc-pkg /home/hecate/.cache/hie-bios/ghc-pkg-2f24098b977902820000739f3f71b7f5 --keep-temp-files --enable-multi-repl /home/hecate/Projects/boreal/compiler/Driver.hs /home/hecate/Projects/boreal/compiler/Boreal/Backend/Lua.hs
   Resolving dependencies...
   
   Warning: this is a debug build of cabal-install with assertions enabled.
   Error: [Cabal-7107]
   Could not resolve dependencies:
   [__0] trying: boreal-0.1.0.0 (user goal)
   [__1] trying: pretty-simple-4.1.2.0 (dependency of boreal)
   [__2] next goal: pretty-simple:setup.Cabal (dependency of pretty-simple)
   [__2] rejecting: pretty-simple:setup.Cabal-3.10.1.0/installed-3.10.1.0 (constraint from --enable-multi-repl requires >=3.11)
   [__2] rejecting: pretty-simple:setup.Cabal; 3.10.2.1, 3.10.2.0 (constraint from project config /home/hecate/Projects/boreal/cabal.project.freeze requires ==3.10.1.0)
   [__2] rejecting: pretty-simple:setup.Cabal-3.10.1.0 (constraint from --enable-multi-repl requires >=3.11)
   [__2] rejecting: pretty-simple:setup.Cabal; 3.8.1.0, 3.6.3.0, 3.6.2.0, 3.6.1.0, 3.6.0.0, 3.4.1.0, 3.4.0.0, 3.2.1.0, 3.2.0.0, 3.0.2.0, 3.0.1.0, 3.0.0.0, 2.4.1.0, 2.4.0.1, 2.4.0.0, 2.2.0.1, 2.2.0.0, 2.0.1.1, 2.0.1.0, 2.0.0.2, 1.24.2.0, 1.24.0.0, 1.22.8.0, 1.22.7.0, 1.22.6.0, 1.22.5.0, 1.22.4.0, 1.22.3.0, 1.22.2.0, 1.22.1.1, 1.22.1.0, 1.22.0.0, 1.20.0.4, 1.20.0.3, 1.20.0.2, 1.20.0.1, 1.20.0.0, 1.18.1.7, 1.18.1.6, 1.18.1.5, 1.18.1.4, 1.18.1.3, 1.18.1.2, 1.18.1.1, 1.18.1, 1.18.0, 1.16.0.3, 1.16.0.2, 1.16.0.1, 1.16.0, 1.14.0, 1.12.0, 1.10.2.0, 1.10.1.0, 1.10.0.0, 1.8.0.6, 1.8.0.4, 1.8.0.2, 1.6.0.3, 1.6.0.2, 1.6.0.1, 1.4.0.2, 1.4.0.1, 1.4.0.0, 1.2.4.0, 1.2.3.0, 1.2.2.0, 1.2.1, 1.1.6, 1.24.1.0 (constraint from project config /home/hecate/Projects/boreal/cabal.project.freeze requires ==3.10.1.0)
   [__2] fail (backjumping, conflict set: pretty-simple, pretty-simple:setup.Cabal)
   After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: pretty-simple:setup.Cabal, pretty-simple, boreal
   
   
   
   Process Environment:
   HIE_BIOS_GHC: /home/hecate/.ghcup/ghc/9.6.4/lib/ghc-9.6.4/bin/ghc-9.6.4
   HIE_BIOS_GHC_ARGS: -B/home/hecate/.ghcup/ghc/9.6.4/lib/ghc-9.6.4/lib
   

I use cabal-nightly, but my cabal.project.freeze contains the following constraints:

constraints: any.Cabal ==3.10.1.0,
             any.Cabal-syntax ==3.10.1.0,

I'm terribly unsure about what to do. Should I disable multi-repl explicitly in my global cabal config?

@fendor
Copy link
Collaborator

fendor commented Apr 1, 2024

Should I disable multi-repl explicitly in my global cabal config?

If I am not mistaken, that wouldn't work. hie-bios will always use the mutli-repl feature when the cabal-install version allows it (>= 3.11).

Changing the freeze file sounds sensible to me in these situations.

Maybe we want to be able to toggle multi-repl usage in HLS?

@Kleidukos
Copy link
Member Author

Kleidukos commented Apr 1, 2024

Changing the freeze file sounds sensible to me in these situations.

Okay but it's a major bump from 3.10, stuff is going to break. I can try it as a hack but I don't think this is a valid workaround.

@fendor
Copy link
Collaborator

fendor commented Apr 1, 2024

Kind of related haskell/haskell-language-server#3738 (comment)

@michaelpj
Copy link
Collaborator

I thought hie-bios had a config option for multi-repl? Which presumably should allow setting it to false?

@michaelpj
Copy link
Collaborator

There will be a HLS config option for this in the next release. I don't know if there's an actual cabal issue here?

@fendor
Copy link
Collaborator

fendor commented Dec 9, 2024

I think we can close this, HLS has a config option now, and I also don't think this is cabal's issue.

@fendor fendor closed this as completed Dec 9, 2024
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

No branches or pull requests

3 participants