haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 210 forks source link

Ormolu 8.8 #1579

Closed Avi-D-coder closed 4 years ago

Avi-D-coder commented 4 years ago

This is a possible stop gap, needed until https://github.com/tweag/ormolu/pull/501 lands in hackage. The alternative is setting allow-newer.

Follow up to #1482

jneira commented 4 years ago

Hi! thanks for the quick fix. I think stack-8.8.1.yaml would need a similar git dependency to work. Other times we've added the forked project (cabal-helper, hare, etc) to submodules and as local package in build config. Not sure if it can be applied to ormolu. Personally i am fine with git dependencies

Avi-D-coder commented 4 years ago

My reason for not using a submodule is that only 8.8 needs it. If I'm not mistaken git dependency support in cabal is relatively new, so was not an option before.

Avi-D-coder commented 4 years ago

Azure Windows_Stack stack-8.4.2 appears to be another instance of https://github.com/haskell/haskell-ide-engine/pull/1482#issuecomment-576055839

jneira commented 4 years ago

@Avi-D-coder yeah, we could ignore for now the Session time outs

Mmm, Linux_Stack stack-8.8.1 is failing due a slighty diff output:

haskell-ide-engine>   test/functional/FormatSpec.hs:106:23: 
haskell-ide-engine>   1) Format.ormolu formats correctly
haskell-ide-engine>        expected: "module    Format where\nfoo   :: Int ->  Int\nfoo  3 = 2\nfoo    x  = x\nbar   :: String ->   IO String\nbar s =  do\n      x <- return \"hello\"\n      return \"asdf\"\n      \n"
haskell-ide-engine>         but got: "module Format where\n\nfoo :: Int -> Int\nfoo 3 = 2\nfoo x = x\n\nbar :: String -> IO String\nbar s = do\n  x <- return \"hello\"\n  return \"asdf\"\n"
haskell-ide-engine> 
haskell-ide-engine>   To rerun use: --match "/Format/ormolu/formats correctly/"

i guess it is not reproduced in local?

alanz commented 4 years ago

I suggest we wait a little to give the ormolu guys a chance to respond to their PR, and if not merge this.