koka-lang / koka

Koka language compiler and interpreter

Home Page:http://koka-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

koka 3.1.1 build failure

chenrui333 opened this issue · comments

👋 me again, I am trying to bump koka to 3.1.1 release, but ran into some build failure against both ghc 9.6 and ghc 9.4.

  Building executable 'koka' for koka-3.1.1..
  [ 1 of 16] Compiling LanguageServer.Conversions ( src/Main/langserver/LanguageServer/Conversions.hs, /private/tmp/koka-20240506-5850-70gy9v/dist-newstyle/build/x86_64-osx/ghc-9.4.8/koka-3.1.1/x/koka/build/koka/koka-tmp/LanguageServer/Conversions.o )
  [ 2 of 16] Compiling LanguageServer.Handler.Pretty ( src/Main/langserver/LanguageServer/Handler/Pretty.hs, /private/tmp/koka-20240506-5850-70gy9v/dist-newstyle/build/x86_64-osx/ghc-9.4.8/koka-3.1.1/x/koka/build/koka/koka-tmp/LanguageServer/Handler/Pretty.o )
  [ 3 of 16] Compiling LanguageServer.Monad ( src/Main/langserver/LanguageServer/Monad.hs, /private/tmp/koka-20240506-5850-70gy9v/dist-newstyle/build/x86_64-osx/ghc-9.4.8/koka-3.1.1/x/koka/build/koka/koka-tmp/LanguageServer/Monad.o )
  [ 4 of 16] Compiling LanguageServer.Handler.TextDocument ( src/Main/langserver/LanguageServer/Handler/TextDocument.hs, /private/tmp/koka-20240506-5850-70gy9v/dist-newstyle/build/x86_64-osx/ghc-9.4.8/koka-3.1.1/x/koka/build/koka/koka-tmp/LanguageServer/Handler/TextDocument.o )
  [ 5 of 16] Compiling LanguageServer.Handler.SignatureHelp ( src/Main/langserver/LanguageServer/Handler/SignatureHelp.hs, /private/tmp/koka-20240506-5850-70gy9v/dist-newstyle/build/x86_64-osx/ghc-9.4.8/koka-3.1.1/x/koka/build/koka/koka-tmp/LanguageServer/Handler/SignatureHelp.o )
  
  src/Main/langserver/LanguageServer/Handler/SignatureHelp.hs:103:98: error:
      • No instance for (Num (J.UInt J.|? J.Null))
          arising from the literal ‘0’
      • In the first argument of ‘Just’, namely ‘0’
        In the third argument of ‘J.SignatureHelp’, namely ‘(Just 0)’
        In the second argument of ‘($!)’, namely
          ‘J.SignatureHelp
             (map snd sigInfos) (fmap fromIntegral mbIndex) (Just 0)’
      |
  103 |           return $! Just $! J.SignatureHelp (map snd sigInfos) (fmap fromIntegral mbIndex) (Just 0)
      |                                                                                                  ^

ghc 9.4 build log, https://github.com/Homebrew/homebrew-core/actions/runs/8963437796/job/24613780693
same as ghc 9.6, https://github.com/Homebrew/homebrew-core/actions/runs/8962886373/job/24612743196

relates to Homebrew/homebrew-core#170893

We are using GHC 9.6, this is an issue due to the lsp dependency updating. I should look into how to pin it to a certain version, but for now, I've updated the problematic line on the dev branch.