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

Bump stack.yaml to work with latest LH #23

Merged
merged 5 commits into from
May 17, 2024
Merged

Bump stack.yaml to work with latest LH #23

merged 5 commits into from
May 17, 2024

Conversation

ranjitjhala
Copy link
Member

Sadly

  1. I cannot seem to get cabal to work for the life of me.
  2. Even stack seems to build etc. (and works fine in e.g. vscode) but ends compilation with this mysterious error
rjhala@pozole ~/r/lh-plugin-demo (bump)> stack clean
rjhala@pozole ~/r/lh-plugin-demo (bump)> stack build --fast

Warning: Stack has not been tested with GHC versions 9.8 and above, and using 9.8.1, this may fail.
lh-plugin-demo> configure (lib)
Configuring lh-plugin-demo-0.1.0.0...
lh-plugin-demo> build (lib)
Preprocessing library for lh-plugin-demo-0.1.0.0..
Building library for lh-plugin-demo-0.1.0.0..
[1 of 3] Compiling Demo.Erase

**** LIQUID: SAFE (26 constraints checked) *************************************
[2 of 3] Compiling Demo.Lib

**** LIQUID: SAFE (47 constraints checked) *************************************
[3 of 3] Compiling Demo.Client

**** LIQUID: SAFE (3 constraints checked) **************************************

lh-plugin-demo> copy/register
Installing library in /Users/rjhala/research/lh-plugin-demo/.stack-work/install/aarch64-osx/e6dad18c7fbe988bce8ffbcdb1655701985f7bc6580a175a2b87b0281885691f/9.8.1/lib/aarch64-osx-ghc-9.8.1/lh-plugin-demo-0.1.0.0-9zPVSWa3gNR64vyEs6oyok
Error: Cabal-simple_6HauvNHV_3.10.2.0_ghc-9.8.1:
'/Users/rjhala/.ghcup/ghc/9.8.1/bin/ghc' 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 lh-plugin-demo-0.1.0.0 (scroll up to its section to see the error) using:
       /Users/rjhala/.stack/setup-exe-cache/aarch64-osx/Cabal-simple_6HauvNHV_3.10.2.0_ghc-9.8.1 --verbose=1 --builddir=.stack-work/dist/aarch64-osx/ghc-9.8.1 register
       Process exited with code: ExitFailure 1

@facundominguez
Copy link
Contributor

You need to eliminate -fplugin=LiquidHaskell from ghc-options: and put it instead in your files with {-# OPTIONS_GHC -fplugin=LiquidHaskell #-}. This is due to haskell/cabal#9375, whose fix hasn't landed in Cabal releases yet, I think.

@facundominguez
Copy link
Contributor

This pr is superseded by #27, I think. Let me know what you think.

@ranjitjhala ranjitjhala merged commit b126f2a into main May 17, 2024
6 of 8 checks passed
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 this pull request may close these issues.

2 participants