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

Could not find module ‘LiquidHaskell’ #2300

Open
nikivazou opened this issue Jun 7, 2024 · 6 comments
Open

Could not find module ‘LiquidHaskell’ #2300

nikivazou opened this issue Jun 7, 2024 · 6 comments

Comments

@nikivazou
Copy link
Member

I still get " Could not find module ‘LiquidHaskell’" (like in #2261) with ghc-9.8.2 and Cabal-3.10.2.0, is there a combination that solves this problem?

Things work if I use the language pragma instead of the compiler plagin flag.

Error: Cabal-simple_6HauvNHV_3.10.2.0_ghc-9.8.2:
'.stack/programs/x86_64-osx/ghc-9.8.2/bin/ghc-9.8.2' exited
with an error:
<command line>: Could not find module ‘LiquidHaskell’.
Use -v to see a list of the files searched for.


Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the error:

       [S-7011]
       While building package plonk-constraints-0.1.0.0 (scroll up to its section to see the error) using:
       .stack/setup-exe-cache/x86_64-osx/Cabal-simple_6HauvNHV_3.10.2.0_ghc-9.8.2 --verbose=1 --builddir=.stack-work/dist/x86_64-osx/ghc-9.8.2 register
       Process exited with code: ExitFailure 1
@facundominguez
Copy link
Collaborator

facundominguez commented Jun 7, 2024 via email

@nikivazou
Copy link
Member Author

Hmmm, ok! The cabal issue also is closed so I thought that they fixed it there!

@facundominguez
Copy link
Collaborator

facundominguez commented Jun 7, 2024

Indeed, the cabal issue seems to have been addressed. However, it remains now to check that it is included on a release of Cabal and that this version of Cabal is used in the tooling that each of us has installed.

The minimum version of Cabal that includes the patch is 3.10.3.0 (from looking at the git history of Cabal).

$ git log Cabal-v3.10.3.0 | grep "Revert #3639"
    Revert #3639 (Don't pass -package-db and -package flags to --abi-hash) (backport #9384)
    Revert #3639 (Don't pass -package-db and -package flags to --abi-hash) (#9384)
    * Revert #3639 (Don't pass -package-db and -package flags to --abi-hash)

@nikivazou
Copy link
Member Author

I am still stuck with this....
After specifying Cabal == 3.10.3.0 in various places (8ed7ff9) I still get the below error:

prover-ple-lib    > Error: Cabal-simple_6HauvNHV_3.10.2.0_ghc-9.8.2:
prover-ple-lib    > '/Users/niki.vazou/.stack/programs/x86_64-osx/ghc-9.8.2/bin/ghc-9.8.2' exited
prover-ple-lib    > with an error:
prover-ple-lib    > <command line>: Could not find module ‘LiquidHaskell’.
prover-ple-lib    > Use -v to see a list of the files searched for.
prover-ple-lib    >

I assume the first line of the error implies that it is using Cabal-3.10.2.0 which seems to still be installed

cabal list --installed
* Cabal
    Synopsis: A framework for packaging Haskell software
    Default available version: 3.12.0.0
    Installed versions: 3.10.2.0, 3.10.3.0
    Homepage: http://www.haskell.org/cabal/
    License:  BSD-3-Clause

Is there any way to remove the older cabal version?

@facundominguez
Copy link
Collaborator

build-depends controls which Cabal version is linked with your artifacts but it doesn't control which Cabal version is used to build them.

Cabal-3.10.2.0 is a boot library of ghc-9.8.2. I don't think you can uninstall it.

When build-type: Custom, the following seems to influence the cabal Choice for building:

custom-setup
  setup-depends: Cabal>=3.10.3 && <4

But I'm seeing other puzzling behavior from Cabal when doing so, so I'm not sure it is worth fighting that battle this early. :)

@nikivazou
Copy link
Member Author

Ok, makes sense! Thanks!

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

2 participants