From a2eab3c9ac2704177eb15ce5585744cd2fce99df Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Wed, 18 Dec 2019 07:49:20 -0500 Subject: [PATCH 001/270] Ghc 8.8.1 support --- .gitmodules | 4 +++ haskell-ide-engine.cabal | 20 +++++++------- install/shake.yaml | 2 +- src/Haskell/Ide/Engine/Plugin/Haddock.hs | 25 ++++++++++++++++- src/Haskell/Ide/Engine/Plugin/Package.hs | 5 ++++ src/Haskell/Ide/Engine/Support/HieExtras.hs | 5 ++++ stack-8.6.5.yaml | 2 +- stack.yaml | 30 +++++++-------------- submodules/apply-refact | 1 + 9 files changed, 61 insertions(+), 33 deletions(-) create mode 160000 submodules/apply-refact diff --git a/.gitmodules b/.gitmodules index ca9fce700..847bd7939 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,7 @@ [submodule "submodules/cabal-helper"] path = submodules/cabal-helper url = https://github.com/DanielG/cabal-helper.git + +[submodule "submodules/apply-refact"] + path = submodules/apply-refact + url = https://github.com/mpickering/apply-refact.git diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index a229137fa..9dddfffb1 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -14,7 +14,7 @@ build-type: Simple cabal-version: >=2.0 flag pedantic - Description: Enable -Werror + Description: Enable -Werror -Wwarn=unused-imports Default: False library @@ -101,7 +101,7 @@ library ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 executable hie @@ -120,7 +120,7 @@ executable hie ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 @@ -141,7 +141,7 @@ executable hie-wrapper ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 library hie-test-utils @@ -167,7 +167,7 @@ library hie-test-utils , yaml ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 test-suite unit-test @@ -211,7 +211,7 @@ test-suite unit-test ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 test-suite dispatcher-test @@ -235,7 +235,7 @@ test-suite dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover @@ -255,7 +255,7 @@ test-suite plugin-dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 test-suite func-test @@ -300,7 +300,7 @@ test-suite func-test , containers ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover , haskell-ide-engine:hie @@ -319,7 +319,7 @@ test-suite wrapper-test , hie-plugin-api ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 diff --git a/install/shake.yaml b/install/shake.yaml index 8c30114fa..22867942f 100644 --- a/install/shake.yaml +++ b/install/shake.yaml @@ -1,5 +1,5 @@ # Used to provide a different environment for the shake build script -resolver: lts-14.11 # GHC 8.6.5 +resolver: lts-14.17 # GHC 8.6.5 packages: - . diff --git a/src/Haskell/Ide/Engine/Plugin/Haddock.hs b/src/Haskell/Ide/Engine/Plugin/Haddock.hs index 2d41c7f45..1c1daef57 100644 --- a/src/Haskell/Ide/Engine/Plugin/Haddock.hs +++ b/src/Haskell/Ide/Engine/Plugin/Haddock.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -107,7 +108,11 @@ getDocsForName df name = do case mf of Nothing -> return Nothing Just f -> do +#if __GLASGOW_HASKELL__ >= 808 + ehi <- readInterfaceFile nameCacheFromIdeM f True +#else ehi <- readInterfaceFile nameCacheFromIdeM f +#endif case ehi of Left message -> do debugm $ "Haddock docs couldn't be loaded as readInterfaceFile failed with: " ++ message @@ -152,8 +157,15 @@ prettyprintType n t = T.unlines , "```\n" ] +unwrap :: Foldable w => w a -> a +unwrap = foldl1 (const id) + renderDocs :: MDoc Name -> T.Text +#if __GLASGOW_HASKELL__ >= 808 +renderDocs = markup renderMarkDown . _doc . fmap unwrap +#else renderDocs = markup renderMarkDown . _doc +#endif renderMarkDown :: DocMarkup Name T.Text renderMarkDown = @@ -162,7 +174,11 @@ renderMarkDown = , markupParagraph = (<> "\n\n") , markupAppend = mappend , markupIdentifier = surround "`" . T.pack . getOccString +#if __GLASGOW_HASKELL__ >= 808 + , markupIdentifierUnchecked = T.pack . occNameString . snd . unwrap +#else , markupIdentifierUnchecked = T.pack . occNameString . snd +#endif , markupModule = surround "**" . T.pack , markupWarning = surround "*" , markupEmphasis = surround "*" @@ -174,9 +190,16 @@ renderMarkDown = , markupDefList = T.unlines . map (\(a, b) -> a <> " :: " <> b) , markupCodeBlock = \x -> "\n```haskell\n" <> removeInner x <> "\n```\n" , markupHyperlink = \h -> - T.pack $ maybe +#if __GLASGOW_HASKELL__ >= 808 + let url = T.pack $ hyperlinkUrl h + in maybe + url + (\l -> "["<>l<>"]("<>url<>")") +#else + T.pack $ maybe (hyperlinkUrl h) (\l -> "["<>l<>"]("<>hyperlinkUrl h<>")") +#endif (hyperlinkLabel h) , markupAName = T.pack , markupPic = const "" diff --git a/src/Haskell/Ide/Engine/Plugin/Package.hs b/src/Haskell/Ide/Engine/Plugin/Package.hs index 28580d4b6..199485384 100644 --- a/src/Haskell/Ide/Engine/Plugin/Package.hs +++ b/src/Haskell/Ide/Engine/Plugin/Package.hs @@ -22,6 +22,7 @@ import qualified Data.ByteString as B import Data.Foldable import Data.List import qualified Data.HashMap.Strict as HM +import qualified Data.Set as S import qualified Data.Text as T import qualified Data.Text.Encoding as T import Data.Maybe @@ -297,7 +298,11 @@ editCabalPackage file modulePath pkgName fileMap = do -- Add it to the bottom of the dependencies list -- TODO: we could sort the depencies and then insert it, -- or insert it in order iff the list is already sorted. +#if __GLASGOW_HASKELL__ >= 808 + newDeps = oldDeps ++ [Dependency (mkPackageName (T.unpack dep)) anyVersion S.empty] +#else newDeps = oldDeps ++ [Dependency (mkPackageName (T.unpack dep)) anyVersion] +#endif -- | Provide a code action to add a package to the local package.yaml or cabal file. -- Reads from diagnostics the unknown import module path and searches for it on Hoogle. diff --git a/src/Haskell/Ide/Engine/Support/HieExtras.hs b/src/Haskell/Ide/Engine/Support/HieExtras.hs index b03876000..831f256b3 100644 --- a/src/Haskell/Ide/Engine/Support/HieExtras.hs +++ b/src/Haskell/Ide/Engine/Support/HieExtras.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -336,7 +337,11 @@ gotoModule rfm mn = do flushFinderCaches env findImportedModule env mn Nothing case fr of +#if __GLASGOW_HASKELL__ < 808 Found (ModLocation (Just src) _ _) _ -> do +#else + Found (ModLocation (Just src) _ _ _) _ -> do +#endif fp <- reverseMapFile rfm src let r = Range (Position 0 0) (Position 0 0) diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 4e9052e19..91b637b69 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -1,4 +1,4 @@ -resolver: lts-14.16 +resolver: lts-14.17 packages: - . - hie-plugin-api diff --git a/stack.yaml b/stack.yaml index 0a1737345..a891f03cf 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-09-21 # Last GHC 8.6.5 +resolver: nightly-2019-12-18 packages: - . - hie-plugin-api @@ -6,31 +6,21 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper +- ./submodules/apply-refact - deque-0.4.3 - ansi-terminal-0.8.2 +- hie-bios-0.3.2 - bytestring-trie-0.2.5.0 -- ansi-wl-pprint-0.6.8.2 -- brittany-0.12.1.0 -- cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 +- fclabels-2.0.3.3 - floskell-0.10.2 -- ghc-lib-parser-8.8.1 -- haddock-api-2.22.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 -- hie-bios-0.3.2 -- hlint-2.2.4 +- fold-debounce-0.2.0.9 +- haddock-api-2.23.0 +- haddock-library-1.8.0 +- hoogle-5.0.17.13 - hsimport-0.11.0 -- lsp-test-0.9.0.0 -- monad-dijkstra-0.1.1.2@rev:1 -- syz-0.2.0.0 -- temporary-1.2.1.1 -- clock-0.7.2 -- ghc-exactprint-0.6.2 # for HaRe -- extra-1.6.18 -- unix-compat-0.5.2 -- yaml-0.11.1.2 +- monad-dijkstra-0.1.1.2 flags: haskell-ide-engine: @@ -39,7 +29,7 @@ flags: pedantic: true -# allow-newer: true +allow-newer: true nix: packages: [ icu libcxx zlib ] diff --git a/submodules/apply-refact b/submodules/apply-refact new file mode 160000 index 000000000..1acf7eb86 --- /dev/null +++ b/submodules/apply-refact @@ -0,0 +1 @@ +Subproject commit 1acf7eb860be5a446828a3a2fe3644aeb5a1b55f From 40df38ae65ad457bbcaf3f03ac281469ce712012 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 20 Dec 2019 07:19:10 -0500 Subject: [PATCH 002/270] Use per-file pragma --- app/MainHie.hs | 1 + haskell-ide-engine.cabal | 20 +++++++++---------- hie-plugin-api/Haskell/Ide/Engine/Ghc.hs | 1 + .../Haskell/Ide/Engine/PluginsIdeMonads.hs | 1 + src/Haskell/Ide/Engine/Completions.hs | 1 + src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs | 1 + src/Haskell/Ide/Engine/Plugin/Brittany.hs | 1 + src/Haskell/Ide/Engine/Plugin/Generic.hs | 1 + src/Haskell/Ide/Engine/Plugin/HsImport.hs | 1 + src/Haskell/Ide/Engine/Plugin/Package.hs | 1 + src/Haskell/Ide/Engine/Plugin/Pragmas.hs | 1 + src/Haskell/Ide/Engine/Scheduler.hs | 1 + src/Haskell/Ide/Engine/Server.hs | 1 + src/Haskell/Ide/Engine/Support/HieExtras.hs | 1 + 14 files changed, 23 insertions(+), 10 deletions(-) diff --git a/app/MainHie.hs b/app/MainHie.hs index dd7833567..074ff1e49 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Main where diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 9dddfffb1..a229137fa 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -14,7 +14,7 @@ build-type: Simple cabal-version: >=2.0 flag pedantic - Description: Enable -Werror -Wwarn=unused-imports + Description: Enable -Werror Default: False library @@ -101,7 +101,7 @@ library ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 executable hie @@ -120,7 +120,7 @@ executable hie ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 @@ -141,7 +141,7 @@ executable hie-wrapper ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 library hie-test-utils @@ -167,7 +167,7 @@ library hie-test-utils , yaml ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 test-suite unit-test @@ -211,7 +211,7 @@ test-suite unit-test ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 test-suite dispatcher-test @@ -235,7 +235,7 @@ test-suite dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover @@ -255,7 +255,7 @@ test-suite plugin-dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 test-suite func-test @@ -300,7 +300,7 @@ test-suite func-test , containers ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover , haskell-ide-engine:hie @@ -319,7 +319,7 @@ test-suite wrapper-test , hie-plugin-api ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 diff --git a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs index 1ec624b5c..ff5e6db4e 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs index 007f02ad1..d263d62ff 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveAnyClass #-} diff --git a/src/Haskell/Ide/Engine/Completions.hs b/src/Haskell/Ide/Engine/Completions.hs index c1234bb87..c9fca07ba 100644 --- a/src/Haskell/Ide/Engine/Completions.hs +++ b/src/Haskell/Ide/Engine/Completions.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs index 884bbca38..788c43a48 100644 --- a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs +++ b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} diff --git a/src/Haskell/Ide/Engine/Plugin/Brittany.hs b/src/Haskell/Ide/Engine/Plugin/Brittany.hs index 222ddb333..4b3b95e22 100644 --- a/src/Haskell/Ide/Engine/Plugin/Brittany.hs +++ b/src/Haskell/Ide/Engine/Plugin/Brittany.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE OverloadedStrings #-} -- | Brittany is a tool to format source code. module Haskell.Ide.Engine.Plugin.Brittany where diff --git a/src/Haskell/Ide/Engine/Plugin/Generic.hs b/src/Haskell/Ide/Engine/Plugin/Generic.hs index f613bf797..b5b5774e4 100644 --- a/src/Haskell/Ide/Engine/Plugin/Generic.hs +++ b/src/Haskell/Ide/Engine/Plugin/Generic.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} diff --git a/src/Haskell/Ide/Engine/Plugin/HsImport.hs b/src/Haskell/Ide/Engine/Plugin/HsImport.hs index 935f013f7..cee7a4d45 100644 --- a/src/Haskell/Ide/Engine/Plugin/HsImport.hs +++ b/src/Haskell/Ide/Engine/Plugin/HsImport.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} diff --git a/src/Haskell/Ide/Engine/Plugin/Package.hs b/src/Haskell/Ide/Engine/Plugin/Package.hs index 199485384..5c46e1b78 100644 --- a/src/Haskell/Ide/Engine/Plugin/Package.hs +++ b/src/Haskell/Ide/Engine/Plugin/Package.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} diff --git a/src/Haskell/Ide/Engine/Plugin/Pragmas.hs b/src/Haskell/Ide/Engine/Plugin/Pragmas.hs index f33c6aef2..0e84633d3 100644 --- a/src/Haskell/Ide/Engine/Plugin/Pragmas.hs +++ b/src/Haskell/Ide/Engine/Plugin/Pragmas.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/src/Haskell/Ide/Engine/Scheduler.hs b/src/Haskell/Ide/Engine/Scheduler.hs index a94787487..42f1e4520 100644 --- a/src/Haskell/Ide/Engine/Scheduler.hs +++ b/src/Haskell/Ide/Engine/Scheduler.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ExistentialQuantification #-} diff --git a/src/Haskell/Ide/Engine/Server.hs b/src/Haskell/Ide/Engine/Server.hs index 9e4d51af9..71e6a8dc2 100644 --- a/src/Haskell/Ide/Engine/Server.hs +++ b/src/Haskell/Ide/Engine/Server.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} diff --git a/src/Haskell/Ide/Engine/Support/HieExtras.hs b/src/Haskell/Ide/Engine/Support/HieExtras.hs index 831f256b3..74821a660 100644 --- a/src/Haskell/Ide/Engine/Support/HieExtras.hs +++ b/src/Haskell/Ide/Engine/Support/HieExtras.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} From 42fb39de94a5f492e7741e727560530abbb5851e Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sat, 21 Dec 2019 17:42:27 -0500 Subject: [PATCH 003/270] Revert "Use per-file pragma" This reverts commit 61192eae6b41e9eac34c41a4686c550d8d99b1af. --- app/MainHie.hs | 1 - haskell-ide-engine.cabal | 20 +++++++++---------- hie-plugin-api/Haskell/Ide/Engine/Ghc.hs | 1 - .../Haskell/Ide/Engine/PluginsIdeMonads.hs | 1 - src/Haskell/Ide/Engine/Completions.hs | 1 - src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs | 1 - src/Haskell/Ide/Engine/Plugin/Brittany.hs | 1 - src/Haskell/Ide/Engine/Plugin/Generic.hs | 1 - src/Haskell/Ide/Engine/Plugin/HsImport.hs | 1 - src/Haskell/Ide/Engine/Plugin/Package.hs | 1 - src/Haskell/Ide/Engine/Plugin/Pragmas.hs | 1 - src/Haskell/Ide/Engine/Scheduler.hs | 1 - src/Haskell/Ide/Engine/Server.hs | 1 - src/Haskell/Ide/Engine/Support/HieExtras.hs | 1 - 14 files changed, 10 insertions(+), 23 deletions(-) diff --git a/app/MainHie.hs b/app/MainHie.hs index 074ff1e49..dd7833567 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Main where diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index a229137fa..9dddfffb1 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -14,7 +14,7 @@ build-type: Simple cabal-version: >=2.0 flag pedantic - Description: Enable -Werror + Description: Enable -Werror -Wwarn=unused-imports Default: False library @@ -101,7 +101,7 @@ library ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 executable hie @@ -120,7 +120,7 @@ executable hie ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 @@ -141,7 +141,7 @@ executable hie-wrapper ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 library hie-test-utils @@ -167,7 +167,7 @@ library hie-test-utils , yaml ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 test-suite unit-test @@ -211,7 +211,7 @@ test-suite unit-test ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 test-suite dispatcher-test @@ -235,7 +235,7 @@ test-suite dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover @@ -255,7 +255,7 @@ test-suite plugin-dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 test-suite func-test @@ -300,7 +300,7 @@ test-suite func-test , containers ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover , haskell-ide-engine:hie @@ -319,7 +319,7 @@ test-suite wrapper-test , hie-plugin-api ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror + ghc-options: -Werror -Wwarn=unused-imports default-language: Haskell2010 diff --git a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs index ff5e6db4e..1ec624b5c 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs index d263d62ff..007f02ad1 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveAnyClass #-} diff --git a/src/Haskell/Ide/Engine/Completions.hs b/src/Haskell/Ide/Engine/Completions.hs index c9fca07ba..c1234bb87 100644 --- a/src/Haskell/Ide/Engine/Completions.hs +++ b/src/Haskell/Ide/Engine/Completions.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs index 788c43a48..884bbca38 100644 --- a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs +++ b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} diff --git a/src/Haskell/Ide/Engine/Plugin/Brittany.hs b/src/Haskell/Ide/Engine/Plugin/Brittany.hs index 4b3b95e22..222ddb333 100644 --- a/src/Haskell/Ide/Engine/Plugin/Brittany.hs +++ b/src/Haskell/Ide/Engine/Plugin/Brittany.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE OverloadedStrings #-} -- | Brittany is a tool to format source code. module Haskell.Ide.Engine.Plugin.Brittany where diff --git a/src/Haskell/Ide/Engine/Plugin/Generic.hs b/src/Haskell/Ide/Engine/Plugin/Generic.hs index b5b5774e4..f613bf797 100644 --- a/src/Haskell/Ide/Engine/Plugin/Generic.hs +++ b/src/Haskell/Ide/Engine/Plugin/Generic.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} diff --git a/src/Haskell/Ide/Engine/Plugin/HsImport.hs b/src/Haskell/Ide/Engine/Plugin/HsImport.hs index cee7a4d45..935f013f7 100644 --- a/src/Haskell/Ide/Engine/Plugin/HsImport.hs +++ b/src/Haskell/Ide/Engine/Plugin/HsImport.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} diff --git a/src/Haskell/Ide/Engine/Plugin/Package.hs b/src/Haskell/Ide/Engine/Plugin/Package.hs index 5c46e1b78..199485384 100644 --- a/src/Haskell/Ide/Engine/Plugin/Package.hs +++ b/src/Haskell/Ide/Engine/Plugin/Package.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} diff --git a/src/Haskell/Ide/Engine/Plugin/Pragmas.hs b/src/Haskell/Ide/Engine/Plugin/Pragmas.hs index 0e84633d3..f33c6aef2 100644 --- a/src/Haskell/Ide/Engine/Plugin/Pragmas.hs +++ b/src/Haskell/Ide/Engine/Plugin/Pragmas.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} diff --git a/src/Haskell/Ide/Engine/Scheduler.hs b/src/Haskell/Ide/Engine/Scheduler.hs index 42f1e4520..a94787487 100644 --- a/src/Haskell/Ide/Engine/Scheduler.hs +++ b/src/Haskell/Ide/Engine/Scheduler.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ExistentialQuantification #-} diff --git a/src/Haskell/Ide/Engine/Server.hs b/src/Haskell/Ide/Engine/Server.hs index 71e6a8dc2..9e4d51af9 100644 --- a/src/Haskell/Ide/Engine/Server.hs +++ b/src/Haskell/Ide/Engine/Server.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} diff --git a/src/Haskell/Ide/Engine/Support/HieExtras.hs b/src/Haskell/Ide/Engine/Support/HieExtras.hs index 74821a660..831f256b3 100644 --- a/src/Haskell/Ide/Engine/Support/HieExtras.hs +++ b/src/Haskell/Ide/Engine/Support/HieExtras.hs @@ -1,4 +1,3 @@ -{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} From e5d1060245814d7182842719b3a03c97284d19d5 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sat, 21 Dec 2019 18:24:54 -0500 Subject: [PATCH 004/270] CPP imports + stack-8.8.1.yaml + ignore hie.yaml --- .gitignore | 1 + app/MainHie.hs | 3 ++ haskell-ide-engine.cabal | 20 +++++------ hie-plugin-api/Haskell/Ide/Engine/Ghc.hs | 6 +++- .../Haskell/Ide/Engine/PluginsIdeMonads.hs | 13 ++++--- install/shake.yaml | 2 +- src/Haskell/Ide/Engine/Completions.hs | 3 ++ src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs | 5 +++ src/Haskell/Ide/Engine/Plugin/Brittany.hs | 3 +- src/Haskell/Ide/Engine/Plugin/Generic.hs | 2 ++ src/Haskell/Ide/Engine/Plugin/HsImport.hs | 3 ++ src/Haskell/Ide/Engine/Plugin/Package.hs | 5 ++- src/Haskell/Ide/Engine/Plugin/Pragmas.hs | 3 ++ src/Haskell/Ide/Engine/Scheduler.hs | 9 +++-- src/Haskell/Ide/Engine/Server.hs | 6 +++- src/Haskell/Ide/Engine/Support/HieExtras.hs | 5 ++- stack-8.6.5.yaml | 2 +- stack-8.8.1.yaml | 35 +++++++++++++++++++ stack.yaml | 2 +- 19 files changed, 103 insertions(+), 25 deletions(-) create mode 100644 stack-8.8.1.yaml diff --git a/.gitignore b/.gitignore index ac2acc891..77bf84b17 100644 --- a/.gitignore +++ b/.gitignore @@ -77,3 +77,4 @@ shake.yaml.lock # ignore hie.yaml's for testdata test/**/*.yaml +/hie.yaml diff --git a/app/MainHie.hs b/app/MainHie.hs index dd7833567..033604b82 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -1,9 +1,12 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Main where import Control.Monad +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#endif import Data.Version (showVersion) import Haskell.Ide.Engine.MonadFunctions import Haskell.Ide.Engine.MonadTypes diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 9dddfffb1..a229137fa 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -14,7 +14,7 @@ build-type: Simple cabal-version: >=2.0 flag pedantic - Description: Enable -Werror -Wwarn=unused-imports + Description: Enable -Werror Default: False library @@ -101,7 +101,7 @@ library ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 executable hie @@ -120,7 +120,7 @@ executable hie ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 @@ -141,7 +141,7 @@ executable hie-wrapper ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 library hie-test-utils @@ -167,7 +167,7 @@ library hie-test-utils , yaml ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 test-suite unit-test @@ -211,7 +211,7 @@ test-suite unit-test ghc-options: -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 test-suite dispatcher-test @@ -235,7 +235,7 @@ test-suite dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover @@ -255,7 +255,7 @@ test-suite plugin-dispatcher-test ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 test-suite func-test @@ -300,7 +300,7 @@ test-suite func-test , containers ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 build-tool-depends: hspec-discover:hspec-discover , haskell-ide-engine:hie @@ -319,7 +319,7 @@ test-suite wrapper-test , hie-plugin-api ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints if flag(pedantic) - ghc-options: -Werror -Wwarn=unused-imports + ghc-options: -Werror default-language: Haskell2010 diff --git a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs index 1ec624b5c..e40514b30 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs @@ -23,7 +23,6 @@ import Control.Monad ( when ) import Data.IORef import qualified Data.Map.Strict as Map -- import qualified Data.IntMap.Strict as IM -import Data.Semigroup ((<>), Semigroup) import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.Aeson @@ -37,7 +36,12 @@ import Haskell.Ide.Engine.PluginUtils import DynFlags import GHC import qualified HscTypes + +#if __GLASGOW_HASKELL__ < 808 +import Data.Semigroup ((<>), Semigroup) import Outputable (renderWithStyle) +#endif + import Language.Haskell.LSP.Types ( NormalizedUri(..), toNormalizedUri ) import Haskell.Ide.Engine.GhcUtils diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs index 007f02ad1..120f1e983 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveAnyClass #-} @@ -111,13 +112,17 @@ import qualified Data.List as List import Data.Dynamic ( Dynamic ) import qualified Data.Map as Map import Data.Maybe -import Data.Monoid ( (<>) ) + import qualified Data.Set as S import Data.String import qualified Data.Text as T -import Data.Typeable ( TypeRep - , Typeable - ) +import Data.Typeable ( TypeRep ) + +#if __GLASGOW_HASKELL__ < 808 +import Data.Monoid ( (<>) ) +import Data.Typeable ( Typeable ) +#endif + import System.Directory import GhcMonad import qualified HIE.Bios.Ghc.Api as BIOS diff --git a/install/shake.yaml b/install/shake.yaml index 22867942f..8c30114fa 100644 --- a/install/shake.yaml +++ b/install/shake.yaml @@ -1,5 +1,5 @@ # Used to provide a different environment for the shake build script -resolver: lts-14.17 # GHC 8.6.5 +resolver: lts-14.11 # GHC 8.6.5 packages: - . diff --git a/src/Haskell/Ide/Engine/Completions.hs b/src/Haskell/Ide/Engine/Completions.hs index c1234bb87..9e3ad2cf5 100644 --- a/src/Haskell/Ide/Engine/Completions.hs +++ b/src/Haskell/Ide/Engine/Completions.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} @@ -23,7 +24,9 @@ import qualified Data.List as List import qualified Data.Text as T import qualified Data.Map as Map import Data.Maybe +#if __GLASGOW_HASKELL__ < 808 import Data.Semigroup (Semigroup(..)) +#endif import Data.Typeable import GHC.Generics ( Generic ) diff --git a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs index 884bbca38..9f3b9c647 100644 --- a/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs +++ b/src/Haskell/Ide/Engine/Plugin/ApplyRefact.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} @@ -19,7 +20,11 @@ import Control.Monad.IO.Class import Control.Monad.Trans.Except import Data.Aeson hiding (Error) import Data.Maybe + +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#endif + import qualified Data.Text as T import GHC.Generics import Haskell.Ide.Engine.MonadFunctions diff --git a/src/Haskell/Ide/Engine/Plugin/Brittany.hs b/src/Haskell/Ide/Engine/Plugin/Brittany.hs index 222ddb333..eb46310e9 100644 --- a/src/Haskell/Ide/Engine/Plugin/Brittany.hs +++ b/src/Haskell/Ide/Engine/Plugin/Brittany.hs @@ -15,7 +15,8 @@ import Haskell.Ide.Engine.PluginUtils import Language.Haskell.Brittany import qualified Language.Haskell.LSP.Types as J import qualified Language.Haskell.LSP.Types.Lens as J -import System.FilePath (FilePath, takeDirectory) + +import System.FilePath import Data.Maybe (maybeToList) brittanyDescriptor :: PluginId -> PluginDescriptor diff --git a/src/Haskell/Ide/Engine/Plugin/Generic.hs b/src/Haskell/Ide/Engine/Plugin/Generic.hs index f613bf797..6f734ce60 100644 --- a/src/Haskell/Ide/Engine/Plugin/Generic.hs +++ b/src/Haskell/Ide/Engine/Plugin/Generic.hs @@ -14,7 +14,9 @@ import Data.Function import qualified Data.HashMap.Strict as HM import Data.List import Data.Maybe +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#endif import qualified Data.Text as T import Name import GHC.Generics diff --git a/src/Haskell/Ide/Engine/Plugin/HsImport.hs b/src/Haskell/Ide/Engine/Plugin/HsImport.hs index 935f013f7..e08a3b1be 100644 --- a/src/Haskell/Ide/Engine/Plugin/HsImport.hs +++ b/src/Haskell/Ide/Engine/Plugin/HsImport.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} @@ -13,7 +14,9 @@ import Control.Monad import Data.Aeson import Data.Foldable import Data.Maybe +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ( (<>) ) +#endif import qualified Data.Text as T import qualified Data.Text.IO as T import qualified GHC.Generics as Generics diff --git a/src/Haskell/Ide/Engine/Plugin/Package.hs b/src/Haskell/Ide/Engine/Plugin/Package.hs index 199485384..481cb7224 100644 --- a/src/Haskell/Ide/Engine/Plugin/Package.hs +++ b/src/Haskell/Ide/Engine/Plugin/Package.hs @@ -22,11 +22,14 @@ import qualified Data.ByteString as B import Data.Foldable import Data.List import qualified Data.HashMap.Strict as HM -import qualified Data.Set as S import qualified Data.Text as T import qualified Data.Text.Encoding as T import Data.Maybe +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#else +import qualified Data.Set as S +#endif #if MIN_VERSION_Cabal(2,2,0) import Distribution.PackageDescription.Parsec import Distribution.Types.VersionRange diff --git a/src/Haskell/Ide/Engine/Plugin/Pragmas.hs b/src/Haskell/Ide/Engine/Plugin/Pragmas.hs index f33c6aef2..ba1e973b5 100644 --- a/src/Haskell/Ide/Engine/Plugin/Pragmas.hs +++ b/src/Haskell/Ide/Engine/Plugin/Pragmas.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} @@ -8,7 +9,9 @@ module Haskell.Ide.Engine.Plugin.Pragmas where import Control.Lens import Data.Aeson import qualified Data.HashMap.Strict as H +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#endif import qualified Data.Text as T import qualified GHC.Generics as Generics import Haskell.Ide.Engine.MonadTypes hiding (_range) diff --git a/src/Haskell/Ide/Engine/Scheduler.hs b/src/Haskell/Ide/Engine/Scheduler.hs index a94787487..1709165ff 100644 --- a/src/Haskell/Ide/Engine/Scheduler.hs +++ b/src/Haskell/Ide/Engine/Scheduler.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ExistentialQuantification #-} @@ -25,9 +26,11 @@ where import Control.Concurrent.Async import GHC.Conc import qualified Control.Concurrent.STM as STM -import Control.Monad.IO.Class ( liftIO - , MonadIO - ) +import Control.Monad.IO.Class ( MonadIO ) +#if __GLASGOW_HASKELL__ < 808 +import Control.Monad.IO.Class ( liftIO ) +#endif + import Control.Monad.Reader.Class ( ask , MonadReader ) diff --git a/src/Haskell/Ide/Engine/Server.hs b/src/Haskell/Ide/Engine/Server.hs index 9e4d51af9..c1250618a 100644 --- a/src/Haskell/Ide/Engine/Server.hs +++ b/src/Haskell/Ide/Engine/Server.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} @@ -32,7 +33,10 @@ import Data.Default import Data.Foldable import qualified Data.Map as Map import Data.Maybe -import Data.Semigroup (Semigroup(..), Option(..), option) +import Data.Semigroup (Option(..), option) +#if __GLASGOW_HASKELL__ < 808 +import Data.Semigroup (Semigroup(..), ) +#endif import qualified Data.Set as S import qualified Data.SortedList as SL import qualified Data.Text as T diff --git a/src/Haskell/Ide/Engine/Support/HieExtras.hs b/src/Haskell/Ide/Engine/Support/HieExtras.hs index 831f256b3..5103608b1 100644 --- a/src/Haskell/Ide/Engine/Support/HieExtras.hs +++ b/src/Haskell/Ide/Engine/Support/HieExtras.hs @@ -26,7 +26,11 @@ module Haskell.Ide.Engine.Support.HieExtras , getFormattingPlugin ) where +#if __GLASGOW_HASKELL__ < 808 import Data.Semigroup (Semigroup(..)) +import Var +#endif + import ConLike import Control.Monad.Reader import Control.Monad.Except @@ -63,7 +67,6 @@ import Packages import SrcLoc import TcEnv import Type -import Var import Module hiding (getModule) -- --------------------------------------------------------------------- diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 91b637b69..4e9052e19 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -1,4 +1,4 @@ -resolver: lts-14.17 +resolver: lts-14.16 packages: - . - hie-plugin-api diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml new file mode 100644 index 000000000..35e202156 --- /dev/null +++ b/stack-8.8.1.yaml @@ -0,0 +1,35 @@ +resolver: nightly-2019-12-18 +packages: +- . +- hie-plugin-api + +extra-deps: +# - ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types +- ./submodules/apply-refact +- hie-bios-0.3.2 +- bytestring-trie-0.2.5.0 +- constrained-dynamic-0.1.0.0 +- fclabels-2.0.3.3 +- floskell-0.10.2 +- fold-debounce-0.2.0.9 +- haddock-api-2.23.0 +- haddock-library-1.8.0 +- hoogle-5.0.17.13 +- hsimport-0.11.0 +- monad-dijkstra-0.1.1.2 + +flags: + haskell-ide-engine: + pedantic: true + hie-plugin-api: + pedantic: true + + +# allow-newer: true + +nix: + packages: [ icu libcxx zlib ] + +concurrent-tests: false diff --git a/stack.yaml b/stack.yaml index a891f03cf..2aac861c4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -29,7 +29,7 @@ flags: pedantic: true -allow-newer: true +# allow-newer: true nix: packages: [ icu libcxx zlib ] From 756ffd653d2ee3d6deee76e927a2478898d0ca5a Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Mon, 23 Dec 2019 16:57:31 -0500 Subject: [PATCH 005/270] Allow newer for cabal-helper --- stack.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stack.yaml b/stack.yaml index 2aac861c4..5b2464b81 100644 --- a/stack.yaml +++ b/stack.yaml @@ -8,12 +8,9 @@ extra-deps: - ./submodules/cabal-helper - ./submodules/apply-refact -- deque-0.4.3 -- ansi-terminal-0.8.2 - hie-bios-0.3.2 - bytestring-trie-0.2.5.0 - constrained-dynamic-0.1.0.0 -- fclabels-2.0.3.3 - floskell-0.10.2 - fold-debounce-0.2.0.9 - haddock-api-2.23.0 @@ -22,6 +19,8 @@ extra-deps: - hsimport-0.11.0 - monad-dijkstra-0.1.1.2 +allow-newer: true + flags: haskell-ide-engine: pedantic: true From 77d08fa86741f0c49edc97a614dc6dbb5e718b98 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Mon, 23 Dec 2019 22:18:03 -0500 Subject: [PATCH 006/270] Fix tests imports --- test/functional/FunctionalCodeActionsSpec.hs | 3 +++ test/unit/LiquidSpec.hs | 3 +++ 2 files changed, 6 insertions(+) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index 251141d28..1d908c606 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module FunctionalCodeActionsSpec where @@ -11,7 +12,9 @@ import Data.Default import qualified Data.HashMap.Strict as HM import qualified Data.Set as Set import Data.Maybe +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#endif import qualified Data.Text as T import Haskell.Ide.Engine.Config import Language.Haskell.LSP.Test as Test diff --git a/test/unit/LiquidSpec.hs b/test/unit/LiquidSpec.hs index 99118fced..5f856e172 100644 --- a/test/unit/LiquidSpec.hs +++ b/test/unit/LiquidSpec.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NamedFieldPuns #-} module LiquidSpec where @@ -7,7 +8,9 @@ import Data.List import qualified Data.ByteString.Lazy as BS import qualified Data.Text as T import qualified Data.Text.IO as T +#if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) +#endif import Haskell.Ide.Engine.MonadTypes import Haskell.Ide.Engine.Plugin.Liquid import System.Directory From 4b7c4ab4a7b00998f99a3d93623fe536cc7d7757 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 24 Dec 2019 18:42:03 -0500 Subject: [PATCH 007/270] Stop using GHC 8.2.1 in tests --- test/testdata/wrapper/8.2.1/stack.yaml | 1 - test/testdata/wrapper/{8.2.1 => 8.8.1}/Setup.hs | 0 test/testdata/wrapper/{8.2.1 => 8.8.1}/cabal1.cabal | 0 test/testdata/wrapper/{8.2.1 => 8.8.1}/hie.yaml | 0 .../testdata/wrapper/{8.2.1 => 8.8.1}/src/Foo/Bar.hs | 0 test/testdata/wrapper/{8.2.1 => 8.8.1}/src/main.hs | 0 test/testdata/wrapper/8.8.1/stack.yaml | 1 + test/testdata/wrapper/lts-11.14/stack.yaml | 1 - .../wrapper/{lts-11.14 => lts-14.18}/Setup.hs | 0 .../wrapper/{lts-11.14 => lts-14.18}/cabal1.cabal | 0 .../wrapper/{lts-11.14 => lts-14.18}/hie.yaml | 0 .../wrapper/{lts-11.14 => lts-14.18}/src/Foo/Bar.hs | 0 .../wrapper/{lts-11.14 => lts-14.18}/src/main.hs | 0 test/testdata/wrapper/lts-14.18/stack.yaml | 1 + test/wrapper/HieWrapper.hs | 12 ++++++------ 15 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 test/testdata/wrapper/8.2.1/stack.yaml rename test/testdata/wrapper/{8.2.1 => 8.8.1}/Setup.hs (100%) rename test/testdata/wrapper/{8.2.1 => 8.8.1}/cabal1.cabal (100%) rename test/testdata/wrapper/{8.2.1 => 8.8.1}/hie.yaml (100%) rename test/testdata/wrapper/{8.2.1 => 8.8.1}/src/Foo/Bar.hs (100%) rename test/testdata/wrapper/{8.2.1 => 8.8.1}/src/main.hs (100%) create mode 100644 test/testdata/wrapper/8.8.1/stack.yaml delete mode 100644 test/testdata/wrapper/lts-11.14/stack.yaml rename test/testdata/wrapper/{lts-11.14 => lts-14.18}/Setup.hs (100%) rename test/testdata/wrapper/{lts-11.14 => lts-14.18}/cabal1.cabal (100%) rename test/testdata/wrapper/{lts-11.14 => lts-14.18}/hie.yaml (100%) rename test/testdata/wrapper/{lts-11.14 => lts-14.18}/src/Foo/Bar.hs (100%) rename test/testdata/wrapper/{lts-11.14 => lts-14.18}/src/main.hs (100%) create mode 100644 test/testdata/wrapper/lts-14.18/stack.yaml diff --git a/test/testdata/wrapper/8.2.1/stack.yaml b/test/testdata/wrapper/8.2.1/stack.yaml deleted file mode 100644 index d6a173c32..000000000 --- a/test/testdata/wrapper/8.2.1/stack.yaml +++ /dev/null @@ -1 +0,0 @@ -resolver: ghc-8.2.1 \ No newline at end of file diff --git a/test/testdata/wrapper/8.2.1/Setup.hs b/test/testdata/wrapper/8.8.1/Setup.hs similarity index 100% rename from test/testdata/wrapper/8.2.1/Setup.hs rename to test/testdata/wrapper/8.8.1/Setup.hs diff --git a/test/testdata/wrapper/8.2.1/cabal1.cabal b/test/testdata/wrapper/8.8.1/cabal1.cabal similarity index 100% rename from test/testdata/wrapper/8.2.1/cabal1.cabal rename to test/testdata/wrapper/8.8.1/cabal1.cabal diff --git a/test/testdata/wrapper/8.2.1/hie.yaml b/test/testdata/wrapper/8.8.1/hie.yaml similarity index 100% rename from test/testdata/wrapper/8.2.1/hie.yaml rename to test/testdata/wrapper/8.8.1/hie.yaml diff --git a/test/testdata/wrapper/8.2.1/src/Foo/Bar.hs b/test/testdata/wrapper/8.8.1/src/Foo/Bar.hs similarity index 100% rename from test/testdata/wrapper/8.2.1/src/Foo/Bar.hs rename to test/testdata/wrapper/8.8.1/src/Foo/Bar.hs diff --git a/test/testdata/wrapper/8.2.1/src/main.hs b/test/testdata/wrapper/8.8.1/src/main.hs similarity index 100% rename from test/testdata/wrapper/8.2.1/src/main.hs rename to test/testdata/wrapper/8.8.1/src/main.hs diff --git a/test/testdata/wrapper/8.8.1/stack.yaml b/test/testdata/wrapper/8.8.1/stack.yaml new file mode 100644 index 000000000..f32e5fadf --- /dev/null +++ b/test/testdata/wrapper/8.8.1/stack.yaml @@ -0,0 +1 @@ +rsesolver: ghc-8.8.1 diff --git a/test/testdata/wrapper/lts-11.14/stack.yaml b/test/testdata/wrapper/lts-11.14/stack.yaml deleted file mode 100644 index a6247386d..000000000 --- a/test/testdata/wrapper/lts-11.14/stack.yaml +++ /dev/null @@ -1 +0,0 @@ -resolver: lts-11.14 \ No newline at end of file diff --git a/test/testdata/wrapper/lts-11.14/Setup.hs b/test/testdata/wrapper/lts-14.18/Setup.hs similarity index 100% rename from test/testdata/wrapper/lts-11.14/Setup.hs rename to test/testdata/wrapper/lts-14.18/Setup.hs diff --git a/test/testdata/wrapper/lts-11.14/cabal1.cabal b/test/testdata/wrapper/lts-14.18/cabal1.cabal similarity index 100% rename from test/testdata/wrapper/lts-11.14/cabal1.cabal rename to test/testdata/wrapper/lts-14.18/cabal1.cabal diff --git a/test/testdata/wrapper/lts-11.14/hie.yaml b/test/testdata/wrapper/lts-14.18/hie.yaml similarity index 100% rename from test/testdata/wrapper/lts-11.14/hie.yaml rename to test/testdata/wrapper/lts-14.18/hie.yaml diff --git a/test/testdata/wrapper/lts-11.14/src/Foo/Bar.hs b/test/testdata/wrapper/lts-14.18/src/Foo/Bar.hs similarity index 100% rename from test/testdata/wrapper/lts-11.14/src/Foo/Bar.hs rename to test/testdata/wrapper/lts-14.18/src/Foo/Bar.hs diff --git a/test/testdata/wrapper/lts-11.14/src/main.hs b/test/testdata/wrapper/lts-14.18/src/main.hs similarity index 100% rename from test/testdata/wrapper/lts-11.14/src/main.hs rename to test/testdata/wrapper/lts-14.18/src/main.hs diff --git a/test/testdata/wrapper/lts-14.18/stack.yaml b/test/testdata/wrapper/lts-14.18/stack.yaml new file mode 100644 index 000000000..6a1219450 --- /dev/null +++ b/test/testdata/wrapper/lts-14.18/stack.yaml @@ -0,0 +1 @@ +resolver: lts-14.18 diff --git a/test/wrapper/HieWrapper.hs b/test/wrapper/HieWrapper.hs index ef8cb4aa5..fa3a62d8b 100644 --- a/test/wrapper/HieWrapper.hs +++ b/test/wrapper/HieWrapper.hs @@ -11,16 +11,16 @@ import System.Process main :: IO () main = hspec $ describe "version checking" $ do - it "picks up a stack.yaml with 8.2.1" $ - withCurrentDirectory "test/testdata/wrapper/8.2.1" $ do + it "picks up a stack.yaml with 8.8.1" $ + withCurrentDirectory "test/testdata/wrapper/8.8.1" $ do d <- getCurrentDirectory cradle <- liftIO (findLocalCradle (d "File.hs")) - getProjectGhcVersion cradle `shouldReturn` "8.2.1" - it "picks up a stack.yaml with 8.2.2" $ - withCurrentDirectory "test/testdata/wrapper/lts-11.14" $ do + getProjectGhcVersion cradle `shouldReturn` "8.8.1" + it "picks up a stack.yaml with 8.6.5" $ + withCurrentDirectory "test/testdata/wrapper/lts-14.18" $ do d <- getCurrentDirectory cradle <- liftIO (findLocalCradle (d "File.hs")) - getProjectGhcVersion cradle `shouldReturn` "8.2.2" + getProjectGhcVersion cradle `shouldReturn` "8.6.5" it "picks up whatever version of ghc is on this machine" $ withCurrentDirectory "test/testdata/wrapper/ghc" $ do d <- getCurrentDirectory From d1832238c0270d9463ee262efbd717e1cbdf7f83 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 24 Dec 2019 14:42:14 -0500 Subject: [PATCH 008/270] 8.8.1 tests --- .azure/linux-stack.yml | 2 + .azure/macos-stack.yml | 2 + .azure/windows-stack.yml | 2 + stack-8.8.1.yaml | 5 +- test/functional/FunctionalCodeActionsSpec.hs | 19 ++- test/unit/ApplyRefactPluginSpec.hs | 2 +- test/unit/PackagePluginSpec.hs | 120 +++++++++++++------ test/utils/TestUtils.hs | 11 +- 8 files changed, 117 insertions(+), 46 deletions(-) diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 806ee2846..66813a87d 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.1: + YAML_FILE: stack-8.8.1.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index e7b72a93c..28ea2c066 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.1: + YAML_FILE: stack-8.8.1.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 68b2c4f0f..0dda3fe00 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.1: + YAML_FILE: stack-8.8.1.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 35e202156..5b2464b81 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -6,12 +6,11 @@ packages: extra-deps: # - ./submodules/HaRe - ./submodules/cabal-helper -- ./submodules/ghc-mod/ghc-project-types - ./submodules/apply-refact + - hie-bios-0.3.2 - bytestring-trie-0.2.5.0 - constrained-dynamic-0.1.0.0 -- fclabels-2.0.3.3 - floskell-0.10.2 - fold-debounce-0.2.0.9 - haddock-api-2.23.0 @@ -20,6 +19,8 @@ extra-deps: - hsimport-0.11.0 - monad-dijkstra-0.1.1.2 +allow-newer: true + flags: haskell-ide-engine: pedantic: true diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index 1d908c606..fdc6f91a3 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -248,7 +248,9 @@ spec = describe "code actions" $ do executeCodeAction action contents <- getDocumentEdit . TextDocumentIdentifier =<< getDocUri "add-package-test.cabal" - liftIO $ T.lines contents `shouldSatisfy` \x -> any (\l -> "text -any" `T.isSuffixOf` (x !! l)) [15, 16] + liftIO $ + T.lines contents `shouldSatisfy` \x -> + any (\l -> "text -any" `T.isSuffixOf` l || "text : {} -any" `T.isSuffixOf` l) x it "adds to hpack package.yaml files" $ runSession hieCommand fullCaps "test/testdata/addPackageTest/hpack-exe" $ do @@ -343,6 +345,14 @@ spec = describe "code actions" $ do suggestion <- case ghcVersion of + GHC88 -> do + liftIO $ map (^. L.title) cas `shouldMatchList` + [ "Substitute hole (Int) with x ([Int])" + , "Substitute hole (Int) with foo ([Int] -> Int Valid hole fits include)" + , "Substitute hole (Int) with maxBound (forall a. Bounded a => a with maxBound @Int)" + , "Substitute hole (Int) with minBound (forall a. Bounded a => a with minBound @Int)" + ] + return "x" GHC86 -> do liftIO $ map (^. L.title) cas `shouldMatchList` [ "Substitute hole (Int) with x ([Int])" @@ -383,6 +393,13 @@ spec = describe "code actions" $ do suggestion <- case ghcVersion of + GHC88 -> do + liftIO $ map (^. L.title) cas `shouldMatchList` + [ "Substitute hole (A) with stuff (A -> A)" + , "Substitute hole (A) with x ([A])" + , "Substitute hole (A) with foo2 ([A] -> A)" + ] + return "stuff" GHC86 -> do liftIO $ map (^. L.title) cas `shouldMatchList` [ "Substitute hole (A) with stuff (A -> A)" diff --git a/test/unit/ApplyRefactPluginSpec.hs b/test/unit/ApplyRefactPluginSpec.hs index 3a7e6f004..c7ade54a3 100644 --- a/test/unit/ApplyRefactPluginSpec.hs +++ b/test/unit/ApplyRefactPluginSpec.hs @@ -152,7 +152,7 @@ applyRefactSpec = do let req = applyAllCmd filePath isExpectedError (IdeResultFail (IdeError PluginError err _)) = - "Illegal symbol '.' in type" `T.isInfixOf` err + "Illegal symbol " `T.isInfixOf` err isExpectedError _ = False r <- withCurrentDirectory "./test/testdata" $ runIGM testPlugins req r `shouldSatisfy` isExpectedError diff --git a/test/unit/PackagePluginSpec.hs b/test/unit/PackagePluginSpec.hs index 9108ff753..3de9ad03f 100644 --- a/test/unit/PackagePluginSpec.hs +++ b/test/unit/PackagePluginSpec.hs @@ -63,27 +63,48 @@ packageSpec = do uri = filePathToUri $ fp "add-package-test.cabal" args = AddParams fp (fp "AddPackage.hs") "text" act = addCmd args - textEdits = - List - [ TextEdit (Range (Position 0 0) (Position 7 27)) $ T.concat - [ "cabal-version: >=1.10\n" - , "name: add-package-test\n" - , "version: 0.1.0.0\n" - , "license: BSD3\n" - , "maintainer: luke_lau@icloud.com\n" - , "author: Luke Lau\n" - , "build-type: Simple\n" - , "extra-source-files:\n" - , " ChangeLog.md" + textEdits = case ghcVersion of + GHC88 -> + List + [ TextEdit (Range (Position 0 0) (Position 7 27)) $ T.concat + [ "cabal-version: >=1.10\n" + , "name: add-package-test\n" + , "version: 0.1.0.0\n" + , "license: BSD3\n" + , "maintainer: luke_lau@icloud.com\n" + , "author: Luke Lau\n" + , "build-type: Simple\n" + , "extra-source-files: ChangeLog.md" + ] + , TextEdit (Range (Position 10 0) (Position 13 34)) $ T.concat + [ " main-is: AddPackage.hs\n" + , " default-language: Haskell2010\n" + , " build-depends:\n" + , " base >=4.7 && <5,\n" + , " text : {} -any" + ] ] - , TextEdit (Range (Position 10 0) (Position 13 34)) $ T.concat - [ " main-is: AddPackage.hs\n" - , " default-language: Haskell2010\n" - , " build-depends:\n" - , " base >=4.7 && <5,\n" - , " text -any" + _ -> + List + [ TextEdit (Range (Position 0 0) (Position 7 27)) $ T.concat + [ "cabal-version: >=1.10\n" + , "name: add-package-test\n" + , "version: 0.1.0.0\n" + , "license: BSD3\n" + , "maintainer: luke_lau@icloud.com\n" + , "author: Luke Lau\n" + , "build-type: Simple\n" + , "extra-source-files:\n" + , " ChangeLog.md" + ] + , TextEdit (Range (Position 10 0) (Position 13 34)) $ T.concat + [ " main-is: AddPackage.hs\n" + , " default-language: Haskell2010\n" + , " build-depends:\n" + , " base >=4.7 && <5,\n" + , " text -any" + ] ] - ] res = IdeResultOk $ WorkspaceEdit (Just $ H.singleton uri textEdits) Nothing testCommand testPlugins act "package" "add" args res @@ -96,28 +117,49 @@ packageSpec = do uri = filePathToUri $ fp "add-package-test.cabal" args = AddParams fp (fp "AddPackage.hs") "text" act = addCmd args - textEdits = - List - [ TextEdit (Range (Position 0 0) (Position 7 27)) $ T.concat - [ "cabal-version: >=1.10\n" - , "name: add-package-test\n" - , "version: 0.1.0.0\n" - , "license: BSD3\n" - , "maintainer: luke_lau@icloud.com\n" - , "author: Luke Lau\n" - , "build-type: Simple\n" - , "extra-source-files:\n" - , " ChangeLog.md" + textEdits = case ghcVersion of + GHC88 -> + List + [ TextEdit (Range (Position 0 0) (Position 7 27)) $ T.concat + [ "cabal-version: >=1.10\n" + , "name: add-package-test\n" + , "version: 0.1.0.0\n" + , "license: BSD3\n" + , "maintainer: luke_lau@icloud.com\n" + , "author: Luke Lau\n" + , "build-type: Simple\n" + , "extra-source-files: ChangeLog.md" + ] + , TextEdit (Range (Position 10 0) (Position 13 34)) $ T.concat + [ " exposed-modules: AddPackage\n" + , " default-language: Haskell2010\n" + , " build-depends:\n" + , " base >=4.7 && <5,\n" + , " text : {} -any" + ] ] - , TextEdit (Range (Position 10 0) (Position 13 34)) $ T.concat - [ " exposed-modules:\n" - , " AddPackage\n" - , " default-language: Haskell2010\n" - , " build-depends:\n" - , " base >=4.7 && <5,\n" - , " text -any" + _ -> + List + [ TextEdit (Range (Position 0 0) (Position 7 27)) $ T.concat + [ "cabal-version: >=1.10\n" + , "name: add-package-test\n" + , "version: 0.1.0.0\n" + , "license: BSD3\n" + , "maintainer: luke_lau@icloud.com\n" + , "author: Luke Lau\n" + , "build-type: Simple\n" + , "extra-source-files:\n" + , " ChangeLog.md" + ] + , TextEdit (Range (Position 10 0) (Position 13 34)) $ T.concat + [ " exposed-modules:\n" + , " AddPackage\n" + , " default-language: Haskell2010\n" + , " build-depends:\n" + , " base >=4.7 && <5,\n" + , " text -any" + ] ] - ] res = IdeResultOk $ WorkspaceEdit (Just $ H.singleton uri textEdits) Nothing testCommand testPlugins act "package" "add" args res diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index b1edb382c..520106a7a 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -138,13 +138,16 @@ files = ] data GhcVersion - = GHC86 + = GHC88 + | GHC86 | GHC84 | GHCPre84 deriving (Eq,Show) ghcVersion :: GhcVersion -#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,0,0))) +#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,0,0))) +ghcVersion = GHC88 +#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,0,0))) ghcVersion = GHC86 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,4,0,0))) ghcVersion = GHC84 @@ -154,7 +157,9 @@ ghcVersion = GHCPre84 stackYaml :: FilePath stackYaml = -#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,5,0))) +#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,1,0))) + "stack-8.8.1.yaml" +#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,5,0))) "stack-8.6.5.yaml" #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,4,0))) "stack-8.6.4.yaml" From 839fe9bfd6f3c885e9ae7b62ac7e43e8cc7da634 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Thu, 26 Dec 2019 01:46:53 -0500 Subject: [PATCH 009/270] Remove GHCPre84 --- test/functional/FunctionalCodeActionsSpec.hs | 13 ------------- test/utils/TestUtils.hs | 3 --- 2 files changed, 16 deletions(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index fdc6f91a3..c4823a933 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -368,12 +368,6 @@ spec = describe "code actions" $ do , "Substitute hole (Int) with undefined (forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a)" ] return "maxBound" - GHCPre84 -> do - liftIO $ map (^. L.title) cas `shouldMatchList` - [ "Substitute hole (Int) with x ([Int])" - , "Substitute hole (Int) with foo ([Int] -> Int)" - ] - return "x" executeCodeAction $ head cas @@ -415,13 +409,6 @@ spec = describe "code actions" $ do , "Substitute hole (A) with foo2 ([A] -> A)" ] return "undefined" - GHCPre84 -> do - liftIO $ map (^. L.title) cas `shouldMatchList` - [ "Substitute hole (A) with stuff (A -> A)" - , "Substitute hole (A) with x ([A])" - , "Substitute hole (A) with foo2 ([A] -> A)" - ] - return "stuff" executeCodeAction $ head cas diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index 520106a7a..608a0355e 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -141,7 +141,6 @@ data GhcVersion = GHC88 | GHC86 | GHC84 - | GHCPre84 deriving (Eq,Show) ghcVersion :: GhcVersion @@ -151,8 +150,6 @@ ghcVersion = GHC88 ghcVersion = GHC86 #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,4,0,0))) ghcVersion = GHC84 -#else -ghcVersion = GHCPre84 #endif stackYaml :: FilePath From 180fff675f754dbb465b73453bb7956d32135eef Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Thu, 26 Dec 2019 18:11:46 -0500 Subject: [PATCH 010/270] Handle stack 8.8.1 warning --- src/Haskell/Ide/Engine/Version.hs | 2 +- test/testdata/wrapper/8.8.1/stack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Haskell/Ide/Engine/Version.hs b/src/Haskell/Ide/Engine/Version.hs index d81df88cf..ee672c256 100644 --- a/src/Haskell/Ide/Engine/Version.hs +++ b/src/Haskell/Ide/Engine/Version.hs @@ -45,7 +45,7 @@ getProjectGhcVersion crdl = do if isStackCradle crdl && isStackInstalled then do L.infoM "hie" "Using stack GHC version" - catch (tryCommand "stack ghc -- --numeric-version") $ \e -> do + catch (last . lines <$> tryCommand "stack ghc -- --numeric-version") $ \e -> do L.errorM "hie" $ show (e :: SomeException) L.infoM "hie" "Couldn't find stack version, falling back to plain GHC" getGhcVersion diff --git a/test/testdata/wrapper/8.8.1/stack.yaml b/test/testdata/wrapper/8.8.1/stack.yaml index f32e5fadf..115aa84ec 100644 --- a/test/testdata/wrapper/8.8.1/stack.yaml +++ b/test/testdata/wrapper/8.8.1/stack.yaml @@ -1 +1 @@ -rsesolver: ghc-8.8.1 +resolver: ghc-8.8.1 From 6ebb4753536f286b589e0aee3c83ece788dd4097 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 28 Dec 2019 00:50:25 +0000 Subject: [PATCH 011/270] Get rid of allow-newer in stack files --- .gitmodules | 3 ++- cabal.project | 1 + stack-8.8.1.yaml | 11 ++++++++--- stack.yaml | 14 ++++++++------ submodules/cabal-helper | 2 +- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.gitmodules b/.gitmodules index 847bd7939..ce231ab7a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,8 @@ [submodule "submodules/cabal-helper"] path = submodules/cabal-helper - url = https://github.com/DanielG/cabal-helper.git + # url = https://github.com/DanielG/cabal-helper.git + url = https://github.com/alanz/cabal-helper.git [submodule "submodules/apply-refact"] path = submodules/apply-refact diff --git a/cabal.project b/cabal.project index 6f39ccbeb..5ba0ae2ad 100644 --- a/cabal.project +++ b/cabal.project @@ -4,6 +4,7 @@ packages: -- ./submodules/HaRe ./submodules/cabal-helper/ + ./submodules/apply-refact tests: true diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 5b2464b81..2c5a7a9d7 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -8,18 +8,23 @@ extra-deps: - ./submodules/cabal-helper - ./submodules/apply-refact -- hie-bios-0.3.2 - bytestring-trie-0.2.5.0 +- clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 - fold-debounce-0.2.0.9 - haddock-api-2.23.0 - haddock-library-1.8.0 -- hoogle-5.0.17.13 +- haskell-src-exts-1.21.1 +- hie-bios-0.3.2 +# - hoogle-5.0.17.13 +- hoogle-5.0.17.11 - hsimport-0.11.0 - monad-dijkstra-0.1.1.2 +- semigroups-0.18.5 +- temporary-1.2.1.1 -allow-newer: true +# allow-newer: true flags: haskell-ide-engine: diff --git a/stack.yaml b/stack.yaml index 5b2464b81..c556da8ce 100644 --- a/stack.yaml +++ b/stack.yaml @@ -8,18 +8,23 @@ extra-deps: - ./submodules/cabal-helper - ./submodules/apply-refact -- hie-bios-0.3.2 - bytestring-trie-0.2.5.0 +- clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 - fold-debounce-0.2.0.9 - haddock-api-2.23.0 - haddock-library-1.8.0 -- hoogle-5.0.17.13 +- haskell-src-exts-1.21.1 +- hie-bios-0.3.2 +# - hoogle-5.0.17.13 +- hoogle-5.0.17.11 - hsimport-0.11.0 - monad-dijkstra-0.1.1.2 +- semigroups-0.18.5 +- temporary-1.2.1.1 -allow-newer: true +# allow-newer: true flags: haskell-ide-engine: @@ -27,9 +32,6 @@ flags: hie-plugin-api: pedantic: true - -# allow-newer: true - nix: packages: [ icu libcxx zlib ] diff --git a/submodules/cabal-helper b/submodules/cabal-helper index 5b6cefdbe..2bf10c11c 160000 --- a/submodules/cabal-helper +++ b/submodules/cabal-helper @@ -1 +1 @@ -Subproject commit 5b6cefdbe03ebc4ec6451751fbaba72cab663766 +Subproject commit 2bf10c11c46c5155973b3996f6e97344ea614517 From e8e3afdc5c38c68ac5e170259dbb69145a295360 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sat, 28 Dec 2019 22:31:32 +0000 Subject: [PATCH 012/270] Update cabal circleCI job --- .circleci/config.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b97f446ac..769c515c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -149,7 +149,7 @@ jobs: cabal: working_directory: ~/build docker: - - image: quay.io/haskell_works/ghc-8.6.5 + - image: haskell:8.8.1 steps: - checkout - run: @@ -161,18 +161,15 @@ jobs: - restore-cache: keys: - cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }} - - run: - name: Cabal version - command: cabal --version - run: name: Update - command: cabal new-update + command: cabal update - run: name: Configure - command: cabal new-configure --enable-tests + command: cabal configure --enable-tests - run: name: Build - command: cabal new-build -j1 # need j1, else ghc-lib-parser triggers OOM + command: cabal build -j1 # need j1, else ghc-lib-parser triggers OOM no_output_timeout: 30m - save_cache: key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }} From 43bcc5e74b4cf77018966d0ad3dd0ffac2653b0d Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 29 Dec 2019 20:24:06 +0000 Subject: [PATCH 013/270] Use cabal-helper from hackage --- .gitmodules | 5 ----- cabal.project | 1 - stack-8.4.2.yaml | 21 ++++++++++----------- stack-8.4.3.yaml | 19 +++++++++---------- stack-8.4.4.yaml | 18 +++++++++--------- stack-8.6.1.yaml | 14 +++++++------- stack-8.6.2.yaml | 14 +++++++------- stack-8.6.3.yaml | 16 ++++++++-------- stack-8.6.4.yaml | 13 ++++++------- stack-8.6.5.yaml | 8 ++++---- stack-8.8.1.yaml | 2 +- stack.yaml | 2 +- submodules/cabal-helper | 1 - 13 files changed, 62 insertions(+), 72 deletions(-) delete mode 160000 submodules/cabal-helper diff --git a/.gitmodules b/.gitmodules index ce231ab7a..05f22b5a4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,11 +10,6 @@ # rm -rf path_to_submodule -[submodule "submodules/cabal-helper"] - path = submodules/cabal-helper - # url = https://github.com/DanielG/cabal-helper.git - url = https://github.com/alanz/cabal-helper.git - [submodule "submodules/apply-refact"] path = submodules/apply-refact url = https://github.com/mpickering/apply-refact.git diff --git a/cabal.project b/cabal.project index 5ba0ae2ad..675dd0b54 100644 --- a/cabal.project +++ b/cabal.project @@ -3,7 +3,6 @@ packages: ./hie-plugin-api/ -- ./submodules/HaRe - ./submodules/cabal-helper/ ./submodules/apply-refact tests: true diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 3e8454872..2f0282a69 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -5,17 +5,19 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper -- brittany-0.12.1.0 - base-compat-0.9.3 +- brittany-0.12.1.0 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 -- ghc-exactprint-0.6.2 # for HaRe +- extra-1.6.18 +- file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 +- ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 - haddock-api-2.20.0 - haddock-library-1.6.0 @@ -28,16 +30,20 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- libyaml-0.1.1.0 - lsp-test-0.9.0.0 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger - network-bsd-2.8.1.0 # for hslogger - pretty-show-1.8.2 - rope-utf16-splay-0.3.1.0 -- syz-0.2.0.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd +- syz-0.2.0.0 - temporary-1.2.1.1 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 # To make build work in windows 7 - unix-time-0.4.7 - windns-0.1.0.0 @@ -47,13 +53,6 @@ extra-deps: - wai-3.2.2.1 # for network and network-bsd -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- file-embed-0.0.11@sha256:77bb3b1dc219ccd682706b1d3dfbc5bf2db5beb1af6c108ed9e0f5b4d58a5a0a,1325 -- libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 - flags: haskell-ide-engine: pedantic: true diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 93fbc062f..9d156aafc 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -5,17 +5,19 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - base-compat-0.9.3 - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 -- ghc-exactprint-0.6.2 # for HaRe +- extra-1.6.18 +- file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 +- ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 - haddock-api-2.20.0 - haddock-library-1.6.0 @@ -28,15 +30,19 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- libyaml-0.1.1.0 - lsp-test-0.9.0.0 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger - network-bsd-2.8.1.0 # for hslogger - pretty-show-1.8.2 - rope-utf16-splay-0.3.1.0 -- syz-0.2.0.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd +- syz-0.2.0.0 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 # To make build work in windows 7 - unix-time-0.4.7 - temporary-1.2.1.1 @@ -45,13 +51,6 @@ extra-deps: - wai-3.2.2.1 # for network and network-bsd -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- file-embed-0.0.11@sha256:77bb3b1dc219ccd682706b1d3dfbc5bf2db5beb1af6c108ed9e0f5b4d58a5a0a,1325 -- libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 - flags: haskell-ide-engine: pedantic: true diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 4773450cf..5ebe02e0e 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -5,16 +5,18 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 -- ghc-exactprint-0.6.2 # for HaRe +- extra-1.6.18 +- file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 +- ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 - haddock-api-2.20.0 - haddock-library-1.6.0 @@ -27,6 +29,7 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- libyaml-0.1.1.0 - lsp-test-0.9.0.0 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger @@ -34,9 +37,12 @@ extra-deps: - optparse-simple-0.1.0 - pretty-show-1.9.5 - rope-utf16-splay-0.3.1.0 -- syz-0.2.0.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd +- syz-0.2.0.0 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 # To make build work in windows 7 - unix-time-0.4.7 - temporary-1.2.1.1 @@ -44,12 +50,6 @@ extra-deps: - warp-3.2.28 # for network and network-bsd - wai-3.2.2.1 # for network and network-bsd -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 -- file-embed-0.0.11@sha256:77bb3b1dc219ccd682706b1d3dfbc5bf2db5beb1af6c108ed9e0f5b4d58a5a0a,1325 -- libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 flags: haskell-ide-engine: diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index 8ccd97963..d34d96d15 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -5,22 +5,23 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - apply-refact-0.6.0.0 - brittany-0.12.1.0 - butcher-1.3.2.3 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-install-2.4.0.0 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 - czipwith-1.0.1.1 - data-tree-print-0.1.0.2 - deque-0.4.3 +- extra-1.6.18 - filepattern-0.1.1 - floskell-0.10.2 -- ghc-lib-parser-8.8.1 - ghc-exactprint-0.6.2 # for HaRe +- ghc-lib-parser-8.8.1 - haddock-api-2.21.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 @@ -30,6 +31,7 @@ extra-deps: - hlint-2.2.4 - hoogle-5.0.17.11 - hsimport-0.11.0 +- libyaml-0.1.1.0 - lsp-test-0.9.0.0 - monad-dijkstra-0.1.1.2 - monad-memo-0.4.1 @@ -41,14 +43,12 @@ extra-deps: - strict-list-0.1.5 - syz-0.2.0.0 - temporary-1.2.1.1 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 # To make build work in windows 7 - unix-time-0.4.7 -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 flags: haskell-ide-engine: diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index 2fd3d7bef..84bae7731 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -5,18 +5,19 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - brittany-0.12.1.0 - butcher-1.3.2.3 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 - deque-0.4.3 +- extra-1.6.18 - filepattern-0.1.1 - floskell-0.10.2 -- ghc-lib-parser-8.8.1 - ghc-exactprint-0.6.2 # for HaRe +- ghc-lib-parser-8.8.1 - haddock-api-2.21.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 @@ -26,6 +27,7 @@ extra-deps: - hlint-2.2.4 - hoogle-5.0.17.11 - hsimport-0.11.0 +- libyaml-0.1.1.0 - lsp-test-0.9.0.0 - monad-dijkstra-0.1.1.2 - monad-memo-0.4.1 @@ -34,15 +36,13 @@ extra-deps: - strict-list-0.1.5 - syz-0.2.0.0 - temporary-1.2.1.1 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 # To make build work in windows 7 - unix-time-0.4.7 #- hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 flags: haskell-ide-engine: diff --git a/stack-8.6.3.yaml b/stack-8.6.3.yaml index 588f4aa31..7c8f7bfbc 100644 --- a/stack-8.6.3.yaml +++ b/stack-8.6.3.yaml @@ -5,16 +5,17 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - brittany-0.12.1.0 -- bytestring-trie-0.2.5.0 - butcher-1.3.2.1 +- bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 +- extra-1.6.18 - floskell-0.10.2 -- ghc-lib-parser-8.8.1 - ghc-exactprint-0.6.2 # for HaRe +- ghc-lib-parser-8.8.1 - haddock-api-2.21.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 @@ -32,14 +33,13 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 + # To make build work in windows 7 - unix-time-0.4.7 -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 - flags: haskell-ide-engine: pedantic: true diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index e590488b7..dfb1b45c7 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -5,16 +5,17 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - brittany-0.12.1.0 - butcher-1.3.2.1 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 +- extra-1.6.18 - floskell-0.10.2 -- ghc-lib-parser-8.8.1 - ghc-exactprint-0.6.2 # for HaRe +- ghc-lib-parser-8.8.1 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 @@ -30,14 +31,12 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 +- unix-compat-0.5.2 +- unordered-containers-0.2.10.0 +- yaml-0.11.1.2 # To make build work in windows 7 - unix-time-0.4.7 -- extra-1.6.18@sha256:5f1fff126f0ae47b701fff5aa8462dc63cb44465d5a724b0afd20a3d731903af -- unix-compat-0.5.2@sha256:16763f1fae4a25abf61ac6195eb530ce838474bd04d86c7d353340aee8716bbb -- yaml-0.11.1.2@sha256:cbc4ddb233c564967aad27ee47c1cd8fd6a06b9183353e76fe66c9be7c9dfd76 -- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 - flags: haskell-ide-engine: diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 4e9052e19..25a003693 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -5,29 +5,29 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - ansi-terminal-0.8.2 - ansi-wl-pprint-0.6.8.2 - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 +- clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-8.8.1 - ghc-exactprint-0.6.2 # for HaRe +- ghc-lib-parser-8.8.1 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - hie-bios-0.3.2 - hlint-2.2.4 -- hsimport-0.11.0 - hoogle-5.0.17.11 +- hsimport-0.11.0 - lsp-test-0.9.0.0 - monad-dijkstra-0.1.1.2@rev:1 - syz-0.2.0.0 - temporary-1.2.1.1 -- clock-0.7.2 flags: haskell-ide-engine: diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 2c5a7a9d7..8b5221a32 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -5,10 +5,10 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - ./submodules/apply-refact - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/stack.yaml b/stack.yaml index c556da8ce..e616760b8 100644 --- a/stack.yaml +++ b/stack.yaml @@ -5,10 +5,10 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/cabal-helper - ./submodules/apply-refact - bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/submodules/cabal-helper b/submodules/cabal-helper deleted file mode 160000 index 2bf10c11c..000000000 --- a/submodules/cabal-helper +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2bf10c11c46c5155973b3996f6e97344ea614517 From 97682e7c878df85ad489280e45168ef67fefaeb6 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Mon, 30 Dec 2019 00:20:32 +0000 Subject: [PATCH 014/270] Use apply-refact-0.7.0.0 from hackage --- .gitmodules | 3 --- cabal.project | 1 - stack-8.8.1.yaml | 2 +- submodules/apply-refact | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) delete mode 160000 submodules/apply-refact diff --git a/.gitmodules b/.gitmodules index 05f22b5a4..281a9120a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,3 @@ # rm -rf path_to_submodule -[submodule "submodules/apply-refact"] - path = submodules/apply-refact - url = https://github.com/mpickering/apply-refact.git diff --git a/cabal.project b/cabal.project index 675dd0b54..a5847f35e 100644 --- a/cabal.project +++ b/cabal.project @@ -3,7 +3,6 @@ packages: ./hie-plugin-api/ -- ./submodules/HaRe - ./submodules/apply-refact tests: true diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 8b5221a32..b30cdf4d2 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -5,8 +5,8 @@ packages: extra-deps: # - ./submodules/HaRe -- ./submodules/apply-refact +- apply-refact-0.7.0.0 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 - clock-0.7.2 diff --git a/submodules/apply-refact b/submodules/apply-refact deleted file mode 160000 index 1acf7eb86..000000000 --- a/submodules/apply-refact +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1acf7eb860be5a446828a3a2fe3644aeb5a1b55f From af0b834c77052b60f8be5b5bff6e64c95c05b29d Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 31 Dec 2019 02:26:19 -0500 Subject: [PATCH 015/270] Update 8.8 resolvers --- stack-8.8.1.yaml | 12 ++++-------- stack.yaml | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 858a40595..3a4db7d9b 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-12-18 +resolver: nightly-2019-12-31 packages: - . - hie-plugin-api @@ -15,18 +15,14 @@ extra-deps: - fold-debounce-0.2.0.9 - haddock-api-2.23.0 - haddock-library-1.8.0 -- haskell-src-exts-1.21.1 - hie-bios-0.3.2 -# - hoogle-5.0.17.13 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 - hoogle-5.0.17.11 - hsimport-0.11.0 -- lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2 - semigroups-0.18.5 - temporary-1.2.1.1 - +- haskell-src-exts-1.21.1 +- ilist-0.3.1.0 +- monad-dijkstra-0.1.1.2 # allow-newer: true flags: diff --git a/stack.yaml b/stack.yaml index 858a40595..3a4db7d9b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-12-18 +resolver: nightly-2019-12-31 packages: - . - hie-plugin-api @@ -15,18 +15,14 @@ extra-deps: - fold-debounce-0.2.0.9 - haddock-api-2.23.0 - haddock-library-1.8.0 -- haskell-src-exts-1.21.1 - hie-bios-0.3.2 -# - hoogle-5.0.17.13 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 - hoogle-5.0.17.11 - hsimport-0.11.0 -- lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2 - semigroups-0.18.5 - temporary-1.2.1.1 - +- haskell-src-exts-1.21.1 +- ilist-0.3.1.0 +- monad-dijkstra-0.1.1.2 # allow-newer: true flags: From 9766a6128171e012ca221c0b9495ba25cd77b623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Thu, 24 Oct 2019 17:47:15 +0100 Subject: [PATCH 016/270] WIP: Adding Ormolu support --- app/MainHie.hs | 2 ++ haskell-ide-engine.cabal | 2 ++ src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 42 +++++++++++++++++++++++++ stack-8.4.4.yaml | 1 + stack-8.6.1.yaml | 1 + stack-8.6.2.yaml | 1 + stack-8.6.3.yaml | 1 + stack-8.6.4.yaml | 1 + stack-8.6.5.yaml | 1 + stack.yaml | 1 + 10 files changed, 53 insertions(+) create mode 100644 src/Haskell/Ide/Engine/Plugin/Ormolu.hs diff --git a/app/MainHie.hs b/app/MainHie.hs index dc57abea9..de2d9c6a4 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -39,6 +39,7 @@ import Haskell.Ide.Engine.Plugin.Haddock import Haskell.Ide.Engine.Plugin.HfaAlign import Haskell.Ide.Engine.Plugin.HsImport import Haskell.Ide.Engine.Plugin.Liquid +import Haskell.Ide.Engine.Plugin.Ormolu import Haskell.Ide.Engine.Plugin.Package import Haskell.Ide.Engine.Plugin.Pragmas @@ -63,6 +64,7 @@ plugins includeExamples = pluginDescToIdePlugins allPlugins , floskellDescriptor "floskell" , genericDescriptor "generic" , ghcmodDescriptor "ghcmod" + , ormoluDescriptor "ormolu" ] examplePlugins = [example2Descriptor "eg2" diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 18ed3094f..709fd74d7 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -33,6 +33,7 @@ library Haskell.Ide.Engine.Plugin.HfaAlign Haskell.Ide.Engine.Plugin.HsImport Haskell.Ide.Engine.Plugin.Liquid + Haskell.Ide.Engine.Plugin.Ormolu Haskell.Ide.Engine.Plugin.Package Haskell.Ide.Engine.Plugin.Package.Compat Haskell.Ide.Engine.Plugin.Pragmas @@ -81,6 +82,7 @@ library , monoid-subclasses > 0.4 , mtl , optparse-simple >= 0.0.3 + , ormolu , parsec , process , safe diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs new file mode 100644 index 000000000..31057a956 --- /dev/null +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -0,0 +1,42 @@ +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE OverloadedStrings #-} + +module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where + +import Control.Monad.IO.Class ( liftIO, MonadIO(..) ) +import Control.Exception +import Data.Aeson ( Value ( Null ) ) +import qualified Data.Text as T +import Ormolu +import Ormolu.Config (defaultConfig) +import Ormolu.Exception (OrmoluException) +import Haskell.Ide.Engine.MonadTypes +import Haskell.Ide.Engine.PluginUtils + +ormoluDescriptor :: PluginId -> PluginDescriptor +ormoluDescriptor plId = PluginDescriptor + { pluginId = plId + , pluginName = "Ormolu" + , pluginDesc = "A formatter for Haskell source code." + , pluginCommands = [] + , pluginCodeActionProvider = Nothing + , pluginDiagnosticProvider = Nothing + , pluginHoverProvider = Nothing + , pluginSymbolProvider = Nothing + , pluginFormattingProvider = Just provider + } + +provider :: FormattingProvider +provider contents uri typ _opts = + case typ of + -- // TODO Adequately throw an error on the following line + FormatRange r -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show r) Null) + FormatText -> pluginGetFile contents uri $ \file -> do + -- INFO: Selection Formatting currently not supported, the below comment is just for temporal information + -- let (range, selectedContents) = case typ of + -- FormatText -> (fullRange contents, contents) + -- FormatRange r -> (r, extractRange r contents) + result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (T.unpack contents)) + case result of + Left err -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) + Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new] \ No newline at end of file diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 5301b80d4..4c060c2b3 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -36,6 +36,7 @@ extra-deps: - network-bsd-2.8.1.0 # for hslogger - optparse-simple-0.1.0 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - pretty-show-1.9.5 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index f741895ca..c6322d553 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -38,6 +38,7 @@ extra-deps: - monoid-subclasses-0.4.6.1 - multistate-0.8.0.1 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - primes-0.2.1.0 - resolv-0.1.1.2 - rope-utf16-splay-0.3.1.0 diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index 347016bac..6f2cc5d78 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -33,6 +33,7 @@ extra-deps: - monad-memo-0.4.1 - multistate-0.8.0.1 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - rope-utf16-splay-0.3.1.0 - strict-list-0.1.5 - syz-0.2.0.0 diff --git a/stack-8.6.3.yaml b/stack-8.6.3.yaml index 46c524136..38e97c28e 100644 --- a/stack-8.6.3.yaml +++ b/stack-8.6.3.yaml @@ -31,6 +31,7 @@ extra-deps: - multistate-0.8.0.1 - optparse-simple-0.1.0 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index d798fb4a8..f0fb7a1ae 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -29,6 +29,7 @@ extra-deps: - monad-memo-0.4.1 - multistate-0.8.0.1 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 48e5d1694..39fb2dfb6 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -27,6 +27,7 @@ extra-deps: - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack.yaml b/stack.yaml index a47bc5b17..b97f0b2fd 100644 --- a/stack.yaml +++ b/stack.yaml @@ -28,6 +28,7 @@ extra-deps: - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 +- ormolu-0.0.2.0 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 From 864d8d90265b283d38c92786be73fca6d9c31431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Wed, 18 Dec 2019 01:18:24 +0000 Subject: [PATCH 017/270] Drop Ormolu for GHC 8.4.x --- stack-8.4.4.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 4c060c2b3..5301b80d4 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -36,7 +36,6 @@ extra-deps: - network-bsd-2.8.1.0 # for hslogger - optparse-simple-0.1.0 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 - pretty-show-1.9.5 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd From bb57d55dd67b74dfb46a525dc1d21be3afa5dd93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Wed, 18 Dec 2019 01:23:48 +0000 Subject: [PATCH 018/270] Removed comment. Reworded format selection warn. --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 31057a956..ede103344 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -30,12 +30,8 @@ provider :: FormattingProvider provider contents uri typ _opts = case typ of -- // TODO Adequately throw an error on the following line - FormatRange r -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show r) Null) + FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: Selection formatting not supported.") Null) FormatText -> pluginGetFile contents uri $ \file -> do - -- INFO: Selection Formatting currently not supported, the below comment is just for temporal information - -- let (range, selectedContents) = case typ of - -- FormatText -> (fullRange contents, contents) - -- FormatRange r -> (r, extractRange r contents) result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (T.unpack contents)) case result of Left err -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) From a9299d2d1c40480885854ae2311a74d39d0cca6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Tue, 24 Dec 2019 05:36:16 +0000 Subject: [PATCH 019/270] Better error wording for selection formatting Co-Authored-By: Luke Lau --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index ede103344..7dc860dfd 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -30,9 +30,9 @@ provider :: FormattingProvider provider contents uri typ _opts = case typ of -- // TODO Adequately throw an error on the following line - FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: Selection formatting not supported.") Null) + FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack $ "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile contents uri $ \file -> do result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (T.unpack contents)) case result of Left err -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) - Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new] \ No newline at end of file + Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new] From 8082825d915a3ec0bbe5e7bd7fd87f65a18ace2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 00:32:33 +0000 Subject: [PATCH 020/270] Removed redundant $ --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 7dc860dfd..94dea9022 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -30,7 +30,7 @@ provider :: FormattingProvider provider contents uri typ _opts = case typ of -- // TODO Adequately throw an error on the following line - FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack $ "Selection formatting for Ormolu is not currently supported.") Null) + FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile contents uri $ \file -> do result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (T.unpack contents)) case result of From 8c51785453c191c35c685659b07ecb0257577e11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 00:33:38 +0000 Subject: [PATCH 021/270] Guard ormolu to only be included if GHC > 8.4 --- haskell-ide-engine.cabal | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 709fd74d7..15a480797 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -33,7 +33,6 @@ library Haskell.Ide.Engine.Plugin.HfaAlign Haskell.Ide.Engine.Plugin.HsImport Haskell.Ide.Engine.Plugin.Liquid - Haskell.Ide.Engine.Plugin.Ormolu Haskell.Ide.Engine.Plugin.Package Haskell.Ide.Engine.Plugin.Package.Compat Haskell.Ide.Engine.Plugin.Pragmas @@ -47,6 +46,9 @@ library Haskell.Ide.Engine.Server Haskell.Ide.Engine.Types Haskell.Ide.Engine.Version + if impl(ghc > 8.4) + exposed-modules: Haskell.Ide.Engine.Plugin.Ormolu + other-modules: Paths_haskell_ide_engine build-depends: Cabal >= 1.22 , Diff @@ -82,7 +84,6 @@ library , monoid-subclasses > 0.4 , mtl , optparse-simple >= 0.0.3 - , ormolu , parsec , process , safe @@ -101,6 +102,8 @@ library , bytestring-trie , unliftio , hlint >= 2.2.2 + if impl(ghc > 8.4) + build-depends: ormolu ghc-options: -Wall -Wredundant-constraints if flag(pedantic) From 1566f47ceb2d4e47a69f214f1e58d79e4b1c97f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 00:58:40 +0000 Subject: [PATCH 022/270] Modified GHC version requirement to >= 8.6 --- haskell-ide-engine.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 15a480797..dcecfe184 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -46,7 +46,7 @@ library Haskell.Ide.Engine.Server Haskell.Ide.Engine.Types Haskell.Ide.Engine.Version - if impl(ghc > 8.4) + if impl(ghc >= 8.6) exposed-modules: Haskell.Ide.Engine.Plugin.Ormolu other-modules: Paths_haskell_ide_engine @@ -102,7 +102,7 @@ library , bytestring-trie , unliftio , hlint >= 2.2.2 - if impl(ghc > 8.4) + if impl(ghc >= 8.6) build-depends: ormolu ghc-options: -Wall -Wredundant-constraints From 04f0d8f57cc61f9d6e6cc43cfb3a49248a77a0f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 01:36:02 +0000 Subject: [PATCH 023/270] Throwing error for GHC < 8.6 --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 28 ++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 94dea9022..72cd5395b 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -1,17 +1,22 @@ {-# LANGUAGE TypeApplications #-} {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP #-} module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where import Control.Monad.IO.Class ( liftIO, MonadIO(..) ) import Control.Exception import Data.Aeson ( Value ( Null ) ) -import qualified Data.Text as T +import Data.Text +import Haskell.Ide.Engine.MonadTypes +import Haskell.Ide.Engine.PluginUtils +import System.Log + +#if __GLASGOW_HASKELL__ >= 806 import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) -import Haskell.Ide.Engine.MonadTypes -import Haskell.Ide.Engine.PluginUtils +#endif ormoluDescriptor :: PluginId -> PluginDescriptor ormoluDescriptor plId = PluginDescriptor @@ -26,13 +31,22 @@ ormoluDescriptor plId = PluginDescriptor , pluginFormattingProvider = Just provider } +#if __GLASGOW_HASKELL__ >= 806 provider :: FormattingProvider provider contents uri typ _opts = case typ of - -- // TODO Adequately throw an error on the following line - FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack "Selection formatting for Ormolu is not currently supported.") Null) + FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile contents uri $ \file -> do - result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (T.unpack contents)) + result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack contents)) case result of - Left err -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) + Left err -> return $ IdeResultFail (IdeError PluginError (pack $ "ormoluCmd: " ++ show err) Null) Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new] +#else +-- Work in progress +provider :: FormattingProvider +provider contents _uri typ _opts = do + errorM "hie" "This version of HIE does not support Ormolu as a formatter" + case typ of + FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) + FormatText -> return $ IdeResultOk [TextEdit (fullRange contents) contents] +#endif \ No newline at end of file From 25b84fab44db27313deeb6c1d92c8807b7734b0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 02:47:26 +0000 Subject: [PATCH 024/270] corrected import System.Log.Logger --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 72cd5395b..100e0d549 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -10,12 +10,13 @@ import Data.Aeson ( Value ( Null ) ) import Data.Text import Haskell.Ide.Engine.MonadTypes import Haskell.Ide.Engine.PluginUtils -import System.Log #if __GLASGOW_HASKELL__ >= 806 import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) +#else +import System.Log.Logger #endif ormoluDescriptor :: PluginId -> PluginDescriptor From c7469c6a550d533aec7b24b4487d2915b175ff0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Fri, 27 Dec 2019 18:11:08 +0000 Subject: [PATCH 025/270] Removed guard for exposed file --- haskell-ide-engine.cabal | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index dcecfe184..32ecd5ebe 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -33,6 +33,7 @@ library Haskell.Ide.Engine.Plugin.HfaAlign Haskell.Ide.Engine.Plugin.HsImport Haskell.Ide.Engine.Plugin.Liquid + Haskell.Ide.Engine.Plugin.Ormolu Haskell.Ide.Engine.Plugin.Package Haskell.Ide.Engine.Plugin.Package.Compat Haskell.Ide.Engine.Plugin.Pragmas @@ -46,8 +47,6 @@ library Haskell.Ide.Engine.Server Haskell.Ide.Engine.Types Haskell.Ide.Engine.Version - if impl(ghc >= 8.6) - exposed-modules: Haskell.Ide.Engine.Plugin.Ormolu other-modules: Paths_haskell_ide_engine build-depends: Cabal >= 1.22 From 304d69216c6c49ca32759bb5e691151db0183f3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Fri, 27 Dec 2019 18:13:07 +0000 Subject: [PATCH 026/270] fine-tuned noop formatter for ghc < 8.6 --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 100e0d549..3c18668af 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -49,5 +49,5 @@ provider contents _uri typ _opts = do errorM "hie" "This version of HIE does not support Ormolu as a formatter" case typ of FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) - FormatText -> return $ IdeResultOk [TextEdit (fullRange contents) contents] + FormatText -> return $ IdeResultOk [] #endif \ No newline at end of file From c6e265bd0f146ebed1d58fe9cfe8da61d7611683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 23:14:56 +0000 Subject: [PATCH 027/270] Using MonadFunctions.errorm for error logging --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 3c18668af..02a042132 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -16,7 +16,7 @@ import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) #else -import System.Log.Logger +import Haskell.Ide.Engine.MonadFunctions #endif ormoluDescriptor :: PluginId -> PluginDescriptor @@ -45,9 +45,9 @@ provider contents uri typ _opts = #else -- Work in progress provider :: FormattingProvider -provider contents _uri typ _opts = do - errorM "hie" "This version of HIE does not support Ormolu as a formatter" +provider _contents _uri typ _opts = do + errorm "This version of HIE does not support Ormolu as a formatter" case typ of FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> return $ IdeResultOk [] -#endif \ No newline at end of file +#endif \ No newline at end of file From 5d2c15545c3da8e60b64de5289db40b12ee12025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Fri, 27 Dec 2019 23:20:42 +0000 Subject: [PATCH 028/270] Moved imports inside GHC guard --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 02a042132..afb57ddeb 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -4,17 +4,17 @@ module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where -import Control.Monad.IO.Class ( liftIO, MonadIO(..) ) -import Control.Exception import Data.Aeson ( Value ( Null ) ) import Data.Text import Haskell.Ide.Engine.MonadTypes -import Haskell.Ide.Engine.PluginUtils #if __GLASGOW_HASKELL__ >= 806 +import Control.Exception +import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) +import Haskell.Ide.Engine.PluginUtils #else import Haskell.Ide.Engine.MonadFunctions #endif From c1c40b425eaf205c6714b8c34d8d8207e50420a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sat, 28 Dec 2019 01:53:08 +0000 Subject: [PATCH 029/270] WIP: Adding test cases --- test/functional/FormatSpec.hs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 2b8524617..dee09cafb 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -92,6 +92,13 @@ spec = do liftIO $ edits `shouldBe` [TextEdit (Range (Position 1 0) (Position 3 0)) "foo x y = do\n print x\n return 42\n"] +-- Work in progress + describe "ormolu" $ do + it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do + doc <- openDoc "Format.hs" "haskell" + formatDoc doc (FormattingOptions 2 True) + documentContents doc >>= liftIO . (`shouldBe` formattedOrmolu) + formattedDocTabSize2 :: T.Text formattedDocTabSize2 = @@ -165,3 +172,16 @@ formattedBrittanyPostFloskell = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n\n" + +formattedOrmolu :: T.Text +formattedOrmolu = + "module Format where\n\ + \\n\ + \foo :: Int -> Int\n\ + \foo 3 = 2\n\ + \foo x = x\n\ + \\n\ + \bar :: String -> IO String\n\ + \bar s = do\n\ + \ x <- return \"hello\"\n\ + \ return \"asdf\"\n" From 1f6b1fc8825aaf9cbcc882feb0338cc84bd7a451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Tue, 31 Dec 2019 19:55:39 +0000 Subject: [PATCH 030/270] Completing formatting test --- test/functional/FormatSpec.hs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index dee09cafb..8f06fbb7f 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -95,9 +95,13 @@ spec = do -- Work in progress describe "ormolu" $ do it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do + sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu")) doc <- openDoc "Format.hs" "haskell" formatDoc doc (FormattingOptions 2 True) - documentContents doc >>= liftIO . (`shouldBe` formattedOrmolu) + docContent <- documentContents doc + case ghcVersion of + GHC86 -> liftIO $ docContent `shouldBe` formattedOrmolu + _ -> liftIO $ docContent `shouldBe` unchangedOrmolu formattedDocTabSize2 :: T.Text @@ -185,3 +189,15 @@ formattedOrmolu = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n" + +unchangedOrmolu :: T.Text +unchangedOrmolu = + "module Format where\n\ + \foo :: Int -> Int\n\ + \foo 3 = 2\n\ + \foo x = x\n\ + \bar :: String -> IO String\n\ + \bar s = do\n\ + \ x <- return \"hello\"\n\ + \ return \"asdf\"\n\ + \ \n" From fa057cad7b62fc798514d7bdfa0b890edc2cf4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Tue, 31 Dec 2019 21:40:15 +0000 Subject: [PATCH 031/270] Exposing formatting providers to ormolu test suite --- test/functional/FormatSpec.hs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 8f06fbb7f..e73a8a651 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -94,6 +94,10 @@ spec = do -- Work in progress describe "ormolu" $ do + let formatLspConfig provider = + object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] + formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) } + it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu")) doc <- openDoc "Format.hs" "haskell" From bb086edf710dea58f72dec324bb2c6c903c4830a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Tue, 31 Dec 2019 22:17:27 +0000 Subject: [PATCH 032/270] Removed unused config function --- test/functional/FormatSpec.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index e73a8a651..4971b4184 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -96,7 +96,6 @@ spec = do describe "ormolu" $ do let formatLspConfig provider = object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] - formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) } it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu")) From 711776c4f1b0cbac9c075f39abdd6d9e9ae150c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sat, 4 Jan 2020 00:20:17 +0000 Subject: [PATCH 033/270] Refactor CPP guards, complete noop for GHC < 8.6 --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index afb57ddeb..02b87d2ca 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -32,10 +32,11 @@ ormoluDescriptor plId = PluginDescriptor , pluginFormattingProvider = Just provider } -#if __GLASGOW_HASKELL__ >= 806 + provider :: FormattingProvider provider contents uri typ _opts = case typ of +#if __GLASGOW_HASKELL__ >= 806 FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile contents uri $ \file -> do result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack contents)) @@ -43,11 +44,6 @@ provider contents uri typ _opts = Left err -> return $ IdeResultFail (IdeError PluginError (pack $ "ormoluCmd: " ++ show err) Null) Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new] #else --- Work in progress -provider :: FormattingProvider -provider _contents _uri typ _opts = do - errorm "This version of HIE does not support Ormolu as a formatter" - case typ of - FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) + FormatRange _ -> return $ IdeResultOk [] FormatText -> return $ IdeResultOk [] #endif \ No newline at end of file From c2daf85cd536482421c381f974c3fb2f17202c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sat, 4 Jan 2020 01:52:11 +0000 Subject: [PATCH 034/270] Corrected unused imports and parameters --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 02b87d2ca..72673d537 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -4,13 +4,12 @@ module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where -import Data.Aeson ( Value ( Null ) ) -import Data.Text -import Haskell.Ide.Engine.MonadTypes - #if __GLASGOW_HASKELL__ >= 806 import Control.Exception import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) +import Data.Aeson ( Value ( Null ) ) +import Data.Text +import Haskell.Ide.Engine.MonadTypes import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) @@ -34,16 +33,16 @@ ormoluDescriptor plId = PluginDescriptor provider :: FormattingProvider -provider contents uri typ _opts = +provider _contents _uri typ _opts = case typ of #if __GLASGOW_HASKELL__ >= 806 FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) - FormatText -> pluginGetFile contents uri $ \file -> do - result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack contents)) + FormatText -> pluginGetFile _contents _uri $ \file -> do + result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack _contents)) case result of Left err -> return $ IdeResultFail (IdeError PluginError (pack $ "ormoluCmd: " ++ show err) Null) - Right new -> return $ IdeResultOk [TextEdit (fullRange contents) new] + Right new -> return $ IdeResultOk [TextEdit (fullRange _contents) new] #else FormatRange _ -> return $ IdeResultOk [] FormatText -> return $ IdeResultOk [] -#endif \ No newline at end of file +#endif \ No newline at end of file From b020cfb832b38c3ca0d22ebcbf5b9154efc6cb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sat, 4 Jan 2020 02:08:11 +0000 Subject: [PATCH 035/270] Corrected MonadTypes import --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 72673d537..336f9b23c 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -4,18 +4,18 @@ module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where +import Haskell.Ide.Engine.MonadTypes + #if __GLASGOW_HASKELL__ >= 806 import Control.Exception import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) import Data.Aeson ( Value ( Null ) ) import Data.Text -import Haskell.Ide.Engine.MonadTypes +import Haskell.Ide.Engine.MonadFunctions import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) import Haskell.Ide.Engine.PluginUtils -#else -import Haskell.Ide.Engine.MonadFunctions #endif ormoluDescriptor :: PluginId -> PluginDescriptor From 500e2ea4079d79882d67a69313eb987841bd52d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sat, 4 Jan 2020 02:33:00 +0000 Subject: [PATCH 036/270] Removed MonadFunctions (errorm no longer used) --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 336f9b23c..c30243495 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -11,7 +11,6 @@ import Control.Exception import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) import Data.Aeson ( Value ( Null ) ) import Data.Text -import Haskell.Ide.Engine.MonadFunctions import Ormolu import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) From b54e1e691f97b48b0e5542c920d1a4dd416b9841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sun, 5 Jan 2020 01:39:36 +0000 Subject: [PATCH 037/270] Added test case for hsImport. Elements at indexes 2 and 3 should not format due to GHC bug --- test/functional/FunctionalCodeActionsSpec.hs | 42 ++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index 251141d28..c06d6ea0d 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -218,6 +218,48 @@ spec = describe "code actions" $ do , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" ] ] + describe "formats with ormolu" $ hsImportSpec "ormolu" + [ -- Expected output for simple format. + [ "import Control.Monad" + , "import qualified Data.Maybe" + , "main :: IO ()" + , "main = when True $ putStrLn \"hello\"" + ] + , -- Use an import list and format the output. + [ "import Control.Monad (when)" + , "import qualified Data.Maybe" + , "main :: IO ()" + , "main = when True $ putStrLn \"hello\"" + ] + , -- Multiple import lists, should not introduce multiple newlines. + -- WIP (Haddock issues) ;TODO + [ "import System.IO (hPutStrLn, stdout)" + , "import Control.Monad (when)" + , "import Data.Maybe (fromMaybe)" + , "-- | Main entry point to the program" + , "main :: IO ()" + , "main =" + , " when True" + , " $ hPutStrLn stdout" + , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" + ] + , -- Complex imports for Constructos and functions + -- WIP (Haddock issues) ;TODO + [ "{-# LANGUAGE NoImplicitPrelude #-}" + , "import System.IO (IO, hPutStrLn, stderr)" + , "import Prelude (Bool (..))" + , "import Control.Monad (when)" + , "import Data.Function (($))" + , "import Data.Maybe (Maybe (Just), fromMaybe)" + , "-- | Main entry point to the program" + , "main :: IO ()" + , "main =" + , " when True" + , " $ hPutStrLn stderr" + , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" + ] + ] + describe "add package suggestions" $ do it "adds to .cabal files" $ do flushStackEnvironment From d81afc6fad4371716b710abdfd43ca92f378091e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sun, 5 Jan 2020 03:26:24 +0000 Subject: [PATCH 038/270] Refactor CPP guards --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index c30243495..9166f66c8 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -32,9 +32,9 @@ ormoluDescriptor plId = PluginDescriptor provider :: FormattingProvider -provider _contents _uri typ _opts = - case typ of +provider _contents _uri _typ _opts = #if __GLASGOW_HASKELL__ >= 806 + case _typ of FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile _contents _uri $ \file -> do result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack _contents)) @@ -42,6 +42,5 @@ provider _contents _uri typ _opts = Left err -> return $ IdeResultFail (IdeError PluginError (pack $ "ormoluCmd: " ++ show err) Null) Right new -> return $ IdeResultOk [TextEdit (fullRange _contents) new] #else - FormatRange _ -> return $ IdeResultOk [] - FormatText -> return $ IdeResultOk [] + return $ IdeResultOk [] -- NOP formatter #endif \ No newline at end of file From 93ab14dd574cc18f91f488506b64cdc7d64f0802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sun, 5 Jan 2020 21:22:57 +0000 Subject: [PATCH 039/270] Temporal CPP guard of Ormolu hsImport test case --- test/functional/FunctionalCodeActionsSpec.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index c06d6ea0d..e57ac5d24 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -218,7 +218,8 @@ spec = describe "code actions" $ do , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" ] ] - describe "formats with ormolu" $ hsImportSpec "ormolu" +#if __GLASGOW_HASKELL__ >= 806 + describe "formats with ormolu" $ hsImportSpec "ormolu" -- Ormolu only works with GHC 8.6.x [ -- Expected output for simple format. [ "import Control.Monad" , "import qualified Data.Maybe" @@ -232,7 +233,6 @@ spec = describe "code actions" $ do , "main = when True $ putStrLn \"hello\"" ] , -- Multiple import lists, should not introduce multiple newlines. - -- WIP (Haddock issues) ;TODO [ "import System.IO (hPutStrLn, stdout)" , "import Control.Monad (when)" , "import Data.Maybe (fromMaybe)" @@ -244,7 +244,6 @@ spec = describe "code actions" $ do , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" ] , -- Complex imports for Constructos and functions - -- WIP (Haddock issues) ;TODO [ "{-# LANGUAGE NoImplicitPrelude #-}" , "import System.IO (IO, hPutStrLn, stderr)" , "import Prelude (Bool (..))" @@ -259,7 +258,7 @@ spec = describe "code actions" $ do , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" ] ] - +#endif describe "add package suggestions" $ do it "adds to .cabal files" $ do flushStackEnvironment From d139e64c977f5885c902db067fd28dd3a8627764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sa=CC=81nchez?= Date: Sun, 5 Jan 2020 21:49:46 +0000 Subject: [PATCH 040/270] Added CPP extension, pending tests for GHC < 8.6 --- test/functional/FunctionalCodeActionsSpec.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index e57ac5d24..b6ac1f034 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE CPP #-} module FunctionalCodeActionsSpec where @@ -219,7 +220,7 @@ spec = describe "code actions" $ do ] ] #if __GLASGOW_HASKELL__ >= 806 - describe "formats with ormolu" $ hsImportSpec "ormolu" -- Ormolu only works with GHC 8.6.x + describe "formats with ormolu" $ hsImportSpec "ormolu" [ -- Expected output for simple format. [ "import Control.Monad" , "import qualified Data.Maybe" @@ -258,6 +259,8 @@ spec = describe "code actions" $ do , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" ] ] +#else + describe "formats with ormolu" $ pendingWith "Ormolu only works with GHC >= 8.6. Need to restore this." #endif describe "add package suggestions" $ do it "adds to .cabal files" $ do From 1b3d6966fcf6a33b695b7108cde34827d2373ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Sun, 5 Jan 2020 21:59:11 +0000 Subject: [PATCH 041/270] Update FunctionalCodeActionsSpec.hs --- test/functional/FunctionalCodeActionsSpec.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index b6ac1f034..92f4c5da2 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -260,7 +260,8 @@ spec = describe "code actions" $ do ] ] #else - describe "formats with ormolu" $ pendingWith "Ormolu only works with GHC >= 8.6. Need to restore this." + describe "formats with ormolu" $ do + pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." #endif describe "add package suggestions" $ do it "adds to .cabal files" $ do From 1542fa2ee7485ce5db19f6c07fc96e7a39b4c5d5 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 5 Jan 2020 22:26:40 +0000 Subject: [PATCH 042/270] Suggested improvements from cabal --- haskell-ide-engine.cabal | 4 ++++ hie-plugin-api/hie-plugin-api.cabal | 2 ++ 2 files changed, 6 insertions(+) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index f0b621380..709530d4e 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -16,6 +16,7 @@ cabal-version: >=2.0 flag pedantic Description: Enable -Werror Default: False + Manual: True library hs-source-dirs: src @@ -47,6 +48,7 @@ library Haskell.Ide.Engine.Types Haskell.Ide.Engine.Version other-modules: Paths_haskell_ide_engine + autogen-modules: Paths_haskell_ide_engine build-depends: Cabal >= 1.22 , Diff -- , HaRe @@ -109,6 +111,7 @@ executable hie hs-source-dirs: app main-is: MainHie.hs other-modules: Paths_haskell_ide_engine + autogen-modules: Paths_haskell_ide_engine build-depends: base , directory , filepath @@ -130,6 +133,7 @@ executable hie-wrapper hs-source-dirs: app main-is: HieWrapper.hs other-modules: Paths_haskell_ide_engine + autogen-modules: Paths_haskell_ide_engine build-depends: base , directory , filepath diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index f5e150ea6..c20e9c5e5 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -1,6 +1,7 @@ name: hie-plugin-api version: 1.0.0.0 synopsis: Haskell IDE API for plugin communication +description: Please see README.md license: BSD3 license-file: LICENSE author: Many,TBD when we release @@ -15,6 +16,7 @@ cabal-version: >=2.0 flag pedantic Description: Enable -Werror Default: False + Manual: True library exposed-modules: From 0483f1c6045abffc723f91575bc79875a15723a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Mon, 6 Jan 2020 00:36:52 +0000 Subject: [PATCH 043/270] Deleted WIP comment --- test/functional/FormatSpec.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 4971b4184..704d62a39 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -92,7 +92,6 @@ spec = do liftIO $ edits `shouldBe` [TextEdit (Range (Position 1 0) (Position 3 0)) "foo x y = do\n print x\n return 42\n"] --- Work in progress describe "ormolu" $ do let formatLspConfig provider = object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] From ba76fab35566be39c195868bef3c08d2785cb830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Mon, 6 Jan 2020 00:39:14 +0000 Subject: [PATCH 044/270] Corrected wrong syntax --- test/functional/FunctionalCodeActionsSpec.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index 92f4c5da2..4b8c27600 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -260,8 +260,9 @@ spec = describe "code actions" $ do ] ] #else - describe "formats with ormolu" $ do - pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." + describe "formats with ormolu" $ + it "is NOP formatter" $ + pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." #endif describe "add package suggestions" $ do it "adds to .cabal files" $ do From 8ff0499e1b774f623da45b63af1d22373739662f Mon Sep 17 00:00:00 2001 From: fendor Date: Sun, 5 Jan 2020 18:32:46 +0100 Subject: [PATCH 045/270] Fix haddock documentation for Cradle.hs --- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 174 +++++++++++--------- 1 file changed, 96 insertions(+), 78 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 76da7b516..d47e6078f 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -52,23 +52,24 @@ findLocalCradle fp = do Nothing -> cabalHelperCradle fp logm $ "Module \"" ++ fp ++ "\" is loaded by Cradle: " ++ show crdl return crdl + -- | Check if the given cradle is a stack cradle. -- This might be used to determine the GHC version to use on the project. --- If it is a stack-cradle, we have to use `stack path --compiler-exe` +-- If it is a stack-cradle, we have to use @"stack path --compiler-exe"@ -- otherwise we may ask `ghc` directly what version it is. isStackCradle :: Cradle -> Bool isStackCradle = (`elem` ["stack", "Cabal-Helper-Stack", "Cabal-Helper-Stack-None"]) . BIOS.actionName . BIOS.cradleOptsProg - -- | Check if the given cradle is a cabal cradle. +-- | Check if the given cradle is a cabal cradle. -- This might be used to determine the GHC version to use on the project. --- If it is a stack-cradle, we have to use `stack path --compiler-exe` --- otherwise we may ask `ghc` directly what version it is. +-- If it is a stack-cradle, we have to use @"stack path --compiler-exe"@ +-- otherwise we may ask @ghc@ directly what version it is. isCabalCradle :: Cradle -> Bool isCabalCradle = (`elem` - ["cabal" + [ "cabal" , "Cabal-Helper-Cabal-V1" , "Cabal-Helper-Cabal-V2" , "Cabal-Helper-Cabal-V1-Dir" @@ -81,10 +82,10 @@ isCabalCradle = -- | Execute @ghc@ that is based on the given cradle. -- Output must be a single line. If an error is raised, e.g. the command --- failed, a @Nothing@ is returned. +-- failed, a 'Nothing' is returned. -- The exact error is written to logs. -- --- E.g. for a stack cradle, we use `stack ghc` and for a cabal cradle +-- E.g. for a stack cradle, we use @stack ghc@ and for a cabal cradle -- we are taking the @ghc@ that is on the path. execProjectGhc :: Cradle -> [String] -> IO (Maybe String) execProjectGhc crdl args = do @@ -167,6 +168,8 @@ This guessing has no guarantees and may change at any time. === Example: Assume the following project structure: + +@ / └── Foo/ ├── Foo.cabal @@ -178,28 +181,31 @@ Assume the following project structure: ├── B.cabal └── src/ └── Lib2.hs +@ -Assume the call @findCabalHelperEntryPoint "/Foo/B/src/Lib2.hs"@. -We now want to know to which project "/Foo/B/src/Lib2.hs" belongs to +Assume the call @findCabalHelperEntryPoint "\/Foo\/B\/src\/Lib2.hs"@. +We now want to know to which project "\/Foo\/B\/src\/Lib2.hs" belongs to and what the projects root is. If we only do a naive search to find the first occurrence of either "B.cabal", "stack.yaml", "cabal.project" or "Foo.cabal", we might assume that the location of "B.cabal" marks -the project's root directory of which "/Foo/B/src/Lib2.hs" is part of. +the project's root directory of which "\/Foo\/B\/src\/Lib2.hs" is part of. However, there is also a "cabal.project" and "stack.yaml" in the parent -directory, which add the package "B" as a package. -So, the compilation of the package "B", and the file "src/Lib2.hs" in it, +directory, which add the package @B@ as a package. +So, the compilation of the package @B@, and the file "src\/Lib2.hs" in it, does not only depend on the definitions in "B.cabal", but also on "stack.yaml" and "cabal.project". -The project root is therefore "/Foo/". +The project root is therefore "\/Foo\/". Only if there is no "stack.yaml" or "cabal.project" in any of the ancestor directories, it is safe to assume that "B.cabal" marks the root of the project. Thus: + >>> findCabalHelperEntryPoint "/Foo/B/src/Lib2.hs Just (Ex (ProjLocStackYaml { plStackYaml = "/Foo/"})) or ->>> findCabalHelperEntryPoint "/Foo/B/src/Lib2.hs + +>>> findCabalHelperEntryPoint "/Foo/B/src/Lib2.hs" Just (Ex (ProjLocV2File { plProjectDirV2 = "/Foo/"})) In the given example, it is not guaranteed which project type is found, @@ -340,6 +346,8 @@ required to load and compile the given file. === Mono-Repo Assume the project structure: + +@ / └── Mono/ ├── cabal.project @@ -350,6 +358,7 @@ Assume the project structure: └── B/ ├── B.cabal └── Exe.hs +@ Currently, Haskell IDE Engine needs to know on startup which GHC version is needed to compile the project. This information is needed to show warnings to @@ -357,14 +366,16 @@ the user if the GHC version on the project does not agree with the GHC version that was used to compile Haskell IDE Engine. Therefore, the function 'findLocalCradle' is invoked with a dummy FilePath, -such as "/Mono/Lib.hs". Since there will be no package that contains this +such as "\/Mono\/Lib.hs". Since there will be no package that contains this dummy FilePath, the result will be a None-cradle. Either + >>> findLocalCradle "/Mono/Lib.hs" Cradle { cradleRootDir = "/Mono/", CradleAction { actionName = "Cabal-Helper-Stack-None", ..} } -or: +or + >>> findLocalCradle "/Mono/Lib.hs" Cradle { cradleRootDir = "/Mono/", CradleAction { actionName = "Cabal-Helper-Cabal-V2-None", ..} } @@ -374,8 +385,9 @@ a 'cabal' project. If we are trying to load the executable: + >>> findLocalCradle "/Mono/B/Exe.hs" -Cradle { cradleRootDir = "/Mono/B/", CradleAction { actionName = "Cabal-Helper-Cabal-V2", ..} } +Cradle { cradleRootDir = "/Mono/", CradleAction { actionName = "Cabal-Helper-Cabal-V2", ..} } we will detect correctly the compiler options, by first finding the appropriate package, followed by traversing the units in the package and finding the @@ -384,6 +396,8 @@ component that exposes the executable by FilePath. === No explicit executable folder Assume the project structure: + +@ / └── Library/ ├── cabal.project @@ -392,18 +406,21 @@ Assume the project structure: └── src ├── Lib.hs └── Exe.hs +@ There are different dependencies for the library "Lib.hs" and the -executable "Exe.hs". If we are trying to load the executable "src/Exe.hs" +executable "Exe.hs". If we are trying to load the executable "src\/Exe.hs" we will correctly identify the executable unit, and correctly initialise dependencies of "exe:Library". It will be correct even if we load the unit "lib:Library" before the "exe:Library" because the unit "lib:Library" does not expose -a module "Exe". +a module @"Exe"@. === Sub package Assume the project structure: + +@ / └── Repo/ ├── cabal.project @@ -414,12 +431,13 @@ Assume the project structure: └── SubRepo ├── SubRepo.cabal └── Lib2.hs +@ -When we try to load "/Repo/SubRepo/Lib2.hs", we need to identify root -of the project, which is "/Repo/" but set the root directory of the cradle -responsible to load "/Repo/SubRepo/Lib2.hs" to "/Repo/SubRepo", since +When we try to load "\/Repo\/SubRepo\/Lib2.hs", we need to identify root +of the project, which is "\/Repo\/" but set the root directory of the cradle +responsible to load "\/Repo\/SubRepo\/Lib2.hs" to "\/Repo\/SubRepo", since the compiler options obtained from Cabal-Helper are relative to the package -source directory, which is "/Repo/SubRepo". +source directory, which is "\/Repo\/SubRepo". -} cabalHelperCradle :: FilePath -> IO Cradle @@ -492,60 +510,60 @@ cabalHelperCradle file = do fp } } - where - -- | Fix occurrences of "-i." to "-i" - -- Flags obtained from cabal-helper are relative to the package - -- source directory. This is less resilient to using absolute paths, - -- thus, we fix it here. - fixImportDirs :: FilePath -> String -> String - fixImportDirs base_dir arg = - if "-i" `isPrefixOf` arg - then let dir = drop 2 arg - -- the flag "-i" has special meaning. - in if not (null dir) && isRelative dir then ("-i" ++ base_dir dir) - else arg - else arg - - -- | Cradle Action to query for the ComponentOptions that are needed - -- to load the given FilePath. - -- This Function is not supposed to throw any exceptions and use - -- 'CradleLoadResult' to indicate errors. - cabalHelperAction :: Ex ProjLoc -- ^ Project location, can be used - -- to present error build-tool - -- agnostic error messages. - -> QueryEnv v -- ^ Query Env created by 'mkQueryEnv' - -- with the appropriate 'distdir' - -> Package v -- ^ Package this cradle is part for. - -> FilePath -- ^ Root directory of the cradle - -- this action belongs to. - -> FilePath -- ^ FilePath to load, expected to be an absolute path. - -> IO (CradleLoadResult ComponentOptions) - cabalHelperAction proj env package root fp = do - -- Get all unit infos the given FilePath may belong to - let units = pUnits package - -- make the FilePath to load relative to the root of the cradle. - let relativeFp = makeRelative root fp - debugm $ "Relative Module FilePath: " ++ relativeFp - getComponent proj env (toList units) relativeFp - >>= \case - Right comp -> do - let fs' = getFlags comp - let fs = map (fixImportDirs root) fs' - let targets = getTargets comp relativeFp - let ghcOptions = fs ++ targets - debugm $ "Flags for \"" ++ fp ++ "\": " ++ show ghcOptions - debugm $ "Component Infos: " ++ show comp - return - $ CradleSuccess - ComponentOptions { componentOptions = ghcOptions - , componentDependencies = [] - } - Left err -> return - $ CradleFail - $ CradleError - (ExitFailure 2) - err +-- | Cradle Action to query for the ComponentOptions that are needed +-- to load the given FilePath. +-- This Function is not supposed to throw any exceptions and use +-- 'CradleLoadResult' to indicate errors. +cabalHelperAction :: Ex ProjLoc -- ^ Project location, can be used + -- to present build-tool + -- agnostic error messages. + -> QueryEnv v -- ^ Query Env created by 'mkQueryEnv' + -- with the appropriate 'distdir' + -> Package v -- ^ Package this cradle is part for. + -> FilePath -- ^ Root directory of the cradle + -- this action belongs to. + -> FilePath -- ^ FilePath to load, expected to be an absolute path. + -> IO (CradleLoadResult ComponentOptions) +cabalHelperAction proj env package root fp = do + -- Get all unit infos the given FilePath may belong to + let units = pUnits package + -- make the FilePath to load relative to the root of the cradle. + let relativeFp = makeRelative root fp + debugm $ "Relative Module FilePath: " ++ relativeFp + getComponent proj env (toList units) relativeFp + >>= \case + Right comp -> do + let fs' = getFlags comp + let fs = map (fixImportDirs root) fs' + let targets = getTargets comp relativeFp + let ghcOptions = fs ++ targets + debugm $ "Flags for \"" ++ fp ++ "\": " ++ show ghcOptions + debugm $ "Component Infos: " ++ show comp + return + $ CradleSuccess + ComponentOptions { componentOptions = ghcOptions + , componentDependencies = [] + } + Left err -> return + $ CradleFail + $ CradleError + (ExitFailure 2) + err + +-- | Fix occurrences of "-i." to "-i" +-- Flags obtained from cabal-helper are relative to the package +-- source directory. This is less resilient to using absolute paths, +-- thus, we fix it here. +fixImportDirs :: FilePath -> String -> String +fixImportDirs base_dir arg = + if "-i" `isPrefixOf` arg + then let dir = drop 2 arg + -- the flag "-i" has special meaning. + in if not (null dir) && isRelative dir then ("-i" ++ base_dir dir) + else arg + else arg + -- | Get the component the given FilePath most likely belongs to. -- Lazily ask units whether the given FilePath is part of one of their @@ -826,8 +844,8 @@ ancestors dir where subdir = takeDirectory dir --- | Assuming a FilePath "src/Lib/Lib.hs" and a list of directories --- such as ["src", "app"], returns either the given FilePath +-- | Assuming a FilePath @"src\/Lib\/Lib.hs"@ and a list of directories +-- such as @["src", "app"]@, returns either the given FilePath -- with a matching directory stripped away. -- If there are multiple matches, e.g. multiple directories are a prefix -- of the given FilePath, return the first match in the list. From 7064012cca8fc1464da75537a9e1581d4da9c6a1 Mon Sep 17 00:00:00 2001 From: fendor Date: Mon, 6 Jan 2020 01:46:04 +0100 Subject: [PATCH 046/270] Add unit-tests for Cabal-Helper cradles --- haskell-ide-engine.cabal | 2 + hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 3 +- .../cabal-helper/implicit-exe/Setup.hs | 2 + .../cabal-helper/implicit-exe/cabal.project | 1 + .../implicit-exe/implicit-exe.cabal | 17 ++ .../cabal-helper/implicit-exe/src/Exe.hs | 4 + .../cabal-helper/implicit-exe/src/Lib.hs | 4 + .../testdata/cabal-helper/mono-repo/A/A.cabal | 15 ++ .../testdata/cabal-helper/mono-repo/A/Main.hs | 8 + .../cabal-helper/mono-repo/A/MyLib.hs | 4 + .../cabal-helper/mono-repo/A/Setup.hs | 2 + .../testdata/cabal-helper/mono-repo/B/B.cabal | 15 ++ .../testdata/cabal-helper/mono-repo/B/Main.hs | 8 + .../cabal-helper/mono-repo/B/MyLib.hs | 4 + .../cabal-helper/mono-repo/B/Setup.hs | 2 + .../testdata/cabal-helper/mono-repo/C/C.cabal | 9 + .../cabal-helper/mono-repo/C/MyLib.hs | 4 + .../cabal-helper/mono-repo/C/Setup.hs | 2 + .../cabal-helper/mono-repo/cabal.project | 4 + .../cabal-helper/simple-cabal/MyLib.hs | 4 + .../cabal-helper/simple-cabal/Setup.hs | 2 + .../simple-cabal/simple-cabal-test.cabal | 10 + .../cabal-helper/simple-stack/MyLib.hs | 4 + .../cabal-helper/simple-stack/Setup.hs | 2 + .../simple-stack/simple-stack-test.cabal | 10 + .../cabal-helper/sub-package/Setup.hs | 2 + .../cabal-helper/sub-package/app/Main.hs | 8 + .../sub-package/plugins-api/PluginLib.hs | 4 + .../sub-package/plugins-api/Setup.hs | 2 + .../sub-package/plugins-api/plugins-api.cabal | 10 + .../cabal-helper/sub-package/src/MyLib.hs | 6 + .../sub-package/sub-package.cabal | 17 ++ test/unit/CabalHelperSpec.hs | 187 ++++++++++++++++++ test/utils/TestUtils.hs | 1 + 34 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 test/testdata/cabal-helper/implicit-exe/Setup.hs create mode 100644 test/testdata/cabal-helper/implicit-exe/cabal.project create mode 100644 test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal create mode 100644 test/testdata/cabal-helper/implicit-exe/src/Exe.hs create mode 100644 test/testdata/cabal-helper/implicit-exe/src/Lib.hs create mode 100644 test/testdata/cabal-helper/mono-repo/A/A.cabal create mode 100644 test/testdata/cabal-helper/mono-repo/A/Main.hs create mode 100644 test/testdata/cabal-helper/mono-repo/A/MyLib.hs create mode 100644 test/testdata/cabal-helper/mono-repo/A/Setup.hs create mode 100644 test/testdata/cabal-helper/mono-repo/B/B.cabal create mode 100644 test/testdata/cabal-helper/mono-repo/B/Main.hs create mode 100644 test/testdata/cabal-helper/mono-repo/B/MyLib.hs create mode 100644 test/testdata/cabal-helper/mono-repo/B/Setup.hs create mode 100644 test/testdata/cabal-helper/mono-repo/C/C.cabal create mode 100644 test/testdata/cabal-helper/mono-repo/C/MyLib.hs create mode 100644 test/testdata/cabal-helper/mono-repo/C/Setup.hs create mode 100644 test/testdata/cabal-helper/mono-repo/cabal.project create mode 100644 test/testdata/cabal-helper/simple-cabal/MyLib.hs create mode 100644 test/testdata/cabal-helper/simple-cabal/Setup.hs create mode 100644 test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal create mode 100644 test/testdata/cabal-helper/simple-stack/MyLib.hs create mode 100644 test/testdata/cabal-helper/simple-stack/Setup.hs create mode 100644 test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal create mode 100644 test/testdata/cabal-helper/sub-package/Setup.hs create mode 100644 test/testdata/cabal-helper/sub-package/app/Main.hs create mode 100644 test/testdata/cabal-helper/sub-package/plugins-api/PluginLib.hs create mode 100644 test/testdata/cabal-helper/sub-package/plugins-api/Setup.hs create mode 100644 test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal create mode 100644 test/testdata/cabal-helper/sub-package/src/MyLib.hs create mode 100644 test/testdata/cabal-helper/sub-package/sub-package.cabal create mode 100644 test/unit/CabalHelperSpec.hs diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index f0b621380..4edac4e21 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -177,6 +177,7 @@ test-suite unit-test hs-source-dirs: test/unit main-is: Main.hs other-modules: ApplyRefactPluginSpec + CabalHelperSpec CodeActionsSpec ContextSpec DiffSpec @@ -193,6 +194,7 @@ test-suite unit-test build-tool-depends: cabal-helper:cabal-helper-main, hspec-discover:hspec-discover build-depends: QuickCheck , aeson + , cabal-helper , ghc , base , bytestring diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 76da7b516..640f0cfe9 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -68,11 +68,12 @@ isStackCradle = (`elem` ["stack", "Cabal-Helper-Stack", "Cabal-Helper-Stack-None isCabalCradle :: Cradle -> Bool isCabalCradle = (`elem` - ["cabal" + [ "cabal" , "Cabal-Helper-Cabal-V1" , "Cabal-Helper-Cabal-V2" , "Cabal-Helper-Cabal-V1-Dir" , "Cabal-Helper-Cabal-V2-Dir" + , "Cabal-Helper-Cabal-V2-None" , "Cabal-Helper-Cabal-None" ] ) diff --git a/test/testdata/cabal-helper/implicit-exe/Setup.hs b/test/testdata/cabal-helper/implicit-exe/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/implicit-exe/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/implicit-exe/cabal.project b/test/testdata/cabal-helper/implicit-exe/cabal.project new file mode 100644 index 000000000..bfe628965 --- /dev/null +++ b/test/testdata/cabal-helper/implicit-exe/cabal.project @@ -0,0 +1 @@ +packages: ./ \ No newline at end of file diff --git a/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal b/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal new file mode 100644 index 000000000..49213fc29 --- /dev/null +++ b/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal @@ -0,0 +1,17 @@ +cabal-version: >=1.10 +name: implicit-exe +version: 0.1.0.0 +license-file: LICENSE +build-type: Simple + +library + exposed-modules: Lib + hs-source-dirs: src + build-depends: base >=4.8 && <4.13 + default-language: Haskell2010 + + +executable implicit-exe + main-is: src/Exe.hs + build-depends: base >=4.8 && <4.13, implicit-exe + default-language: Haskell2010 \ No newline at end of file diff --git a/test/testdata/cabal-helper/implicit-exe/src/Exe.hs b/test/testdata/cabal-helper/implicit-exe/src/Exe.hs new file mode 100644 index 000000000..ed41929e7 --- /dev/null +++ b/test/testdata/cabal-helper/implicit-exe/src/Exe.hs @@ -0,0 +1,4 @@ + +import Lib (someFunc) + +main = someFunc \ No newline at end of file diff --git a/test/testdata/cabal-helper/implicit-exe/src/Lib.hs b/test/testdata/cabal-helper/implicit-exe/src/Lib.hs new file mode 100644 index 000000000..f51af83e2 --- /dev/null +++ b/test/testdata/cabal-helper/implicit-exe/src/Lib.hs @@ -0,0 +1,4 @@ +module Lib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/mono-repo/A/A.cabal b/test/testdata/cabal-helper/mono-repo/A/A.cabal new file mode 100644 index 000000000..dd682ddd0 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/A/A.cabal @@ -0,0 +1,15 @@ +cabal-version: >=2.0 +name: A +version: 0.1.0.0 +build-type: Simple + +library + exposed-modules: MyLib + build-depends: base >=4.9 && < 5 + default-language: Haskell2010 + +executable A + main-is: Main.hs + other-modules: MyLib + build-depends: base >= 4.9 && < 5, A + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/mono-repo/A/Main.hs b/test/testdata/cabal-helper/mono-repo/A/Main.hs new file mode 100644 index 000000000..60d904e8c --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/A/Main.hs @@ -0,0 +1,8 @@ +module Main where + +import qualified MyLib (someFunc) + +main :: IO () +main = do + putStrLn "Hello, Haskell!" + MyLib.someFunc diff --git a/test/testdata/cabal-helper/mono-repo/A/MyLib.hs b/test/testdata/cabal-helper/mono-repo/A/MyLib.hs new file mode 100644 index 000000000..e657c4403 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/A/MyLib.hs @@ -0,0 +1,4 @@ +module MyLib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/mono-repo/A/Setup.hs b/test/testdata/cabal-helper/mono-repo/A/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/A/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/mono-repo/B/B.cabal b/test/testdata/cabal-helper/mono-repo/B/B.cabal new file mode 100644 index 000000000..96805e98e --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/B/B.cabal @@ -0,0 +1,15 @@ +cabal-version: >=2.0 +name: B +version: 0.1.0.0 +build-type: Simple + +library + exposed-modules: MyLib + build-depends: base >= 4.9 && < 5 + default-language: Haskell2010 + +executable B + main-is: Main.hs + other-modules: MyLib + build-depends: base >= 4.9 && < 5, B + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/mono-repo/B/Main.hs b/test/testdata/cabal-helper/mono-repo/B/Main.hs new file mode 100644 index 000000000..60d904e8c --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/B/Main.hs @@ -0,0 +1,8 @@ +module Main where + +import qualified MyLib (someFunc) + +main :: IO () +main = do + putStrLn "Hello, Haskell!" + MyLib.someFunc diff --git a/test/testdata/cabal-helper/mono-repo/B/MyLib.hs b/test/testdata/cabal-helper/mono-repo/B/MyLib.hs new file mode 100644 index 000000000..e657c4403 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/B/MyLib.hs @@ -0,0 +1,4 @@ +module MyLib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/mono-repo/B/Setup.hs b/test/testdata/cabal-helper/mono-repo/B/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/B/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/mono-repo/C/C.cabal b/test/testdata/cabal-helper/mono-repo/C/C.cabal new file mode 100644 index 000000000..016a83201 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/C/C.cabal @@ -0,0 +1,9 @@ +cabal-version: >=2.0 +name: C +version: 0.1.0.0 +build-type: Simple + +library + exposed-modules: MyLib + build-depends: base>= 4.9 && < 5 + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/mono-repo/C/MyLib.hs b/test/testdata/cabal-helper/mono-repo/C/MyLib.hs new file mode 100644 index 000000000..e657c4403 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/C/MyLib.hs @@ -0,0 +1,4 @@ +module MyLib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/mono-repo/C/Setup.hs b/test/testdata/cabal-helper/mono-repo/C/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/C/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/mono-repo/cabal.project b/test/testdata/cabal-helper/mono-repo/cabal.project new file mode 100644 index 000000000..cf2eab3e1 --- /dev/null +++ b/test/testdata/cabal-helper/mono-repo/cabal.project @@ -0,0 +1,4 @@ +packages: + ./A/ + ./B/ + ./C/ \ No newline at end of file diff --git a/test/testdata/cabal-helper/simple-cabal/MyLib.hs b/test/testdata/cabal-helper/simple-cabal/MyLib.hs new file mode 100644 index 000000000..e657c4403 --- /dev/null +++ b/test/testdata/cabal-helper/simple-cabal/MyLib.hs @@ -0,0 +1,4 @@ +module MyLib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/simple-cabal/Setup.hs b/test/testdata/cabal-helper/simple-cabal/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/simple-cabal/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal b/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal new file mode 100644 index 000000000..75e30b0dd --- /dev/null +++ b/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal @@ -0,0 +1,10 @@ +cabal-version: >=1.10 +name: simple-cabal-test +version: 0.1.0.0 +license-file: LICENSE +build-type: Simple + +library + exposed-modules: MyLib + build-depends: base >=4.12 && <4.13 + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/simple-stack/MyLib.hs b/test/testdata/cabal-helper/simple-stack/MyLib.hs new file mode 100644 index 000000000..e657c4403 --- /dev/null +++ b/test/testdata/cabal-helper/simple-stack/MyLib.hs @@ -0,0 +1,4 @@ +module MyLib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/simple-stack/Setup.hs b/test/testdata/cabal-helper/simple-stack/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/simple-stack/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal b/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal new file mode 100644 index 000000000..1f4d908b9 --- /dev/null +++ b/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal @@ -0,0 +1,10 @@ +cabal-version: >=1.10 +name: simple-stack-test +version: 0.1.0.0 +license-file: LICENSE +build-type: Simple + +library + exposed-modules: MyLib + build-depends: base >=4.12 && <4.13 + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/sub-package/Setup.hs b/test/testdata/cabal-helper/sub-package/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/sub-package/app/Main.hs b/test/testdata/cabal-helper/sub-package/app/Main.hs new file mode 100644 index 000000000..60d904e8c --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/app/Main.hs @@ -0,0 +1,8 @@ +module Main where + +import qualified MyLib (someFunc) + +main :: IO () +main = do + putStrLn "Hello, Haskell!" + MyLib.someFunc diff --git a/test/testdata/cabal-helper/sub-package/plugins-api/PluginLib.hs b/test/testdata/cabal-helper/sub-package/plugins-api/PluginLib.hs new file mode 100644 index 000000000..55a7098c2 --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/plugins-api/PluginLib.hs @@ -0,0 +1,4 @@ +module PluginLib (someFunc) where + +someFunc :: IO () +someFunc = putStrLn "someFunc" diff --git a/test/testdata/cabal-helper/sub-package/plugins-api/Setup.hs b/test/testdata/cabal-helper/sub-package/plugins-api/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/plugins-api/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal b/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal new file mode 100644 index 000000000..129dc9e06 --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal @@ -0,0 +1,10 @@ +cabal-version: >=1.10 +name: plugins-api +version: 0.1.0.0 +license-file: LICENSE +build-type: Simple + +library + exposed-modules: PluginLib + build-depends: base >=4.12 && <4.13 + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/sub-package/src/MyLib.hs b/test/testdata/cabal-helper/sub-package/src/MyLib.hs new file mode 100644 index 000000000..53ea5c633 --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/src/MyLib.hs @@ -0,0 +1,6 @@ +module MyLib (someFunc) where + +import qualified PluginLib as L + +someFunc :: IO () +someFunc = L.someFunc diff --git a/test/testdata/cabal-helper/sub-package/sub-package.cabal b/test/testdata/cabal-helper/sub-package/sub-package.cabal new file mode 100644 index 000000000..d54355aea --- /dev/null +++ b/test/testdata/cabal-helper/sub-package/sub-package.cabal @@ -0,0 +1,17 @@ +cabal-version: >=1.10 +name: sub-package +version: 0.1.0.0 +license-file: LICENSE +build-type: Simple + +library + exposed-modules: MyLib + build-depends: base >=4.12 && <4.13, plugins-api + hs-source-dirs: src + default-language: Haskell2010 + +executable sub-package + main-is: Main.hs + build-depends: base >=4.12 && <4.13, sub-package + hs-source-dirs: app + default-language: Haskell2010 diff --git a/test/unit/CabalHelperSpec.hs b/test/unit/CabalHelperSpec.hs new file mode 100644 index 000000000..f24985a95 --- /dev/null +++ b/test/unit/CabalHelperSpec.hs @@ -0,0 +1,187 @@ +{-# LANGUAGE OverloadedStrings #-} +module CabalHelperSpec where + +import Haskell.Ide.Engine.Cradle +import Test.Hspec +import System.FilePath +import System.Directory (getCurrentDirectory, removeFile) +import TestUtils + +rootPath :: FilePath -> FilePath +rootPath cwd = cwd "test" "testdata" "cabal-helper" + +implicitExePath :: FilePath -> FilePath +implicitExePath cwd = rootPath cwd "implicit-exe" + +monoRepoPath :: FilePath -> FilePath +monoRepoPath cwd = rootPath cwd "mono-repo" + +subPackagePath :: FilePath -> FilePath +subPackagePath cwd = rootPath cwd "sub-package" + +simpleCabalPath :: FilePath -> FilePath +simpleCabalPath cwd = rootPath cwd "simple-cabal" + +simpleStackPath :: FilePath -> FilePath +simpleStackPath cwd = rootPath cwd "simple-stack" + +spec :: Spec +spec = beforeAll_ setupStackFiles $ do + describe "cabal-helper spec" $ do + describe "find cabal entry point spec" findCabalHelperEntryPointSpec + describe "cradle discovery" cabalHelperCradleSpec + +cabalHelperCradleSpec :: Spec +cabalHelperCradleSpec = do + cwd <- runIO getCurrentDirectory + describe "dummy filepath, finds none-cradle" $ do + it "implicit exe, dummy filepath" $ do + crdl <- cabalHelperCradle (implicitExePath cwd "File.hs") + crdl `shouldSatisfy` isCabalCradle + it "mono repo, dummy filepath" $ do + crdl <- cabalHelperCradle (monoRepoPath cwd "File.hs") + crdl `shouldSatisfy` isCabalCradle + it "stack repo, dummy filepath" $ do + crdl <- cabalHelperCradle (simpleStackPath cwd "File.hs") + crdl `shouldSatisfy` isStackCradle + it "cabal repo, dummy filepath" $ + pendingWith "Can not work because of global `cabal.project`" + -- crdl <- cabalHelperCradle (simpleCabalPath cwd "File.hs") + -- crdl `shouldSatisfy` isCabalCradle + it "sub package, dummy filepath" $ do + crdl <- cabalHelperCradle (subPackagePath cwd "File.hs") + crdl `shouldSatisfy` isStackCradle + + describe "Existing projects" $ do + it "implicit exe" $ do + crdl <- cabalHelperCradle (implicitExePath cwd "src" "Exe.hs") + crdl `shouldSatisfy` isCabalCradle + it "mono repo" $ do + crdl <- cabalHelperCradle (monoRepoPath cwd "A" "Main.hs") + crdl `shouldSatisfy` isCabalCradle + it "stack repo" $ do + crdl <- cabalHelperCradle (simpleStackPath cwd "MyLib.hs") + crdl `shouldSatisfy` isStackCradle + it "cabal repo" $ + pendingWith "Can not work because of global `cabal.project`" + -- crdl <- cabalHelperCradle (simpleCabalPath cwd "MyLib.hs") + -- crdl `shouldSatisfy` isCabalCradle + it "sub package" $ do + crdl <- cabalHelperCradle (subPackagePath cwd "plugins-api" "PluginLib.hs") + crdl `shouldSatisfy` isStackCradle + +findCabalHelperEntryPointSpec :: Spec +findCabalHelperEntryPointSpec = do + cwd <- runIO getCurrentDirectory + describe "implicit exe" $ do + it "Find project root with dummy filepath" $ do + let dummyFile = implicitExePath cwd "File.hs" + cabalTest dummyFile + it "Find project root from source component" $ do + let libFile = implicitExePath cwd "src" "Lib.hs" + cabalTest libFile + it "Find project root from executable component" $ do + let mainFile = implicitExePath cwd "src" "Exe.hs" + cabalTest mainFile + + describe "mono repo" $ do + it "Find project root with dummy filepath" $ do + let dummyFile = monoRepoPath cwd "File.hs" + cabalTest dummyFile + it "Find project root with existing executable" $ do + let mainFile = monoRepoPath cwd "A" "Main.hs" + cabalTest mainFile + + describe "sub package repo" $ do + it "Find project root with dummy filepath" $ do + let dummyFile = subPackagePath cwd "File.hs" + stackTest dummyFile + it "Find project root with existing executable" $ do + let mainFile = subPackagePath cwd "plugins-api" "PluginLib.hs" + stackTest mainFile + + describe "stack repo" $ do + it "Find project root with dummy filepath" $ do + let dummyFile = simpleStackPath cwd "File.hs" + stackTest dummyFile + it "Find project root with real filepath" $ do + let dummyFile = simpleStackPath cwd "MyLib.hs" + stackTest dummyFile + + describe "simple cabal repo" $ + it "Find porject root with dummy filepath" $ + pendingWith "Change test-setup, we will always find `cabal.project` in root dir" + +-- ------------------------------------------------------------- + +cabalTest :: FilePath -> IO () +cabalTest fp = do + entryPoint <- findCabalHelperEntryPoint fp + let Just proj = entryPoint + isCabal = isCabalProject proj + shouldBe isCabal True + +stackTest :: FilePath -> IO () +stackTest fp = do + entryPoint <- findCabalHelperEntryPoint fp + let Just proj = entryPoint + isStack = isStackProject proj + shouldBe isStack True + +-- ------------------------------------------------------------- + +setupStackFiles :: IO () +setupStackFiles = do + resolver <- readResolver + cwd <- getCurrentDirectory + writeFile (implicitExePath cwd "stack.yaml") (standardStackYaml resolver) + writeFile (monoRepoPath cwd "stack.yaml") (monoRepoStackYaml resolver) + writeFile (subPackagePath cwd "stack.yaml") (subPackageStackYaml resolver) + writeFile (simpleStackPath cwd "stack.yaml") (standardStackYaml resolver) + + +cleanupStackFiles :: IO () +cleanupStackFiles = do + cwd <- getCurrentDirectory + removeFile (implicitExePath cwd "stack.yaml") + removeFile (monoRepoPath cwd "stack.yaml") + removeFile (subPackagePath cwd "stack.yaml") + removeFile (simpleStackPath cwd "stack.yaml") + +-- ------------------------------------------------------------- + +standardStackYaml :: String -> String +standardStackYaml resolver = unlines + [ "# WARNING: THIS FILE IS AUTOGENERATED IN test/utils/CabalHelperSpec. IT WILL BE OVERWRITTEN ON EVERY TEST RUN" + , "resolver: " ++ resolver + , "packages:" + , "- '.'" + , "extra-deps: []" + , "flags: {}" + , "extra-package-dbs: []" + ] + +monoRepoStackYaml :: String -> String +monoRepoStackYaml resolver = unlines + [ "# WARNING: THIS FILE IS AUTOGENERATED IN test/utils/CabalHelperSpec. IT WILL BE OVERWRITTEN ON EVERY TEST RUN" + , "resolver: " ++ resolver + , "packages:" + , "- 'A'" + , "- 'B'" + , "- 'C'" + , "extra-deps: []" + , "flags: {}" + , "extra-package-dbs: []" + ] + +subPackageStackYaml :: String -> String +subPackageStackYaml resolver = unlines + [ "# WARNING: THIS FILE IS AUTOGENERATED IN test/unit/CabalHelperSpec. IT WILL BE OVERWRITTEN ON EVERY TEST RUN" + , "resolver: " ++ resolver + , "packages:" + , "- '.'" + , "- 'plugins-api'" + , "extra-deps: []" + , "flags: {}" + , "extra-package-dbs: []" + ] \ No newline at end of file diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index db0b880c8..4e9a040cc 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -10,6 +10,7 @@ module TestUtils , runIGM , ghcVersion, GhcVersion(..) , logFilePath + , readResolver , hieCommand , hieCommandVomit , hieCommandExamplePlugin From 3978177e1bccb9c77c528f5170f28e875ebe6cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Mon, 6 Jan 2020 12:01:30 +0000 Subject: [PATCH 047/270] Removed CPP guards in favor of ghcVersion check --- test/functional/FunctionalCodeActionsSpec.hs | 90 ++++++++++---------- 1 file changed, 44 insertions(+), 46 deletions(-) diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index 4b8c27600..55f9e78df 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -1,5 +1,4 @@ {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE CPP #-} module FunctionalCodeActionsSpec where @@ -219,51 +218,50 @@ spec = describe "code actions" $ do , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" ] ] -#if __GLASGOW_HASKELL__ >= 806 - describe "formats with ormolu" $ hsImportSpec "ormolu" - [ -- Expected output for simple format. - [ "import Control.Monad" - , "import qualified Data.Maybe" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Use an import list and format the output. - [ "import Control.Monad (when)" - , "import qualified Data.Maybe" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Multiple import lists, should not introduce multiple newlines. - [ "import System.IO (hPutStrLn, stdout)" - , "import Control.Monad (when)" - , "import Data.Maybe (fromMaybe)" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stdout" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - , -- Complex imports for Constructos and functions - [ "{-# LANGUAGE NoImplicitPrelude #-}" - , "import System.IO (IO, hPutStrLn, stderr)" - , "import Prelude (Bool (..))" - , "import Control.Monad (when)" - , "import Data.Function (($))" - , "import Data.Maybe (Maybe (Just), fromMaybe)" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stderr" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - ] -#else - describe "formats with ormolu" $ - it "is NOP formatter" $ - pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." -#endif + describe "formats with ormolu" $ + case ghcVersion of + GHC86 -> hsImportSpec "ormolu" + [ -- Expected output for simple format. + [ "import Control.Monad" + , "import qualified Data.Maybe" + , "main :: IO ()" + , "main = when True $ putStrLn \"hello\"" + ] + , -- Use an import list and format the output. + [ "import Control.Monad (when)" + , "import qualified Data.Maybe" + , "main :: IO ()" + , "main = when True $ putStrLn \"hello\"" + ] + , -- Multiple import lists, should not introduce multiple newlines. + [ "import System.IO (hPutStrLn, stdout)" + , "import Control.Monad (when)" + , "import Data.Maybe (fromMaybe)" + , "-- | Main entry point to the program" + , "main :: IO ()" + , "main =" + , " when True" + , " $ hPutStrLn stdout" + , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" + ] + , -- Complex imports for Constructos and functions + [ "{-# LANGUAGE NoImplicitPrelude #-}" + , "import System.IO (IO, hPutStrLn, stderr)" + , "import Prelude (Bool (..))" + , "import Control.Monad (when)" + , "import Data.Function (($))" + , "import Data.Maybe (Maybe (Just), fromMaybe)" + , "-- | Main entry point to the program" + , "main :: IO ()" + , "main =" + , " when True" + , " $ hPutStrLn stderr" + , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" + ] + ] + _ -> it "is NOP formatter" $ + pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." + describe "add package suggestions" $ do it "adds to .cabal files" $ do flushStackEnvironment From 650ffc936aa9f2739b27391b023353bdfcdb97c5 Mon Sep 17 00:00:00 2001 From: Anrock Date: Mon, 6 Jan 2020 21:00:55 +0300 Subject: [PATCH 048/270] Update neovim+coc integration instruction for lsp flag --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index da1a75364..fdeb39d98 100644 --- a/README.md +++ b/README.md @@ -546,6 +546,7 @@ Then issue `:CocConfig` and add the following to your Coc config file. "languageserver": { "haskell": { "command": "hie-wrapper", + "args": ["--lsp"], "rootPatterns": [ "*.cabal", "stack.yaml", From 4f423a0633cc6bba0b59e9d987af1f5725d0fbc1 Mon Sep 17 00:00:00 2001 From: Anrock Date: Mon, 6 Jan 2020 21:01:24 +0300 Subject: [PATCH 049/270] Update LanguageClientNeovim integration for lsp flag --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fdeb39d98..27de2171e 100644 --- a/README.md +++ b/README.md @@ -589,7 +589,7 @@ into `~/.vim/pack/XXX/start/`, where `XXX` is just a name for your "plugin suite ```vim set rtp+=~/.vim/pack/XXX/start/LanguageClient-neovim -let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper'] } +let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper', '--lsp'] } ``` You'll probably want to add some mappings for common commands: From 433d082167cb43f24b9b2fa2621b84e78b0e2e70 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 6 Jan 2020 22:25:10 +0100 Subject: [PATCH 050/270] Avoid building HIE twice cabal install works different than cabal build and does not re-use its artifacts. Even some dependencies may be rebuilt. Future cabal versions may fix that, we don't know. --- install/src/HieInstall.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index 6b53bf845..ba1c03b78 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -122,7 +122,6 @@ defaultMain = do (\version -> phony ("cabal-hie-" ++ version) $ do need ["submodules"] need ["cabal"] - cabalBuildHie version cabalInstallHie version ) From 8e61c599d468a8674d559c49890609bfeec73c67 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 6 Jan 2020 22:24:23 +0100 Subject: [PATCH 051/270] Add cabal freeze files and use them automatically --- cabal.project.8.4.1 | 1 + cabal.project.8.4.1.freeze | 336 ++++++++++++++++++++++++++++++++++++ cabal.project.8.4.2 | 1 + cabal.project.8.4.2.freeze | 336 ++++++++++++++++++++++++++++++++++++ cabal.project.8.4.3 | 1 + cabal.project.8.4.3.freeze | 336 ++++++++++++++++++++++++++++++++++++ cabal.project.8.4.4 | 1 + cabal.project.8.4.4.freeze | 336 ++++++++++++++++++++++++++++++++++++ cabal.project.8.6.1 | 1 + cabal.project.8.6.1.freeze | 337 +++++++++++++++++++++++++++++++++++++ cabal.project.8.6.2 | 1 + cabal.project.8.6.2.freeze | 337 +++++++++++++++++++++++++++++++++++++ cabal.project.8.6.3 | 1 + cabal.project.8.6.3.freeze | 337 +++++++++++++++++++++++++++++++++++++ cabal.project.8.6.5 | 1 + cabal.project.8.6.5.freeze | 337 +++++++++++++++++++++++++++++++++++++ install/src/Cabal.hs | 16 ++ 17 files changed, 2716 insertions(+) create mode 120000 cabal.project.8.4.1 create mode 100644 cabal.project.8.4.1.freeze create mode 120000 cabal.project.8.4.2 create mode 100644 cabal.project.8.4.2.freeze create mode 120000 cabal.project.8.4.3 create mode 100644 cabal.project.8.4.3.freeze create mode 120000 cabal.project.8.4.4 create mode 100644 cabal.project.8.4.4.freeze create mode 120000 cabal.project.8.6.1 create mode 100644 cabal.project.8.6.1.freeze create mode 120000 cabal.project.8.6.2 create mode 100644 cabal.project.8.6.2.freeze create mode 120000 cabal.project.8.6.3 create mode 100644 cabal.project.8.6.3.freeze create mode 120000 cabal.project.8.6.5 create mode 100644 cabal.project.8.6.5.freeze diff --git a/cabal.project.8.4.1 b/cabal.project.8.4.1 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.4.1 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.1.freeze b/cabal.project.8.4.1.freeze new file mode 100644 index 000000000..6cfb757ac --- /dev/null +++ b/cabal.project.8.4.1.freeze @@ -0,0 +1,336 @@ +with-compiler: ghc-8.4.1 + +constraints: any.Cabal ==2.2.0.0, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.5.0.0, + any.array ==0.5.2.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.11.0.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.5.1, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.5.11.0, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.3.0, + any.deque ==0.4.3, + any.directory ==1.3.1.5, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.4.1, + any.ghc-boot ==8.4.1, + any.ghc-boot-th ==8.4.1, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.2.0, + any.ghci ==8.4.1, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.19.0.1, + any.haddock-library ==1.5.0.1, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.1.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.13.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.1, + any.text ==1.2.3.0, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.4.2 b/cabal.project.8.4.2 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.4.2 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.2.freeze b/cabal.project.8.4.2.freeze new file mode 100644 index 000000000..612e469b1 --- /dev/null +++ b/cabal.project.8.4.2.freeze @@ -0,0 +1,336 @@ +with-compiler: ghc-8.4.2 + +constraints: any.Cabal ==2.2.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.5.0.0, + any.array ==0.5.2.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.11.1.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.5.1, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.5.11.0, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.3.0, + any.deque ==0.4.3, + any.directory ==1.3.1.5, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.4.2, + any.ghc-boot ==8.4.2, + any.ghc-boot-th ==8.4.2, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.2.0, + any.ghci ==8.4.2, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.20.0, + any.haddock-library ==1.6.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.13.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.1, + any.text ==1.2.3.0, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.4.3 b/cabal.project.8.4.3 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.4.3 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.3.freeze b/cabal.project.8.4.3.freeze new file mode 100644 index 000000000..9cf8399f3 --- /dev/null +++ b/cabal.project.8.4.3.freeze @@ -0,0 +1,336 @@ +with-compiler: ghc-8.4.3 + +constraints: any.Cabal ==2.2.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.5.0.0, + any.array ==0.5.2.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.11.1.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.5.1, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.5.11.0, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.3.0, + any.deque ==0.4.3, + any.directory ==1.3.1.5, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.4.3, + any.ghc-boot ==8.4.3, + any.ghc-boot-th ==8.4.3, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.2.0, + any.ghci ==8.4.3, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.20.0, + any.haddock-library ==1.6.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.13.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.1, + any.text ==1.2.3.0, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.4.4 b/cabal.project.8.4.4 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.4.4 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.4.freeze b/cabal.project.8.4.4.freeze new file mode 100644 index 000000000..b25b81d95 --- /dev/null +++ b/cabal.project.8.4.4.freeze @@ -0,0 +1,336 @@ +with-compiler: ghc-8.4.4 + +constraints: any.Cabal ==2.2.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.5.0.0, + any.array ==0.5.2.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.11.1.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.5.1, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.5.11.0, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.3.0, + any.deque ==0.4.3, + any.directory ==1.3.1.5, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.4.4, + any.ghc-boot ==8.4.4, + any.ghc-boot-th ==8.4.4, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.2.0, + any.ghci ==8.4.4, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.20.0, + any.haddock-library ==1.6.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.4.5.1, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.13.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.1, + any.text ==1.2.3.1, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.1 b/cabal.project.8.6.1 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.6.1 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.1.freeze b/cabal.project.8.6.1.freeze new file mode 100644 index 000000000..b955f9ef9 --- /dev/null +++ b/cabal.project.8.6.1.freeze @@ -0,0 +1,337 @@ +with-compiler: ghc-8.6.1 + +constraints: any.Cabal ==2.4.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.6.0.0, + any.array ==0.5.2.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.12.0.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.6.0, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.6.0.1, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.4.0, + any.deque ==0.4.3, + any.directory ==1.3.3.0, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2.1, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.6.1, + any.ghc-boot ==8.6.1, + any.ghc-boot-th ==8.6.1, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-heap ==8.6.1, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.3, + any.ghci ==8.6.1, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.22.0, + any.haddock-library ==1.7.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.14.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.2, + any.text ==1.2.3.1, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.2 b/cabal.project.8.6.2 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.6.2 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.2.freeze b/cabal.project.8.6.2.freeze new file mode 100644 index 000000000..4fba8538f --- /dev/null +++ b/cabal.project.8.6.2.freeze @@ -0,0 +1,337 @@ +with-compiler: ghc-8.6.2 + +constraints: any.Cabal ==2.4.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.6.0.0, + any.array ==0.5.3.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.12.0.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.6.0, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.6.0.1, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.4.0, + any.deque ==0.4.3, + any.directory ==1.3.3.0, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2.1, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.6.2, + any.ghc-boot ==8.6.2, + any.ghc-boot-th ==8.6.2, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-heap ==8.6.2, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.3, + any.ghci ==8.6.2, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.22.0, + any.haddock-library ==1.7.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.14.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.2, + any.text ==1.2.3.1, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.3 b/cabal.project.8.6.3 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.6.3 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.3.freeze b/cabal.project.8.6.3.freeze new file mode 100644 index 000000000..82ef37f8f --- /dev/null +++ b/cabal.project.8.6.3.freeze @@ -0,0 +1,337 @@ +with-compiler: ghc-8.6.3 + +constraints: any.Cabal ==2.4.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.6.0.0, + any.array ==0.5.3.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.12.0.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.6.0, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.6.0.1, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.4.0, + any.deque ==0.4.3, + any.directory ==1.3.3.0, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2.1, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.6.3, + any.ghc-boot ==8.6.3, + any.ghc-boot-th ==8.6.3, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-heap ==8.6.3, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.3, + any.ghci ==8.6.3, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.22.0, + any.haddock-library ==1.7.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.3.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.14.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.2, + any.text ==1.2.3.1, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.5.0, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.5 b/cabal.project.8.6.5 new file mode 120000 index 000000000..b4c9ceac5 --- /dev/null +++ b/cabal.project.8.6.5 @@ -0,0 +1 @@ +cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.5.freeze b/cabal.project.8.6.5.freeze new file mode 100644 index 000000000..6ef2ec333 --- /dev/null +++ b/cabal.project.8.6.5.freeze @@ -0,0 +1,337 @@ +with-compiler: ghc-8.6.5 + +constraints: any.Cabal ==2.4.0.1, + any.Diff ==0.4.0, + any.HUnit ==1.6.0.0, + any.ListLike ==4.6.3, + any.QuickCheck ==2.13.2, + QuickCheck +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.aeson ==1.4.6.0, + aeson -bytestring-builder -cffi -developer -fast, + any.aeson-pretty ==0.8.8, + aeson-pretty -lib-only, + any.alex ==3.2.5, + alex +small_base, + any.ansi-terminal ==0.10.2, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.appar ==0.1.8, + any.apply-refact ==0.6.0.0, + any.array ==0.5.3.0, + any.asn1-encoding ==0.9.6, + any.asn1-parse ==0.9.5, + any.asn1-types ==0.3.3, + any.assoc ==1.0.1, + any.async ==2.2.2, + async -bench, + any.attoparsec ==0.13.2.3, + attoparsec -developer, + any.auto-update ==0.1.6, + any.base ==4.12.0.0, + any.base-compat ==0.11.0, + any.base-orphans ==0.8.1, + any.base-prelude ==1.3, + any.base16-bytestring ==0.1.1.6, + any.basement ==0.0.11, + any.bifunctors ==5.5.6, + bifunctors +semigroups +tagged, + any.binary ==0.8.6.0, + any.blaze-builder ==0.4.1.0, + any.blaze-html ==0.9.1.2, + any.blaze-markup ==0.8.2.3, + any.brittany ==0.12.1.1, + brittany -brittany-dev-lib -brittany-test-perf, + any.bsb-http-chunked ==0.0.0.4, + any.butcher ==1.3.2.3, + any.byteorder ==1.0.4, + any.bytestring ==0.10.8.2, + any.bytestring-trie ==0.2.5.0, + any.cabal-doctest ==1.0.8, + any.cabal-helper ==1.0.0.0, + cabal-helper -dev, + any.cabal-plan ==0.6.2.0, + cabal-plan -_ +exe -license-report, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.charset ==0.3.7.1, + any.clock ==0.7.2, + clock -llvm, + any.cmdargs ==0.10.20, + cmdargs +quotation -testprog, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.conduit ==1.3.1.2, + any.conduit-extra ==1.3.4, + any.conduit-parse ==0.2.1.0, + conduit-parse -enable-hlint-test, + any.connection ==0.3.1, + any.constrained-dynamic ==0.1.0.0, + any.constraints ==0.11.2, + any.containers ==0.6.0.1, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + any.cookie ==0.4.5, + any.cpphs ==1.20.8, + any.cryptohash-sha1 ==0.11.100.1, + any.cryptonite ==0.26, + cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, + any.czipwith ==1.0.1.2, + any.data-default ==0.7.1.1, + any.data-default-class ==0.1.2.0, + any.data-default-instances-containers ==0.0.1, + any.data-default-instances-dlist ==0.0.1, + any.data-default-instances-old-locale ==0.0.1, + any.data-tree-print ==0.1.0.2, + any.dec ==0.0.3, + any.deepseq ==1.4.4.0, + any.deque ==0.4.3, + any.directory ==1.3.3.0, + any.distributive ==0.6.1, + distributive +semigroups +tagged, + any.dlist ==0.8.0.7, + any.dyre ==0.8.12, + any.easy-file ==0.2.2, + any.exceptions ==0.10.4, + exceptions +transformers-0-4, + any.executable-path ==0.0.3.1, + any.extra ==1.6.18, + any.fast-logger ==3.0.0, + any.file-embed ==0.0.11.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2.1, + any.filepattern ==0.1.1, + any.fingertree ==0.1.4.2, + any.floskell ==0.10.2, + any.fmlist ==0.9.3, + any.fold-debounce ==0.2.0.9, + any.foundation ==0.0.25, + foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, + any.free ==5.1.3, + any.generic-deriving ==1.13.1, + generic-deriving +base-4-9, + any.ghc ==8.6.5, + any.ghc-boot ==8.6.5, + any.ghc-boot-th ==8.6.5, + any.ghc-exactprint ==0.6.2, + ghc-exactprint -dev -roundtrip, + any.ghc-heap ==8.6.5, + any.ghc-lib-parser ==8.8.1.20191204, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.5.3, + any.ghci ==8.6.5, + any.githash ==0.1.3.3, + any.gitrev ==1.3.1, + any.haddock-api ==2.22.0, + any.haddock-library ==1.7.0, + any.happy ==1.19.12, + happy +small_base, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + haskell-ide-engine +pedantic, + any.haskell-lsp ==0.19.0.0, + haskell-lsp -demo, + any.haskell-lsp-types ==0.19.0.0, + any.haskell-src-exts ==1.21.1, + any.haskell-src-exts-util ==0.2.5, + any.hie-bios ==0.3.2, + hie-plugin-api -pedantic, + any.hlint ==2.2.5, + hlint -ghc-lib +gpl +threaded, + any.hoogle ==5.0.17.11, + any.hourglass ==0.2.12, + any.hpc ==0.6.0.3, + any.hsc2hs ==0.68.6, + hsc2hs -in-ghc-tree, + any.hscolour ==1.24.4, + any.hsimport ==0.11.0, + any.hslogger ==1.3.1.0, + hslogger +network--gt-3_0_0, + any.hspec ==2.7.1, + any.hspec-core ==2.7.1, + any.hspec-discover ==2.7.1, + any.hspec-expectations ==0.8.2, + any.http-client ==0.6.4, + http-client +network-uri, + any.http-client-tls ==0.3.5.3, + any.http-conduit ==2.3.7.3, + any.http-date ==0.0.8, + any.http-types ==0.12.3, + any.http2 ==2.0.3, + http2 -devel, + any.ilist ==0.3.1.0, + any.indexed-profunctors ==0.1, + any.integer-gmp ==1.0.2.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-storage ==0.3, + any.iproute ==1.7.8, + any.js-flot ==0.8.3, + any.js-jquery ==3.3.1, + any.kan-extensions ==5.2, + any.lens ==4.18.1, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + any.libyaml ==0.1.1.1, + libyaml -no-unicode -system-libyaml, + any.lifted-async ==0.10.0.4, + any.lifted-base ==0.2.3.12, + any.lsp-test ==0.10.0.0, + any.megaparsec ==8.0.0, + megaparsec -dev, + any.memory ==0.15.0, + memory +support_basement +support_bytestring +support_deepseq +support_foundation, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.2, + any.mime-types ==0.1.0.9, + any.mmap ==0.5.9, + mmap -mmaptest, + any.monad-control ==1.0.2.3, + any.monad-dijkstra ==0.1.1.2, + any.monad-memo ==0.5.1, + any.mono-traversable ==1.0.15.1, + any.monoid-subclasses ==1.0, + any.mtl ==2.2.2, + any.multistate ==0.8.0.2, + multistate -build-example, + any.neat-interpolation ==0.3.2.5, + any.network ==3.1.1.1, + any.network-bsd ==2.8.1.0, + any.network-byte-order ==0.1.2.0, + any.network-uri ==2.6.1.0, + any.old-locale ==1.0.0.7, + any.old-time ==1.1.0.3, + any.optics-core ==0.2, + any.optparse-applicative ==0.15.1.0, + any.optparse-simple ==0.1.1.2, + optparse-simple -build-example, + any.parallel ==3.2.2.0, + any.parsec ==3.1.13.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.parsers ==0.12.10, + parsers +attoparsec +binary +parsec, + any.pem ==0.2.4, + any.polyparse ==1.13, + any.pretty ==1.1.3.6, + any.primes ==0.2.1.0, + any.primitive ==0.7.0.0, + any.process ==1.6.5.0, + any.process-extras ==0.7.4, + any.profunctors ==5.5.1, + any.psqueues ==0.2.7.2, + any.quickcheck-instances ==0.3.22, + quickcheck-instances -bytestring-builder, + any.quickcheck-io ==0.2.0, + any.random ==1.1, + any.refact ==0.3.0.2, + any.reflection ==2.1.5, + reflection -slow +template-haskell, + any.resourcet ==1.2.2, + any.rope-utf16-splay ==0.3.1.0, + any.rts ==1.0, + any.safe ==0.3.18, + any.safe-exceptions ==0.1.7.0, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semialign ==1.1, + semialign +semigroupoids, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.18.5, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.simple-sendfile ==0.2.30, + simple-sendfile +allow-bsd, + any.singleton-bool ==0.1.5, + any.socks ==0.6.1, + any.sorted-list ==0.2.1.0, + any.split ==0.2.3.3, + any.splitmix ==0.0.3, + splitmix -optimised-mixer +random, + any.stm ==2.5.0.0, + any.stm-delay ==0.1.1.1, + any.storable-record ==0.0.4, + storable-record -buildtests +splitbase, + any.storable-tuple ==0.0.3.3, + storable-tuple +splitbase, + any.streaming-commons ==0.2.1.2, + streaming-commons -use-bytestring-builder, + any.strict ==0.3.2, + strict +split-base, + any.strict-list ==0.1.5, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tagsoup ==0.14.8, + any.tar ==0.5.1.1, + tar -old-bytestring -old-time, + any.template-haskell ==2.14.0.0, + any.temporary ==1.2.1.1, + any.terminfo ==0.4.1.2, + any.text ==1.2.3.1, + any.tf-random ==0.5, + any.th-abstraction ==0.3.1.0, + any.these ==1.0.1, + these +aeson +assoc +quickcheck +semigroupoids, + any.time ==1.8.0.2, + any.time-compat ==1.9.2.2, + time-compat -old-locale, + any.time-manager ==0.0.0, + any.tls ==1.5.3, + tls +compat -hans +network, + any.tls-session-manager ==0.0.4, + any.topograph ==1, + any.transformers ==0.5.6.2, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.5, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.typed-process ==0.2.6.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unix-time ==0.4.7, + any.unliftio ==0.2.12, + any.unliftio-core ==0.1.2.0, + any.unordered-containers ==0.2.10.0, + unordered-containers -debug, + any.unsafe ==0.0, + any.utf8-string ==1.0.1.1, + any.utility-ht ==0.0.14, + any.uuid-types ==1.0.3, + any.vault ==0.3.1.3, + vault +useghc, + any.vector ==0.12.0.3, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-algorithms ==0.8.0.3, + vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, + any.versions ==3.5.1.1, + any.void ==0.7.3, + void -safe, + any.wai ==3.2.2.1, + any.wai-logger ==2.3.6, + any.warp ==3.3.5, + warp +allow-sendfilefd -network-bytestring -warp-debug, + any.warp-tls ==3.2.9, + any.word8 ==0.1.3, + any.x509 ==1.7.5, + any.x509-store ==1.6.7, + any.x509-system ==1.6.6, + any.x509-validation ==1.6.11, + any.xdg-basedir ==0.2.2, + any.xhtml ==3000.2.2.1, + any.yaml ==0.11.2.0, + yaml +no-examples +no-exe, + any.zlib ==0.6.2.1, + zlib -non-blocking-ffi -pkg-config diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index df08b53f8..a78155611 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -42,8 +42,10 @@ getGhcPathOfOrThrowError versionNumber = cabalBuildHie :: VersionNumber -> Action () cabalBuildHie versionNumber = do ghcPath <- getGhcPathOfOrThrowError versionNumber + projectFile <- getCabalProjectFile versionNumber execCabal_ [ "v2-build" + , "--project-file=" <> projectFile , "-w", ghcPath , "--write-ghc-environment-files=never" , "--max-backjumps=5000" @@ -54,6 +56,7 @@ cabalInstallHie versionNumber = do localBin <- getLocalBin cabalVersion <- getCabalVersion ghcPath <- getGhcPathOfOrThrowError versionNumber + projectFile <- getCabalProjectFile versionNumber let isCabal3 = checkVersion [3,0,0,0] cabalVersion installDirOpt | isCabal3 = "--installdir" @@ -62,6 +65,7 @@ cabalInstallHie versionNumber = do | otherwise = [] execCabal_ $ [ "v2-install" + , "--project-file=" <> projectFile , "-w", ghcPath , "--write-ghc-environment-files=never" , installDirOpt, localBin @@ -129,3 +133,15 @@ requiredCabalVersion | isWindowsSystem = requiredCabalVersionForWindows requiredCabalVersionForWindows :: RequiredVersion requiredCabalVersionForWindows = [3, 0, 0, 0] + + +defaultProjectFile :: FilePath +defaultProjectFile = "cabal.project" + +getCabalProjectFile :: VersionNumber -> Action FilePath +getCabalProjectFile versionNumber = do + let versionedProjectFile = "cabal.project." <> versionNumber + tryFile <- doesFileExist versionedProjectFile + case tryFile of + True -> need [versionedProjectFile] >> pure versionedProjectFile + False -> need [defaultProjectFile] >> pure defaultProjectFile From 93ecb1ec9f926f5cef3c7bda4948241d96a3c6f6 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 7 Jan 2020 15:09:27 +0100 Subject: [PATCH 052/270] Add script to regenerate freeze files --- regen-freeze-files.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 regen-freeze-files.sh diff --git a/regen-freeze-files.sh b/regen-freeze-files.sh new file mode 100755 index 000000000..adfaca7b8 --- /dev/null +++ b/regen-freeze-files.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -eu + +status_message() { + printf "\\033[0;32m%s\\033[0m\\n" "$1" +} + +warning_message() { + printf "\\033[1;33m%s\\033[0m\\n" "$1" +} + +shopt -s extglob + +cabal v2-update --write-ghc-environment-files=never + +for project_file in cabal.project.!(*.freeze) ; do + unset ghc_ver freeze_file + ghc_ver=${project_file#cabal.project.} + freeze_file=${project_file}.freeze + if command -V ghc-${ghc_ver} >/dev/null 2>&1 ; then + status_message "Generating ${freeze_file}" + [ -f "${freeze_file}" ] && rm "${freeze_file}" + cabal v2-freeze \ + --write-ghc-environment-files=never \ + -w ghc-${ghc_ver} \ + --project-file=${project_file} + awk " + BEGIN{print \"with-compiler: ghc-${ghc_ver}\n\"} + {print \$0}" "${freeze_file}" > "${freeze_file}.tmp" + mv "${freeze_file}.tmp" "${freeze_file}" + else + warning_message "Missing ghc-${ghc_ver}, skipping freeze file generation" + fi +done + +# vim: tabstop=4 shiftwidth=4 expandtab + From b202c8bbd7987770986fd55f0c262533c039573d Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 7 Jan 2020 23:28:09 +0100 Subject: [PATCH 053/270] Pin index state --- cabal.project | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cabal.project b/cabal.project index cc18fadd3..c8c3c4b03 100644 --- a/cabal.project +++ b/cabal.project @@ -15,3 +15,5 @@ constraints: hie-plugin-api +pedantic write-ghc-environment-files: never + +index-state: 2020-01-07T22:09:46Z From 06569b72b21b45f2a12fb7aab683490a55d74304 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 7 Jan 2020 23:29:38 +0100 Subject: [PATCH 054/270] Add update-index-state.sh script This is kinda heavy, but it should work well on 32bit and 64bit arches. The alternative was to copy-paste a lot of cabal-install code that is not exposed. There seems to be no value in that for a development script. The alternative to this script is simply running 'cabal v2-update' twice and then copy-pasting the output manually to cabal.project. --- update-index-state.sh | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 update-index-state.sh diff --git a/update-index-state.sh b/update-index-state.sh new file mode 100755 index 000000000..356f6d596 --- /dev/null +++ b/update-index-state.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +set -eu + +status_message() { + printf "\\033[0;32m%s\\033[0m\\n" "$1" +} + +error_message() { + printf "\\033[0;31m%s\\033[0m\\n" "$1" +} + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +CACHE_LOCATION="${HOME}/.cabal/packages/hackage.haskell.org/01-index.cache" + +if [ ! -f "${CACHE_LOCATION}" ] ; then + error_message "${CACHE_LOCATION} does not exist, did you run 'cabal update'?" + exit 1 +fi + +if [ ! -f "${SCRIPTPATH}/cabal.project" ] ; then + error_message "Could not find ${SCRIPTPATH}/cabal.project, skipping index state update." + exit 3 +fi + +cabal v2-update + +arch=$(getconf LONG_BIT) + +case "${arch}" in +32) + byte_size=4 + magic_word="CABA1002" + ;; +64) + byte_size=8 + magic_word="00000000CABA1002" + ;; +*) + error_message "Unknown architecture (long bit): ${arch}" + exit 2 + ;; +esac + +# This is the logic to parse the binary format of 01-index.cache. +# The first word is a magic 'caba1002', the second one is the timestamp in unix epoch. +# Better than copying the cabal-install source code. +if [ "$(xxd -u -p -l${byte_size} -s 0 "${CACHE_LOCATION}")" != "${magic_word}" ] ; then + error_message "Magic word does not match!" + exit 4 +fi +cache_timestamp=$(echo "ibase=16;obase=A;$(xxd -u -p -l${byte_size} -s ${byte_size} "${CACHE_LOCATION}")" | bc) + +# If we got junk from the binary file, this should fail. +cache_date=$(date --utc --date "@${cache_timestamp}" "+%FT%TZ") + + +status_message "Updating index state in ${SCRIPTPATH}/cabal.project" + +if grep -q "^index-state: .*" "${SCRIPTPATH}/cabal.project" ; then + awk '/index-state:/ {gsub(/.*/, "index-state: '${cache_date}'")}; { print }' "${SCRIPTPATH}/cabal.project" > "${SCRIPTPATH}/cabal.project.tmp" + mv "${SCRIPTPATH}/cabal.project.tmp" "${SCRIPTPATH}/cabal.project" +else + printf "index-state: %s\n" "${cache_date}" >> "${SCRIPTPATH}/cabal.project" +fi + From 8164e43191c3291acf677e6e638b6f35e7384a15 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 7 Jan 2020 23:30:09 +0100 Subject: [PATCH 055/270] Revert "Add script to regenerate freeze files" This reverts commit 93ecb1ec9f926f5cef3c7bda4948241d96a3c6f6. --- regen-freeze-files.sh | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100755 regen-freeze-files.sh diff --git a/regen-freeze-files.sh b/regen-freeze-files.sh deleted file mode 100755 index adfaca7b8..000000000 --- a/regen-freeze-files.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -status_message() { - printf "\\033[0;32m%s\\033[0m\\n" "$1" -} - -warning_message() { - printf "\\033[1;33m%s\\033[0m\\n" "$1" -} - -shopt -s extglob - -cabal v2-update --write-ghc-environment-files=never - -for project_file in cabal.project.!(*.freeze) ; do - unset ghc_ver freeze_file - ghc_ver=${project_file#cabal.project.} - freeze_file=${project_file}.freeze - if command -V ghc-${ghc_ver} >/dev/null 2>&1 ; then - status_message "Generating ${freeze_file}" - [ -f "${freeze_file}" ] && rm "${freeze_file}" - cabal v2-freeze \ - --write-ghc-environment-files=never \ - -w ghc-${ghc_ver} \ - --project-file=${project_file} - awk " - BEGIN{print \"with-compiler: ghc-${ghc_ver}\n\"} - {print \$0}" "${freeze_file}" > "${freeze_file}.tmp" - mv "${freeze_file}.tmp" "${freeze_file}" - else - warning_message "Missing ghc-${ghc_ver}, skipping freeze file generation" - fi -done - -# vim: tabstop=4 shiftwidth=4 expandtab - From f2881f23965b261c03308743cd1116db88b46663 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 7 Jan 2020 23:30:12 +0100 Subject: [PATCH 056/270] Revert "Add cabal freeze files and use them automatically" This reverts commit 8e61c599d468a8674d559c49890609bfeec73c67. --- cabal.project.8.4.1 | 1 - cabal.project.8.4.1.freeze | 336 ------------------------------------ cabal.project.8.4.2 | 1 - cabal.project.8.4.2.freeze | 336 ------------------------------------ cabal.project.8.4.3 | 1 - cabal.project.8.4.3.freeze | 336 ------------------------------------ cabal.project.8.4.4 | 1 - cabal.project.8.4.4.freeze | 336 ------------------------------------ cabal.project.8.6.1 | 1 - cabal.project.8.6.1.freeze | 337 ------------------------------------- cabal.project.8.6.2 | 1 - cabal.project.8.6.2.freeze | 337 ------------------------------------- cabal.project.8.6.3 | 1 - cabal.project.8.6.3.freeze | 337 ------------------------------------- cabal.project.8.6.5 | 1 - cabal.project.8.6.5.freeze | 337 ------------------------------------- install/src/Cabal.hs | 16 -- 17 files changed, 2716 deletions(-) delete mode 120000 cabal.project.8.4.1 delete mode 100644 cabal.project.8.4.1.freeze delete mode 120000 cabal.project.8.4.2 delete mode 100644 cabal.project.8.4.2.freeze delete mode 120000 cabal.project.8.4.3 delete mode 100644 cabal.project.8.4.3.freeze delete mode 120000 cabal.project.8.4.4 delete mode 100644 cabal.project.8.4.4.freeze delete mode 120000 cabal.project.8.6.1 delete mode 100644 cabal.project.8.6.1.freeze delete mode 120000 cabal.project.8.6.2 delete mode 100644 cabal.project.8.6.2.freeze delete mode 120000 cabal.project.8.6.3 delete mode 100644 cabal.project.8.6.3.freeze delete mode 120000 cabal.project.8.6.5 delete mode 100644 cabal.project.8.6.5.freeze diff --git a/cabal.project.8.4.1 b/cabal.project.8.4.1 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.4.1 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.1.freeze b/cabal.project.8.4.1.freeze deleted file mode 100644 index 6cfb757ac..000000000 --- a/cabal.project.8.4.1.freeze +++ /dev/null @@ -1,336 +0,0 @@ -with-compiler: ghc-8.4.1 - -constraints: any.Cabal ==2.2.0.0, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.5.0.0, - any.array ==0.5.2.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.11.0.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.5.1, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.5.11.0, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.3.0, - any.deque ==0.4.3, - any.directory ==1.3.1.5, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.4.1, - any.ghc-boot ==8.4.1, - any.ghc-boot-th ==8.4.1, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.2.0, - any.ghci ==8.4.1, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.19.0.1, - any.haddock-library ==1.5.0.1, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.1.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.13.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.1, - any.text ==1.2.3.0, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.4.2 b/cabal.project.8.4.2 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.4.2 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.2.freeze b/cabal.project.8.4.2.freeze deleted file mode 100644 index 612e469b1..000000000 --- a/cabal.project.8.4.2.freeze +++ /dev/null @@ -1,336 +0,0 @@ -with-compiler: ghc-8.4.2 - -constraints: any.Cabal ==2.2.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.5.0.0, - any.array ==0.5.2.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.11.1.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.5.1, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.5.11.0, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.3.0, - any.deque ==0.4.3, - any.directory ==1.3.1.5, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.4.2, - any.ghc-boot ==8.4.2, - any.ghc-boot-th ==8.4.2, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.2.0, - any.ghci ==8.4.2, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.20.0, - any.haddock-library ==1.6.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.13.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.1, - any.text ==1.2.3.0, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.4.3 b/cabal.project.8.4.3 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.4.3 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.3.freeze b/cabal.project.8.4.3.freeze deleted file mode 100644 index 9cf8399f3..000000000 --- a/cabal.project.8.4.3.freeze +++ /dev/null @@ -1,336 +0,0 @@ -with-compiler: ghc-8.4.3 - -constraints: any.Cabal ==2.2.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.5.0.0, - any.array ==0.5.2.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.11.1.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.5.1, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.5.11.0, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.3.0, - any.deque ==0.4.3, - any.directory ==1.3.1.5, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.4.3, - any.ghc-boot ==8.4.3, - any.ghc-boot-th ==8.4.3, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.2.0, - any.ghci ==8.4.3, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.20.0, - any.haddock-library ==1.6.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.13.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.1, - any.text ==1.2.3.0, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.4.4 b/cabal.project.8.4.4 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.4.4 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.4.4.freeze b/cabal.project.8.4.4.freeze deleted file mode 100644 index b25b81d95..000000000 --- a/cabal.project.8.4.4.freeze +++ /dev/null @@ -1,336 +0,0 @@ -with-compiler: ghc-8.4.4 - -constraints: any.Cabal ==2.2.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.5.0.0, - any.array ==0.5.2.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.11.1.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.5.1, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.5.11.0, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.3.0, - any.deque ==0.4.3, - any.directory ==1.3.1.5, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.4.4, - any.ghc-boot ==8.4.4, - any.ghc-boot-th ==8.4.4, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.2.0, - any.ghci ==8.4.4, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.20.0, - any.haddock-library ==1.6.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.4.5.1, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.13.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.1, - any.text ==1.2.3.1, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.1 b/cabal.project.8.6.1 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.6.1 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.1.freeze b/cabal.project.8.6.1.freeze deleted file mode 100644 index b955f9ef9..000000000 --- a/cabal.project.8.6.1.freeze +++ /dev/null @@ -1,337 +0,0 @@ -with-compiler: ghc-8.6.1 - -constraints: any.Cabal ==2.4.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.6.0.0, - any.array ==0.5.2.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.12.0.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.6.0, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.6.0.1, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.4.0, - any.deque ==0.4.3, - any.directory ==1.3.3.0, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2.1, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.6.1, - any.ghc-boot ==8.6.1, - any.ghc-boot-th ==8.6.1, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-heap ==8.6.1, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.3, - any.ghci ==8.6.1, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.22.0, - any.haddock-library ==1.7.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.14.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.2, - any.text ==1.2.3.1, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.2 b/cabal.project.8.6.2 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.6.2 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.2.freeze b/cabal.project.8.6.2.freeze deleted file mode 100644 index 4fba8538f..000000000 --- a/cabal.project.8.6.2.freeze +++ /dev/null @@ -1,337 +0,0 @@ -with-compiler: ghc-8.6.2 - -constraints: any.Cabal ==2.4.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.6.0.0, - any.array ==0.5.3.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.12.0.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.6.0, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.6.0.1, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.4.0, - any.deque ==0.4.3, - any.directory ==1.3.3.0, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2.1, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.6.2, - any.ghc-boot ==8.6.2, - any.ghc-boot-th ==8.6.2, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-heap ==8.6.2, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.3, - any.ghci ==8.6.2, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.22.0, - any.haddock-library ==1.7.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.14.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.2, - any.text ==1.2.3.1, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.3 b/cabal.project.8.6.3 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.6.3 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.3.freeze b/cabal.project.8.6.3.freeze deleted file mode 100644 index 82ef37f8f..000000000 --- a/cabal.project.8.6.3.freeze +++ /dev/null @@ -1,337 +0,0 @@ -with-compiler: ghc-8.6.3 - -constraints: any.Cabal ==2.4.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.6.0.0, - any.array ==0.5.3.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.12.0.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.6.0, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.6.0.1, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.4.0, - any.deque ==0.4.3, - any.directory ==1.3.3.0, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2.1, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.6.3, - any.ghc-boot ==8.6.3, - any.ghc-boot-th ==8.6.3, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-heap ==8.6.3, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.3, - any.ghci ==8.6.3, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.22.0, - any.haddock-library ==1.7.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.3.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.14.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.2, - any.text ==1.2.3.1, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.5.0, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/cabal.project.8.6.5 b/cabal.project.8.6.5 deleted file mode 120000 index b4c9ceac5..000000000 --- a/cabal.project.8.6.5 +++ /dev/null @@ -1 +0,0 @@ -cabal.project \ No newline at end of file diff --git a/cabal.project.8.6.5.freeze b/cabal.project.8.6.5.freeze deleted file mode 100644 index 6ef2ec333..000000000 --- a/cabal.project.8.6.5.freeze +++ /dev/null @@ -1,337 +0,0 @@ -with-compiler: ghc-8.6.5 - -constraints: any.Cabal ==2.4.0.1, - any.Diff ==0.4.0, - any.HUnit ==1.6.0.0, - any.ListLike ==4.6.3, - any.QuickCheck ==2.13.2, - QuickCheck +templatehaskell, - any.SHA ==1.6.4.4, - SHA -exe, - any.StateVar ==1.2, - any.adjunctions ==4.4, - any.aeson ==1.4.6.0, - aeson -bytestring-builder -cffi -developer -fast, - any.aeson-pretty ==0.8.8, - aeson-pretty -lib-only, - any.alex ==3.2.5, - alex +small_base, - any.ansi-terminal ==0.10.2, - ansi-terminal -example, - any.ansi-wl-pprint ==0.6.9, - ansi-wl-pprint -example, - any.appar ==0.1.8, - any.apply-refact ==0.6.0.0, - any.array ==0.5.3.0, - any.asn1-encoding ==0.9.6, - any.asn1-parse ==0.9.5, - any.asn1-types ==0.3.3, - any.assoc ==1.0.1, - any.async ==2.2.2, - async -bench, - any.attoparsec ==0.13.2.3, - attoparsec -developer, - any.auto-update ==0.1.6, - any.base ==4.12.0.0, - any.base-compat ==0.11.0, - any.base-orphans ==0.8.1, - any.base-prelude ==1.3, - any.base16-bytestring ==0.1.1.6, - any.basement ==0.0.11, - any.bifunctors ==5.5.6, - bifunctors +semigroups +tagged, - any.binary ==0.8.6.0, - any.blaze-builder ==0.4.1.0, - any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.3, - any.brittany ==0.12.1.1, - brittany -brittany-dev-lib -brittany-test-perf, - any.bsb-http-chunked ==0.0.0.4, - any.butcher ==1.3.2.3, - any.byteorder ==1.0.4, - any.bytestring ==0.10.8.2, - any.bytestring-trie ==0.2.5.0, - any.cabal-doctest ==1.0.8, - any.cabal-helper ==1.0.0.0, - cabal-helper -dev, - any.cabal-plan ==0.6.2.0, - cabal-plan -_ +exe -license-report, - any.call-stack ==0.2.0, - any.case-insensitive ==1.2.1.0, - any.cereal ==0.5.8.1, - cereal -bytestring-builder, - any.charset ==0.3.7.1, - any.clock ==0.7.2, - clock -llvm, - any.cmdargs ==0.10.20, - cmdargs +quotation -testprog, - any.colour ==2.3.5, - any.comonad ==5.0.6, - comonad +containers +distributive +test-doctests, - any.conduit ==1.3.1.2, - any.conduit-extra ==1.3.4, - any.conduit-parse ==0.2.1.0, - conduit-parse -enable-hlint-test, - any.connection ==0.3.1, - any.constrained-dynamic ==0.1.0.0, - any.constraints ==0.11.2, - any.containers ==0.6.0.1, - any.contravariant ==1.5.2, - contravariant +semigroups +statevar +tagged, - any.cookie ==0.4.5, - any.cpphs ==1.20.8, - any.cryptohash-sha1 ==0.11.100.1, - any.cryptonite ==0.26, - cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse, - any.czipwith ==1.0.1.2, - any.data-default ==0.7.1.1, - any.data-default-class ==0.1.2.0, - any.data-default-instances-containers ==0.0.1, - any.data-default-instances-dlist ==0.0.1, - any.data-default-instances-old-locale ==0.0.1, - any.data-tree-print ==0.1.0.2, - any.dec ==0.0.3, - any.deepseq ==1.4.4.0, - any.deque ==0.4.3, - any.directory ==1.3.3.0, - any.distributive ==0.6.1, - distributive +semigroups +tagged, - any.dlist ==0.8.0.7, - any.dyre ==0.8.12, - any.easy-file ==0.2.2, - any.exceptions ==0.10.4, - exceptions +transformers-0-4, - any.executable-path ==0.0.3.1, - any.extra ==1.6.18, - any.fast-logger ==3.0.0, - any.file-embed ==0.0.11.1, - any.filemanip ==0.3.6.3, - any.filepath ==1.4.2.1, - any.filepattern ==0.1.1, - any.fingertree ==0.1.4.2, - any.floskell ==0.10.2, - any.fmlist ==0.9.3, - any.fold-debounce ==0.2.0.9, - any.foundation ==0.0.25, - foundation -bench-all -bounds-check -doctest -experimental -linktest -minimal-deps, - any.free ==5.1.3, - any.generic-deriving ==1.13.1, - generic-deriving +base-4-9, - any.ghc ==8.6.5, - any.ghc-boot ==8.6.5, - any.ghc-boot-th ==8.6.5, - any.ghc-exactprint ==0.6.2, - ghc-exactprint -dev -roundtrip, - any.ghc-heap ==8.6.5, - any.ghc-lib-parser ==8.8.1.20191204, - any.ghc-paths ==0.1.0.12, - any.ghc-prim ==0.5.3, - any.ghci ==8.6.5, - any.githash ==0.1.3.3, - any.gitrev ==1.3.1, - any.haddock-api ==2.22.0, - any.haddock-library ==1.7.0, - any.happy ==1.19.12, - happy +small_base, - any.hashable ==1.3.0.0, - hashable -examples +integer-gmp +sse2 -sse41, - haskell-ide-engine +pedantic, - any.haskell-lsp ==0.19.0.0, - haskell-lsp -demo, - any.haskell-lsp-types ==0.19.0.0, - any.haskell-src-exts ==1.21.1, - any.haskell-src-exts-util ==0.2.5, - any.hie-bios ==0.3.2, - hie-plugin-api -pedantic, - any.hlint ==2.2.5, - hlint -ghc-lib +gpl +threaded, - any.hoogle ==5.0.17.11, - any.hourglass ==0.2.12, - any.hpc ==0.6.0.3, - any.hsc2hs ==0.68.6, - hsc2hs -in-ghc-tree, - any.hscolour ==1.24.4, - any.hsimport ==0.11.0, - any.hslogger ==1.3.1.0, - hslogger +network--gt-3_0_0, - any.hspec ==2.7.1, - any.hspec-core ==2.7.1, - any.hspec-discover ==2.7.1, - any.hspec-expectations ==0.8.2, - any.http-client ==0.6.4, - http-client +network-uri, - any.http-client-tls ==0.3.5.3, - any.http-conduit ==2.3.7.3, - any.http-date ==0.0.8, - any.http-types ==0.12.3, - any.http2 ==2.0.3, - http2 -devel, - any.ilist ==0.3.1.0, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - integer-logarithms -check-bounds +integer-gmp, - any.invariant ==0.5.3, - any.io-storage ==0.3, - any.iproute ==1.7.8, - any.js-flot ==0.8.3, - any.js-jquery ==3.3.1, - any.kan-extensions ==5.2, - any.lens ==4.18.1, - lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, - any.libyaml ==0.1.1.1, - libyaml -no-unicode -system-libyaml, - any.lifted-async ==0.10.0.4, - any.lifted-base ==0.2.3.12, - any.lsp-test ==0.10.0.0, - any.megaparsec ==8.0.0, - megaparsec -dev, - any.memory ==0.15.0, - memory +support_basement +support_bytestring +support_deepseq +support_foundation, - any.microlens ==0.4.11.2, - any.microlens-th ==0.4.3.2, - any.mime-types ==0.1.0.9, - any.mmap ==0.5.9, - mmap -mmaptest, - any.monad-control ==1.0.2.3, - any.monad-dijkstra ==0.1.1.2, - any.monad-memo ==0.5.1, - any.mono-traversable ==1.0.15.1, - any.monoid-subclasses ==1.0, - any.mtl ==2.2.2, - any.multistate ==0.8.0.2, - multistate -build-example, - any.neat-interpolation ==0.3.2.5, - any.network ==3.1.1.1, - any.network-bsd ==2.8.1.0, - any.network-byte-order ==0.1.2.0, - any.network-uri ==2.6.1.0, - any.old-locale ==1.0.0.7, - any.old-time ==1.1.0.3, - any.optics-core ==0.2, - any.optparse-applicative ==0.15.1.0, - any.optparse-simple ==0.1.1.2, - optparse-simple -build-example, - any.parallel ==3.2.2.0, - any.parsec ==3.1.13.0, - any.parser-combinators ==1.2.1, - parser-combinators -dev, - any.parsers ==0.12.10, - parsers +attoparsec +binary +parsec, - any.pem ==0.2.4, - any.polyparse ==1.13, - any.pretty ==1.1.3.6, - any.primes ==0.2.1.0, - any.primitive ==0.7.0.0, - any.process ==1.6.5.0, - any.process-extras ==0.7.4, - any.profunctors ==5.5.1, - any.psqueues ==0.2.7.2, - any.quickcheck-instances ==0.3.22, - quickcheck-instances -bytestring-builder, - any.quickcheck-io ==0.2.0, - any.random ==1.1, - any.refact ==0.3.0.2, - any.reflection ==2.1.5, - reflection -slow +template-haskell, - any.resourcet ==1.2.2, - any.rope-utf16-splay ==0.3.1.0, - any.rts ==1.0, - any.safe ==0.3.18, - any.safe-exceptions ==0.1.7.0, - any.scientific ==0.3.6.2, - scientific -bytestring-builder -integer-simple, - any.semialign ==1.1, - semialign +semigroupoids, - any.semigroupoids ==5.3.4, - semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, - any.semigroups ==0.18.5, - semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +text +transformers +unordered-containers, - any.setenv ==0.1.1.3, - any.simple-sendfile ==0.2.30, - simple-sendfile +allow-bsd, - any.singleton-bool ==0.1.5, - any.socks ==0.6.1, - any.sorted-list ==0.2.1.0, - any.split ==0.2.3.3, - any.splitmix ==0.0.3, - splitmix -optimised-mixer +random, - any.stm ==2.5.0.0, - any.stm-delay ==0.1.1.1, - any.storable-record ==0.0.4, - storable-record -buildtests +splitbase, - any.storable-tuple ==0.0.3.3, - storable-tuple +splitbase, - any.streaming-commons ==0.2.1.2, - streaming-commons -use-bytestring-builder, - any.strict ==0.3.2, - strict +split-base, - any.strict-list ==0.1.5, - any.syb ==0.7.1, - any.tagged ==0.8.6, - tagged +deepseq +transformers, - any.tagsoup ==0.14.8, - any.tar ==0.5.1.1, - tar -old-bytestring -old-time, - any.template-haskell ==2.14.0.0, - any.temporary ==1.2.1.1, - any.terminfo ==0.4.1.2, - any.text ==1.2.3.1, - any.tf-random ==0.5, - any.th-abstraction ==0.3.1.0, - any.these ==1.0.1, - these +aeson +assoc +quickcheck +semigroupoids, - any.time ==1.8.0.2, - any.time-compat ==1.9.2.2, - time-compat -old-locale, - any.time-manager ==0.0.0, - any.tls ==1.5.3, - tls +compat -hans +network, - any.tls-session-manager ==0.0.4, - any.topograph ==1, - any.transformers ==0.5.6.2, - any.transformers-base ==0.4.5.2, - transformers-base +orphaninstances, - any.transformers-compat ==0.6.5, - transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, - any.type-equality ==1, - any.typed-process ==0.2.6.0, - any.uniplate ==1.6.12, - uniplate +separate_syb +typeable_fingerprint, - any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, - unix-compat -old-time, - any.unix-time ==0.4.7, - any.unliftio ==0.2.12, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - unordered-containers -debug, - any.unsafe ==0.0, - any.utf8-string ==1.0.1.1, - any.utility-ht ==0.0.14, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.3, - vault +useghc, - any.vector ==0.12.0.3, - vector +boundschecks -internalchecks -unsafechecks -wall, - any.vector-algorithms ==0.8.0.3, - vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, - any.versions ==3.5.1.1, - any.void ==0.7.3, - void -safe, - any.wai ==3.2.2.1, - any.wai-logger ==2.3.6, - any.warp ==3.3.5, - warp +allow-sendfilefd -network-bytestring -warp-debug, - any.warp-tls ==3.2.9, - any.word8 ==0.1.3, - any.x509 ==1.7.5, - any.x509-store ==1.6.7, - any.x509-system ==1.6.6, - any.x509-validation ==1.6.11, - any.xdg-basedir ==0.2.2, - any.xhtml ==3000.2.2.1, - any.yaml ==0.11.2.0, - yaml +no-examples +no-exe, - any.zlib ==0.6.2.1, - zlib -non-blocking-ffi -pkg-config diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index a78155611..df08b53f8 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -42,10 +42,8 @@ getGhcPathOfOrThrowError versionNumber = cabalBuildHie :: VersionNumber -> Action () cabalBuildHie versionNumber = do ghcPath <- getGhcPathOfOrThrowError versionNumber - projectFile <- getCabalProjectFile versionNumber execCabal_ [ "v2-build" - , "--project-file=" <> projectFile , "-w", ghcPath , "--write-ghc-environment-files=never" , "--max-backjumps=5000" @@ -56,7 +54,6 @@ cabalInstallHie versionNumber = do localBin <- getLocalBin cabalVersion <- getCabalVersion ghcPath <- getGhcPathOfOrThrowError versionNumber - projectFile <- getCabalProjectFile versionNumber let isCabal3 = checkVersion [3,0,0,0] cabalVersion installDirOpt | isCabal3 = "--installdir" @@ -65,7 +62,6 @@ cabalInstallHie versionNumber = do | otherwise = [] execCabal_ $ [ "v2-install" - , "--project-file=" <> projectFile , "-w", ghcPath , "--write-ghc-environment-files=never" , installDirOpt, localBin @@ -133,15 +129,3 @@ requiredCabalVersion | isWindowsSystem = requiredCabalVersionForWindows requiredCabalVersionForWindows :: RequiredVersion requiredCabalVersionForWindows = [3, 0, 0, 0] - - -defaultProjectFile :: FilePath -defaultProjectFile = "cabal.project" - -getCabalProjectFile :: VersionNumber -> Action FilePath -getCabalProjectFile versionNumber = do - let versionedProjectFile = "cabal.project." <> versionNumber - tryFile <- doesFileExist versionedProjectFile - case tryFile of - True -> need [versionedProjectFile] >> pure versionedProjectFile - False -> need [defaultProjectFile] >> pure defaultProjectFile From e33205599135e30ff3616c252a6219ee2e3b5e11 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 8 Jan 2020 12:43:48 +0100 Subject: [PATCH 057/270] Don't mix stack with cabal (#1557) Fixes #1380 and #1556 * Simplifify targets * Updating docs Co-authored-by: Javier Neira --- .azure/linux-installhs-stack.yml | 8 +-- .azure/windows-installhs-stack.yml | 8 +-- README.md | 28 +++------ docs/Build.md | 26 +++++---- install/hie-install.cabal | 2 + install/src/Cabal.hs | 49 +++++++--------- install/src/Help.hs | 56 ++---------------- install/src/HieInstall.hs | 94 +++++++++++------------------- install/src/Stack.hs | 32 ---------- 9 files changed, 89 insertions(+), 214 deletions(-) diff --git a/.azure/linux-installhs-stack.yml b/.azure/linux-installhs-stack.yml index 086354113..65dd6d5a8 100644 --- a/.azure/linux-installhs-stack.yml +++ b/.azure/linux-installhs-stack.yml @@ -32,9 +32,5 @@ jobs: displayName: Run help of `install.hs` - bash: | source .azure/linux.bashrc - stack install.hs stack-install-cabal - displayName: Run stack-install-cabal target of `install.hs` - - bash: | - source .azure/linux.bashrc - stack install.hs build-latest - displayName: Run build-latest target of `install.hs` + stack install.hs latest + displayName: Run latest target of `install.hs` diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 4dfed9e9d..aed7a1526 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -30,9 +30,5 @@ jobs: displayName: Run help of `install.hs` - bash: | source .azure/windows.bashrc - stack install.hs stack-install-cabal - displayName: Run stack-install-cabal target of `install.hs` - - bash: | - source .azure/windows.bashrc - stack install.hs build-latest - displayName: Run build-latest target of `install.hs` + stack install.hs latest + displayName: Run latest target of `install.hs` diff --git a/README.md b/README.md index 27de2171e..6a62dbe1e 100644 --- a/README.md +++ b/README.md @@ -226,47 +226,35 @@ or using the existing alias script Running the script with cabal on windows requires a cabal version greater or equal to `3.0.0.0`. -Unfortunately, it is still required to have `stack` installed so that the install-script can locate the `local-bin` directory (on Linux `~/.local/bin`) and copy the `hie` binaries to `hie-x.y.z`, which is required for the `hie-wrapper` to function as expected. There are plans to remove this requirement and let users build hie only with one build tool or another. - For brevity, only the `stack`-based commands are presented in the following sections. -##### Install cabal using stack - -Although you can use hie for stack based projects (those which have a `stack.yaml` in the project base directory) without having cabal installed, you will need it for cabal based projects (with only a `.cabal` file or a `cabal.project` one in the project base directory). - -You can install an appropriate cabal version using stack by running: - -```bash -stack ./install.hs stack-install-cabal -``` - ##### Install specific GHC Version Install hie for the latest available and supported GHC version (and hoogle docs): ```bash -stack ./install.hs build +stack ./install.hs hie ``` Install hie for a specific GHC version (and hoogle docs): ```bash stack ./install.hs hie-8.6.5 -stack ./install.hs build-data +stack ./install.hs data ``` The Haskell IDE Engine can also be built with `cabal v2-build` instead of `stack build`. This has the advantage that you can decide how the GHC versions have been installed. -To see what GHC versions are available, the command `stack install.hs cabal-ghcs` can be used. +To see what GHC versions are available, the command `cabal-hie-install ghcs` can be used. It will list all GHC versions that are on the path and their respective installation directory. If you think, this list is incomplete, you can try to modify the PATH variable, such that the executables can be found. -Note, that the targets `cabal-build` and `cabal-build-data` depend on the found GHC versions. +Note, that the targets `hie` and `data` depend on the found GHC versions. They install Haskell IDE Engine only for the found GHC versions. An example output is: ```bash -> stack install.hs cabal-ghcs +> cabal-hie-install ghcs ****************************************************************** Found the following GHC paths: ghc-8.4.4: /opt/bin/ghc-8.4.4 @@ -278,11 +266,11 @@ ghc-8.6.2: /opt/bin/ghc-8.6.2 If your desired ghc has been found, you use it to install Haskell IDE Engine. ```bash -stack install.hs cabal-hie-8.4.4 -stack install.hs cabal-build-data +cabal-hie-install hie-8.4.4 +cabal-hie-install data ``` -In general, targets that use `cabal` instead of `stack` are prefixed with `cabal-*` and are identical to their counterpart, except they do not install a GHC if it is missing but fail. +In general, executing targets with `cabal` instead of `stack` have the same behaviour, except they do not install a GHC if it is missing but fail. ##### Multiple versions of HIE (optional) diff --git a/docs/Build.md b/docs/Build.md index 289107ba0..7868fc350 100644 --- a/docs/Build.md +++ b/docs/Build.md @@ -27,18 +27,17 @@ See the project's `README` for detailed information about installing `hie`. The build script `install.hs` defines several targets using the `shake` build system. The targets are roughly: * `hie-*`: builds and installs the `hie` binaries. Also renames the binaries to contain the correct version-number. -* `build-latest`: builds and installs `hie` for the latest available and supported `ghc` version. -* `build-data`: builds the hoogle-db required by `hie` -* `build`: builds and installs `hie` for the latest supported `ghc` version (like `build-latest`) and the hoogle-db (like `build-data`) -* `cabal-*`: execute the same task as the original target, but with `cabal` instead of `stack` +* `latest`: builds and installs `hie` for the latest available and supported `ghc` version. +* `data`: builds the hoogle-db required by `hie` +* `hie`: builds and installs `hie` for the latest supported `ghc` version (like `latest`) and the hoogle-db (like `data`) -Each `stack-*.yaml` contains references to packages in the submodules. Calling `stack` with one of those causes the build to fail if the submodules have not been initialized already. The file `shake.yaml` solves this issue invoking the `git` binary itself to update the submodules. Moreover, it specifies the correct version of `shake` and is used for installing all run-time dependencies such as `cabal` and `hoogle` if necessary. +Each `stack-*.yaml` contains references to packages in the submodules. Calling `stack` with one of those causes the build to fail if the submodules have not been initialized already. The file `shake.yaml` solves this issue invoking the `git` binary itself to update the submodules. Moreover, it specifies the correct version of `shake` and is used for installing all run-time dependencies such as `hoogle` if necessary. ### Run-time dependencies `hie` depends on a correct environment in order to function properly: -* `cabal-install`: This dependency is required by `hie` to handle correctly projects that are not `stack` based. You can install an appropriate version using `stack` with the `stack-install-cabal` target. +* `cabal-install`: This dependency is required by `hie` to handle correctly projects that are not `stack` based. You can install it using one of the methods listed here: https://www.haskell.org/cabal/#install-upgrade * The `hoogle` database: `hoogle generate` needs to be called with the most-recent `hoogle` version. ### Steps to build `hie` @@ -68,12 +67,21 @@ EOF Then `hie` can be compiled for a specific GHC version: +* For cabal prior to 3.0.0.0 ```bash export GHCP= cabal v2-install exe:hie -w $GHCP \ --write-ghc-environment-files=never --symlink-bindir=$HOME/.local/bin \ --overwrite-policy=always --reinstall ``` +* For cabal 3.0.0.0 or newer +```bash +export GHCP= +cabal v2-install exe:hie -w $GHCP \ + --write-ghc-environment-files=never --installdir=$HOME/.local/bin \ + --overwrite-policy=always --reinstall +``` +* For windows you will need cabal 3.0.0.0 and add the argument `--install-method=copy` The final step is to configure the `hie` client to use a custom `hie-wrapper` script that enables the runtime options for profiling. Such a script could look like this: @@ -88,17 +96,13 @@ The final step is to configure the `hie` client to use a custom `hie-wrapper` sc The `install.hs` script performs some checks to ensure that a correct installation is possible and provide meaningful error messages for known issues. -* `stack` needs to be up-to-date. Version `1.9.3` is required +* `stack` needs to be up-to-date. Version `2.1.1` is required * `cabal` needs to be up-to-date. Version `3.0.0.0` is required for windows systems and `2.4.1.0` for other ones. * `ghc-8.6.3` is broken on windows. Trying to install `hie-8.6.3` on windows is not possible. * When the build fails, an error message, that suggests to remove `.stack-work` directory, is displayed. ### Tradeoffs -#### `stack` is a build dependency - -Currently, `stack` is needed even if you run the script with `cabal` to get the path where install the binaries but there are plans to remove that dependency (see #1380). - #### run `install.hs` with `stack` installs a GHC before running Before the code in `install.hs` can be executed, `stack` installs a `GHC`, depending on the `resolver` field in `shake.yaml`. This is necessary if `install.hs` should be completely functional right after a fresh `git clone` without further configuration. diff --git a/install/hie-install.cabal b/install/hie-install.cabal index 47ae55591..013d246fe 100644 --- a/install/hie-install.cabal +++ b/install/hie-install.cabal @@ -31,6 +31,8 @@ library if flag(run-from-stack) cpp-options: -DRUN_FROM_STACK + else + build-depends: cabal-install-parsers flag run-from-stack description: Inform the application that it is run from stack diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index df08b53f8..5ae3dcb30 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE CPP #-} + module Cabal where import Development.Shake @@ -15,16 +17,26 @@ import System.Directory ( findExecutable import Version import Print import Env -import Stack +import Data.Functor.Identity +#if RUN_FROM_STACK +import Control.Exception ( throwIO ) +#else +import Cabal.Config +#endif + +getInstallDir :: IO FilePath +#if RUN_FROM_STACK +-- we should never hit this codepath +getInstallDir = throwIO $ userError "Stack and cabal should never be mixed" +#else +getInstallDir = runIdentity . cfgInstallDir <$> readConfig +#endif execCabal :: CmdResult r => [String] -> Action r -execCabal = execCabalWithOriginalPath +execCabal = command [] "cabal" execCabal_ :: [String] -> Action () -execCabal_ = execCabalWithOriginalPath - -execCabalWithOriginalPath :: CmdResult r => [String] -> Action r -execCabalWithOriginalPath = withoutStackCachedBinaries . (command [] "cabal") +execCabal_ = command [] "cabal" cabalBuildData :: Action () cabalBuildData = do @@ -39,19 +51,9 @@ getGhcPathOfOrThrowError versionNumber = error (ghcVersionNotFoundFailMsg versionNumber) Just p -> return p -cabalBuildHie :: VersionNumber -> Action () -cabalBuildHie versionNumber = do - ghcPath <- getGhcPathOfOrThrowError versionNumber - execCabal_ - [ "v2-build" - , "-w", ghcPath - , "--write-ghc-environment-files=never" - , "--max-backjumps=5000" - , "--disable-tests"] - cabalInstallHie :: VersionNumber -> Action () cabalInstallHie versionNumber = do - localBin <- getLocalBin + localBin <- liftIO $ getInstallDir cabalVersion <- getCabalVersion ghcPath <- getGhcPathOfOrThrowError versionNumber @@ -65,6 +67,7 @@ cabalInstallHie versionNumber = do , "-w", ghcPath , "--write-ghc-environment-files=never" , installDirOpt, localBin + , "--max-backjumps=5000" , "exe:hie" , "--overwrite-policy=always" ] @@ -84,18 +87,6 @@ cabalInstallHie versionNumber = do ++ minorVerExe ++ " to " ++ localBin -installCabalWithStack :: Action () -installCabalWithStack = do - -- try to find existing `cabal` executable with appropriate version - mbc <- withoutStackCachedBinaries (liftIO (findExecutable "cabal")) - - case mbc of - Just c -> do - cabalVersion <- checkCabal - printLine $ "There is already a cabal executable in $PATH with the required minimum version: " ++ cabalVersion - -- install `cabal-install` if not already installed - Nothing -> execStackShake_ ["install", "cabal-install"] - checkCabal_ :: Action () checkCabal_ = checkCabal >> return () diff --git a/install/src/Help.hs b/install/src/Help.hs index 02b529c8e..c0f600bc6 100644 --- a/install/src/Help.hs +++ b/install/src/Help.hs @@ -78,8 +78,7 @@ helpMessage versions@BuildableVersions {..} = do [emptyTarget] [ generalTargets , defaultTargets - , stackTargets - , cabalTargets + , if isRunFromCabal then [cabalGhcsTarget] else [] , [macosIcuTarget] ] @@ -89,22 +88,6 @@ helpMessage versions@BuildableVersions {..} = do defaultTargets = [buildTarget, buildLatestTarget, buildDataTarget] ++ map hieTarget (getDefaultBuildSystemVersions versions) - stackTargets = - [ stackTarget buildTarget - , stackTarget buildLatestTarget - , stackTarget buildDataTarget - ] - ++ (if isRunFromStack then [stackTarget installCabalTarget] else []) - ++ map (stackTarget . hieTarget) stackVersions - - cabalTargets = - [ cabalGhcsTarget - , cabalTarget buildTarget - , cabalTarget buildLatestTarget - , cabalTarget buildDataTarget - ] - ++ map (cabalTarget . hieTarget) cabalVersions - -- | Empty target. Purpose is to introduce a newline between the targets emptyTarget :: (String, String) emptyTarget = ("", "") @@ -112,29 +95,19 @@ emptyTarget = ("", "") templateTarget :: (String, String) templateTarget = ("", "") -targetWithBuildSystem :: String -> TargetDescription -> TargetDescription -targetWithBuildSystem system (target, description) = - (system ++ "-" ++ target, description ++ "; with " ++ system) - -stackTarget :: TargetDescription -> TargetDescription -stackTarget = targetWithBuildSystem "stack" - -cabalTarget :: TargetDescription -> TargetDescription -cabalTarget = targetWithBuildSystem "cabal" - hieTarget :: String -> TargetDescription hieTarget version = ("hie-" ++ version, "Builds hie for GHC version " ++ version) buildTarget :: TargetDescription -buildTarget = ("build", "Build hie with the latest available GHC and the data files") +buildTarget = ("hie", "Build hie with the latest available GHC and the data files") buildLatestTarget :: TargetDescription -buildLatestTarget = ("build-latest", "Build hie with the latest available GHC") +buildLatestTarget = ("latest", "Build hie with the latest available GHC") buildDataTarget :: TargetDescription buildDataTarget = - ("build-data", "Get the required data-files for `hie` (Hoogle DB)") + ("data", "Get the required data-files for `hie` (Hoogle DB)") -- special targets @@ -146,25 +119,6 @@ helpTarget = ("help", "Show help message including all targets") cabalGhcsTarget :: TargetDescription cabalGhcsTarget = - ( "cabal-ghcs" + ( "ghcs" , "Show all GHC versions that can be installed via `cabal-build`." ) - -installCabalTarget :: TargetDescription -installCabalTarget = - ( "install-cabal" - , "Install the cabal executable. It will install the required minimum version for hie (currently " - ++ versionToString requiredCabalVersion - ++ ") if it isn't already present in $PATH" - ) - --- | Creates a message of the form "a, b, c and d", where a,b,c,d are GHC versions. --- If there is no GHC in the list of `hieVersions` -allVersionMessage :: [String] -> String -allVersionMessage wordList = case wordList of - [] -> "" - [a] -> show a - (a : as) -> - let msg = intersperse ", " wordList - lastVersion = last msg - in concat $ init (init msg) ++ [" and ", lastVersion] diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index ba1c03b78..b0e723ac3 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -48,88 +48,64 @@ defaultMain = do -- used for cabal-based targets ghcPaths <- findInstalledGhcs - let ghcVersions = map fst ghcPaths + let cabalVersions = map fst ghcPaths -- used for stack-based targets - hieVersions <- getHieVersions + stackVersions <- getHieVersions - let versions = BuildableVersions { stackVersions = hieVersions - , cabalVersions = ghcVersions - } + let versions = if isRunFromStack then stackVersions else cabalVersions - let latestVersion = last hieVersions + let toolsVersions = BuildableVersions stackVersions cabalVersions - putStrLn $ "run from: " ++ buildSystem + let latestVersion = last versions shakeArgs shakeOptions { shakeFiles = "_build" } $ do want ["short-help"] -- general purpose targets phony "submodules" updateSubmodules - phony "cabal" installCabalWithStack phony "short-help" shortHelpMessage - phony "all" shortHelpMessage - phony "help" (helpMessage versions) - phony "check-stack" checkStack - phony "check-cabal" checkCabal_ - - phony "cabal-ghcs" $ do - let - msg = - "Found the following GHC paths: \n" - ++ unlines - (map (\(version, path) -> "ghc-" ++ version ++ ": " ++ path) - ghcPaths - ) - printInStars msg - - -- default-targets - phony "build" $ need [buildSystem ++ "-build"] - phony "build-latest" $ need [buildSystem ++ "-build-latest"] - phony "build-data" $ need [buildSystem ++ "-build-data"] - forM_ - (getDefaultBuildSystemVersions versions) - (\version -> - phony ("hie-" ++ version) $ need [buildSystem ++ "-hie-" ++ version] - ) - - -- stack specific targets - when isRunFromStack (phony "stack-install-cabal" (need ["cabal"])) - phony "stack-build-latest" (need ["stack-hie-" ++ last hieVersions]) - phony "stack-build" (need ["build-data", "stack-build-latest"]) + phony "help" (helpMessage toolsVersions) - phony "stack-build-data" $ do + phony "check" (if isRunFromStack then checkStack else checkCabal_) + + phony "data" $ do need ["submodules"] - need ["check-stack"] - stackBuildData + need ["check"] + if isRunFromStack then stackBuildData else cabalBuildData + forM_ - hieVersions - (\version -> phony ("stack-hie-" ++ version) $ do + versions + (\version -> phony ("hie-" ++ version) $ do need ["submodules"] - need ["check-stack"] - stackBuildHie version - stackInstallHie version + need ["check"] + if isRunFromStack then do + stackBuildHie version + stackInstallHie version + else + cabalInstallHie version ) + phony "latest" (need ["hie-" ++ latestVersion]) + phony "hie" (need ["data", "latest"]) + -- cabal specific targets - phony "cabal-build-latest" (need ["cabal-hie-" ++ last ghcVersions]) - phony "cabal-build" (need ["build-data", "cabal-build-latest"]) - phony "cabal-build-data" $ do - need ["submodules"] - need ["cabal"] - cabalBuildData - forM_ - ghcVersions - (\version -> phony ("cabal-hie-" ++ version) $ do - need ["submodules"] - need ["cabal"] - cabalInstallHie version - ) + when isRunFromCabal $ do + + phony "ghcs" $ do + let + msg = + "Found the following GHC paths: \n" + ++ unlines + (map (\(version, path) -> "ghc-" ++ version ++ ": " ++ path) + ghcPaths + ) + printInStars msg -- macos specific targets phony "icu-macos-fix" (need ["icu-macos-fix-install"] >> need ["icu-macos-fix-build"]) phony "icu-macos-fix-install" (command_ [] "brew" ["install", "icu4c"]) - phony "icu-macos-fix-build" $ mapM_ buildIcuMacosFix hieVersions + phony "icu-macos-fix-build" $ mapM_ buildIcuMacosFix versions buildIcuMacosFix :: VersionNumber -> Action () diff --git a/install/src/Stack.hs b/install/src/Stack.hs index dd054f93e..c33db4432 100644 --- a/install/src/Stack.hs +++ b/install/src/Stack.hs @@ -31,11 +31,6 @@ stackInstallHie versionNumber = do copyFile (localBinDir hie) (localBinDir "hie-" ++ dropExtension versionNumber <.> exe) -buildCopyCompilerTool :: VersionNumber -> Action () -buildCopyCompilerTool versionNumber = - execStackWithGhc_ versionNumber ["build", "--copy-compiler-tool"] - - -- | check `stack` has the required version checkStack :: Action () checkStack = do @@ -101,30 +96,3 @@ stackBuildFailMsg = ++ "If this does not work, open an issue at \n" ++ "\thttps://github.com/haskell/haskell-ide-engine" --- |Run actions without the stack cached binaries -withoutStackCachedBinaries :: Action a -> Action a -withoutStackCachedBinaries action = do - - mbPath <- liftIO (lookupEnv "PATH") - - case (mbPath, isRunFromStack) of - - (Just paths, True) -> do - snapshotDir <- trimmedStdout <$> execStackShake ["path", "--snapshot-install-root"] - localInstallDir <- trimmedStdout <$> execStackShake ["path", "--local-install-root"] - - let cacheBinPaths = [snapshotDir "bin", localInstallDir "bin"] - let origPaths = removePathsContaining cacheBinPaths paths - - liftIO (setEnv "PATH" origPaths) - a <- action - liftIO (setEnv "PATH" paths) - return a - - otherwise -> action - - where removePathsContaining strs path = - joinPaths (filter (not . containsAny) (splitSearchPath path)) - where containsAny p = any (`isInfixOf` p) strs - - joinPaths = intercalate [searchPathSeparator] \ No newline at end of file From 059f354ae473f173b939f266d097c2020dfda741 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Thu, 9 Jan 2020 06:16:12 +0100 Subject: [PATCH 058/270] Enable azure releases and some fixes (#1545) * Publish artifacts * Start to generate hoogle database * Fix windows caching --- .azure/linux-installhs-stack.yml | 6 +-- .azure/linux-stack.yml | 46 ++++++++++++++++---- .azure/macos-installhs-stack.yml | 14 ++----- .azure/macos-stack.yml | 46 ++++++++++++++++---- .azure/windows-installhs-cabal.yml | 24 ++++++----- .azure/windows-installhs-stack.yml | 9 ++-- .azure/windows-stack.yml | 67 +++++++++++++++++++++++------- azure-pipelines.yml | 27 ++++++++++++ 8 files changed, 176 insertions(+), 63 deletions(-) diff --git a/.azure/linux-installhs-stack.yml b/.azure/linux-installhs-stack.yml index 65dd6d5a8..0fc930ed1 100644 --- a/.azure/linux-installhs-stack.yml +++ b/.azure/linux-installhs-stack.yml @@ -3,10 +3,8 @@ jobs: timeoutInMinutes: 0 pool: vmImage: ubuntu-16.04 - strategy: - matrix: - shake: - YAML_FILE: install/shake.yaml + variables: + YAML_FILE: install/shake.yaml steps: - bash: | export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 806ee2846..1eaf57df5 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -26,27 +26,26 @@ jobs: variables: STACK_ROOT: /home/vsts/.stack steps: - - task: CacheBeta@0 + - task: Cache@2 inputs: - key: stack-root | $(Agent.OS) | $(Build.SourcesDirectory)/$(YAML_FILE) + key: '"stack-root" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" - bash: | mkdir -p $STACK_ROOT - tar -xzf .azure-cache/stack-root.tar.gz -C / + tar -vxzf .azure-cache/stack-root.tar.gz -C / mkdir -p .stack-work - tar -xzf .azure-cache/stack-work.tar.gz + tar -vxzf .azure-cache/stack-work.tar.gz displayName: "Unpack cache" condition: eq(variables.CACHE_RESTORED, 'true') - bash: | git submodule sync git submodule update --init - displayName: Sync submodules - bash: | mkdir -p ~/.local/bin curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | \ - tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' + tar vxz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' displayName: Install stack - bash: | source .azure/linux.bashrc @@ -60,10 +59,29 @@ jobs: source .azure/linux.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie` + - bash: | + source .azure/linux.bashrc + stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests + mkdir .azure-deploy + stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy + cd .azure-deploy + if [ $YAML_FILE != "stack.yaml" ]; then + GHC_MINOR_VERSION=${YAML_FILE:6:5} + GHC_MAJOR_VERSION=${YAML_FILE:6:3} + cp hie hie-$GHC_MINOR_VERSION + cp hie hie-$GHC_MAJOR_VERSION + else + GHC_MINOR_VERSION=nightly + fi + stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" + mkdir -p data + cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data + ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-linux-x86_64 + tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * + displayName: Install `hie` - bash: | source .azure/linux.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies - stack install --stack-yaml $(YAML_FILE) # `hie` binary required for tests displayName: Build Test-dependencies - bash: | sudo apt update @@ -73,12 +91,22 @@ jobs: source .azure/linux.bashrc stack install --resolver=lts-11.18 liquid-fixpoint-0.7.0.7 dotgen-0.4.2 fgl-visualize-0.1.0.1 located-base-0.1.1.1 liquidhaskell-0.8.2.4 displayName: "Install Runtime Test-Dependencies: liquidhaskell" + - bash: | + source .azure/linux.bashrc + stack build hoogle --stack-yaml=$(YAML_FILE) + stack exec hoogle generate --stack-yaml=$(YAML_FILE) + displayName: "Install Runtime Test-Dependencies: hoogle database" # - bash: | # source .azure/linux.bashrc # stack test --stack-yaml $(YAML_FILE) # displayName: Run Test + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: hie-$(Agent.OS)-$(YAML_FILE) + condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues') - bash: | mkdir -p .azure-cache - tar -czf .azure-cache/stack-root.tar.gz $STACK_ROOT - tar -czf .azure-cache/stack-work.tar.gz .stack-work + tar -vczf .azure-cache/stack-root.tar.gz $STACK_ROOT + tar -vczf .azure-cache/stack-work.tar.gz .stack-work displayName: "Pack cache" diff --git a/.azure/macos-installhs-stack.yml b/.azure/macos-installhs-stack.yml index df7296193..edabb9cac 100644 --- a/.azure/macos-installhs-stack.yml +++ b/.azure/macos-installhs-stack.yml @@ -3,10 +3,8 @@ jobs: timeoutInMinutes: 0 pool: vmImage: macOS-10.13 - strategy: - matrix: - shake: - YAML_FILE: install/shake.yaml + variables: + YAML_FILE: install/shake.yaml steps: - bash: | export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root @@ -32,9 +30,5 @@ jobs: displayName: Run help of `install.hs` - bash: | source .azure/macos.bashrc - stack install.hs stack-install-cabal - displayName: Run stack-install-cabal target of `install.hs` - - bash: | - source .azure/macos.bashrc - stack install.hs build-latest - displayName: Run build-latest target of `install.hs` + stack install.hs latest + displayName: Run latest target of `install.hs` diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index e7b72a93c..d679bacaa 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -22,17 +22,17 @@ jobs: variables: STACK_ROOT: $(Build.SourcesDirectory)/.stack steps: - - task: CacheBeta@0 + - task: Cache@2 inputs: - key: stack-root | $(Agent.OS) | $(Build.SourcesDirectory)/$(YAML_FILE) + key: '"stack-root" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" - bash: | mkdir -p $STACK_ROOT - tar -xzf .azure-cache/stack-root.tar.gz -C / + tar -vxzf .azure-cache/stack-root.tar.gz -C / mkdir -p .stack-work - tar -xzf .azure-cache/stack-work.tar.gz + tar -vxzf .azure-cache/stack-work.tar.gz displayName: "Unpack cache" condition: eq(variables.CACHE_RESTORED, 'true') - bash: | @@ -42,7 +42,7 @@ jobs: - bash: | mkdir -p ~/.local/bin curl -skL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | \ - tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin; + tar vxz --strip-components=1 --include '*/stack' -C ~/.local/bin; displayName: Install stack - bash: | source .azure/macos.bashrc @@ -56,26 +56,56 @@ jobs: source .azure/macos.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie` + - bash: | + source .azure/macos.bashrc + stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests + mkdir .azure-deploy + stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy + cd .azure-deploy + if [ $YAML_FILE != "stack.yaml" ]; then + GHC_MINOR_VERSION=${YAML_FILE:6:5} + GHC_MAJOR_VERSION=${YAML_FILE:6:3} + cp hie hie-$GHC_MINOR_VERSION + cp hie hie-$GHC_MAJOR_VERSION + else + GHC_MINOR_VERSION=nightly + fi + stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" + mkdir -p data + cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data + ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-macos-x86_64 + tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * + displayName: Install `hie` - bash: | source .azure/macos.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies - stack install --stack-yaml $(YAML_FILE) # `hie` binary required for tests displayName: Build Test-dependencies - bash: | ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew update + brew unlink python@2 brew install z3 displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/macos.bashrc stack install --resolver=lts-11.18 liquid-fixpoint-0.7.0.7 dotgen-0.4.2 fgl-visualize-0.1.0.1 located-base-0.1.1.1 liquidhaskell-0.8.2.4 displayName: "Install Runtime Test-Dependencies: liquidhaskell" + - bash: | + source .azure/macos.bashrc + stack build hoogle --stack-yaml=$(YAML_FILE) + stack exec hoogle generate --stack-yaml=$(YAML_FILE) + displayName: "Install Runtime Test-Dependencies: hoogle database" # - bash: | # source .azure/macos.bashrc # stack test --stack-yaml $(YAML_FILE) # displayName: Run Test + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: hie-$(Agent.OS)-$(YAML_FILE) + condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues') - bash: | mkdir -p .azure-cache - tar -czf .azure-cache/stack-root.tar.gz $STACK_ROOT - tar -czf .azure-cache/stack-work.tar.gz .stack-work + tar -vczf .azure-cache/stack-root.tar.gz $STACK_ROOT + tar -vczf .azure-cache/stack-work.tar.gz .stack-work displayName: "Pack cache" diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index e37d20018..4c488edee 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -6,6 +6,8 @@ jobs: variables: YAML_FILE: install/shake.yaml PROJECT_FILE: install/shake.project + STACK_ROOT: "C:\\sr" + # TODO: Replace stack with chocolatey for installing ghc and cabal steps: - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip @@ -17,21 +19,21 @@ jobs: displayName: Install GHC - bash: | source .azure/windows.bashrc - stack install cabal-install --stack-yaml $(YAML_FILE) + stack install Cabal-3.0.0.0 cabal-install-3.0.0.0 --stack-yaml $(YAML_FILE) displayName: Install `cabal-install` - bash: | source .azure/windows.bashrc - cabal update + cabal v2-update displayName: update cabal - # - bash: | - # source .azure/windows.bashrc - # stack --stack-yaml $(YAML_FILE) build --only-dependencies - # displayName: Build dependencies - - bash: | - source .azure/windows.bashrc - cabal v2-build hie-install -w $(stack path --stack-yaml $(YAML_FILE) --compiler-exe) --project-file $(PROJECT_FILE) - displayName: Build `hie-install` - bash: | source .azure/windows.bashrc - cabal v2-run install.hs -w $(stack path --stack-yaml $(YAML_FILE) --compiler-exe) --project-file $(PROJECT_FILE) help + GHC_PATH=$(stack path --stack-yaml $YAML_FILE --compiler-exe) + cabal v2-run install.hs -w $GHC_PATH --project-file $(PROJECT_FILE) help displayName: Run help of `install.hs` + # - bash: | + # source .azure/windows.bashrc + # GHC_PATH=$(stack path --stack-yaml $YAML_FILE --compiler-exe) + # GHC_DIR=$(dirname $GHC_PATH) + # export PATH=$(cygpath $GHC_DIR):$PATH + # cabal v2-run install.hs -w $GHC_PATH --project-file $(PROJECT_FILE) build-latest + # displayName: Run build-latest target of `install.hs` diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index aed7a1526..3a108c73f 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -3,10 +3,9 @@ jobs: timeoutInMinutes: 0 pool: vmImage: windows-2019 - strategy: - matrix: - shake: - YAML_FILE: install/shake.yaml + variables: + YAML_FILE: install/shake.yaml + STACK_ROOT: "C:\\sr" steps: - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip @@ -18,7 +17,7 @@ jobs: displayName: Install GHC - bash: | source .azure/windows.bashrc - stack --stack-yaml $(YAML_FILE) --install-ghc build --only-dependencies + stack --stack-yaml $(YAML_FILE) build --only-dependencies displayName: Build dependencies - bash: | source .azure/windows.bashrc diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 68b2c4f0f..f1acfd167 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -25,19 +25,19 @@ jobs: STACK_ROOT: "C:\\sr" steps: - - task: CacheBeta@0 + - task: Cache@2 inputs: - key: stack-root | $(Agent.OS) | $(Build.SourcesDirectory)/$(YAML_FILE) - path: $(STACK_ROOT) + key: '"stack-root" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' + path: .azure-cache + cacheHitVar: CACHE_RESTORED displayName: "Cache stack-root" - - task: CacheBeta@0 - inputs: - key: | - "stack-work" - $(Agent.OS) - $(Build.SourcesDirectory)/$(YAML_FILE) - path: .stack-work - displayName: "Cache stack-work" + - bash: | + mkdir -p $STACK_ROOT + tar -vxzf .azure-cache/stack-root.tar.gz -C / + mkdir -p .stack-work + tar -vxzf .azure-cache/stack-work.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') - bash: | git submodule sync git submodule update --init @@ -58,10 +58,29 @@ jobs: source .azure/windows.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie` + - bash: | + source .azure/windows.bashrc + stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests + mkdir .azure-deploy + stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy + cd .azure-deploy + if [ $YAML_FILE != "stack.yaml" ]; then + GHC_MINOR_VERSION=${YAML_FILE:6:5} + GHC_MAJOR_VERSION=${YAML_FILE:6:3} + cp hie.exe hie-$GHC_MINOR_VERSION.exe + cp hie.exe hie-$GHC_MAJOR_VERSION.exe + else + GHC_MINOR_VERSION=nightly + fi + stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" + mkdir -p data + cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data + ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-windows-x86_64 + 7z a "$(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.zip" * + displayName: Install `hie` - bash: | source .azure/windows.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies - stack install --stack-yaml $(YAML_FILE) # `hie` binary required for tests displayName: Build Test-dependencies - bash: | # TODO: try to install automatically (`choco install z3` fails and pacman is not installed) @@ -74,7 +93,23 @@ jobs: stack install --resolver=lts-11.18 liquid-fixpoint-0.7.0.7 dotgen-0.4.2 fgl-visualize-0.1.0.1 located-base-0.1.1.1 liquidhaskell-0.8.2.4 liquid -v displayName: "Install Runtime Test-Dependencies: liquidhaskell" - # - bash: | - # source .azure/windows.bashrc - # stack test --stack-yaml $(YAML_FILE) :unit-test - # displayName: Run Test + - bash: | + source .azure/windows.bashrc + stack build hoogle --stack-yaml=$(YAML_FILE) + stack exec hoogle generate --stack-yaml=$(YAML_FILE) + displayName: "Install Runtime Test-Dependencies: hoogle database" +# - bash: | +# source .azure/windows.bashrc +# stack test --stack-yaml $(YAML_FILE) :unit-test +# displayName: Run Test + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: hie-$(Agent.OS)-$(YAML_FILE) + condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues') + - bash: | + mkdir -p .azure-cache + tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT) + tar -vczf .azure-cache/stack-work.tar.gz .stack-work + displayName: "Pack cache" + \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 57aa8497e..84869439b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,7 +1,34 @@ +# Build master, branches starting with `azure` and tags commits +trigger: + batch: false + branches: + include: + - master + - azure* + tags: + include: + - '*' + paths: + exclude: + - .circleci + - docs + - licenses + - logos + - LICENSE + - '*.md' + +# Enable PR triggers that target the master branch +pr: + autoCancel: true # cancel previous builds on push + branches: + include: + - master + jobs: - template: ./.azure/linux-stack.yml - template: ./.azure/windows-stack.yml - template: ./.azure/macos-stack.yml - template: ./.azure/linux-installhs-stack.yml - template: ./.azure/windows-installhs-stack.yml +- template: ./.azure/windows-installhs-cabal.yml - template: ./.azure/macos-installhs-stack.yml From 52ca3a5321116424acaf84cf118052609a1c7639 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 10 Jan 2020 10:37:35 +0100 Subject: [PATCH 059/270] Exclude ghc-8.8.1 for windows Due to https://gitlab.haskell.org/ghc/ghc/issues/17575 --- install/src/Env.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/src/Env.hs b/install/src/Env.hs index cd8a296bd..b9b75d1cd 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -104,8 +104,8 @@ getHieVersions = do & mapMaybe (T.stripPrefix stackYamlPrefix >=> T.stripSuffix stackYamlSuffix) & map T.unpack - -- the following line excludes `8.6.3` on windows systems - & filter (\p -> not isWindowsSystem || p /= "8.6.3") + -- the following line excludes `8.6.3` and `8.8.1` on windows systems + & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1"])) & sort return hieVersions From 6391efd7cc7aac5e30ed2a01510a4ac8f99f5212 Mon Sep 17 00:00:00 2001 From: fendor Date: Fri, 10 Jan 2020 19:00:05 +0100 Subject: [PATCH 060/270] Load all possible haskell source files --- app/MainHie.hs | 51 ++++++++++++++++++--- app/RunTest.hs | 97 ++++++++++++++++++++++++++++++++++++++++ haskell-ide-engine.cabal | 7 ++- 3 files changed, 149 insertions(+), 6 deletions(-) create mode 100644 app/RunTest.hs diff --git a/app/MainHie.hs b/app/MainHie.hs index dc57abea9..38de30a0a 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -6,9 +6,11 @@ import qualified Control.Exception as E import Control.Monad import Data.Monoid ((<>)) import Data.Version (showVersion) +import qualified Data.Text as T +import qualified Data.Text.IO as T import qualified Data.Yaml as Yaml import HIE.Bios.Types -import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay) +import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay, getProjectGhcLibDir) import Haskell.Ide.Engine.MonadFunctions import Haskell.Ide.Engine.MonadTypes import Haskell.Ide.Engine.Options @@ -20,11 +22,15 @@ import Options.Applicative.Simple import qualified Paths_haskell_ide_engine as Meta import System.Directory import System.Environment -import System.FilePath (()) +import System.FilePath import System.Info import System.IO import qualified System.Log.Logger as L +-- --------------------------------------------------------------------- + +import RunTest + -- --------------------------------------------------------------------- -- plugins @@ -117,6 +123,8 @@ run opts = do progName <- getProgName args <- getArgs + let plugins' = plugins (optExamplePlugin opts) + if optLsp opts then do -- Start up in LSP mode @@ -136,8 +144,6 @@ run opts = do when (optExamplePlugin opts) $ logm "Enabling Example2 plugin, will insert constant diagnostics etc." - let plugins' = plugins (optExamplePlugin opts) - -- launch the dispatcher. scheduler <- newScheduler plugins' initOpts server scheduler origDir plugins' (optCaptureFile opts) @@ -155,7 +161,39 @@ run opts = do ecradle <- getCradleInfo origDir case ecradle of Left e -> cliOut $ "Could not get cradle:" ++ show e - Right cradle -> cliOut $ "Cradle:" ++ cradleDisplay cradle + Right cradle -> do + projGhc <- getProjectGhcVersion cradle + mlibdir <- getProjectGhcLibDir cradle + cliOut "" + cliOut "" + cliOut "###################################################" + cliOut "" + cliOut $ "Cradle: " ++ cradleDisplay cradle + cliOut $ "Project Ghc version: " ++ projGhc + cliOut $ "Libdir: " ++ show mlibdir + cliOut "Searching for Haskell source files..." + targets <- findAllSourceFiles origDir + cliOut $ "Found " ++ show (length targets) ++ " Haskell source files." + cliOut "Load them all now. This may take a very long time." + cliOut "" + cliOut "###################################################" + cliOut "" + cliOut "" + loadDiagnostics <- runServer plugins' targets + + cliOut "" + cliOut "###################################################" + cliOut "###################################################" + cliOut "" + cliOut "Dumping diagnostics:" + cliOut "" + cliOut "" + mapM_ (cliOut' . uncurry prettyPrintDiags) loadDiagnostics + cliOut "" + cliOut "" + cliOut "" + cliOut "Note: loading of 'Setup.hs' is not supported." + -- --------------------------------------------------------------------- @@ -170,4 +208,7 @@ getCradleInfo currentDir = do cliOut :: String -> IO () cliOut = putStrLn +cliOut' :: T.Text -> IO () +cliOut' = T.putStrLn + -- --------------------------------------------------------------------- diff --git a/app/RunTest.hs b/app/RunTest.hs new file mode 100644 index 000000000..c843b50a3 --- /dev/null +++ b/app/RunTest.hs @@ -0,0 +1,97 @@ +{-# LANGUAGE NamedFieldPuns #-} +{-# LANGUAGE TupleSections #-} +{-# LANGUAGE OverloadedStrings #-} +module RunTest + ( findAllSourceFiles + , compileTarget + , runServer + , prettyPrintDiags + ) +where + +import GhcMonad +import GHC +import qualified Data.Text as T +import System.Directory ( doesDirectoryExist + , listDirectory + , canonicalizePath + , getCurrentDirectory + ) +import Haskell.Ide.Engine.PluginsIdeMonads +import qualified Haskell.Ide.Engine.ModuleCache + as MC +import qualified Haskell.Ide.Engine.Ghc as Ghc +import System.FilePath +import Control.Monad +import Data.List ( isPrefixOf ) +import TestUtils ( runIGM ) + +findAllSourceFiles :: FilePath -> IO [FilePath] +findAllSourceFiles dir = do + absDir <- canonicalizePath dir + findFilesRecursively isHaskellSource + (\fp -> any (\p -> p fp) [isHidden, isSpecialDir]) + absDir + where + isHaskellSource = (== ".hs") . takeExtension + isHidden = ("." `isPrefixOf`) . takeFileName + isSpecialDir = (== "dist-newstyle") . takeFileName + +findFilesRecursively + :: (FilePath -> Bool) -> (FilePath -> Bool) -> FilePath -> IO [FilePath] +findFilesRecursively p exclude dir = do + dirContents' <- listDirectory dir + let dirContents = map (dir ) dirContents' + + files <- forM dirContents $ \fp -> do + isDirectory <- doesDirectoryExist fp + if isDirectory + then if not $ exclude fp + then findFilesRecursively p exclude fp + else return [] + else if p fp then return [fp] else return [] + + return $ concat files + + +-- --------------------------------------------------------------------- + +compileTarget + :: DynFlags + -> FilePath + -> IdeGhcM (IdeResult (Ghc.Diagnostics, Ghc.AdditionalErrs)) +compileTarget dynFlags fp = do + let pubDiags _ _ _ = return () + let defAction = return (mempty, mempty) + let action = Ghc.setTypecheckedModule (filePathToUri fp) + actionResult <- MC.runActionWithContext pubDiags + dynFlags + (Just fp) + defAction + action + return $ join actionResult + +-- --------------------------------------------------------------------- + +runServer + :: IdePlugins + -> [FilePath] + -> IO [(FilePath, IdeResult (Ghc.Diagnostics, Ghc.AdditionalErrs))] +runServer ideplugins targets = do + cwd <- getCurrentDirectory + runIGM ideplugins (cwd "File.hs") $ do + dynFlags <- getSessionDynFlags + mapM (\fp -> (fp, ) <$> compileTarget dynFlags fp) targets + +-- --------------------------------------------------------------------- + +prettyPrintDiags + :: FilePath -> IdeResult (Ghc.Diagnostics, Ghc.AdditionalErrs) -> T.Text +prettyPrintDiags fp diags = + T.pack fp <> ": " <> + case diags of + IdeResultFail IdeError { ideMessage } -> "FAILED\n\t" <> ideMessage + IdeResultOk (_diags, errs) -> + if null errs + then "OK" + else T.unlines (map (T.append "\t") errs) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 709530d4e..1f57ab4e8 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -110,18 +110,23 @@ library executable hie hs-source-dirs: app main-is: MainHie.hs - other-modules: Paths_haskell_ide_engine + other-modules: Paths_haskell_ide_engine, RunTest autogen-modules: Paths_haskell_ide_engine build-depends: base + , containers , directory , filepath + , ghc , hie-bios , haskell-ide-engine , haskell-lsp , hie-plugin-api , hslogger , optparse-simple + , text , yaml + -- TODO: this is horrible + , hie-test-utils ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) From 7aa384dc6ab2a2fb8c7995b2bb5c296df093f81e Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 10 Jan 2020 22:33:15 +0100 Subject: [PATCH 061/270] Not use ghc-8.8.1 for windows in azure ci --- .azure/windows-stack.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 0dda3fe00..8943e3774 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -5,10 +5,9 @@ jobs: vmImage: windows-2019 strategy: matrix: - stack-def: - YAML_FILE: stack.yaml - stack-8.8.1: - YAML_FILE: stack-8.8.1.yaml + # We can't use stack.yaml while it uses ghc-8.8.1 + # stack-def: + # YAML_FILE: stack.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: From abf9c1a33b8e63c53cf1022f677736150958ccae Mon Sep 17 00:00:00 2001 From: fendor Date: Mon, 13 Jan 2020 21:31:53 +0100 Subject: [PATCH 062/270] Add dry-run flag and optional filepaths --- app/MainHie.hs | 40 ++++++++--------- app/RunTest.hs | 75 ++++++++++++++++++++++--------- haskell-ide-engine.cabal | 5 ++- src/Haskell/Ide/Engine/Options.hs | 14 +++++- 4 files changed, 87 insertions(+), 47 deletions(-) diff --git a/app/MainHie.hs b/app/MainHie.hs index 38de30a0a..8e1cd5257 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -164,35 +164,31 @@ run opts = do Right cradle -> do projGhc <- getProjectGhcVersion cradle mlibdir <- getProjectGhcLibDir cradle - cliOut "" - cliOut "" - cliOut "###################################################" - cliOut "" + cliOut "\n\n###################################################\n" cliOut $ "Cradle: " ++ cradleDisplay cradle cliOut $ "Project Ghc version: " ++ projGhc cliOut $ "Libdir: " ++ show mlibdir cliOut "Searching for Haskell source files..." - targets <- findAllSourceFiles origDir - cliOut $ "Found " ++ show (length targets) ++ " Haskell source files." - cliOut "Load them all now. This may take a very long time." - cliOut "" - cliOut "###################################################" - cliOut "" - cliOut "" - loadDiagnostics <- runServer plugins' targets + targets <- case optFiles opts of + [] -> findAllSourceFiles origDir + xs -> concat <$> mapM findAllSourceFiles xs - cliOut "" + cliOut $ "Found " ++ show (length targets) ++ " Haskell source files.\n" cliOut "###################################################" - cliOut "###################################################" - cliOut "" - cliOut "Dumping diagnostics:" - cliOut "" - cliOut "" - mapM_ (cliOut' . uncurry prettyPrintDiags) loadDiagnostics + cliOut "\nFound the following files:\n" + mapM_ cliOut targets cliOut "" - cliOut "" - cliOut "" - cliOut "Note: loading of 'Setup.hs' is not supported." + + unless (optDryRun opts) $ do + loadDiagnostics <- runServer mlibdir plugins' targets + + cliOut "" + cliOut "###################################################" + cliOut "###################################################" + cliOut "\nLoad them all now. This may take a very long time.\n" + cliOut "\nDumping diagnostics:\n\n" + mapM_ (cliOut' . uncurry prettyPrintDiags) loadDiagnostics + cliOut "\n\n\nNote: loading of 'Setup.hs' is not supported." -- --------------------------------------------------------------------- diff --git a/app/RunTest.hs b/app/RunTest.hs index c843b50a3..bc06a716f 100644 --- a/app/RunTest.hs +++ b/app/RunTest.hs @@ -11,27 +11,39 @@ where import GhcMonad import GHC +import Control.Monad +import qualified Control.Concurrent.STM as STM +import Data.List ( isPrefixOf ) import qualified Data.Text as T +import qualified Data.Map as Map +import Data.Default import System.Directory ( doesDirectoryExist , listDirectory , canonicalizePath - , getCurrentDirectory + , doesFileExist ) +import System.FilePath +import Language.Haskell.LSP.Core +import Language.Haskell.LSP.Types import Haskell.Ide.Engine.PluginsIdeMonads + hiding ( withIndefiniteProgress + , withProgress + ) +import Haskell.Ide.Engine.GhcModuleCache import qualified Haskell.Ide.Engine.ModuleCache as MC import qualified Haskell.Ide.Engine.Ghc as Ghc -import System.FilePath -import Control.Monad -import Data.List ( isPrefixOf ) -import TestUtils ( runIGM ) findAllSourceFiles :: FilePath -> IO [FilePath] -findAllSourceFiles dir = do - absDir <- canonicalizePath dir - findFilesRecursively isHaskellSource - (\fp -> any (\p -> p fp) [isHidden, isSpecialDir]) - absDir +findAllSourceFiles fp = do + absFp <- canonicalizePath fp + isDir <- doesDirectoryExist absFp + if isDir + then findFilesRecursively + isHaskellSource + (\path -> any (\p -> p path) [isHidden, isSpecialDir]) + absFp + else filterM doesFileExist [absFp] where isHaskellSource = (== ".hs") . takeExtension isHidden = ("." `isPrefixOf`) . takeFileName @@ -74,12 +86,15 @@ compileTarget dynFlags fp = do -- --------------------------------------------------------------------- runServer - :: IdePlugins + :: Maybe FilePath + -> IdePlugins -> [FilePath] -> IO [(FilePath, IdeResult (Ghc.Diagnostics, Ghc.AdditionalErrs))] -runServer ideplugins targets = do - cwd <- getCurrentDirectory - runIGM ideplugins (cwd "File.hs") $ do +runServer mlibdir ideplugins targets = do + let initialState = IdeState emptyModuleCache Map.empty Map.empty Nothing + stateVar <- STM.newTVarIO initialState + + runIdeGhcM mlibdir ideplugins dummyLspFuncs stateVar $ do dynFlags <- getSessionDynFlags mapM (\fp -> (fp, ) <$> compileTarget dynFlags fp) targets @@ -87,11 +102,27 @@ runServer ideplugins targets = do prettyPrintDiags :: FilePath -> IdeResult (Ghc.Diagnostics, Ghc.AdditionalErrs) -> T.Text -prettyPrintDiags fp diags = - T.pack fp <> ": " <> - case diags of - IdeResultFail IdeError { ideMessage } -> "FAILED\n\t" <> ideMessage - IdeResultOk (_diags, errs) -> - if null errs - then "OK" - else T.unlines (map (T.append "\t") errs) +prettyPrintDiags fp diags = T.pack fp <> ": " <> case diags of + IdeResultFail IdeError { ideMessage } -> "FAILED\n\t" <> ideMessage + IdeResultOk (_diags, errs) -> + if null errs then "OK" else T.unlines (map (T.append "\t") errs) + +-- --------------------------------------------------------------------- + +dummyLspFuncs :: Default a => LspFuncs a +dummyLspFuncs = LspFuncs + { clientCapabilities = def + , config = return (Just def) + , sendFunc = const (return ()) + , getVirtualFileFunc = const (return Nothing) + , persistVirtualFileFunc = \uri -> + return (uriToFilePath (fromNormalizedUri uri)) + , reverseFileMapFunc = return id + , publishDiagnosticsFunc = mempty + , flushDiagnosticsBySourceFunc = mempty + , getNextReqId = pure (IdInt 0) + , rootPath = Nothing + , getWorkspaceFolders = return Nothing + , withProgress = \_ _ f -> f (const (return ())) + , withIndefiniteProgress = \_ _ f -> f + } diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 1f57ab4e8..932dc5dc6 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -114,19 +114,20 @@ executable hie autogen-modules: Paths_haskell_ide_engine build-depends: base , containers + , data-default , directory , filepath , ghc , hie-bios , haskell-ide-engine , haskell-lsp + , haskell-lsp-types , hie-plugin-api , hslogger , optparse-simple + , stm , text , yaml - -- TODO: this is horrible - , hie-test-utils ghc-options: -threaded -rtsopts -with-rtsopts=-N -Wall -Wredundant-constraints -with-rtsopts=-T if flag(pedantic) diff --git a/src/Haskell/Ide/Engine/Options.hs b/src/Haskell/Ide/Engine/Options.hs index 57af3cd11..d5862c0d2 100644 --- a/src/Haskell/Ide/Engine/Options.hs +++ b/src/Haskell/Ide/Engine/Options.hs @@ -6,11 +6,13 @@ import Options.Applicative.Simple data GlobalOpts = GlobalOpts { optDebugOn :: Bool , optLogFile :: Maybe String - , optLsp :: Bool -- Kept for a while, to not break legacy clients + , optLsp :: Bool , projectRoot :: Maybe String , optBiosVerbose :: Bool , optCaptureFile :: Maybe FilePath , optExamplePlugin :: Bool + , optDryRun :: Bool + , optFiles :: [FilePath] } deriving (Show) globalOptsParser :: Parser GlobalOpts @@ -53,3 +55,13 @@ globalOptsParser = GlobalOpts <*> switch ( long "example" <> help "Enable Example2 plugin. Useful for developers only") + <*> flag False True + ( long "dry-run" + <> help "Perform a dry-run of loading files. Only searches for Haskell source files to load." + ) + <*> many + ( argument str + ( metavar "FILES..." + <> help "Directories and Filepaths to load.") + ) + From e56c7b7847ef95eb8424183e7f4644f9608f4ac6 Mon Sep 17 00:00:00 2001 From: fendor Date: Mon, 13 Jan 2020 21:51:06 +0100 Subject: [PATCH 063/270] Qualify import of GHC lib --- app/RunTest.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/RunTest.hs b/app/RunTest.hs index bc06a716f..4478d7df5 100644 --- a/app/RunTest.hs +++ b/app/RunTest.hs @@ -10,7 +10,7 @@ module RunTest where import GhcMonad -import GHC +import qualified GHC import Control.Monad import qualified Control.Concurrent.STM as STM import Data.List ( isPrefixOf ) @@ -69,7 +69,7 @@ findFilesRecursively p exclude dir = do -- --------------------------------------------------------------------- compileTarget - :: DynFlags + :: GHC.DynFlags -> FilePath -> IdeGhcM (IdeResult (Ghc.Diagnostics, Ghc.AdditionalErrs)) compileTarget dynFlags fp = do From 848f9f095f788a05963df8aec8e1b9fe8cd22c64 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 14 Jan 2020 10:48:31 +0100 Subject: [PATCH 064/270] Mention hlint data file handling --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6a62dbe1e..07fad826a 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ HIE builds from source code, so there's a couple of extra steps. * `stack` must be in your PATH * `git` must be in your PATH * Stack local bin directory must be in your PATH. Get it with `stack path --local-bin` +* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). As last resort it will look for it in a subdirectory named `data` in the same directory where the `hie` executable is. Tip: you can quickly check if some command is in your path by running the command. If you receive some meaningful output instead of "command not found"-like message From 0bbe5b78cb7908138d062604ff5a3b40a6cf01bf Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 14 Jan 2020 13:15:05 +0100 Subject: [PATCH 065/270] List all possible hlint.yaml locations --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 07fad826a..97cbfd7db 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,10 @@ HIE builds from source code, so there's a couple of extra steps. * `stack` must be in your PATH * `git` must be in your PATH * Stack local bin directory must be in your PATH. Get it with `stack path --local-bin` -* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). As last resort it will look for it in a subdirectory named `data` in the same directory where the `hie` executable is. +* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). The file is searched in order in the following locations: + * In the directory pointed by the environment variable `$HLINT_DATADIR`. + * If hie was installed using stack or cabal, in a tool-specific internal installation directory. + * And finally in a subdirectory named `data` inside the directory where the `hie` executable is. Tip: you can quickly check if some command is in your path by running the command. If you receive some meaningful output instead of "command not found"-like message From cf025df05ae50ff042f55290376151abae8c0cbd Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Wed, 15 Jan 2020 06:24:13 +0100 Subject: [PATCH 066/270] Enable all working test suites and add linux-cabal job in Azure (#1571) * Enabled test-suites: * Linux, with stack or cabal, all test suites are enabled * Macos: * ghc-8.6.*: all suites enabled * ghc-8.4.*: func-test and dispatcher-test disabled * Windows * unit-test enabled * Except CabalHelper ones for ghc-8.6.4 * func-test enabled with almost all tests * cabal job: * Aadded one for linux Make progress towards #1401 Closes #1431 --- .azure/linux-cabal.bashrc | 1 + .azure/linux-cabal.yml | 76 +++++++++++++++++++++ .azure/{linux.bashrc => linux-stack.bashrc} | 0 .azure/linux-stack.yml | 26 +++---- .azure/macos-stack.yml | 20 ++++-- .azure/windows-installhs-stack.yml | 3 +- .azure/windows-stack.yml | 27 ++++++-- .gitignore | 1 + azure-pipelines.yml | 1 + test/functional/DiagnosticsSpec.hs | 17 ++--- 10 files changed, 136 insertions(+), 36 deletions(-) create mode 100644 .azure/linux-cabal.bashrc create mode 100644 .azure/linux-cabal.yml rename .azure/{linux.bashrc => linux-stack.bashrc} (100%) diff --git a/.azure/linux-cabal.bashrc b/.azure/linux-cabal.bashrc new file mode 100644 index 000000000..864dfa2ae --- /dev/null +++ b/.azure/linux-cabal.bashrc @@ -0,0 +1 @@ +export PATH=$HOME/.cabal/bin:/opt/cabal/$CABAL_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$HOME/.local/bin:$PATH diff --git a/.azure/linux-cabal.yml b/.azure/linux-cabal.yml new file mode 100644 index 000000000..9554e5223 --- /dev/null +++ b/.azure/linux-cabal.yml @@ -0,0 +1,76 @@ +jobs: +- job: Linux_Cabal + timeoutInMinutes: 0 + pool: + vmImage: ubuntu-16.04 + strategy: + matrix: + ghc-8.6.5: + GHC_VERSION: "8.6.5" + ghc-8.4.4: + GHC_VERSION: "8.4.4" + variables: + CABAL_VERSION: "3.0" + steps: + - task: Cache@2 + inputs: + key: '"cabal-store" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Download cache" + - bash: | + mkdir -p $HOME/.cabal + tar -vxzf .azure-cache/cabal-root.tar.gz -C / + mkdir -p $HOME/.ghc + tar -vxzf .azure-cache/ghc-root.tar.gz -C / + mkdir -p dist-newtyle + tar -vxzf .azure-cache/cabal-dist.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') + - bash: | + git submodule sync + git submodule update --init + displayName: Sync submodules + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-update + cabal v2-build --only-dependencies + displayName: Build dependencies + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-build + displayName: Build `hie` + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-install --overwrite-policy=always # `hie` binary required locally for tests + displayName: Install `hie` + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + displayName: Build Test-dependencies + - bash: | + sudo apt update + sudo apt install z3 + displayName: "Install Runtime Test-Dependencies: z3" + - bash: | + source .azure/linux-cabal.bashrc + # to not reinstall hie + cd $(Agent.TempDirectory) + cabal v2-install liquidhaskell-0.8.6.2 -w /opt/ghc/8.6.5/bin/ghc --overwrite-policy=always + displayName: "Install Runtime Test-Dependencies: liquidhaskell" + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-build hoogle + cabal v2-exec hoogle generate + displayName: "Install Runtime Test-Dependencies: hoogle database" + - bash: | + source .azure/linux-cabal.bashrc + # TODO: Investigate why the test suite can't be run in parallel + cabal v2-test -j1 + displayName: Run Test + - bash: | + mkdir -p .azure-cache + tar -vczf .azure-cache/cabal-root.tar.gz $HOME/.cabal + tar -vczf .azure-cache/ghc-root.tar.gz $HOME/.ghc + tar -vczf .azure-cache/cabal-dist.tar.gz dist-newstyle + displayName: "Pack cache" \ No newline at end of file diff --git a/.azure/linux.bashrc b/.azure/linux-stack.bashrc similarity index 100% rename from .azure/linux.bashrc rename to .azure/linux-stack.bashrc diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 1eaf57df5..c9a623b28 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -48,19 +48,19 @@ jobs: tar vxz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' displayName: Install stack - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack setup --stack-yaml $(YAML_FILE) displayName: Install GHC - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack --stack-yaml $(YAML_FILE) --install-ghc build --only-dependencies displayName: Build dependencies - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie` - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests mkdir .azure-deploy stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy @@ -80,7 +80,7 @@ jobs: tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * displayName: Install `hie` - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies displayName: Build Test-dependencies - bash: | @@ -88,18 +88,20 @@ jobs: sudo apt install z3 displayName: "Install Runtime Test-Dependencies: z3" - bash: | - source .azure/linux.bashrc - stack install --resolver=lts-11.18 liquid-fixpoint-0.7.0.7 dotgen-0.4.2 fgl-visualize-0.1.0.1 located-base-0.1.1.1 liquidhaskell-0.8.2.4 + source .azure/linux-stack.bashrc + stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack build hoogle --stack-yaml=$(YAML_FILE) stack exec hoogle generate --stack-yaml=$(YAML_FILE) displayName: "Install Runtime Test-Dependencies: hoogle database" - # - bash: | - # source .azure/linux.bashrc - # stack test --stack-yaml $(YAML_FILE) - # displayName: Run Test + - bash: | + source .azure/linux-stack.bashrc + # cabal is also a test runtime dependency + export PATH=/opt/cabal/3.0/bin:$PATH + stack test --stack-yaml $(YAML_FILE) + displayName: Run Test - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index d679bacaa..0778fe6f4 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -88,17 +88,27 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/macos.bashrc - stack install --resolver=lts-11.18 liquid-fixpoint-0.7.0.7 dotgen-0.4.2 fgl-visualize-0.1.0.1 located-base-0.1.1.1 liquidhaskell-0.8.2.4 + stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | source .azure/macos.bashrc stack build hoogle --stack-yaml=$(YAML_FILE) stack exec hoogle generate --stack-yaml=$(YAML_FILE) displayName: "Install Runtime Test-Dependencies: hoogle database" - # - bash: | - # source .azure/macos.bashrc - # stack test --stack-yaml $(YAML_FILE) - # displayName: Run Test + - bash: | + source .azure/macos.bashrc + brew install cabal-install + displayName: "Install Runtime Test-Dependencies: cabal" + - bash: | + source .azure/macos.bashrc + GHC_MAJOR_VERSION=${YAML_FILE:6:3} + if [ $GHC_MAJOR_VERSION != "8.4" ]; then + stack test --stack-yaml $(YAML_FILE) + else + #TODO Enable dispatcher-test and func-test for ghc-8.4.* + stack test --stack-yaml $(YAML_FILE) :unit-test :plugin-dispatcher-test :wrapper-test + fi + displayName: Run Test - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 3a108c73f..428024d3e 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -29,5 +29,6 @@ jobs: displayName: Run help of `install.hs` - bash: | source .azure/windows.bashrc - stack install.hs latest + # Some executions fails with spurious errors installing the exe + stack install.hs latest || stack install.hs latest displayName: Run latest target of `install.hs` diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index f1acfd167..b251e1bbc 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -90,18 +90,33 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/windows.bashrc - stack install --resolver=lts-11.18 liquid-fixpoint-0.7.0.7 dotgen-0.4.2 fgl-visualize-0.1.0.1 located-base-0.1.1.1 liquidhaskell-0.8.2.4 - liquid -v + stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | source .azure/windows.bashrc stack build hoogle --stack-yaml=$(YAML_FILE) stack exec hoogle generate --stack-yaml=$(YAML_FILE) displayName: "Install Runtime Test-Dependencies: hoogle database" -# - bash: | -# source .azure/windows.bashrc -# stack test --stack-yaml $(YAML_FILE) :unit-test -# displayName: Run Test + - bash: | + source .azure/windows.bashrc + choco install cabal + /C/ProgramData/chocolatey/bin/RefreshEnv.cmd + displayName: "Install Runtime Test-Dependencies: cabal" + - bash: | + source .azure/windows.bashrc + # TODO: Enable CabalHelper unit tests, see https://github.com/DanielG/cabal-helper/issues/91 + if [ $YAML_FILE = "stack-8.6.4.yaml" ]; then + TEST_ARGS=--test-arguments="--skip=CabalHelper" + fi + # TODO: Enable rest of test suites + stack test --stack-yaml $(YAML_FILE) :unit-test :plugin-dispatcher-test $TEST_ARGS # :dispatcher-test :wrapper-test + # TODO: Enable failing functional test + if [ $YAML_FILE != "stack-8.6.4.yaml" ]; then + stack test --stack-yaml $(YAML_FILE) :func-test + else + stack test --stack-yaml $(YAML_FILE) :func-test --ta="--skip \"/Hover/hover/works\"" + fi + displayName: Run Test - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/.gitignore b/.gitignore index 77bf84b17..c731a9d21 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,7 @@ /docs/source/__pycache__/ /docs/source/plugins/ /elisp/.cask/ +/test/testdata/*.exe /test/testdata/FuncTest.refactored.hs /test/testdata/HaReAddRmParam.refactored.hs /test/testdata/HaReCase.refactored.hs diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 84869439b..fd05884f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,6 +26,7 @@ pr: jobs: - template: ./.azure/linux-stack.yml +- template: ./.azure/linux-cabal.yml - template: ./.azure/windows-stack.yml - template: ./.azure/macos-stack.yml - template: ./.azure/linux-installhs-stack.yml diff --git a/test/functional/DiagnosticsSpec.hs b/test/functional/DiagnosticsSpec.hs index d9444ed9e..2c82ed865 100644 --- a/test/functional/DiagnosticsSpec.hs +++ b/test/functional/DiagnosticsSpec.hs @@ -40,25 +40,18 @@ spec = describe "diagnostics providers" $ do reduceDiag ^. LSP.source `shouldBe` Just "hlint" diags2a <- waitForDiagnostics - -- liftIO $ show diags2a `shouldBe` "" + liftIO $ length diags2a `shouldBe` 2 - -- docItem <- getDocItem file languageId sendNotification TextDocumentDidSave (DidSaveTextDocumentParams doc) - -- diags2hlint <- waitForDiagnostics - -- -- liftIO $ show diags2hlint `shouldBe` "" - -- liftIO $ length diags2hlint `shouldBe` 3 - -- diags2liquid <- waitForDiagnostics - -- liftIO $ length diags2liquid `shouldBe` 3 - -- -- liftIO $ show diags2 `shouldBe` "" - diags3@(d:_) <- waitForDiagnostics - -- liftIO $ show diags3 `shouldBe` "" + + diags3@(d:_) <- waitForDiagnosticsSource "eg2" + liftIO $ do - length diags3 `shouldBe` 3 + length diags3 `shouldBe` 1 d ^. LSP.range `shouldBe` Range (Position 0 0) (Position 1 0) d ^. LSP.severity `shouldBe` Nothing d ^. LSP.code `shouldBe` Nothing - d ^. LSP.source `shouldBe` Just "eg2" d ^. LSP.message `shouldBe` T.pack "Example plugin diagnostic, triggered byDiagnosticOnSave" describe "typed hole errors" $ From 3c60648ed17ca8dfe57f0e37835671befb0e350c Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 17 Jan 2020 09:39:36 +0100 Subject: [PATCH 067/270] Remove duplicated allow-newer --- stack-8.8.1.yaml | 1 - stack.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 3a4db7d9b..49e7556a1 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -23,7 +23,6 @@ extra-deps: - haskell-src-exts-1.21.1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 -# allow-newer: true flags: haskell-ide-engine: diff --git a/stack.yaml b/stack.yaml index 3a4db7d9b..49e7556a1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -23,7 +23,6 @@ extra-deps: - haskell-src-exts-1.21.1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 -# allow-newer: true flags: haskell-ide-engine: From e50676ca538b90c83927cd97a0d542093976eb58 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 17 Jan 2020 06:04:00 -0500 Subject: [PATCH 068/270] Bump stack nightly resolver --- stack-8.8.1.yaml | 3 +-- stack.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 49e7556a1..7e6e43360 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-12-31 +resolver: nightly-2020-01-17 packages: - . - hie-plugin-api @@ -12,7 +12,6 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- fold-debounce-0.2.0.9 - haddock-api-2.23.0 - haddock-library-1.8.0 - hie-bios-0.3.2 diff --git a/stack.yaml b/stack.yaml index 49e7556a1..7e6e43360 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-12-31 +resolver: nightly-2020-01-17 packages: - . - hie-plugin-api @@ -12,7 +12,6 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- fold-debounce-0.2.0.9 - haddock-api-2.23.0 - haddock-library-1.8.0 - hie-bios-0.3.2 From e0cac6aefc453f8474ff87c5303cb9d6995c54fd Mon Sep 17 00:00:00 2001 From: fendor Date: Fri, 17 Jan 2020 14:35:00 +0100 Subject: [PATCH 069/270] Fix location of logging message --- app/MainHie.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/MainHie.hs b/app/MainHie.hs index 8e1cd5257..564582caf 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -180,15 +180,15 @@ run opts = do cliOut "" unless (optDryRun opts) $ do + cliOut "\nLoad them all now. This may take a very long time.\n" loadDiagnostics <- runServer mlibdir plugins' targets cliOut "" cliOut "###################################################" cliOut "###################################################" - cliOut "\nLoad them all now. This may take a very long time.\n" cliOut "\nDumping diagnostics:\n\n" mapM_ (cliOut' . uncurry prettyPrintDiags) loadDiagnostics - cliOut "\n\n\nNote: loading of 'Setup.hs' is not supported." + cliOut "\n\nNote: loading of 'Setup.hs' is not supported." -- --------------------------------------------------------------------- From 8fce52fb28d2f63c154a109986fd0ba68cec59e8 Mon Sep 17 00:00:00 2001 From: fendor Date: Sat, 18 Jan 2020 12:07:01 +0100 Subject: [PATCH 070/270] Improve help message Indicate that some options dont do anything in combination with the `--lsp` flag. We do this, because we cant express this invariant in the type-system, yet. A follow-up PR, refactoring the command line flags is needed. --- src/Haskell/Ide/Engine/Options.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Haskell/Ide/Engine/Options.hs b/src/Haskell/Ide/Engine/Options.hs index d5862c0d2..25a43fb0d 100644 --- a/src/Haskell/Ide/Engine/Options.hs +++ b/src/Haskell/Ide/Engine/Options.hs @@ -57,11 +57,11 @@ globalOptsParser = GlobalOpts <> help "Enable Example2 plugin. Useful for developers only") <*> flag False True ( long "dry-run" - <> help "Perform a dry-run of loading files. Only searches for Haskell source files to load." + <> help "Perform a dry-run of loading files. Only searches for Haskell source files to load. Does nothing if run as LSP server." ) <*> many ( argument str ( metavar "FILES..." - <> help "Directories and Filepaths to load.") + <> help "Directories and Filepaths to load. Does nothing if run as LSP server.") ) From 9220fda936dc1751dcd9887b2cac5c749d6708e1 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sat, 18 Jan 2020 12:41:48 +0000 Subject: [PATCH 071/270] Bump bounds for implicit-exe test data Needed for #1482 --- test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal b/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal index 49213fc29..28a0728f4 100644 --- a/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal +++ b/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal @@ -7,11 +7,11 @@ build-type: Simple library exposed-modules: Lib hs-source-dirs: src - build-depends: base >=4.8 && <4.13 + build-depends: base >=4.8 && <4.14 default-language: Haskell2010 executable implicit-exe main-is: src/Exe.hs - build-depends: base >=4.8 && <4.13, implicit-exe + build-depends: base >=4.8 && <4.14, implicit-exe default-language: Haskell2010 \ No newline at end of file From fbeb428998244c006bc8a1d1d4b447e731fb6efa Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sat, 18 Jan 2020 18:21:12 -0500 Subject: [PATCH 072/270] Leave stack.yaml on 8.6 for windows --- stack.yaml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/stack.yaml b/stack.yaml index 7e6e43360..a47bc5b17 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-01-17 +resolver: nightly-2019-09-21 # Last GHC 8.6.5 packages: - . - hie-plugin-api @@ -6,22 +6,32 @@ packages: extra-deps: # - ./submodules/HaRe -- apply-refact-0.7.0.0 +- ansi-terminal-0.8.2 +- ansi-wl-pprint-0.6.8.2 +- brittany-0.12.1.0 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 +- cabal-plan-0.5.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 +- deque-0.4.3 +- extra-1.6.18 - floskell-0.10.2 -- haddock-api-2.23.0 -- haddock-library-1.8.0 +- ghc-exactprint-0.6.2 # for HaRe +- ghc-lib-parser-8.8.1 +- haddock-api-2.22.0 +- haskell-lsp-0.19.0.0 +- haskell-lsp-types-0.19.0.0 - hie-bios-0.3.2 -- hoogle-5.0.17.11 +- hlint-2.2.4 - hsimport-0.11.0 -- semigroups-0.18.5 +- lsp-test-0.10.0.0 +- monad-dijkstra-0.1.1.2@rev:1 +- parser-combinators-1.2.1 +- syz-0.2.0.0 - temporary-1.2.1.1 -- haskell-src-exts-1.21.1 -- ilist-0.3.1.0 -- monad-dijkstra-0.1.1.2 +- unix-compat-0.5.2 +- yaml-0.11.1.2 flags: haskell-ide-engine: From 360e7e5d7deea185a91cf5e14ea8c042798189e6 Mon Sep 17 00:00:00 2001 From: Mitsutoshi Aoe Date: Tue, 21 Jan 2020 15:03:23 +0900 Subject: [PATCH 073/270] Make cabal-hie-install executable --- cabal-hie-install | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 cabal-hie-install diff --git a/cabal-hie-install b/cabal-hie-install old mode 100644 new mode 100755 From fba149aace622372b9ecbf2445d9acc6793e49e1 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 10:46:20 +0100 Subject: [PATCH 074/270] Change stack-root to D: (more free space) --- .azure/windows-installhs-stack.yml | 2 +- .azure/windows-stack.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 428024d3e..4290b5298 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -5,7 +5,7 @@ jobs: vmImage: windows-2019 variables: YAML_FILE: install/shake.yaml - STACK_ROOT: "C:\\sr" + STACK_ROOT: "D:\\sr" steps: - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 0957a28f9..3e6832b33 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -23,7 +23,7 @@ jobs: stack-8.4.2: YAML_FILE: stack-8.4.2.yaml variables: - STACK_ROOT: "C:\\sr" + STACK_ROOT: "D:\\sr" steps: - task: Cache@2 From 0fbd6d6b7e8aa081dcd6daa5c462a60c1e503010 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 10:54:13 +0100 Subject: [PATCH 075/270] Change branch trigger --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fd05884f8..13efd503e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,5 @@ # Build master, branches starting with `azure` and tags commits trigger: - batch: false branches: include: - master From 30e423962c6032e3a7f26d3b4a848d1b499b1c82 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Tue, 21 Jan 2020 10:46:37 +0000 Subject: [PATCH 076/270] Allow newer optparse-applicative for ormolu Fixes building via cabal with ghc-8.8 until ormolu bumps its dependencies --- cabal.project | 1 + 1 file changed, 1 insertion(+) diff --git a/cabal.project b/cabal.project index c8c3c4b03..c5b49711f 100644 --- a/cabal.project +++ b/cabal.project @@ -17,3 +17,4 @@ constraints: write-ghc-environment-files: never index-state: 2020-01-07T22:09:46Z +allow-newer: ormolu:optparse-applicative From 4fdaf3797178d59a44712d1de9ca394b51249deb Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 12:10:12 +0100 Subject: [PATCH 077/270] Change stack win cache key --- .azure/windows-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 3e6832b33..d5a02aac4 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -28,7 +28,7 @@ jobs: steps: - task: Cache@2 inputs: - key: '"stack-root" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' + key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Cache stack-root" From 3c52b4eac108792f7f1118d541ce686e282fdd9a Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 12:12:56 +0100 Subject: [PATCH 078/270] Remove commented code --- test/functional/DiagnosticsSpec.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/functional/DiagnosticsSpec.hs b/test/functional/DiagnosticsSpec.hs index 2c82ed865..5002f952a 100644 --- a/test/functional/DiagnosticsSpec.hs +++ b/test/functional/DiagnosticsSpec.hs @@ -24,14 +24,11 @@ spec = describe "diagnostics providers" $ do describe "diagnostics triggers" $ it "runs diagnostics on save" $ runSession hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do - -- runSessionWithConfig logConfig hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do logm "starting DiagnosticSpec.runs diagnostic on save" doc <- openDoc "ApplyRefact2.hs" "haskell" diags@(reduceDiag:_) <- waitForDiagnostics - -- liftIO $ show diags `shouldBe` "" - liftIO $ do length diags `shouldBe` 2 reduceDiag ^. LSP.range `shouldBe` Range (Position 1 0) (Position 1 12) From 16ce3d2dda11cf6501d1d3cc457d9b7def2c1aa1 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 12:13:18 +0100 Subject: [PATCH 079/270] Fix test with interleaved diagnostics --- test/functional/FunctionalLiquidSpec.hs | 31 +++++++------------------ 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/test/functional/FunctionalLiquidSpec.hs b/test/functional/FunctionalLiquidSpec.hs index 154b7c92c..49b9d4043 100644 --- a/test/functional/FunctionalLiquidSpec.hs +++ b/test/functional/FunctionalLiquidSpec.hs @@ -21,14 +21,10 @@ spec :: Spec spec = describe "liquid haskell diagnostics" $ do it "runs diagnostics on save, no liquid" $ runSession hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do - -- runSessionWithConfig logConfig hieCommandExamplePlugin codeActionSupportCaps "test/testdata" $ do doc <- openDoc "liquid/Evens.hs" "haskell" diags@(reduceDiag:_) <- waitForDiagnostics - -- liftIO $ show diags `shouldBe` "" - -- liftIO $ putStrLn "a" - liftIO $ do length diags `shouldBe` 2 reduceDiag ^. range `shouldBe` Range (Position 5 18) (Position 5 22) @@ -36,31 +32,20 @@ spec = describe "liquid haskell diagnostics" $ do reduceDiag ^. code `shouldBe` Just (StringValue "Use negate") reduceDiag ^. source `shouldBe` Just "hlint" - -- liftIO $ putStrLn "b" - diags2hlint <- waitForDiagnostics - -- liftIO $ putStrLn "c" - -- liftIO $ show diags2hlint `shouldBe` "" + liftIO $ length diags2hlint `shouldBe` 2 - -- docItem <- getDocItem file languageId sendNotification TextDocumentDidSave (DidSaveTextDocumentParams doc) - -- diags2liquid <- waitForDiagnostics - -- liftIO $ putStrLn "d" - -- liftIO $ length diags2liquid `shouldBe` 3 - -- -- liftIO $ show diags2liquid `shouldBe` "" - - diags3@(d:_) <- waitForDiagnostics - -- liftIO $ putStrLn "e" - -- liftIO $ show diags3 `shouldBe` "" + diags3@(d:_) <- waitForDiagnosticsSource "eg2" + liftIO $ do - length diags3 `shouldBe` 3 - d ^. range `shouldBe` Range (Position 0 0) (Position 1 0) - d ^. severity `shouldBe` Nothing - d ^. code `shouldBe` Nothing - d ^. source `shouldBe` Just "eg2" - d ^. message `shouldBe` (T.pack "Example plugin diagnostic, triggered byDiagnosticOnSave") + length diags3 `shouldBe` 1 + d ^. LSP.range `shouldBe` Range (Position 0 0) (Position 1 0) + d ^. LSP.severity `shouldBe` Nothing + d ^. LSP.code `shouldBe` Nothing + d ^. LSP.message `shouldBe` T.pack "Example plugin diagnostic, triggered byDiagnosticOnSave" -- --------------------------------- From 9a75daf99f8b848667c601ca64fda70ae3e641e5 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 12:13:48 +0100 Subject: [PATCH 080/270] Test cabal and stack exec are accesible --- test/unit/CabalHelperSpec.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/unit/CabalHelperSpec.hs b/test/unit/CabalHelperSpec.hs index f24985a95..5df817d75 100644 --- a/test/unit/CabalHelperSpec.hs +++ b/test/unit/CabalHelperSpec.hs @@ -1,10 +1,11 @@ {-# LANGUAGE OverloadedStrings #-} module CabalHelperSpec where +import Data.Maybe (isJust) import Haskell.Ide.Engine.Cradle import Test.Hspec import System.FilePath -import System.Directory (getCurrentDirectory, removeFile) +import System.Directory (findExecutable, getCurrentDirectory, removeFile) import TestUtils rootPath :: FilePath -> FilePath @@ -27,6 +28,13 @@ simpleStackPath cwd = rootPath cwd "simple-stack" spec :: Spec spec = beforeAll_ setupStackFiles $ do + describe "stack and cabal executables should be accesible" $ do + it "cabal is accesible" $ do + stack <- findExecutable "cabal" + stack `shouldSatisfy` isJust + it "stack is accesible" $ do + cabal <- findExecutable "stack" + cabal `shouldSatisfy` isJust describe "cabal-helper spec" $ do describe "find cabal entry point spec" findCabalHelperEntryPointSpec describe "cradle discovery" cabalHelperCradleSpec From 9b37518b33464c1230864db7cf413bd7df503888 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 12:41:55 +0100 Subject: [PATCH 081/270] Use the same keys in all stack jobs --- .azure/linux-stack.yml | 2 +- .azure/macos-stack.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 1096d9ca0..ec12e3f7a 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -30,7 +30,7 @@ jobs: steps: - task: Cache@2 inputs: - key: '"stack-root" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' + key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index cfac41b0b..1f63b3abd 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -26,7 +26,7 @@ jobs: steps: - task: Cache@2 inputs: - key: '"stack-root" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' + key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" From d5ffea70f1a005208dd1af9effa36035413e335a Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 21 Jan 2020 21:49:34 +0100 Subject: [PATCH 082/270] Add ormolu to stack-8.8.1 including allow-newer --- stack-8.8.1.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 7e6e43360..40dac19c0 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -22,6 +22,8 @@ extra-deps: - haskell-src-exts-1.21.1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 +- ormolu-0.0.3.0 +- optparse-applicative-0.15.1.0 flags: haskell-ide-engine: @@ -29,8 +31,8 @@ flags: hie-plugin-api: pedantic: true - -# allow-newer: true +# Required to build ormolu with optparse-applicative-0.15.1.0 +allow-newer: true nix: packages: [ icu libcxx zlib ] From f1436857730ecefcbbe9e2640b93f0c220cd3359 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 21 Jan 2020 16:42:37 -0500 Subject: [PATCH 083/270] Update ormolu test for 8.8 --- test/functional/FormatSpec.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 704d62a39..bbb8052cd 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -101,8 +101,10 @@ spec = do doc <- openDoc "Format.hs" "haskell" formatDoc doc (FormattingOptions 2 True) docContent <- documentContents doc + let formatted = liftIO $ docContent `shouldBe` formattedOrmolu case ghcVersion of - GHC86 -> liftIO $ docContent `shouldBe` formattedOrmolu + GHC88 -> formatted + GHC86 -> formatted _ -> liftIO $ docContent `shouldBe` unchangedOrmolu From 948e792858f13147359234b7cd2432b83400e3a5 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Tue, 21 Jan 2020 22:01:23 +0000 Subject: [PATCH 084/270] Update hlint to 2.2.8 and ormolu to 0.0.3 hlint 2.2.8 embeds its config file, making redistribution easier. Closes #1587 --- cabal.project | 2 +- haskell-ide-engine.cabal | 2 +- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 6 ++++-- stack-8.4.2.yaml | 9 +++++---- stack-8.4.3.yaml | 3 ++- stack-8.4.4.yaml | 3 ++- stack-8.6.1.yaml | 5 +++-- stack-8.6.2.yaml | 5 +++-- stack-8.6.3.yaml | 5 +++-- stack-8.6.4.yaml | 5 +++-- stack-8.6.5.yaml | 5 +++-- stack-8.8.1.yaml | 10 ++++++---- stack.yaml | 5 +++-- 13 files changed, 39 insertions(+), 26 deletions(-) diff --git a/cabal.project b/cabal.project index c5b49711f..98b24fa80 100644 --- a/cabal.project +++ b/cabal.project @@ -16,5 +16,5 @@ constraints: write-ghc-environment-files: never -index-state: 2020-01-07T22:09:46Z +index-state: 2020-01-21T18:23:31Z allow-newer: ormolu:optparse-applicative diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 3d73dae82..6c2b8db6a 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -102,7 +102,7 @@ library , hie-bios >= 0.3.2 && < 0.4.0 , bytestring-trie , unliftio - , hlint >= 2.2.2 + , hlint >= 2.2.8 if impl(ghc >= 8.6) build-depends: ormolu diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 9166f66c8..30054ad06 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -12,8 +12,10 @@ import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) import Data.Aeson ( Value ( Null ) ) import Data.Text import Ormolu +#if __GLASGOW_HASKELL__ < 808 import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) +#endif import Haskell.Ide.Engine.PluginUtils #endif @@ -34,7 +36,7 @@ ormoluDescriptor plId = PluginDescriptor provider :: FormattingProvider provider _contents _uri _typ _opts = #if __GLASGOW_HASKELL__ >= 806 - case _typ of + case _typ of FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile _contents _uri $ \file -> do result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack _contents)) @@ -43,4 +45,4 @@ provider _contents _uri _typ _opts = Right new -> return $ IdeResultOk [TextEdit (fullRange _contents) new] #else return $ IdeResultOk [] -- NOP formatter -#endif \ No newline at end of file +#endif diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index cdfc46ff5..32a474726 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -19,6 +19,7 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.19.0.0 @@ -26,7 +27,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 @@ -46,12 +47,12 @@ extra-deps: - unordered-containers-0.2.10.0 - yaml-0.11.1.2 # To make build work in windows 7 +- time-manager-0.0.0 # for http2 - unix-time-0.4.7 +- wai-3.2.2.1 # for network and network-bsd +- warp-3.2.28 # for network and network-bsd - windns-0.1.0.0 - yi-rope-0.11 -- time-manager-0.0.0 # for http2 -- warp-3.2.28 # for network and network-bsd -- wai-3.2.2.1 # for network and network-bsd flags: diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 312fe10e7..f617d39be 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -19,6 +19,7 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.19.0.0 @@ -26,7 +27,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 5301b80d4..a8f35f4c6 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -18,6 +18,7 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.19.0.0 @@ -25,7 +26,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index c6322d553..bc5e343fa 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -22,13 +22,14 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.21.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - libyaml-0.1.1.0 @@ -38,7 +39,7 @@ extra-deps: - monoid-subclasses-0.4.6.1 - multistate-0.8.0.1 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 +- ormolu-0.0.3.0 - primes-0.2.1.0 - resolv-0.1.1.2 - rope-utf16-splay-0.3.1.0 diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index 6f2cc5d78..be0194778 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -18,13 +18,14 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.21.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - libyaml-0.1.1.0 @@ -33,7 +34,7 @@ extra-deps: - monad-memo-0.4.1 - multistate-0.8.0.1 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 +- ormolu-0.0.3.0 - rope-utf16-splay-0.3.1.0 - strict-list-0.1.5 - syz-0.2.0.0 diff --git a/stack-8.6.3.yaml b/stack-8.6.3.yaml index 38e97c28e..012836a36 100644 --- a/stack-8.6.3.yaml +++ b/stack-8.6.3.yaml @@ -16,13 +16,14 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.21.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - lsp-test-0.10.0.0 @@ -30,8 +31,8 @@ extra-deps: - monad-memo-0.4.1 - multistate-0.8.0.1 - optparse-simple-0.1.0 +- ormolu-0.0.3.0 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 6b2d30d34..54cb10395 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -16,20 +16,21 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 - multistate-0.8.0.1 +- ormolu-0.0.3.0 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index ebd4305de..d5bb732dc 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -17,17 +17,18 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 +- ormolu-0.0.3.0 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 40dac19c0..5c887bffc 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -12,18 +12,20 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.23.0 - haddock-library-1.8.0 +- haskell-src-exts-1.21.1 - hie-bios-0.3.2 +- hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 -- semigroups-0.18.5 -- temporary-1.2.1.1 -- haskell-src-exts-1.21.1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 -- ormolu-0.0.3.0 - optparse-applicative-0.15.1.0 +- ormolu-0.0.3.0 +- semigroups-0.18.5 +- temporary-1.2.1.1 flags: haskell-ide-engine: diff --git a/stack.yaml b/stack.yaml index b97f0b2fd..64791aa2d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -19,16 +19,17 @@ extra-deps: - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 +- ghc-lib-parser-ex-8.8.2 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - hie-bios-0.3.2 -- hlint-2.2.4 +- hlint-2.2.8 - hsimport-0.11.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 -- ormolu-0.0.2.0 +- ormolu-0.0.3.0 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 From 88cc608522ed91366d9dbd6f6aa04b6762793b97 Mon Sep 17 00:00:00 2001 From: fendor Date: Wed, 22 Jan 2020 18:39:39 +0100 Subject: [PATCH 085/270] Demote HsImport func-tests to unit-test Previously, we had long running func-tests for HsImport. However, after the first code-action tests, we actually are testing the same functionality over and over again. Moreover, we dont have to test that HsImport works as intended since they have a huge set of tests, anyways. Now, we only test that our implementation of the plugin truly maps correctly to HsImport, accelerating execution time of func-tests as a side-effect. Hooray! --- haskell-ide-engine.cabal | 3 +- test/functional/FunctionalCodeActionsSpec.hs | 396 ++----------------- test/unit/HsImportSpec.hs | 170 ++++++++ test/utils/TestUtils.hs | 19 +- 4 files changed, 218 insertions(+), 370 deletions(-) create mode 100644 test/unit/HsImportSpec.hs diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 6c2b8db6a..7aba47ce1 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -200,6 +200,7 @@ test-suite unit-test GhcModPluginSpec -- HaRePluginSpec HooglePluginSpec + HsImportSpec JsonSpec LiquidSpec PackagePluginSpec @@ -208,7 +209,7 @@ test-suite unit-test build-tool-depends: cabal-helper:cabal-helper-main, hspec-discover:hspec-discover build-depends: QuickCheck , aeson - , cabal-helper + , cabal-helper , ghc , base , bytestring diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index 27482f74f..c4969a807 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -10,7 +10,6 @@ import Control.Monad.IO.Class import Data.Aeson import Data.Default import qualified Data.HashMap.Strict as HM -import qualified Data.Set as Set import Data.Maybe #if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) @@ -132,139 +131,39 @@ spec = describe "code actions" $ do _:x:_ <- T.lines <$> documentContents doc liftIO $ x `shouldBe` "foo = putStrLn \"world\"" - describe "import suggestions" $ do + describe "import suggestions" $ + it "works with 3.8 code action kinds" $ runSession hieCommand fullCaps "test/testdata" $ do + doc <- openDoc "CodeActionImport.hs" "haskell" + -- No Formatting: + let config = def { formattingProvider = "none" } + sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) + + -- ignore the first empty hlint diagnostic publish + [_,diag:_] <- count 2 waitForDiagnostics + liftIO $ diag ^. L.message `shouldBe` "Variable not in scope: when :: Bool -> IO () -> IO ()" + + actionsOrCommands <- getAllCodeActions doc + let actns = map fromAction actionsOrCommands + + liftIO $ do + head actns ^. L.title `shouldBe` "Import module Control.Monad" + head (tail actns) ^. L.title `shouldBe` "Import module Control.Monad (when)" + forM_ actns $ \a -> do + a ^. L.kind `shouldBe` Just CodeActionQuickFix + a ^. L.command `shouldSatisfy` isJust + a ^. L.edit `shouldBe` Nothing + let hasOneDiag (Just (List [_])) = True + hasOneDiag _ = False + a ^. L.diagnostics `shouldSatisfy` hasOneDiag + length actns `shouldBe` 10 + + executeCodeAction (head actns) + + contents <- getDocumentEdit doc + liftIO $ contents `shouldBe` "import Control.Monad\nmain :: IO ()\nmain = when True $ putStrLn \"hello\"" -- --------------------------------- - describe "formats with brittany" $ hsImportSpec "brittany" - [ -- Expected output for simple format. - [ "import qualified Data.Maybe" - , "import Control.Monad" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Use an import list and format the output. - [ "import qualified Data.Maybe" - , "import Control.Monad ( when )" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Multiple import lists, should not introduce multiple newlines. - [ "import System.IO ( stdout" - , " , hPutStrLn" - , " )" - , "import Control.Monad ( when )" - , "import Data.Maybe ( fromMaybe )" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stdout" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - , -- Complex imports for Constructos and functions - [ "{-# LANGUAGE NoImplicitPrelude #-}" - , "import System.IO ( IO" - , " , hPutStrLn" - , " , stderr" - , " )" - , "import Prelude ( Bool(..) )" - , "import Control.Monad ( when )" - , "import Data.Function ( ($) )" - , "import Data.Maybe ( fromMaybe" - , " , Maybe(Just)" - , " )" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stderr" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - ] - describe "formats with floskell" $ hsImportSpec "floskell" - [ -- Expected output for simple format. - [ "import qualified Data.Maybe" - , "import Control.Monad" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Use an import list and format the output. - [ "import qualified Data.Maybe" - , "import Control.Monad (when)" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Multiple import lists, should not introduce multiple newlines. - [ "import System.IO (stdout, hPutStrLn)" - , "import Control.Monad (when)" - , "import Data.Maybe (fromMaybe)" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stdout" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - , -- Complex imports for Constructos and functions - [ "{-# LANGUAGE NoImplicitPrelude #-}" - , "import System.IO (IO, hPutStrLn, stderr)" - , "import Prelude (Bool(..))" - , "import Control.Monad (when)" - , "import Data.Function (($))" - , "import Data.Maybe (fromMaybe, Maybe(Just))" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stderr" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - ] - describe "formats with ormolu" $ - case ghcVersion of - GHC86 -> hsImportSpec "ormolu" - [ -- Expected output for simple format. - [ "import Control.Monad" - , "import qualified Data.Maybe" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Use an import list and format the output. - [ "import Control.Monad (when)" - , "import qualified Data.Maybe" - , "main :: IO ()" - , "main = when True $ putStrLn \"hello\"" - ] - , -- Multiple import lists, should not introduce multiple newlines. - [ "import System.IO (hPutStrLn, stdout)" - , "import Control.Monad (when)" - , "import Data.Maybe (fromMaybe)" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stdout" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - , -- Complex imports for Constructos and functions - [ "{-# LANGUAGE NoImplicitPrelude #-}" - , "import System.IO (IO, hPutStrLn, stderr)" - , "import Prelude (Bool (..))" - , "import Control.Monad (when)" - , "import Data.Function (($))" - , "import Data.Maybe (Maybe (Just), fromMaybe)" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stderr" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - ] - _ -> it "is NOP formatter" $ - pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." - describe "add package suggestions" $ do it "adds to .cabal files" $ do flushStackEnvironment @@ -573,241 +472,6 @@ spec = describe "code actions" $ do kinds `shouldNotSatisfy` any (Just CodeActionRefactorInline /=) kinds `shouldSatisfy` all (Just CodeActionRefactorInline ==) --- --------------------------------------------------------------------- --- Parameterized HsImport Spec. --- --------------------------------------------------------------------- -hsImportSpec :: T.Text -> [[T.Text]]-> Spec -hsImportSpec formatterName [e1, e2, e3, e4] = - describe ("Execute HsImport with formatter " <> T.unpack formatterName) $ do - it "works with 3.8 code action kinds" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImport.hs" "haskell" - -- No Formatting: - let config = def { formattingProvider = "none" } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - -- ignore the first empty hlint diagnostic publish - [_,diag:_] <- count 2 waitForDiagnostics - liftIO $ diag ^. L.message `shouldBe` "Variable not in scope: when :: Bool -> IO () -> IO ()" - - actionsOrCommands <- getAllCodeActions doc - let actns = map fromAction actionsOrCommands - - liftIO $ do - head actns ^. L.title `shouldBe` "Import module Control.Monad" - head (tail actns) ^. L.title `shouldBe` "Import module Control.Monad (when)" - forM_ actns $ \a -> do - a ^. L.kind `shouldBe` Just CodeActionQuickFix - a ^. L.command `shouldSatisfy` isJust - a ^. L.edit `shouldBe` Nothing - let hasOneDiag (Just (List [_])) = True - hasOneDiag _ = False - a ^. L.diagnostics `shouldSatisfy` hasOneDiag - length actns `shouldBe` 10 - - executeCodeAction (head actns) - - contents <- getDocumentEdit doc - liftIO $ contents `shouldBe` "import Control.Monad\nmain :: IO ()\nmain = when True $ putStrLn \"hello\"" - - it "formats" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportBrittany.hs" "haskell" - _ <- waitForDiagnosticsSource "bios" - - let config = def { formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - actionsOrCommands <- getAllCodeActions doc - let action:_ = map fromAction actionsOrCommands - executeCodeAction action - - contents <- getDocumentEdit doc - liftIO $ T.lines contents `shouldMatchList` e1 - - it "import-list formats" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportBrittany.hs" "haskell" - _ <- waitForDiagnosticsSource "bios" - - let config = def { formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - actionsOrCommands <- getAllCodeActions doc - let _:action:_ = map fromAction actionsOrCommands - executeCodeAction action - - contents <- getDocumentEdit doc - liftIO $ T.lines contents `shouldMatchList` e2 - - -- --------------------------------- - - it "multiple import-list formats" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportList.hs" "haskell" - - let config = def { formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - let wantedCodeActionTitles = [ "Import module System.IO (hPutStrLn)" - , "Import module System.IO (stdout)" - , "Import module Control.Monad (when)" - , "Import module Data.Maybe (fromMaybe)" - ] - - contents <- executeAllCodeActions doc wantedCodeActionTitles - - liftIO $ Set.fromList (T.lines contents) `shouldBe` Set.fromList e3 - - -- --------------------------------- - - it "respects format config, multiple import-list" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportList.hs" "haskell" - - let config = def { formatOnImportOn = False, formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - let wantedCodeActionTitles = [ "Import module System.IO (hPutStrLn)" - , "Import module System.IO (stdout)" - , "Import module Control.Monad (when)" - , "Import module Data.Maybe (fromMaybe)" - ] - - contents <- executeAllCodeActions doc wantedCodeActionTitles - liftIO $ Set.fromList (T.lines contents) `shouldBe` - Set.fromList - [ "import System.IO (stdout, hPutStrLn)" - , "import Control.Monad (when)" - , "import Data.Maybe (fromMaybe)" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stdout" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - it "respects format config" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportBrittany.hs" "haskell" - _ <- waitForDiagnosticsSource "bios" - - let config = def { formatOnImportOn = False, formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - actionsOrCommands <- getAllCodeActions doc - let action:_ = map fromAction actionsOrCommands - executeCodeAction action - - contents <- getDocumentEdit doc - liftIO $ do - let [l1, l2, l3, l4] = T.lines contents - l1 `shouldBe` "import qualified Data.Maybe" - l2 `shouldBe` "import Control.Monad" - l3 `shouldBe` "main :: IO ()" - l4 `shouldBe` "main = when True $ putStrLn \"hello\"" - - it "import-list respects format config" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportBrittany.hs" "haskell" - _ <- waitForDiagnosticsSource "bios" - - let config = def { formatOnImportOn = False, formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - actionsOrCommands <- getAllCodeActions doc - let _:action:_ = map fromAction actionsOrCommands - executeCodeAction action - - contents <- getDocumentEdit doc - liftIO $ do - let [l1, l2, l3, l4] = T.lines contents - l1 `shouldBe` "import qualified Data.Maybe" - l2 `shouldBe` "import Control.Monad (when)" - l3 `shouldBe` "main :: IO ()" - l4 `shouldBe` "main = when True $ putStrLn \"hello\"" - - it "complex import-list" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportListElaborate.hs" "haskell" - _ <- waitForDiagnosticsSource "bios" - - let config = def { formatOnImportOn = True, formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - let wantedCodeActionTitles = [ "Import module System.IO (hPutStrLn)" - , "Import module Control.Monad (when)" - , "Import module Data.Maybe (fromMaybe)" - , "Import module Data.Function (($))" - , "Import module Data.Maybe (Maybe (Just))" - , "Import module Prelude (Bool (..))" - , "Import module System.IO (stderr)" - ] - - contents <- executeAllCodeActions doc wantedCodeActionTitles - - liftIO $ - T.lines contents `shouldBe` e4 - - it "complex import-list respects format config" $ runSession hieCommand fullCaps "test/testdata" $ do - doc <- openDoc "CodeActionImportListElaborate.hs" "haskell" - _ <- waitForDiagnosticsSource "bios" - - let config = def { formatOnImportOn = False, formattingProvider = formatterName } - sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (toJSON config)) - - let wantedCodeActionTitles = [ "Import module System.IO (hPutStrLn)" - , "Import module Control.Monad (when)" - , "Import module Data.Maybe (fromMaybe)" - , "Import module Data.Function (($))" - , "Import module Data.Maybe (Maybe (Just))" - , "Import module Prelude (Bool (..))" - , "Import module System.IO (stderr)" - ] - - contents <- executeAllCodeActions doc wantedCodeActionTitles - - liftIO $ - T.lines contents `shouldBe` - [ "{-# LANGUAGE NoImplicitPrelude #-}" - , "import System.IO (IO, hPutStrLn, stderr)" - , "import Prelude (Bool(..))" - , "import Control.Monad (when)" - , "import Data.Function (($))" - , "import Data.Maybe (fromMaybe, Maybe(Just))" - , "-- | Main entry point to the program" - , "main :: IO ()" - , "main =" - , " when True" - , " $ hPutStrLn stderr" - , " $ fromMaybe \"Good night, World!\" (Just \"Hello, World!\")" - ] - - where - executeAllCodeActions :: TextDocumentIdentifier -> [T.Text] -> Session T.Text - executeAllCodeActions doc names = - foldM (\_ _ -> do - _ <- waitForDiagnosticsSource "bios" - executeCodeActionByName doc names - content <- skipManyTill publishDiagnosticsNotification $ getDocumentEdit doc - _ <- waitForDiagnosticsSource "bios" - return content - ) - (T.pack "") - [ 1 .. length names ] - - executeCodeActionByName :: TextDocumentIdentifier -> [T.Text] -> Session () - executeCodeActionByName doc names = do - actionsOrCommands <- getAllCodeActions doc - let allActions = map fromAction actionsOrCommands - let actions = filter (\actn -> actn ^. L.title `elem` names) allActions - case actions of - (action:_) -> executeCodeAction action - [] -> - error - $ "No action found to be executed!" - ++ "\n Actual actions titles: " ++ show (map (^. L.title) allActions) - ++ "\n Expected actions titles: " ++ show names - --- Silence warnings -hsImportSpec formatter args = - error $ "Not the right amount of arguments for \"hsImportSpec (" - ++ T.unpack formatter - ++ ")\", expected 4, got " - ++ show (length args) - -- --------------------------------------------------------------------- fromAction :: CAResult -> CodeAction diff --git a/test/unit/HsImportSpec.hs b/test/unit/HsImportSpec.hs new file mode 100644 index 000000000..9526889a3 --- /dev/null +++ b/test/unit/HsImportSpec.hs @@ -0,0 +1,170 @@ +{-# LANGUAGE OverloadedStrings #-} +module HsImportSpec where + +import Control.Monad.IO.Class +import qualified Data.Text as T +import qualified Data.HashMap.Strict as Map +import Haskell.Ide.Engine.MonadTypes +import Haskell.Ide.Engine.PluginUtils +import Haskell.Ide.Engine.Plugin.HsImport +import qualified Haskell.Ide.Engine.Config as Config +import qualified Haskell.Ide.Engine.Plugin.Brittany as Brittany +import qualified Haskell.Ide.Engine.Plugin.Ormolu as Ormolu +import qualified Haskell.Ide.Engine.Plugin.Floskell as Floskell +import System.Directory +import System.FilePath +import Test.Hspec +import TestUtils + + +main :: IO () +main = hspec spec + +spec :: Spec +spec = + describe "hsimport plugin" hsImportSpec + +-- --------------------------------------------------------------------- + +testPlugins :: IdePlugins +testPlugins = pluginDescToIdePlugins + [ Brittany.brittanyDescriptor "brittany" + , Floskell.floskellDescriptor "floskell" + , Ormolu.ormoluDescriptor "ormolu" + ] + +brittanyFilePath :: FilePath +brittanyFilePath = "test" "testdata" "CodeActionImportList.hs" + +dispatchRequestP :: IdeGhcM a -> IO a +dispatchRequestP act = do + cwd <- liftIO $ getCurrentDirectory + runIGM testPlugins (cwd "test" "testdata" "File.hs") act + +-- --------------------------------------------------------------------- + +hsImportSpec :: Spec +hsImportSpec = do + describe "formats with brittany" $ hsImportSpecRunner "brittany" + [ -- Expected output for simple format. + [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad ( when )\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe ( Maybe )\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe ( Maybe(..) )\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe ( Maybe(Nothing) )\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function ( ($) )\n" + ] + ] + describe "formats with floskell" $ hsImportSpecRunner "floskell" + [ -- Expected output for simple format. + [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad (when)\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe)\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe(..))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe(Nothing))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function (($))\n" + ] + ] + describe "formats with ormolu" $ case ghcVersion of + GHC86 -> hsImportSpecRunner "ormolu" + [ -- Expected output for simple format. + [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Control.Monad (when)\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe)\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe (..))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Maybe (Maybe (Nothing))\n" + ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function (($))\n" + ] + ] + _ -> it "is NOP formatter" $ + pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." + +-- --------------------------------------------------------------------- +-- Parameterized HsImport Spec. +-- --------------------------------------------------------------------- +hsImportSpecRunner :: T.Text -> [[TextEdit]] -> Spec +hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do + it "formats" $ do + fp <- makeAbsolute brittanyFilePath + let uri = filePathToUri fp + let act = importModule (ImportParams uri Simple "Control.Monad") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e1 + Nothing -> fail "No Change found" + + it "import-list formats" $ do + fp <- makeAbsolute brittanyFilePath + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ Only "when")) "Control.Monad") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e2 + Nothing -> fail "No Change found" + + it "import-list type formats" $ do + fp <- makeAbsolute brittanyFilePath + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ Only "Maybe")) "Data.Maybe") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e3 + Nothing -> fail "No Change found" + + it "import-list constructor formats" $ do + fp <- makeAbsolute brittanyFilePath + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ AllOf "Maybe")) "Data.Maybe") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e4 + Nothing -> fail "No Change found" + + it "import-list constructor formats" $ do + fp <- makeAbsolute brittanyFilePath + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ OneOf "Maybe" "Nothing")) "Data.Maybe") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e5 + Nothing -> fail "No Change found" + + it "import-list infix function formats" $ do + fp <- makeAbsolute brittanyFilePath + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ Only "$")) "Data.Function") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e6 + Nothing -> fail "No Change found" + +-- Silence warnings +hsImportSpecRunner formatter args = + error $ "Not the right amount of arguments for \"hsImportSpec (" + ++ T.unpack formatter + ++ ")\", got " + ++ show (length args) + +setFormatter :: T.Text -> Config.Config -> Config.Config +setFormatter formatterName cfg = cfg { Config.formattingProvider = formatterName } \ No newline at end of file diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index 776cd9b8f..4d3bcc54d 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -5,9 +5,11 @@ module TestUtils , setupBuildToolFiles , testCommand , runSingle + , runSingle' , runSingleReq , makeRequest , runIGM + , runIGM' , ghcVersion, GhcVersion(..) , logFilePath , readResolver @@ -34,6 +36,7 @@ import Language.Haskell.LSP.Core import Language.Haskell.LSP.Types (LspId(IdInt), fromNormalizedUri) import Haskell.Ide.Engine.MonadTypes hiding (withProgress, withIndefiniteProgress) import qualified Haskell.Ide.Engine.Cradle as Bios +import qualified Haskell.Ide.Engine.Config as Config import System.Directory import System.Environment import System.FilePath @@ -65,7 +68,10 @@ testCommand testPlugins fp act plugin cmd arg res = do fmap fromDynJSON oldApiRes `shouldBe` fmap Just res runSingle :: IdePlugins -> FilePath -> IdeGhcM (IdeResult b) -> IO (IdeResult b) -runSingle testPlugins fp act = runIGM testPlugins fp act +runSingle = runSingle' id + +runSingle' :: (Config.Config -> Config.Config) -> IdePlugins -> FilePath -> IdeGhcM (IdeResult b) -> IO (IdeResult b) +runSingle' modifyConfig testPlugins fp act = runIGM' modifyConfig testPlugins fp act runSingleReq :: ToJSON a => IdePlugins -> FilePath -> PluginId -> CommandId -> a -> IO (IdeResult DynamicJSON) @@ -75,11 +81,18 @@ makeRequest :: ToJSON a => PluginId -> CommandId -> a -> IdeGhcM (IdeResult Dyna makeRequest plugin com arg = runPluginCommand plugin com (toJSON arg) runIGM :: IdePlugins -> FilePath -> IdeGhcM a -> IO a -runIGM testPlugins fp f = do +runIGM = runIGM' id + +runIGM' :: (Config.Config -> Config.Config) -> IdePlugins -> FilePath -> IdeGhcM a -> IO a +runIGM' modifyConfig testPlugins fp f = do stateVar <- newTVarIO $ IdeState emptyModuleCache Map.empty Map.empty Nothing crdl <- Bios.findLocalCradle fp mlibdir <- Bios.getProjectGhcLibDir crdl - runIdeGhcM mlibdir testPlugins dummyLspFuncs stateVar f + let tmpFuncs :: LspFuncs Config.Config + tmpFuncs = dummyLspFuncs + lspFuncs :: LspFuncs Config.Config + lspFuncs = tmpFuncs { config = (fmap . fmap) modifyConfig (config tmpFuncs)} + runIdeGhcM mlibdir testPlugins lspFuncs stateVar f withFileLogging :: FilePath -> IO a -> IO a withFileLogging logFile f = do From 55ccdd3ddb938acffb2546de003266c135d13439 Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 23 Jan 2020 00:04:46 +0100 Subject: [PATCH 086/270] Add tests to force overflows for formatters --- .../testdata/CodeActionImportListElaborate.hs | 1 + test/unit/HsImportSpec.hs | 74 ++++++++++++++++--- 2 files changed, 65 insertions(+), 10 deletions(-) diff --git a/test/testdata/CodeActionImportListElaborate.hs b/test/testdata/CodeActionImportListElaborate.hs index 587f9c042..63f905698 100644 --- a/test/testdata/CodeActionImportListElaborate.hs +++ b/test/testdata/CodeActionImportListElaborate.hs @@ -1,5 +1,6 @@ {-# LANGUAGE NoImplicitPrelude #-} import System.IO (IO) +import Data.List (find, head, last, tail, init, union, (\\), null, length, cons, uncons) -- | Main entry point to the program main :: IO () main = diff --git a/test/unit/HsImportSpec.hs b/test/unit/HsImportSpec.hs index 9526889a3..6029180ab 100644 --- a/test/unit/HsImportSpec.hs +++ b/test/unit/HsImportSpec.hs @@ -33,12 +33,15 @@ testPlugins = pluginDescToIdePlugins , Ormolu.ormoluDescriptor "ormolu" ] -brittanyFilePath :: FilePath -brittanyFilePath = "test" "testdata" "CodeActionImportList.hs" +codeActionImportList :: FilePath +codeActionImportList = "test" "testdata" "CodeActionImportList.hs" + +codeActionBigImportList :: FilePath +codeActionBigImportList = "test" "testdata" "CodeActionImportListElaborate.hs" dispatchRequestP :: IdeGhcM a -> IO a dispatchRequestP act = do - cwd <- liftIO $ getCurrentDirectory + cwd <- liftIO getCurrentDirectory runIGM testPlugins (cwd "test" "testdata" "File.hs") act -- --------------------------------------------------------------------- @@ -59,6 +62,26 @@ hsImportSpec = do ] , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function ( ($) )\n" ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 32))) $ + "import System.IO ( IO\n" <> + " , hPutStrLn\n" <> + " )" + ] + , [ TextEdit (Range (toPos (3, 1)) (toPos (3, 99))) $ + "import Data.List ( find\n" <> + " , head\n" <> + " , last\n" <> + " , tail\n" <> + " , init\n" <> + " , union\n" <> + " , (\\\\)\n" <> + " , null\n" <> + " , length\n" <> + " , cons\n" <> + " , uncons\n" <> + " , reverse\n" <> + " )" + ] ] describe "formats with floskell" $ hsImportSpecRunner "floskell" [ -- Expected output for simple format. @@ -74,6 +97,12 @@ hsImportSpec = do ] , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function (($))\n" ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 32))) "import System.IO (IO, hPutStrLn)" + ] + , [ TextEdit (Range (toPos (3, 1)) (toPos (3, 99))) $ + "import Data.List (find, head, last, tail, init, union, (\\\\), null\n" <> + " , length, cons, uncons, reverse)" + ] ] describe "formats with ormolu" $ case ghcVersion of GHC86 -> hsImportSpecRunner "ormolu" @@ -90,6 +119,10 @@ hsImportSpec = do ] , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 1))) "import Data.Function (($))\n" ] + , [ TextEdit (Range (toPos (2, 1)) (toPos (2, 32))) "import System.IO (IO, hPutStrLn)" + ] + , [ TextEdit (Range (toPos (3, 1)) (toPos (3, 99))) "import Data.List ((\\\\), cons, find, head, init, last, length, null, reverse, tail, uncons, union)" + ] ] _ -> it "is NOP formatter" $ pendingWith "Ormolu only supported by GHC >= 8.6. Need to restore this." @@ -98,9 +131,9 @@ hsImportSpec = do -- Parameterized HsImport Spec. -- --------------------------------------------------------------------- hsImportSpecRunner :: T.Text -> [[TextEdit]] -> Spec -hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do +hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6, e7, e8] = do it "formats" $ do - fp <- makeAbsolute brittanyFilePath + fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri Simple "Control.Monad") @@ -110,7 +143,7 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do Nothing -> fail "No Change found" it "import-list formats" $ do - fp <- makeAbsolute brittanyFilePath + fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "when")) "Control.Monad") @@ -120,7 +153,7 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do Nothing -> fail "No Change found" it "import-list type formats" $ do - fp <- makeAbsolute brittanyFilePath + fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "Maybe")) "Data.Maybe") @@ -130,7 +163,7 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do Nothing -> fail "No Change found" it "import-list constructor formats" $ do - fp <- makeAbsolute brittanyFilePath + fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ AllOf "Maybe")) "Data.Maybe") @@ -140,7 +173,7 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do Nothing -> fail "No Change found" it "import-list constructor formats" $ do - fp <- makeAbsolute brittanyFilePath + fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ OneOf "Maybe" "Nothing")) "Data.Maybe") @@ -150,7 +183,7 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do Nothing -> fail "No Change found" it "import-list infix function formats" $ do - fp <- makeAbsolute brittanyFilePath + fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "$")) "Data.Function") @@ -159,6 +192,27 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6] = do Just (List val) -> val `shouldBe` e6 Nothing -> fail "No Change found" + it "import-list with existing entry formats" $ do + fp <- makeAbsolute codeActionBigImportList + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ Only "hPutStrLn")) "System.IO") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e7 + Nothing -> fail "No Change found" + + it "import-list with forced overflow formats" $ do + fp <- makeAbsolute codeActionBigImportList + let uri = filePathToUri fp + let act = importModule (ImportParams uri (Complex (Import $ Only "reverse")) "Data.List") + + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` e8 + Nothing -> fail "No Change found" + + -- Silence warnings hsImportSpecRunner formatter args = error $ "Not the right amount of arguments for \"hsImportSpec (" From 86ccb3d9e3ce0df604e435b3e9735e3a578ee58d Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 23 Jan 2020 10:50:49 +0100 Subject: [PATCH 087/270] Re-use function for same functionality --- test/unit/HsImportSpec.hs | 57 +++++++++++---------------------------- 1 file changed, 16 insertions(+), 41 deletions(-) diff --git a/test/unit/HsImportSpec.hs b/test/unit/HsImportSpec.hs index 6029180ab..5bc2107a7 100644 --- a/test/unit/HsImportSpec.hs +++ b/test/unit/HsImportSpec.hs @@ -136,81 +136,49 @@ hsImportSpecRunner formatterName [e1, e2, e3, e4, e5, e6, e7, e8] = do fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri Simple "Control.Monad") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e1 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e1 act it "import-list formats" $ do fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "when")) "Control.Monad") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e2 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e2 act it "import-list type formats" $ do fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "Maybe")) "Data.Maybe") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e3 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e3 act it "import-list constructor formats" $ do fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ AllOf "Maybe")) "Data.Maybe") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e4 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e4 act it "import-list constructor formats" $ do fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ OneOf "Maybe" "Nothing")) "Data.Maybe") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e5 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e5 act it "import-list infix function formats" $ do fp <- makeAbsolute codeActionImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "$")) "Data.Function") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e6 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e6 act it "import-list with existing entry formats" $ do fp <- makeAbsolute codeActionBigImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "hPutStrLn")) "System.IO") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e7 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e7 act it "import-list with forced overflow formats" $ do fp <- makeAbsolute codeActionBigImportList let uri = filePathToUri fp let act = importModule (ImportParams uri (Complex (Import $ Only "reverse")) "Data.List") - - IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act - case Map.lookup uri changes of - Just (List val) -> val `shouldBe` e8 - Nothing -> fail "No Change found" + expectHsImportResult formatterName fp uri e8 act -- Silence warnings @@ -221,4 +189,11 @@ hsImportSpecRunner formatter args = ++ show (length args) setFormatter :: T.Text -> Config.Config -> Config.Config -setFormatter formatterName cfg = cfg { Config.formattingProvider = formatterName } \ No newline at end of file +setFormatter formatterName cfg = cfg { Config.formattingProvider = formatterName } + +expectHsImportResult :: T.Text -> FilePath -> Uri -> [TextEdit] -> IdeGhcM (IdeResult WorkspaceEdit) -> IO () +expectHsImportResult formatterName fp uri expectedChanges act = do + IdeResultOk (WorkspaceEdit (Just changes) _) <- runSingle' (setFormatter formatterName) testPlugins fp act + case Map.lookup uri changes of + Just (List val) -> val `shouldBe` expectedChanges + Nothing -> fail "No Change found" \ No newline at end of file From 93d35740703cb9cc73ed71a00fc6b9114ef434c4 Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 23 Jan 2020 13:16:03 +0100 Subject: [PATCH 088/270] Drop GHC version 8.6.1, 8.6.2 and 8.6.3 (#1592) Version 8.6.3 is broken on windows, so should not be used. All other minor versions do not have a stackage LTS, so stack users should not be using them, either, since they can upgrade within an LTS with ease. --- .azure/linux-stack.yml | 10 ++----- .azure/macos-stack.yml | 6 ++-- .azure/windows-stack.yml | 9 ++---- .circleci/config.yml | 18 ----------- appveyor.yml | 4 +-- stack-8.6.1.yaml | 65 ---------------------------------------- stack-8.6.2.yaml | 59 ------------------------------------ stack-8.6.3.yaml | 55 ---------------------------------- 8 files changed, 7 insertions(+), 219 deletions(-) delete mode 100644 stack-8.6.1.yaml delete mode 100644 stack-8.6.2.yaml delete mode 100644 stack-8.6.3.yaml diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index ec12e3f7a..404abaec4 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -13,12 +13,6 @@ jobs: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: YAML_FILE: stack-8.6.4.yaml - stack-8.6.3: - YAML_FILE: stack-8.6.3.yaml - stack-8.6.2: - YAML_FILE: stack-8.6.2.yaml - stack-8.6.1: - YAML_FILE: stack-8.6.1.yaml stack-8.4.4: YAML_FILE: stack-8.4.4.yaml stack-8.4.3: @@ -65,7 +59,7 @@ jobs: source .azure/linux-stack.bashrc stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests mkdir .azure-deploy - stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy + stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy cd .azure-deploy if [ $YAML_FILE != "stack.yaml" ]; then GHC_MINOR_VERSION=${YAML_FILE:6:5} @@ -80,7 +74,7 @@ jobs: cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-linux-x86_64 tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * - displayName: Install `hie` + displayName: Install `hie` - bash: | source .azure/linux-stack.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index 1f63b3abd..475d93ed3 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -13,8 +13,6 @@ jobs: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: YAML_FILE: stack-8.6.4.yaml - stack-8.6.3: - YAML_FILE: stack-8.6.3.yaml stack-8.4.4: YAML_FILE: stack-8.4.4.yaml stack-8.4.3: @@ -62,7 +60,7 @@ jobs: source .azure/macos.bashrc stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests mkdir .azure-deploy - stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy + stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy cd .azure-deploy if [ $YAML_FILE != "stack.yaml" ]; then GHC_MINOR_VERSION=${YAML_FILE:6:5} @@ -77,7 +75,7 @@ jobs: cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-macos-x86_64 tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * - displayName: Install `hie` + displayName: Install `hie` - bash: | source .azure/macos.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index d5a02aac4..c7379536f 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -12,10 +12,6 @@ jobs: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: YAML_FILE: stack-8.6.4.yaml - stack-8.6.2: - YAML_FILE: stack-8.6.2.yaml - stack-8.6.1: - YAML_FILE: stack-8.6.1.yaml stack-8.4.4: YAML_FILE: stack-8.4.4.yaml stack-8.4.3: @@ -63,7 +59,7 @@ jobs: source .azure/windows.bashrc stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests mkdir .azure-deploy - stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy + stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy cd .azure-deploy if [ $YAML_FILE != "stack.yaml" ]; then GHC_MINOR_VERSION=${YAML_FILE:6:5} @@ -78,7 +74,7 @@ jobs: cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-windows-x86_64 7z a "$(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.zip" * - displayName: Install `hie` + displayName: Install `hie` - bash: | source .azure/windows.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies @@ -128,4 +124,3 @@ jobs: tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT) tar -vczf .azure-cache/stack-work.tar.gz .stack-work displayName: "Pack cache" - \ No newline at end of file diff --git a/.circleci/config.yml b/.circleci/config.yml index 769c515c5..bd3312b1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -116,21 +116,6 @@ jobs: - STACK_FILE: "stack-8.4.4.yaml" <<: *defaults - ghc-8.6.1: - environment: - - STACK_FILE: "stack-8.6.1.yaml" - <<: *defaults - - ghc-8.6.2: - environment: - - STACK_FILE: "stack-8.6.2.yaml" - <<: *defaults - - ghc-8.6.3: - environment: - - STACK_FILE: "stack-8.6.3.yaml" - <<: *defaults - ghc-8.6.4: environment: - STACK_FILE: "stack-8.6.4.yaml" @@ -184,9 +169,6 @@ workflows: - ghc-8.4.2 - ghc-8.4.3 - ghc-8.4.4 - - ghc-8.6.1 - - ghc-8.6.2 - # - ghc-8.6.3 - ghc-8.6.4 - ghc-8.6.5 - ghc-nightly diff --git a/appveyor.yml b/appveyor.yml index e45e2ca10..1a8f04e1a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,7 @@ version: 1.0.{build} environment: matrix: -# - GHCVER: 8.6.4 - - GHCVER: 8.6.2 - - GHCVER: 8.6.1 + - GHCVER: 8.6.5 - GHCVER: 8.4.4 - GHCVER: 8.4.3 - GHCVER: 8.4.2 diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml deleted file mode 100644 index bc5e343fa..000000000 --- a/stack-8.6.1.yaml +++ /dev/null @@ -1,65 +0,0 @@ -resolver: nightly-2018-11-11 # Last GHC 8.6.1 -packages: - - . - - hie-plugin-api - -extra-deps: -# - ./submodules/HaRe - -- apply-refact-0.6.0.0 -- brittany-0.12.1.0 -- butcher-1.3.2.3 -- bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 -- cabal-install-2.4.0.0 -- cabal-plan-0.5.0.0 -- constrained-dynamic-0.1.0.0 -- czipwith-1.0.1.1 -- data-tree-print-0.1.0.2 -- deque-0.4.3 -- extra-1.6.18 -- filepattern-0.1.1 -- floskell-0.10.2 -- ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 -- haddock-api-2.21.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 -- haskell-src-exts-1.21.1 -- haskell-src-exts-util-0.2.5 -- hie-bios-0.3.2 -- hlint-2.2.8 -- hoogle-5.0.17.11 -- hsimport-0.11.0 -- libyaml-0.1.1.0 -- lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2 -- monad-memo-0.4.1 -- monoid-subclasses-0.4.6.1 -- multistate-0.8.0.1 -- parser-combinators-1.2.1 -- ormolu-0.0.3.0 -- primes-0.2.1.0 -- resolv-0.1.1.2 -- rope-utf16-splay-0.3.1.0 -- strict-list-0.1.5 -- syz-0.2.0.0 -- temporary-1.2.1.1 -- unix-compat-0.5.2 -- unordered-containers-0.2.10.0 -- yaml-0.11.1.2 - -# To make build work in windows 7 -- unix-time-0.4.7 - -flags: - haskell-ide-engine: - pedantic: true - hie-plugin-api: - pedantic: true - -nix: - packages: [ icu libcxx zlib ] - -concurrent-tests: false diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml deleted file mode 100644 index be0194778..000000000 --- a/stack-8.6.2.yaml +++ /dev/null @@ -1,59 +0,0 @@ -resolver: nightly-2018-12-17 # Last GHC 8.6.2 -packages: - - . - - hie-plugin-api - -extra-deps: -# - ./submodules/HaRe - -- brittany-0.12.1.0 -- butcher-1.3.2.3 -- bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 -- cabal-plan-0.5.0.0 -- constrained-dynamic-0.1.0.0 -- deque-0.4.3 -- extra-1.6.18 -- filepattern-0.1.1 -- floskell-0.10.2 -- ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 -- haddock-api-2.21.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 -- haskell-src-exts-1.21.1 -- haskell-src-exts-util-0.2.5 -- hie-bios-0.3.2 -- hlint-2.2.8 -- hoogle-5.0.17.11 -- hsimport-0.11.0 -- libyaml-0.1.1.0 -- lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2 -- monad-memo-0.4.1 -- multistate-0.8.0.1 -- parser-combinators-1.2.1 -- ormolu-0.0.3.0 -- rope-utf16-splay-0.3.1.0 -- strict-list-0.1.5 -- syz-0.2.0.0 -- temporary-1.2.1.1 -- unix-compat-0.5.2 -- unordered-containers-0.2.10.0 -- yaml-0.11.1.2 -# To make build work in windows 7 -- unix-time-0.4.7 -#- hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 - - -flags: - haskell-ide-engine: - pedantic: true - hie-plugin-api: - pedantic: true - -nix: - packages: [ icu libcxx zlib ] - -concurrent-tests: false diff --git a/stack-8.6.3.yaml b/stack-8.6.3.yaml deleted file mode 100644 index 012836a36..000000000 --- a/stack-8.6.3.yaml +++ /dev/null @@ -1,55 +0,0 @@ -resolver: lts-13.10 # Last GHC 8.6.3 -packages: - - . - - hie-plugin-api - -extra-deps: -# - ./submodules/HaRe - -- brittany-0.12.1.0 -- butcher-1.3.2.1 -- bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 -- cabal-plan-0.5.0.0 -- constrained-dynamic-0.1.0.0 -- extra-1.6.18 -- floskell-0.10.2 -- ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 -- haddock-api-2.21.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 -- haskell-src-exts-1.21.1 -- haskell-src-exts-util-0.2.5 -- hie-bios-0.3.2 -- hlint-2.2.8 -- hoogle-5.0.17.11 -- hsimport-0.11.0 -- lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2 -- monad-memo-0.4.1 -- multistate-0.8.0.1 -- optparse-simple-0.1.0 -- ormolu-0.0.3.0 -- parser-combinators-1.2.1 -- rope-utf16-splay-0.3.1.0 -- syz-0.2.0.0 -- temporary-1.2.1.1 -- unix-compat-0.5.2 -- unordered-containers-0.2.10.0 -- yaml-0.11.1.2 - -# To make build work in windows 7 -- unix-time-0.4.7 - -flags: - haskell-ide-engine: - pedantic: true - hie-plugin-api: - pedantic: true - -nix: - packages: [ icu libcxx zlib ] - -concurrent-tests: false From 1fef5ebeb0ecba6d1f38d9c73acb84279d0bbf13 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 23 Jan 2020 13:43:56 +0100 Subject: [PATCH 089/270] Add windows+cabal job and improvements --- .azure/linux-cabal.yml | 40 ++++-- .azure/linux-installhs-stack.yml | 31 ++++- .azure/linux-stack.yml | 23 +++- .azure/macos-installhs-stack.yml | 21 +++ .azure/macos-stack.yml | 32 +++-- .azure/windows-cabal.bashrc | 5 + .azure/windows-cabal.yml | 128 ++++++++++++++++++ .azure/windows-installhs-cabal.yml | 67 +++++---- .azure/windows-installhs-stack.yml | 34 ++++- .../{windows.bashrc => windows-stack.bashrc} | 0 .azure/windows-stack.yml | 57 ++++---- azure-pipelines.yml | 1 + 12 files changed, 354 insertions(+), 85 deletions(-) create mode 100644 .azure/windows-cabal.bashrc create mode 100644 .azure/windows-cabal.yml rename .azure/{windows.bashrc => windows-stack.bashrc} (100%) diff --git a/.azure/linux-cabal.yml b/.azure/linux-cabal.yml index 9554e5223..1e93abedb 100644 --- a/.azure/linux-cabal.yml +++ b/.azure/linux-cabal.yml @@ -5,16 +5,22 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: + # Fail with compilation error building haddock-api + # ghc-8.8.2: + # GHC_VERSION: "8.8.2" + ghc-8.8.1: + GHC_VERSION: "8.8.1" ghc-8.6.5: GHC_VERSION: "8.6.5" ghc-8.4.4: GHC_VERSION: "8.4.4" variables: CABAL_VERSION: "3.0" + LIQUID_VERSION: "0.8.6.2" steps: - task: Cache@2 inputs: - key: '"cabal-store" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + key: '"cabal" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" @@ -23,7 +29,7 @@ jobs: tar -vxzf .azure-cache/cabal-root.tar.gz -C / mkdir -p $HOME/.ghc tar -vxzf .azure-cache/ghc-root.tar.gz -C / - mkdir -p dist-newtyle + mkdir -p dist-newstyle tar -vxzf .azure-cache/cabal-dist.tar.gz displayName: "Unpack cache" condition: eq(variables.CACHE_RESTORED, 'true') @@ -31,18 +37,26 @@ jobs: git submodule sync git submodule update --init displayName: Sync submodules + - bash: | + # To install ghc if they are not yet included in the agent image + ghc --version || (sudo apt-get update && sudo apt-get install -y ghc-$GHC_VERSION) + displayName: Install ghc - bash: | source .azure/linux-cabal.bashrc cabal v2-update - cabal v2-build --only-dependencies + echo "overwrite-policy: always" >> $HOME/.cabal/config + displayName: Update cabal + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-build --disable-tests --disable-benchmarks --only-dependencies displayName: Build dependencies - bash: | source .azure/linux-cabal.bashrc - cabal v2-build + cabal v2-build --disable-tests --disable-benchmarks displayName: Build `hie` - bash: | source .azure/linux-cabal.bashrc - cabal v2-install --overwrite-policy=always # `hie` binary required locally for tests + cabal v2-install # `hie` binary required locally for tests displayName: Install `hie` - bash: | source .azure/linux-cabal.bashrc @@ -54,9 +68,8 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/linux-cabal.bashrc - # to not reinstall hie cd $(Agent.TempDirectory) - cabal v2-install liquidhaskell-0.8.6.2 -w /opt/ghc/8.6.5/bin/ghc --overwrite-policy=always + cabal v2-install liquidhaskell-$LIQUID_VERSION -w /opt/ghc/8.6.5/bin/ghc displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | source .azure/linux-cabal.bashrc @@ -65,9 +78,16 @@ jobs: displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | source .azure/linux-cabal.bashrc - # TODO: Investigate why the test suite can't be run in parallel - cabal v2-test -j1 - displayName: Run Test + cabal v2-test :unit-test + displayName: "Run Test: unit-test" + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test + displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" + - bash: | + source .azure/linux-cabal.bashrc + cabal v2-test :func-test + displayName: "Run Test: func-test" - bash: | mkdir -p .azure-cache tar -vczf .azure-cache/cabal-root.tar.gz $HOME/.cabal diff --git a/.azure/linux-installhs-stack.yml b/.azure/linux-installhs-stack.yml index 0fc930ed1..0695fb669 100644 --- a/.azure/linux-installhs-stack.yml +++ b/.azure/linux-installhs-stack.yml @@ -6,6 +6,21 @@ jobs: variables: YAML_FILE: install/shake.yaml steps: + - task: Cache@2 + inputs: + key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE) | $(Build.SourcesDirectory)/install/shake.yaml' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Cache stack-root" + - bash: | + mkdir -p $STACK_ROOT + tar -vxzf .azure-cache/stack-root.tar.gz -C / + mkdir -p .stack-work + tar -vxzf .azure-cache/stack-work.tar.gz + mkdir -p ./install/.stack-work + tar -vxzf .azure-cache/install-stack-work.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') - bash: | export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root mkdir -p ~/.local/bin @@ -13,22 +28,28 @@ jobs: tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' displayName: Install stack - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack setup --stack-yaml $(YAML_FILE) displayName: Install GHC - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack --stack-yaml $(YAML_FILE) --install-ghc build --only-dependencies displayName: Build dependencies - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie-install` - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack install.hs help displayName: Run help of `install.hs` - bash: | - source .azure/linux.bashrc + source .azure/linux-stack.bashrc stack install.hs latest displayName: Run latest target of `install.hs` + - bash: | + mkdir -p .azure-cache + tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT) + tar -vczf .azure-cache/stack-work.tar.gz .stack-work + tar -vczf .azure-cache/install-stack-work.tar.gz ./install/.stack-work + displayName: "Pack cache" diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 404abaec4..667bb5e2b 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -21,6 +21,7 @@ jobs: YAML_FILE: stack-8.4.2.yaml variables: STACK_ROOT: /home/vsts/.stack + CABAL_VERSION: "3.0" steps: - task: Cache@2 inputs: @@ -62,9 +63,9 @@ jobs: stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy cd .azure-deploy if [ $YAML_FILE != "stack.yaml" ]; then - GHC_MINOR_VERSION=${YAML_FILE:6:5} + GHC_VERSION=${YAML_FILE:6:5} GHC_MAJOR_VERSION=${YAML_FILE:6:3} - cp hie hie-$GHC_MINOR_VERSION + cp hie hie-$GHC_VERSION cp hie hie-$GHC_MAJOR_VERSION else GHC_MINOR_VERSION=nightly @@ -72,7 +73,7 @@ jobs: stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" mkdir -p data cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data - ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-linux-x86_64 + ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_VERSION-linux-x86_64 tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * displayName: Install `hie` - bash: | @@ -94,10 +95,18 @@ jobs: displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | source .azure/linux-stack.bashrc - # cabal is also a test runtime dependency - export PATH=/opt/cabal/3.0/bin:$PATH - stack test --stack-yaml $(YAML_FILE) - displayName: Run Test + # cabal is also a test runtime dependency for unit-test suite + export PATH=/opt/cabal/$CABAL_VERSION/bin:$PATH + stack test :unit-test --stack-yaml $(YAML_FILE) + displayName: "Run Test: unit-test" + - bash: | + source .azure/linux-stack.bashrc + stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) + displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" + - bash: | + source .azure/linux-stack.bashrc + stack test :func-test --stack-yaml $(YAML_FILE) + displayName: "Run Test: func-test" - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/.azure/macos-installhs-stack.yml b/.azure/macos-installhs-stack.yml index edabb9cac..337a7a7c5 100644 --- a/.azure/macos-installhs-stack.yml +++ b/.azure/macos-installhs-stack.yml @@ -6,6 +6,21 @@ jobs: variables: YAML_FILE: install/shake.yaml steps: + - task: Cache@2 + inputs: + key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE) | $(Build.SourcesDirectory)/install/shake.yaml' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Cache stack-root" + - bash: | + mkdir -p $STACK_ROOT + tar -vxzf .azure-cache/stack-root.tar.gz -C / + mkdir -p .stack-work + tar -vxzf .azure-cache/stack-work.tar.gz + mkdir -p ./install/.stack-work + tar -vxzf .azure-cache/install-stack-work.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') - bash: | export STACK_ROOT="$(Build.SourcesDirectory)"/.stack-root mkdir -p ~/.local/bin @@ -32,3 +47,9 @@ jobs: source .azure/macos.bashrc stack install.hs latest displayName: Run latest target of `install.hs` + - bash: | + mkdir -p .azure-cache + tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT) + tar -vczf .azure-cache/stack-work.tar.gz .stack-work + tar -vczf .azure-cache/install-stack-work.tar.gz ./install/.stack-work + displayName: "Pack cache" diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index 475d93ed3..ecb718e33 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -63,17 +63,17 @@ jobs: stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy cd .azure-deploy if [ $YAML_FILE != "stack.yaml" ]; then - GHC_MINOR_VERSION=${YAML_FILE:6:5} + GHC_VERSION=${YAML_FILE:6:5} GHC_MAJOR_VERSION=${YAML_FILE:6:3} - cp hie hie-$GHC_MINOR_VERSION + cp hie hie-$GHC_VERSION cp hie hie-$GHC_MAJOR_VERSION else - GHC_MINOR_VERSION=nightly + GHC_VERSION=nightly fi stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" mkdir -p data cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data - ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-macos-x86_64 + ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_VERSION-macos-x86_64 tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * displayName: Install `hie` - bash: | @@ -98,17 +98,31 @@ jobs: - bash: | source .azure/macos.bashrc brew install cabal-install - displayName: "Install Runtime Test-Dependencies: cabal" + displayName: "Install Runtime Unit Test-Dependencies: cabal" + - bash: | + source .azure/macos.bashrc + stack test :unit-test --stack-yaml $(YAML_FILE) + displayName: "Run Test: unit-test" + # TODO: Enable dispatcher-test for ghc-8.4.* - bash: | source .azure/macos.bashrc GHC_MAJOR_VERSION=${YAML_FILE:6:3} if [ $GHC_MAJOR_VERSION != "8.4" ]; then - stack test --stack-yaml $(YAML_FILE) + TEST_TARGETS=:dispatcher-test :plugin-dispatcher-test :wrapper-test else - #TODO Enable dispatcher-test and func-test for ghc-8.4.* - stack test --stack-yaml $(YAML_FILE) :unit-test :plugin-dispatcher-test :wrapper-test + TEST_TARGETS=:plugin-dispatcher-test :wrapper-test + fi + stack test $TEST_TARGETS --stack-yaml $(YAML_FILE) + displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" + condition: False + # TODO: Enable func-test for ghc-8.4.* + - bash: | + source .azure/macos.bashrc + GHC_MAJOR_VERSION=${YAML_FILE:6:3} + if [ $GHC_MAJOR_VERSION != "8.4" ]; then + stack test :func-test --stack-yaml $(YAML_FILE) fi - displayName: Run Test + displayName: "Run Test: func-test" - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/.azure/windows-cabal.bashrc b/.azure/windows-cabal.bashrc new file mode 100644 index 000000000..7ad443a98 --- /dev/null +++ b/.azure/windows-cabal.bashrc @@ -0,0 +1,5 @@ +export GHCS_PATH=$(cygpath $ProgramData)/chocolatey/lib/ghc/tools +export GHC_PATH=$GHCS_PATH/ghc-$GHC_VERSION +export CABAL_ROOT=$(cygpath $APPDATA)/cabal +export Z3_BIN_PATH=/usr/local/z3-4.8.5-x64-win/bin +export PATH=$CABAL_ROOT/bin:$GHC_PATH/bin:$Z3_BIN_PATH:$PATH diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml new file mode 100644 index 000000000..1008d9812 --- /dev/null +++ b/.azure/windows-cabal.yml @@ -0,0 +1,128 @@ +jobs: +- job: Windows_Cabal + timeoutInMinutes: 0 + pool: + vmImage: windows-2019 + strategy: + matrix: + # It still is not in chocolatey + # ghc-8.8.2: + # GHC_VERSION: "8.8.2" + ghc-8.6.5: + GHC_VERSION: "8.6.5" + ghc-8.4.4: + GHC_VERSION: "8.4.4" + variables: + CABAL_VERSION: "3.0.0.0" + CABAL_STORE_DIR: "D:\\sd" + LIQUID_VERSION: "0.8.6.2" + STACK_ROOT: "D:\\sr" + steps: + - task: Cache@2 + inputs: + key: '"cabal" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Download cache" + - bash: | + df -k + source .azure/windows-cabal.bashrc + mkdir -p $CABAL_ROOT + tar -vxzf .azure-cache/cabal-root.tar.gz -C /c + mkdir -p $CABAL_STORE_DIR + tar -vxzf .azure-cache/cabal-store.tar.gz -C /d + mkdir -p ${CABAL_STORE_DIR}i + tar -vxzf .azure-cache/cabal-store-install.tar.gz -C /d + mkdir -p dist-newstyle + tar -vxzf .azure-cache/cabal-dist.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') + - bash: | + git submodule sync + git submodule update --init + displayName: Sync submodules + - bash: | + choco install -y --ignore-dependencies ghc --version=$GHC_VERSION + displayName: Install ghc + - bash: | + choco install -y cabal --version=$CABAL_VERSION + $(cygpath $ProgramData)/chocolatey/bin/RefreshEnv.cmd + displayName: Install cabal + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-update + echo "store-dir: $CABAL_STORE_DIR" >> $CABAL_ROOT/config + echo "overwrite-policy: always" >> $CABAL_ROOT/config + displayName: Update cabal + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-build all --disable-tests --disable-benchmarks --only-dependencies + displayName: Build dependencies + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-build all --disable-tests --disable-benchmarks + displayName: Build `hie` + - bash: | + source .azure/windows-cabal.bashrc + # `hie` binary required locally for tests + cabal --store-dir ${CABAL_STORE_DIR}i v2-install + displayName: Install `hie` + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-build all --enable-tests --enable-benchmarks --only-dependencies + displayName: Build Test-dependencies + - bash: | + mkdir -p /usr/local + curl -L https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-win.zip -o /usr/local/z3.zip + unzip -o /usr/local/z3.zip -d /usr/local/ + displayName: "Install Runtime Test-Dependencies: z3" + - bash: | + source .azure/windows-cabal.bashrc + choco install -y --ignore-dependencies ghc --version=8.6.5 + # to not reinstall hie + cd "$(Agent.TempDirectory)" + cabal v2-install liquidhaskell-$LIQUID_VERSION -w $GHCS_PATH/ghc-8.6.5/bin/ghc.exe + displayName: "Install Runtime Test-Dependencies: liquidhaskell" + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-build hoogle + cabal v2-exec hoogle generate + displayName: "Install Runtime Test-Dependencies: hoogle database" + - bash: | + curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip + unzip -o /usr/bin/stack.zip -d /usr/bin/ + mkdir -p "$STACK_ROOT" + echo "local-programs-path: D:/bin/stack" > $STACK_ROOT/config.yaml + # If we don't install the ghc used in test projects in advance, tests fail + stack setup --resolver=lts-14.20 + displayName: "Install Runtime Unit Test-Dependencies: stack" + - bash: | + source .azure/windows-cabal.bashrc + # TODO: Enable CabalHelper tests + if [ $GHC_VERSION = "8.4.4" ]; then + TEST_OPTIONS=--test-options="--skip=CabalHelper" + fi + cabal v2-test :unit-test $TEST_OPTIONS + displayName: "Run Test: unit-test" + # TODO: Enable rest of test suites in windows + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test + displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" + condition: False + - bash: | + source .azure/windows-cabal.bashrc + # TODO: Enable completion test + if [ $GHC_VERSION = "8.4.4" ]; then + TEST_OPTIONS="--test-options=\"--skip=/Completion/completions/works/\"" + fi + cabal v2-test :func-test $TEST_OPTIONS + displayName: "Run Test: func-test" + - bash: | + source .azure/windows-cabal.bashrc + mkdir -p .azure-cache + tar -vczf .azure-cache/cabal-root.tar.gz $CABAL_ROOT + tar -vczf .azure-cache/cabal-store.tar.gz $(cygpath $CABAL_STORE_DIR) + tar -vczf .azure-cache/cabal-store-install.tar.gz $(cygpath $CABAL_STORE_DIR)i + tar -vczf .azure-cache/cabal-dist.tar.gz dist-newstyle + displayName: "Pack cache" \ No newline at end of file diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index 4c488edee..16bd6d439 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -4,36 +4,53 @@ jobs: pool: vmImage: windows-2019 variables: - YAML_FILE: install/shake.yaml - PROJECT_FILE: install/shake.project - STACK_ROOT: "C:\\sr" - # TODO: Replace stack with chocolatey for installing ghc and cabal + GHC_VERSION: "8.6.5" + CABAL_VERSION: "3.0.0.0" + PROJECT_FILE: "./install/shake.project" + CABAL_STORE_DIR: "D:\\sd" steps: + - task: Cache@2 + inputs: + key: '"cabal-installhs" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Download cache" - bash: | - curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip - unzip -o /usr/bin/stack.zip -d /usr/bin/ - displayName: Install stack + source .azure/windows-cabal.bashrc + mkdir -p $CABAL_ROOT + tar -vxzf .azure-cache/cabal-root.tar.gz -C /c + mkdir -p $CABAL_STORE_DIR + tar -vxzf .azure-cache/cabal-store.tar.gz -C /d + mkdir -p ./dist-newstyle + tar -vxzf .azure-cache/cabal-dist.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') - bash: | - source .azure/windows.bashrc - stack setup --stack-yaml $(YAML_FILE) - displayName: Install GHC + choco install -y --ignore-dependencies ghc --version=$GHC_VERSION + displayName: Install ghc - bash: | - source .azure/windows.bashrc - stack install Cabal-3.0.0.0 cabal-install-3.0.0.0 --stack-yaml $(YAML_FILE) - displayName: Install `cabal-install` + source .azure/windows-cabal.bashrc + choco install -y cabal --version=$CABAL_VERSION + $(cygpath $ProgramData)/chocolatey/bin/RefreshEnv.cmd + displayName: Install cabal - bash: | - source .azure/windows.bashrc + source .azure/windows-cabal.bashrc cabal v2-update - displayName: update cabal + echo "store-dir: $CABAL_STORE_DIR" >> $CABAL_ROOT/config + displayName: Update cabal - bash: | - source .azure/windows.bashrc - GHC_PATH=$(stack path --stack-yaml $YAML_FILE --compiler-exe) - cabal v2-run install.hs -w $GHC_PATH --project-file $(PROJECT_FILE) help + source .azure/windows-cabal.bashrc + cabal v2-run ./install.hs --project-file $PROJECT_FILE help displayName: Run help of `install.hs` - # - bash: | - # source .azure/windows.bashrc - # GHC_PATH=$(stack path --stack-yaml $YAML_FILE --compiler-exe) - # GHC_DIR=$(dirname $GHC_PATH) - # export PATH=$(cygpath $GHC_DIR):$PATH - # cabal v2-run install.hs -w $GHC_PATH --project-file $(PROJECT_FILE) build-latest - # displayName: Run build-latest target of `install.hs` + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-run ./install.hs --project-file $PROJECT_FILE latest + displayName: Run build-latest target of `install.hs` + - bash: | + source .azure/windows-cabal.bashrc + mkdir -p .azure-cache + tar -vczf .azure-cache/cabal-root.tar.gz $CABAL_ROOT + tar -vczf .azure-cache/cabal-store.tar.gz $(cygpath $CABAL_STORE_DIR) + tar -vczf .azure-cache/cabal-dist.tar.gz dist-newstyle + displayName: "Pack cache" + diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 4290b5298..6c77ffcae 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -7,28 +7,50 @@ jobs: YAML_FILE: install/shake.yaml STACK_ROOT: "D:\\sr" steps: + - task: Cache@2 + inputs: + key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE) | $(Build.SourcesDirectory)/install/shake.yaml' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Cache stack-root" + - bash: | + mkdir -p $STACK_ROOT + tar -vxzf .azure-cache/stack-root.tar.gz -C /d + mkdir -p .stack-work + tar -vxzf .azure-cache/stack-work.tar.gz + mkdir -p ./install/.stack-work + tar -vxzf .azure-cache/install-stack-work.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ + echo "local-programs-path: D:/bin/stack" > $STACK_ROOT/config.yaml displayName: Install stack - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack setup --stack-yaml $(YAML_FILE) displayName: Install GHC - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack --stack-yaml $(YAML_FILE) build --only-dependencies displayName: Build dependencies - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie-install` - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack install.hs help displayName: Run help of `install.hs` - bash: | - source .azure/windows.bashrc - # Some executions fails with spurious errors installing the exe + source .azure/windows-stack.bashrc + # Some executions fails with spurious errors installing executables stack install.hs latest || stack install.hs latest displayName: Run latest target of `install.hs` + - bash: | + mkdir -p .azure-cache + tar -vczf .azure-cache/stack-root.tar.gz $(cygpath $STACK_ROOT) + tar -vczf .azure-cache/stack-work.tar.gz .stack-work + tar -vczf .azure-cache/install-stack-work.tar.gz ./install/.stack-work + displayName: "Pack cache" diff --git a/.azure/windows.bashrc b/.azure/windows-stack.bashrc similarity index 100% rename from .azure/windows.bashrc rename to .azure/windows-stack.bashrc diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index c7379536f..b84ab33e1 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -5,9 +5,8 @@ jobs: vmImage: windows-2019 strategy: matrix: - # We can't use stack.yaml while it uses ghc-8.8.1 - # stack-def: - # YAML_FILE: stack.yaml + stack-def: + YAML_FILE: stack.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: @@ -20,6 +19,7 @@ jobs: YAML_FILE: stack-8.4.2.yaml variables: STACK_ROOT: "D:\\sr" + CABAL_VERSION: "3.0.0.0" steps: - task: Cache@2 @@ -30,7 +30,7 @@ jobs: displayName: "Cache stack-root" - bash: | mkdir -p $STACK_ROOT - tar -vxzf .azure-cache/stack-root.tar.gz -C / + tar -vxzf .azure-cache/stack-root.tar.gz -C /d mkdir -p .stack-work tar -vxzf .azure-cache/stack-work.tar.gz displayName: "Unpack cache" @@ -42,41 +42,45 @@ jobs: - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ + mkdir -p "$STACK_ROOT" + echo "local-programs-path: D:/bin/stack" > "$STACK_ROOT/config.yaml" displayName: Install stack - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack setup --stack-yaml $(YAML_FILE) displayName: Install GHC - bash: | - source .azure/windows.bashrc - stack --stack-yaml $(YAML_FILE) --install-ghc build --only-dependencies + source .azure/windows-stack.bashrc + STACK_CMD="stack build --stack-yaml $(YAML_FILE) --only-dependencies" + # Some executions fails with spurious errors installing executables + $STACK_CMD || $STACK_CMD displayName: Build dependencies - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie` - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests mkdir .azure-deploy stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy cd .azure-deploy if [ $YAML_FILE != "stack.yaml" ]; then - GHC_MINOR_VERSION=${YAML_FILE:6:5} + GHC_VERSION=${YAML_FILE:6:5} GHC_MAJOR_VERSION=${YAML_FILE:6:3} - cp hie.exe hie-$GHC_MINOR_VERSION.exe + cp hie.exe hie-$GHC_VERSION.exe cp hie.exe hie-$GHC_MAJOR_VERSION.exe else - GHC_MINOR_VERSION=nightly + GHC_VERSION=nightly fi stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" mkdir -p data cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data - ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_MINOR_VERSION-windows-x86_64 + ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_VERSION-windows-x86_64 7z a "$(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.zip" * displayName: Install `hie` - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies displayName: Build Test-dependencies - bash: | @@ -86,34 +90,41 @@ jobs: unzip -o /usr/local/z3.zip -d /usr/local/ displayName: "Install Runtime Test-Dependencies: z3" - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc stack build hoogle --stack-yaml=$(YAML_FILE) stack exec hoogle generate --stack-yaml=$(YAML_FILE) displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | - source .azure/windows.bashrc - choco install cabal + source .azure/windows-stack.bashrc + choco install -y cabal --version 3.0.0.0 /C/ProgramData/chocolatey/bin/RefreshEnv.cmd displayName: "Install Runtime Test-Dependencies: cabal" - bash: | - source .azure/windows.bashrc + source .azure/windows-stack.bashrc # TODO: Enable CabalHelper unit tests, see https://github.com/DanielG/cabal-helper/issues/91 if [ $YAML_FILE = "stack-8.6.4.yaml" ]; then TEST_ARGS=--test-arguments="--skip=CabalHelper" fi - # TODO: Enable rest of test suites - stack test --stack-yaml $(YAML_FILE) :unit-test :plugin-dispatcher-test $TEST_ARGS # :dispatcher-test :wrapper-test - # TODO: Enable failing functional test + stack test :unit-test $TEST_ARGS --stack-yaml $(YAML_FILE) + displayName: "Run Test: unit-test" + # TODO: Enable rest of test suites in windows + - bash: | + source .azure/windows-stack.bashrc + stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) + displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" + condition: False + - bash: | + source .azure/windows-stack.bashrc if [ $YAML_FILE != "stack-8.6.4.yaml" ]; then stack test --stack-yaml $(YAML_FILE) :func-test else stack test --stack-yaml $(YAML_FILE) :func-test --ta="--skip \"/Hover/hover/works\"" fi - displayName: Run Test + displayName: "Run Test: func-test" - task: PublishBuildArtifacts@1 inputs: pathtoPublish: '$(Build.ArtifactStagingDirectory)' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 13efd503e..f9fda27ef 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,6 +27,7 @@ jobs: - template: ./.azure/linux-stack.yml - template: ./.azure/linux-cabal.yml - template: ./.azure/windows-stack.yml +- template: ./.azure/windows-cabal.yml - template: ./.azure/macos-stack.yml - template: ./.azure/linux-installhs-stack.yml - template: ./.azure/windows-installhs-stack.yml From 9b026f405b24a4939f4952bba3ad5ce8cab305e5 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 23 Jan 2020 14:07:11 +0100 Subject: [PATCH 090/270] Use $CABAL_VERSION env var --- .azure/windows-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index b84ab33e1..cf5a4e6c4 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -100,7 +100,7 @@ jobs: displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | source .azure/windows-stack.bashrc - choco install -y cabal --version 3.0.0.0 + choco install -y cabal --version $CABAL_VERSION /C/ProgramData/chocolatey/bin/RefreshEnv.cmd displayName: "Install Runtime Test-Dependencies: cabal" - bash: | From 2ec75dc4a8b2cacce72484abc593ccb0a88840b4 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 23 Jan 2020 23:02:57 +0100 Subject: [PATCH 091/270] Create STACK_ROOT before writing config --- .azure/windows-installhs-stack.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 6c77ffcae..747bb716a 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -14,7 +14,7 @@ jobs: cacheHitVar: CACHE_RESTORED displayName: "Cache stack-root" - bash: | - mkdir -p $STACK_ROOT + mkdir -p "$STACK_ROOT" tar -vxzf .azure-cache/stack-root.tar.gz -C /d mkdir -p .stack-work tar -vxzf .azure-cache/stack-work.tar.gz @@ -25,7 +25,8 @@ jobs: - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ - echo "local-programs-path: D:/bin/stack" > $STACK_ROOT/config.yaml + mkdir -p "$STACK_ROOT" + echo "local-programs-path: D:/bin/stack" > "$STACK_ROOT/config.yaml" displayName: Install stack - bash: | source .azure/windows-stack.bashrc From e7a4bee5d3b3407a07b0a6a2b3633690ec5fe2a2 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 23 Jan 2020 23:03:12 +0100 Subject: [PATCH 092/270] Disable all completion tests --- .azure/windows-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 1008d9812..2f9b025dc 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -114,7 +114,7 @@ jobs: source .azure/windows-cabal.bashrc # TODO: Enable completion test if [ $GHC_VERSION = "8.4.4" ]; then - TEST_OPTIONS="--test-options=\"--skip=/Completion/completions/works/\"" + TEST_OPTIONS="--test-options=\"--skip=/Completion/completions/\"" fi cabal v2-test :func-test $TEST_OPTIONS displayName: "Run Test: func-test" From 4d9bda6239fbaae21569373d13b45686c6ddf451 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 06:36:20 +0100 Subject: [PATCH 093/270] Ignore func-test for cabal+win+ghc-8.4.4 --- .azure/windows-cabal.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 2f9b025dc..e26773968 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -112,11 +112,10 @@ jobs: condition: False - bash: | source .azure/windows-cabal.bashrc - # TODO: Enable completion test - if [ $GHC_VERSION = "8.4.4" ]; then - TEST_OPTIONS="--test-options=\"--skip=/Completion/completions/\"" + # TODO: Enable for 8.4.4 + if [ $GHC_VERSION != "8.4.4" ]; then + cabal v2-test :func-test $TEST_OPTIONS fi - cabal v2-test :func-test $TEST_OPTIONS displayName: "Run Test: func-test" - bash: | source .azure/windows-cabal.bashrc From 53b5f3ff7b36d87612e44000c7c5ffdf1af8e6b2 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 06:38:15 +0100 Subject: [PATCH 094/270] Separate ghc install dir for each matrix run --- .azure/windows-stack.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index cf5a4e6c4..69b9bbe7a 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -43,7 +43,8 @@ jobs: curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ mkdir -p "$STACK_ROOT" - echo "local-programs-path: D:/bin/stack" > "$STACK_ROOT/config.yaml" + GHC_VERSION=${YAML_FILE:6:5} + echo "local-programs-path: D:/bin/stack-$GHC_VERSION" > "$STACK_ROOT/config.yaml" displayName: Install stack - bash: | source .azure/windows-stack.bashrc From 6d37ea7b7b7aa5ab1227dfa3886eee75f2d847a2 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 07:36:29 +0100 Subject: [PATCH 095/270] Install alt ghc in a separate step --- .azure/windows-stack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 69b9bbe7a..3d39544ec 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -43,8 +43,7 @@ jobs: curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ mkdir -p "$STACK_ROOT" - GHC_VERSION=${YAML_FILE:6:5} - echo "local-programs-path: D:/bin/stack-$GHC_VERSION" > "$STACK_ROOT/config.yaml" + echo "local-programs-path: D:/bin/stack" > "$STACK_ROOT/config.yaml" displayName: Install stack - bash: | source .azure/windows-stack.bashrc @@ -92,6 +91,7 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/windows-stack.bashrc + stack setup --resolver=lts-13.20 stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | From 77df7ba2dc7607cf3780e80e4fc2db9ec35fb846 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 07:37:00 +0100 Subject: [PATCH 096/270] Remove outdated comment --- .azure/windows-stack.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 3d39544ec..81ec08424 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -84,7 +84,6 @@ jobs: stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies displayName: Build Test-dependencies - bash: | - # TODO: try to install automatically (`choco install z3` fails and pacman is not installed) mkdir -p /usr/local curl -L https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-win.zip -o /usr/local/z3.zip unzip -o /usr/local/z3.zip -d /usr/local/ From 5561141d63483c30779bbf246a2972bcb8081662 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 07:38:48 +0100 Subject: [PATCH 097/270] Add comment about using a separate store-dir --- .azure/windows-cabal.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index e26773968..38f6c737a 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -65,6 +65,8 @@ jobs: - bash: | source .azure/windows-cabal.bashrc # `hie` binary required locally for tests + # we have to use a separate store for install and builds + # to workaround https://github.com/haskell/cabal/issues/6483 cabal --store-dir ${CABAL_STORE_DIR}i v2-install displayName: Install `hie` - bash: | From 2a2fa86fd0eeb0583e15048174446cf6b5ccd836 Mon Sep 17 00:00:00 2001 From: fendor Date: Fri, 24 Jan 2020 12:37:19 +0100 Subject: [PATCH 098/270] Fix multi source directories (#1577) * Add failing test-cases for #1576 * Handle multiple source directories correctly Change existing behaviour to find all source directories which are a prefix of the given filepath. * Relax base constraints on c-h testdata There was probably no reason to have the constraints in the first pace * Lower cabal constraint for testdata * Avoid load checks as long as AZURE CI chokes on it --- haskell-ide-engine.cabal | 1 + hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 40 +++---- .../implicit-exe/implicit-exe.cabal | 4 +- .../testdata/cabal-helper/mono-repo/A/A.cabal | 6 +- .../testdata/cabal-helper/mono-repo/B/B.cabal | 6 +- .../testdata/cabal-helper/mono-repo/C/C.cabal | 4 +- .../cabal-helper/multi-source-dirs/Setup.hs | 2 + .../multi-source-dirs/multi-source-dirs.cabal | 11 ++ .../multi-source-dirs/src/BetterLib.hs | 5 + .../multi-source-dirs/src/input/Lib.hs | 6 + .../simple-cabal/simple-cabal-test.cabal | 2 +- .../simple-stack/simple-stack-test.cabal | 2 +- .../sub-package/plugins-api/plugins-api.cabal | 2 +- .../sub-package/sub-package.cabal | 4 +- test/unit/CabalHelperSpec.hs | 112 ++++++++++++------ 15 files changed, 138 insertions(+), 69 deletions(-) create mode 100644 test/testdata/cabal-helper/multi-source-dirs/Setup.hs create mode 100644 test/testdata/cabal-helper/multi-source-dirs/multi-source-dirs.cabal create mode 100644 test/testdata/cabal-helper/multi-source-dirs/src/BetterLib.hs create mode 100644 test/testdata/cabal-helper/multi-source-dirs/src/input/Lib.hs diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 7aba47ce1..f95ee16e4 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -220,6 +220,7 @@ test-suite unit-test , ghc , haskell-ide-engine , haskell-lsp-types == 0.19.* + , hie-bios , hie-test-utils , hie-plugin-api , hoogle > 5.0.11 diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 0a5fe02ef..f75be8901 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -684,11 +684,8 @@ partOfComponent :: -- | Component to check whether the given FilePath is part of it. ChComponentInfo -> Bool -partOfComponent fp' comp - | inTargets (ciSourceDirs comp) fp' (getTargets comp fp') - = True - | otherwise - = False +partOfComponent fp' comp = + inTargets (ciSourceDirs comp) fp' (getTargets comp fp') where -- Check if the FilePath is in an executable or setup's main-is field inMainIs :: FilePath -> Bool @@ -698,11 +695,15 @@ partOfComponent fp' comp | otherwise = False inTargets :: [FilePath] -> FilePath -> [String] -> Bool - inTargets sourceDirs fp targets - | Just relative <- relativeTo fp sourceDirs - = any (`elem` targets) [getModuleName relative, fp] || inMainIs relative - | otherwise - = False + inTargets sourceDirs fp targets = + let candidates = relativeTo fp sourceDirs + in any (existsInTargets targets fp) candidates + + existsInTargets :: [String] -> FilePath -> FilePath -> Bool + existsInTargets targets absFp relFp = or + [ any (`elem` targets) [getModuleName relFp, absFp] + , inMainIs relFp + ] getModuleName :: FilePath -> String getModuleName fp = map @@ -846,24 +847,23 @@ ancestors dir subdir = takeDirectory dir -- | Assuming a FilePath @"src\/Lib\/Lib.hs"@ and a list of directories --- such as @["src", "app"]@, returns either the given FilePath +-- such as @["src", "app"]@, returns the given FilePath -- with a matching directory stripped away. -- If there are multiple matches, e.g. multiple directories are a prefix --- of the given FilePath, return the first match in the list. --- Returns Nothing, if not a single --- given directory is a prefix of the FilePath. +-- of the given FilePath we return all matches. +-- Returns an empty list if no prefix matches the given FilePath. -- -- >>> relativeTo "src/Lib/Lib.hs" ["src"] --- Just "Lib/Lib.hs" +-- ["Lib/Lib.hs"] -- -- >>> relativeTo "src/Lib/Lib.hs" ["app"] --- Nothing +-- [] -- -- >>> relativeTo "src/Lib/Lib.hs" ["src", "src/Lib"] --- Just "Lib/Lib.hs" -relativeTo :: FilePath -> [FilePath] -> Maybe FilePath -relativeTo file sourceDirs = listToMaybe - $ mapMaybe (`stripFilePath` file) sourceDirs +-- ["Lib/Lib.hs", "Lib.hs"] +relativeTo :: FilePath -> [FilePath] -> [FilePath] +relativeTo file sourceDirs = + mapMaybe (`stripFilePath` file) sourceDirs -- | Returns a user facing display name for the cradle type, -- e.g. "Stack project" or "GHC session" diff --git a/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal b/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal index 28a0728f4..3aca1b42f 100644 --- a/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal +++ b/test/testdata/cabal-helper/implicit-exe/implicit-exe.cabal @@ -7,11 +7,11 @@ build-type: Simple library exposed-modules: Lib hs-source-dirs: src - build-depends: base >=4.8 && <4.14 + build-depends: base default-language: Haskell2010 executable implicit-exe main-is: src/Exe.hs - build-depends: base >=4.8 && <4.14, implicit-exe + build-depends: base, implicit-exe default-language: Haskell2010 \ No newline at end of file diff --git a/test/testdata/cabal-helper/mono-repo/A/A.cabal b/test/testdata/cabal-helper/mono-repo/A/A.cabal index dd682ddd0..e70b43fc1 100644 --- a/test/testdata/cabal-helper/mono-repo/A/A.cabal +++ b/test/testdata/cabal-helper/mono-repo/A/A.cabal @@ -1,15 +1,15 @@ -cabal-version: >=2.0 +cabal-version: >=1.10 name: A version: 0.1.0.0 build-type: Simple library exposed-modules: MyLib - build-depends: base >=4.9 && < 5 + build-depends: base default-language: Haskell2010 executable A main-is: Main.hs other-modules: MyLib - build-depends: base >= 4.9 && < 5, A + build-depends: base, A default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/mono-repo/B/B.cabal b/test/testdata/cabal-helper/mono-repo/B/B.cabal index 96805e98e..4093e1d0f 100644 --- a/test/testdata/cabal-helper/mono-repo/B/B.cabal +++ b/test/testdata/cabal-helper/mono-repo/B/B.cabal @@ -1,15 +1,15 @@ -cabal-version: >=2.0 +cabal-version: >=1.10 name: B version: 0.1.0.0 build-type: Simple library exposed-modules: MyLib - build-depends: base >= 4.9 && < 5 + build-depends: base default-language: Haskell2010 executable B main-is: Main.hs other-modules: MyLib - build-depends: base >= 4.9 && < 5, B + build-depends: base, B default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/mono-repo/C/C.cabal b/test/testdata/cabal-helper/mono-repo/C/C.cabal index 016a83201..db5e380f4 100644 --- a/test/testdata/cabal-helper/mono-repo/C/C.cabal +++ b/test/testdata/cabal-helper/mono-repo/C/C.cabal @@ -1,9 +1,9 @@ -cabal-version: >=2.0 +cabal-version: >=1.10 name: C version: 0.1.0.0 build-type: Simple library exposed-modules: MyLib - build-depends: base>= 4.9 && < 5 + build-depends: base default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/multi-source-dirs/Setup.hs b/test/testdata/cabal-helper/multi-source-dirs/Setup.hs new file mode 100644 index 000000000..9a994af67 --- /dev/null +++ b/test/testdata/cabal-helper/multi-source-dirs/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/test/testdata/cabal-helper/multi-source-dirs/multi-source-dirs.cabal b/test/testdata/cabal-helper/multi-source-dirs/multi-source-dirs.cabal new file mode 100644 index 000000000..58568683d --- /dev/null +++ b/test/testdata/cabal-helper/multi-source-dirs/multi-source-dirs.cabal @@ -0,0 +1,11 @@ +cabal-version: >=1.10 +name: multi-source-dirs +version: 0.1.0.0 +license-file: LICENSE +build-type: Simple + +library + exposed-modules: Lib, BetterLib + hs-source-dirs: src, src/input + build-depends: base + default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/multi-source-dirs/src/BetterLib.hs b/test/testdata/cabal-helper/multi-source-dirs/src/BetterLib.hs new file mode 100644 index 000000000..0784c76d4 --- /dev/null +++ b/test/testdata/cabal-helper/multi-source-dirs/src/BetterLib.hs @@ -0,0 +1,5 @@ +module BetterLib where + + +foo = 3 +bar = "String" \ No newline at end of file diff --git a/test/testdata/cabal-helper/multi-source-dirs/src/input/Lib.hs b/test/testdata/cabal-helper/multi-source-dirs/src/input/Lib.hs new file mode 100644 index 000000000..6c3723491 --- /dev/null +++ b/test/testdata/cabal-helper/multi-source-dirs/src/input/Lib.hs @@ -0,0 +1,6 @@ +module Lib where + +foobar = 15 + +fizbuzz :: Int -> String +fizbuzz n = "Fizz" \ No newline at end of file diff --git a/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal b/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal index 75e30b0dd..3c8be5d86 100644 --- a/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal +++ b/test/testdata/cabal-helper/simple-cabal/simple-cabal-test.cabal @@ -6,5 +6,5 @@ build-type: Simple library exposed-modules: MyLib - build-depends: base >=4.12 && <4.13 + build-depends: base default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal b/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal index 1f4d908b9..264baebfd 100644 --- a/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal +++ b/test/testdata/cabal-helper/simple-stack/simple-stack-test.cabal @@ -6,5 +6,5 @@ build-type: Simple library exposed-modules: MyLib - build-depends: base >=4.12 && <4.13 + build-depends: base default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal b/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal index 129dc9e06..223fa73b9 100644 --- a/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal +++ b/test/testdata/cabal-helper/sub-package/plugins-api/plugins-api.cabal @@ -6,5 +6,5 @@ build-type: Simple library exposed-modules: PluginLib - build-depends: base >=4.12 && <4.13 + build-depends: base default-language: Haskell2010 diff --git a/test/testdata/cabal-helper/sub-package/sub-package.cabal b/test/testdata/cabal-helper/sub-package/sub-package.cabal index d54355aea..ba36f1b4d 100644 --- a/test/testdata/cabal-helper/sub-package/sub-package.cabal +++ b/test/testdata/cabal-helper/sub-package/sub-package.cabal @@ -6,12 +6,12 @@ build-type: Simple library exposed-modules: MyLib - build-depends: base >=4.12 && <4.13, plugins-api + build-depends: base, plugins-api hs-source-dirs: src default-language: Haskell2010 executable sub-package main-is: Main.hs - build-depends: base >=4.12 && <4.13, sub-package + build-depends: base, sub-package hs-source-dirs: app default-language: Haskell2010 diff --git a/test/unit/CabalHelperSpec.hs b/test/unit/CabalHelperSpec.hs index 5df817d75..4859ad6e0 100644 --- a/test/unit/CabalHelperSpec.hs +++ b/test/unit/CabalHelperSpec.hs @@ -3,6 +3,7 @@ module CabalHelperSpec where import Data.Maybe (isJust) import Haskell.Ide.Engine.Cradle +import HIE.Bios.Types (runCradle, cradleOptsProg, Cradle, CradleLoadResult(..)) import Test.Hspec import System.FilePath import System.Directory (findExecutable, getCurrentDirectory, removeFile) @@ -26,6 +27,9 @@ simpleCabalPath cwd = rootPath cwd "simple-cabal" simpleStackPath :: FilePath -> FilePath simpleStackPath cwd = rootPath cwd "simple-stack" +multiSourceDirsPath :: FilePath -> FilePath +multiSourceDirsPath cwd = rootPath cwd "multi-source-dirs" + spec :: Spec spec = beforeAll_ setupStackFiles $ do describe "stack and cabal executables should be accesible" $ do @@ -36,88 +40,125 @@ spec = beforeAll_ setupStackFiles $ do cabal <- findExecutable "stack" cabal `shouldSatisfy` isJust describe "cabal-helper spec" $ do - describe "find cabal entry point spec" findCabalHelperEntryPointSpec - describe "cradle discovery" cabalHelperCradleSpec + describe "find entry point" findCabalHelperEntryPointSpec + describe "cradle discovery and loading" cabalHelperCradleSpec cabalHelperCradleSpec :: Spec cabalHelperCradleSpec = do cwd <- runIO getCurrentDirectory describe "dummy filepath, finds none-cradle" $ do - it "implicit exe, dummy filepath" $ do + it "implicit exe" $ do crdl <- cabalHelperCradle (implicitExePath cwd "File.hs") crdl `shouldSatisfy` isCabalCradle - it "mono repo, dummy filepath" $ do + it "mono repo" $ do crdl <- cabalHelperCradle (monoRepoPath cwd "File.hs") crdl `shouldSatisfy` isCabalCradle - it "stack repo, dummy filepath" $ do + it "stack repo" $ do crdl <- cabalHelperCradle (simpleStackPath cwd "File.hs") crdl `shouldSatisfy` isStackCradle - it "cabal repo, dummy filepath" $ + it "cabal repo" $ pendingWith "Can not work because of global `cabal.project`" -- crdl <- cabalHelperCradle (simpleCabalPath cwd "File.hs") -- crdl `shouldSatisfy` isCabalCradle - it "sub package, dummy filepath" $ do + it "sub package" $ do crdl <- cabalHelperCradle (subPackagePath cwd "File.hs") crdl `shouldSatisfy` isStackCradle + it "multi-source-dirs" $ do + crdl <- cabalHelperCradle (multiSourceDirsPath cwd "File.hs") + crdl `shouldSatisfy` isStackCradle - describe "Existing projects" $ do + describe "existing projects" $ do it "implicit exe" $ do - crdl <- cabalHelperCradle (implicitExePath cwd "src" "Exe.hs") - crdl `shouldSatisfy` isCabalCradle + let fp = implicitExePath cwd "src" "Exe.hs" + componentTest fp isCabalCradle it "mono repo" $ do - crdl <- cabalHelperCradle (monoRepoPath cwd "A" "Main.hs") - crdl `shouldSatisfy` isCabalCradle + let fp = monoRepoPath cwd "A" "Main.hs" + componentTest fp isCabalCradle it "stack repo" $ do - crdl <- cabalHelperCradle (simpleStackPath cwd "MyLib.hs") - crdl `shouldSatisfy` isStackCradle + let fp = simpleStackPath cwd "MyLib.hs" + componentTest fp isStackCradle it "cabal repo" $ pendingWith "Can not work because of global `cabal.project`" - -- crdl <- cabalHelperCradle (simpleCabalPath cwd "MyLib.hs") - -- crdl `shouldSatisfy` isCabalCradle + -- let fp = (simpleCabalPath cwd "MyLib.hs") + -- componentTest fp isStackCradle it "sub package" $ do - crdl <- cabalHelperCradle (subPackagePath cwd "plugins-api" "PluginLib.hs") - crdl `shouldSatisfy` isStackCradle + let fp = subPackagePath cwd "plugins-api" "PluginLib.hs" + componentTest fp isStackCradle + it "multi-source-dirs, nested dir" $ do + let fp = multiSourceDirsPath cwd "src" "input" "Lib.hs" + componentTest fp isStackCradle + it "multi-source-dirs" $ do + let fp = multiSourceDirsPath cwd "src" "BetterLib.hs" + componentTest fp isStackCradle + +componentTest :: FilePath -> (Cradle -> Bool) -> Expectation +componentTest fp testCradleType = do + crdl <- cabalHelperCradle fp + crdl `shouldSatisfy` testCradleType + -- TODO: this works but CI crashes + -- loadComponent crdl fp + +loadComponent :: Cradle -> FilePath -> Expectation +loadComponent crdl fp = do + result <- runCradle (cradleOptsProg crdl) (\_ -> return ()) fp + case result of + CradleFail err -> expectationFailure $ "Loading should not have failed: " ++ show err + _ -> return () + return () findCabalHelperEntryPointSpec :: Spec findCabalHelperEntryPointSpec = do cwd <- runIO getCurrentDirectory describe "implicit exe" $ do - it "Find project root with dummy filepath" $ do + it "dummy filepath" $ do let dummyFile = implicitExePath cwd "File.hs" cabalTest dummyFile - it "Find project root from source component" $ do + it "source component" $ do let libFile = implicitExePath cwd "src" "Lib.hs" cabalTest libFile - it "Find project root from executable component" $ do + it "executable component" $ do let mainFile = implicitExePath cwd "src" "Exe.hs" cabalTest mainFile describe "mono repo" $ do - it "Find project root with dummy filepath" $ do + it "dummy filepath" $ do let dummyFile = monoRepoPath cwd "File.hs" cabalTest dummyFile - it "Find project root with existing executable" $ do + it "existing executable" $ do let mainFile = monoRepoPath cwd "A" "Main.hs" cabalTest mainFile describe "sub package repo" $ do - it "Find project root with dummy filepath" $ do + it "dummy filepath" $ do let dummyFile = subPackagePath cwd "File.hs" stackTest dummyFile - it "Find project root with existing executable" $ do + it "existing executable" $ do let mainFile = subPackagePath cwd "plugins-api" "PluginLib.hs" stackTest mainFile describe "stack repo" $ do - it "Find project root with dummy filepath" $ do + it "dummy filepath" $ do let dummyFile = simpleStackPath cwd "File.hs" stackTest dummyFile - it "Find project root with real filepath" $ do + it "real filepath" $ do let dummyFile = simpleStackPath cwd "MyLib.hs" stackTest dummyFile + describe "multi-source-dirs" $ do + it "dummy filepath" $ do + let dummyFile = multiSourceDirsPath cwd "File.hs" + stackTest dummyFile + + it "real filepath" $ do + let dummyFile = multiSourceDirsPath cwd "src" "BetterLib.hs" + stackTest dummyFile + + it "nested filpath" $ do + let dummyFile = multiSourceDirsPath cwd "src" "input" "Lib.hs" + stackTest dummyFile + describe "simple cabal repo" $ - it "Find porject root with dummy filepath" $ + it "Find project root with dummy filepath" $ pendingWith "Change test-setup, we will always find `cabal.project` in root dir" -- ------------------------------------------------------------- @@ -141,20 +182,23 @@ stackTest fp = do setupStackFiles :: IO () setupStackFiles = do resolver <- readResolver - cwd <- getCurrentDirectory + cwd <- getCurrentDirectory writeFile (implicitExePath cwd "stack.yaml") (standardStackYaml resolver) - writeFile (monoRepoPath cwd "stack.yaml") (monoRepoStackYaml resolver) - writeFile (subPackagePath cwd "stack.yaml") (subPackageStackYaml resolver) + writeFile (monoRepoPath cwd "stack.yaml") (monoRepoStackYaml resolver) + writeFile (subPackagePath cwd "stack.yaml") (subPackageStackYaml resolver) writeFile (simpleStackPath cwd "stack.yaml") (standardStackYaml resolver) + writeFile (multiSourceDirsPath cwd "stack.yaml") + (standardStackYaml resolver) cleanupStackFiles :: IO () cleanupStackFiles = do - cwd <- getCurrentDirectory + cwd <- getCurrentDirectory removeFile (implicitExePath cwd "stack.yaml") - removeFile (monoRepoPath cwd "stack.yaml") - removeFile (subPackagePath cwd "stack.yaml") + removeFile (monoRepoPath cwd "stack.yaml") + removeFile (subPackagePath cwd "stack.yaml") removeFile (simpleStackPath cwd "stack.yaml") + removeFile (multiSourceDirsPath cwd "stack.yaml") -- ------------------------------------------------------------- From bb6bd30a28f84a4dc61c91d7f8f8b3d239ddbe16 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 21 Jan 2020 11:59:51 -0500 Subject: [PATCH 099/270] Cache CompilerOptions with Cradle --- .../Haskell/Ide/Engine/GhcModuleCache.hs | 48 +++++++++++++++++-- .../Haskell/Ide/Engine/ModuleCache.hs | 10 ++-- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index 493b2ef01..4d6834409 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -4,6 +4,8 @@ module Haskell.Ide.Engine.GhcModuleCache where +import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) + import qualified Data.Map as Map import Data.Dynamic (Dynamic) import Data.Typeable (TypeRep) @@ -100,21 +102,59 @@ data LookupCradleResult = ReuseCradle | LoadCradle CachedCradle | NewCradle File lookupCradle :: FilePath -> GhcModuleCache -> LookupCradleResult lookupCradle fp gmc = case currentCradle gmc of - Just (dirs, _c) | (any (\d -> d `isPrefixOf` fp) dirs) -> ReuseCradle + Just (dirs, _c, _) | any (`isPrefixOf` fp) dirs -> ReuseCradle _ -> case T.match (cradleCache gmc) (B.pack fp) of Just (_k, c, _suf) -> LoadCradle c Nothing -> NewCradle fp -data CachedCradle = CachedCradle BIOS.Cradle HscEnv +getComponentOptions + :: (MonadIO m, HasGhcModuleCache m) + => FilePath + -> m (Maybe BIOS.ComponentOptions) +getComponentOptions fp = do + mc <- getModuleCache + case currentCradle mc of + Just (dirs, cradle, co) | any (`isPrefixOf` fp) dirs -> case co of + Just _ -> return co + _ -> setCo fp cradle setCur + _ -> case T.match (cradleCache mc) (B.pack fp) of + Just (_, CachedCradle _ _ (Just co), _) -> return $ Just co + Just (p, CachedCradle cradle _ Nothing, _) -> + setCo (B.unpack p) cradle setCac + _ -> return Nothing + where + setCo fp' cradle mod' = do + res <- liftIO $ BIOS.getCompilerOptions fp' cradle + case res of + BIOS.CradleSuccess opts -> do + modifyModuleCache $ mod' opts fp' + return $ Just opts + _ -> return Nothing + setCur opts _ mc'@(GhcModuleCache _ _ (Just (fps, c', _))) = + mc' { currentCradle = Just (fps, c', Just opts) } + setCur _ _ mc' = mc' + setCac opts fp' mc' = mc' + { cradleCache = T.adjust (\cc -> cc { mCompOpts = Just opts }) (B.pack fp') + $ cradleCache mc' + } + + + +data CachedCradle = CachedCradle + { ccradle :: BIOS.Cradle + , hscEnv :: HscEnv + , mCompOpts :: Maybe BIOS.ComponentOptions + } instance Show CachedCradle where - show (CachedCradle x _) = show x + show (CachedCradle x _ _) = show x data GhcModuleCache = GhcModuleCache { cradleCache :: !(T.Trie CachedCradle) -- ^ map from FilePath to cradles + -- May not include currentCradle , uriCaches :: !UriCaches - , currentCradle :: Maybe ([FilePath], BIOS.Cradle) + , currentCradle :: Maybe ([FilePath], BIOS.Cradle, Maybe BIOS.ComponentOptions) -- ^ The current cradle and which FilePath's it is -- responsible for } deriving (Show) diff --git a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs index 5ad3054e5..c9c4f71b0 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs @@ -131,7 +131,7 @@ loadCradle _ _ ReuseCradle _def action = do debugm "Reusing cradle" IdeResultOk <$> action -loadCradle _ _iniDynFlags (LoadCradle (CachedCradle crd env)) _def action = do +loadCradle _ _iniDynFlags (LoadCradle (CachedCradle crd env _)) _def action = do -- Reloading a cradle happens on component switch logm $ "Switch to cradle: " ++ show crd -- Cache the existing cradle @@ -245,17 +245,17 @@ setCurrentCradle cradle = do let ps = mapMaybe (GHC.ml_hs_file . GHC.ms_location) (mgModSummaries mg) debugm $ "Modules in the cradle: " ++ show ps ps' <- liftIO $ mapM canonicalizePath ps - modifyCache (\s -> s { currentCradle = Just (ps', cradle) }) + modifyCache (\s -> s { currentCradle = Just (ps', cradle, Nothing) }) -- | Cache the given Cradle. -- Caches the given Cradle together with all Modules this Cradle is responsible -- for. -- Via 'lookupCradle' it can be checked if a given FilePath is managed by -- a any Cradle that has already been loaded. -cacheCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => ([FilePath], Bios.Cradle) -> m () -cacheCradle (ds, c) = do +cacheCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => ([FilePath], Bios.Cradle, Maybe Bios.ComponentOptions) -> m () +cacheCradle (ds, c, co) = do env <- GHC.getSession - let cc = CachedCradle c env + let cc = CachedCradle c env co new_map = T.fromList (map (, cc) (map B.pack ds)) modifyCache (\s -> s { cradleCache = T.unionWith (\a _ -> a) new_map (cradleCache s) }) From dd96dc7a41c999e9b0b2da8b627ff573e1aa43c5 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 21 Jan 2020 18:18:20 -0500 Subject: [PATCH 100/270] Make Ormolu respect cradle GHC options & extensions --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 30054ad06..d55cb7621 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -8,15 +8,19 @@ import Haskell.Ide.Engine.MonadTypes #if __GLASGOW_HASKELL__ >= 806 import Control.Exception +import Control.Monad import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) import Data.Aeson ( Value ( Null ) ) -import Data.Text +import Data.List +import Data.Maybe +import qualified Data.Text as T import Ormolu #if __GLASGOW_HASKELL__ < 808 import Ormolu.Config (defaultConfig) import Ormolu.Exception (OrmoluException) #endif import Haskell.Ide.Engine.PluginUtils +import HIE.Bios.Types #endif ormoluDescriptor :: PluginId -> PluginDescriptor @@ -37,12 +41,21 @@ provider :: FormattingProvider provider _contents _uri _typ _opts = #if __GLASGOW_HASKELL__ >= 806 case _typ of - FormatRange _ -> return $ IdeResultFail (IdeError PluginError (pack "Selection formatting for Ormolu is not currently supported.") Null) + FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile _contents _uri $ \file -> do - result <- liftIO $ try @OrmoluException (ormolu defaultConfig file (unpack _contents)) + opts <- getComponentOptions file + let opts' = map DynOption $ filter exop $ join $ maybeToList $ componentOptions <$> opts + conf = Config opts' False False True False + result <- liftIO $ try @OrmoluException (ormolu conf file (T.unpack _contents)) + case result of - Left err -> return $ IdeResultFail (IdeError PluginError (pack $ "ormoluCmd: " ++ show err) Null) + Left err -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) Right new -> return $ IdeResultOk [TextEdit (fullRange _contents) new] + where + exop s = + "-X" `isPrefixOf` s + || "-fplugin=" `isPrefixOf` s + || "-pgmF=" `isPrefixOf` s #else return $ IdeResultOk [] -- NOP formatter #endif From 3e039fcb5d1aec02684e3b9c5f1e41b510fd43b7 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Wed, 22 Jan 2020 18:47:38 -0500 Subject: [PATCH 101/270] Cache CompilerOptions on cradle initialization --- .../Haskell/Ide/Engine/GhcModuleCache.hs | 35 +++------------- .../Haskell/Ide/Engine/ModuleCache.hs | 41 +++++++++++++------ 2 files changed, 33 insertions(+), 43 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index 4d6834409..705592502 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -4,8 +4,6 @@ module Haskell.Ide.Engine.GhcModuleCache where -import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) - import qualified Data.Map as Map import Data.Dynamic (Dynamic) import Data.Typeable (TypeRep) @@ -108,42 +106,19 @@ lookupCradle fp gmc = Nothing -> NewCradle fp getComponentOptions - :: (MonadIO m, HasGhcModuleCache m) - => FilePath - -> m (Maybe BIOS.ComponentOptions) + :: HasGhcModuleCache m => FilePath -> m (Maybe BIOS.ComponentOptions) getComponentOptions fp = do mc <- getModuleCache case currentCradle mc of - Just (dirs, cradle, co) | any (`isPrefixOf` fp) dirs -> case co of - Just _ -> return co - _ -> setCo fp cradle setCur + Just (dirs, _, co) | any (`isPrefixOf` fp) dirs -> return $ Just co _ -> case T.match (cradleCache mc) (B.pack fp) of - Just (_, CachedCradle _ _ (Just co), _) -> return $ Just co - Just (p, CachedCradle cradle _ Nothing, _) -> - setCo (B.unpack p) cradle setCac - _ -> return Nothing - where - setCo fp' cradle mod' = do - res <- liftIO $ BIOS.getCompilerOptions fp' cradle - case res of - BIOS.CradleSuccess opts -> do - modifyModuleCache $ mod' opts fp' - return $ Just opts + Just (_, CachedCradle _ _ co, _) -> return $ Just co _ -> return Nothing - setCur opts _ mc'@(GhcModuleCache _ _ (Just (fps, c', _))) = - mc' { currentCradle = Just (fps, c', Just opts) } - setCur _ _ mc' = mc' - setCac opts fp' mc' = mc' - { cradleCache = T.adjust (\cc -> cc { mCompOpts = Just opts }) (B.pack fp') - $ cradleCache mc' - } - - data CachedCradle = CachedCradle { ccradle :: BIOS.Cradle , hscEnv :: HscEnv - , mCompOpts :: Maybe BIOS.ComponentOptions + , compOpts :: BIOS.ComponentOptions } instance Show CachedCradle where @@ -154,7 +129,7 @@ data GhcModuleCache = GhcModuleCache -- ^ map from FilePath to cradles -- May not include currentCradle , uriCaches :: !UriCaches - , currentCradle :: Maybe ([FilePath], BIOS.Cradle, Maybe BIOS.ComponentOptions) + , currentCradle :: Maybe ([FilePath], BIOS.Cradle, BIOS.ComponentOptions) -- ^ The current cradle and which FilePath's it is -- responsible for } deriving (Show) diff --git a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs index c9c4f71b0..2a5fd900a 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs @@ -48,6 +48,7 @@ import System.Directory import qualified GHC +import qualified GhcMake as GHC import qualified HscMain as GHC import qualified HIE.Bios as Bios import qualified HIE.Bios.Ghc.Api as Bios @@ -131,13 +132,13 @@ loadCradle _ _ ReuseCradle _def action = do debugm "Reusing cradle" IdeResultOk <$> action -loadCradle _ _iniDynFlags (LoadCradle (CachedCradle crd env _)) _def action = do +loadCradle _ _iniDynFlags (LoadCradle (CachedCradle crd env co)) _def action = do -- Reloading a cradle happens on component switch logm $ "Switch to cradle: " ++ show crd -- Cache the existing cradle maybe (return ()) cacheCradle =<< (currentCradle <$> getModuleCache) GHC.setSession env - setCurrentCradle crd + setCurrentCradle crd co IdeResultOk <$> action loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do @@ -166,13 +167,14 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do initialiseCradle :: (MonadIde m, HasGhcModuleCache m, GHC.GhcMonad m) => Bios.Cradle -> (Progress -> IO ()) -> m (IdeResult a) initialiseCradle cradle f = do - res <- Bios.initializeFlagsWithCradleWithMessage (Just (toMessager f)) fp cradle - case res of - Bios.CradleNone -> + co <- liftIO $ Bios.getCompilerOptions fp cradle + res <- fmap (initSessionWithMessage (Just (toMessager f))) <$> return co + case (co, res) of + (_, Bios.CradleNone) -> -- Note: The action is not run if we are in the none cradle, we -- just pretend the file doesn't exist. return $ IdeResultOk def - Bios.CradleFail (Bios.CradleError code msg) -> do + (_, Bios.CradleFail (Bios.CradleError code msg)) -> do warningm $ "Fail on cradle initialisation: (" ++ show code ++ ")" ++ show msg -- Send a detailed diagnostic to the user. @@ -194,7 +196,7 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do , ideMessage = Text.unwords (take 2 msgTxt) , ideInfo = Aeson.Null } - Bios.CradleSuccess init_session -> do + (Bios.CradleSuccess co', Bios.CradleSuccess init_session) -> do -- Note that init_session contains a Hook to 'f'. -- So, it can still provide Progress Reports. -- Therefore, invocation of 'init_session' must happen @@ -225,34 +227,47 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do -- be that slow, even though the cradle isn't cached because the -- `.hi` files will be saved. Right Bios.Succeeded -> do - setCurrentCradle cradle + setCurrentCradle cradle co' logm "Cradle set succesfully" IdeResultOk <$> action Right Bios.Failed -> do - setCurrentCradle cradle + setCurrentCradle cradle co' logm "Cradle did not load succesfully" IdeResultOk <$> action + _ -> return (IdeResultFail $ IdeError OtherError "Not Reachable" Aeson.Null) + +-- TODO remove when it's exposed by hie-bios +initSessionWithMessage :: (GHC.GhcMonad m) + => Maybe GHC.Messager + -> Bios.ComponentOptions + -> m GHC.SuccessFlag +initSessionWithMessage msg co = do + targets <- Bios.initSession co + GHC.setTargets targets + -- Get the module graph using the function `getModuleGraph` + mod_graph <- GHC.depanal [] True + GHC.load' GHC.LoadAllTargets msg mod_graph -- | Sets the current cradle for caching. -- Retrieves the current GHC Module Graph, to find all modules -- that belong to this cradle. -- If the cradle does not load any module, it is responsible for an empty -- list of Modules. -setCurrentCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => Bios.Cradle -> m () -setCurrentCradle cradle = do +setCurrentCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => Bios.Cradle -> Bios.ComponentOptions -> m () +setCurrentCradle cradle co = do mg <- GHC.getModuleGraph let ps = mapMaybe (GHC.ml_hs_file . GHC.ms_location) (mgModSummaries mg) debugm $ "Modules in the cradle: " ++ show ps ps' <- liftIO $ mapM canonicalizePath ps - modifyCache (\s -> s { currentCradle = Just (ps', cradle, Nothing) }) + modifyCache (\s -> s { currentCradle = Just (ps', cradle, co) }) -- | Cache the given Cradle. -- Caches the given Cradle together with all Modules this Cradle is responsible -- for. -- Via 'lookupCradle' it can be checked if a given FilePath is managed by -- a any Cradle that has already been loaded. -cacheCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => ([FilePath], Bios.Cradle, Maybe Bios.ComponentOptions) -> m () +cacheCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => ([FilePath], Bios.Cradle, Bios.ComponentOptions) -> m () cacheCradle (ds, c, co) = do env <- GHC.getSession let cc = CachedCradle c env co From 62c73260b2386b2cb270f54edcd15ec546d181e9 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Thu, 23 Jan 2020 16:58:48 -0500 Subject: [PATCH 102/270] Cache ComponentOptions from cradle init --- .../Haskell/Ide/Engine/ModuleCache.hs | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs index 2a5fd900a..67d62e7a7 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs @@ -167,14 +167,13 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do initialiseCradle :: (MonadIde m, HasGhcModuleCache m, GHC.GhcMonad m) => Bios.Cradle -> (Progress -> IO ()) -> m (IdeResult a) initialiseCradle cradle f = do - co <- liftIO $ Bios.getCompilerOptions fp cradle - res <- fmap (initSessionWithMessage (Just (toMessager f))) <$> return co - case (co, res) of - (_, Bios.CradleNone) -> + res <- initializeFlagsWithCradleWithMessage (Just (toMessager f)) fp cradle + case res of + Bios.CradleNone -> -- Note: The action is not run if we are in the none cradle, we -- just pretend the file doesn't exist. return $ IdeResultOk def - (_, Bios.CradleFail (Bios.CradleError code msg)) -> do + Bios.CradleFail (Bios.CradleError code msg) -> do warningm $ "Fail on cradle initialisation: (" ++ show code ++ ")" ++ show msg -- Send a detailed diagnostic to the user. @@ -196,7 +195,7 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do , ideMessage = Text.unwords (take 2 msgTxt) , ideInfo = Aeson.Null } - (Bios.CradleSuccess co', Bios.CradleSuccess init_session) -> do + Bios.CradleSuccess (init_session, copts) -> do -- Note that init_session contains a Hook to 'f'. -- So, it can still provide Progress Reports. -- Therefore, invocation of 'init_session' must happen @@ -227,27 +226,35 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do -- be that slow, even though the cradle isn't cached because the -- `.hi` files will be saved. Right Bios.Succeeded -> do - setCurrentCradle cradle co' + setCurrentCradle cradle copts logm "Cradle set succesfully" IdeResultOk <$> action Right Bios.Failed -> do - setCurrentCradle cradle co' + setCurrentCradle cradle copts logm "Cradle did not load succesfully" IdeResultOk <$> action - _ -> return (IdeResultFail $ IdeError OtherError "Not Reachable" Aeson.Null) --- TODO remove when it's exposed by hie-bios +-- TODO remove after hie-bios update +initializeFlagsWithCradleWithMessage :: + GHC.GhcMonad m + => Maybe GHC.Messager + -> FilePath -- ^ The file we are loading the 'Cradle' because of + -> Bios.Cradle -- ^ The cradle we want to load + -> m (Bios.CradleLoadResult (m GHC.SuccessFlag, Bios.ComponentOptions)) -- ^ Whether we actually loaded the cradle or not. +initializeFlagsWithCradleWithMessage msg fp cradle = + fmap (initSessionWithMessage msg) <$> liftIO (Bios.getCompilerOptions fp cradle) + initSessionWithMessage :: (GHC.GhcMonad m) => Maybe GHC.Messager -> Bios.ComponentOptions - -> m GHC.SuccessFlag -initSessionWithMessage msg co = do - targets <- Bios.initSession co + -> (m GHC.SuccessFlag, Bios.ComponentOptions) +initSessionWithMessage msg copts = (do + targets <- Bios.initSession copts GHC.setTargets targets -- Get the module graph using the function `getModuleGraph` mod_graph <- GHC.depanal [] True - GHC.load' GHC.LoadAllTargets msg mod_graph + GHC.load' GHC.LoadAllTargets msg mod_graph, copts) -- | Sets the current cradle for caching. -- Retrieves the current GHC Module Graph, to find all modules From d2316022a2f3409691db5835f50f6200c144fe05 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Thu, 23 Jan 2020 17:59:16 -0500 Subject: [PATCH 103/270] Refactor & rename lookupComponentOptions --- .../Haskell/Ide/Engine/GhcModuleCache.hs | 31 +++++++++++-------- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index 705592502..d9f8e6bf5 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -99,21 +99,26 @@ data LookupCradleResult = ReuseCradle | LoadCradle CachedCradle | NewCradle File -- via 'setCurrentCradle' before the Cradle can be cached via 'cacheCradle'. lookupCradle :: FilePath -> GhcModuleCache -> LookupCradleResult lookupCradle fp gmc = - case currentCradle gmc of - Just (dirs, _c, _) | any (`isPrefixOf` fp) dirs -> ReuseCradle - _ -> case T.match (cradleCache gmc) (B.pack fp) of - Just (_k, c, _suf) -> LoadCradle c - Nothing -> NewCradle fp + lookupInCache fp gmc (const $ const ReuseCradle) LoadCradle $ NewCradle fp -getComponentOptions +lookupComponentOptions :: HasGhcModuleCache m => FilePath -> m (Maybe BIOS.ComponentOptions) -getComponentOptions fp = do - mc <- getModuleCache - case currentCradle mc of - Just (dirs, _, co) | any (`isPrefixOf` fp) dirs -> return $ Just co - _ -> case T.match (cradleCache mc) (B.pack fp) of - Just (_, CachedCradle _ _ co, _) -> return $ Just co - _ -> return Nothing +lookupComponentOptions fp = do + gmc <- getModuleCache + return $ lookupInCache fp gmc (const Just) (Just . compOpts) Nothing + +lookupInCache + :: FilePath + -> GhcModuleCache + -> (BIOS.Cradle -> BIOS.ComponentOptions -> a) + -> (CachedCradle -> a) + -> a + -> a +lookupInCache fp gmc cur cached def = case currentCradle gmc of + Just (dirs, c, co) | any (`isPrefixOf` fp) dirs -> cur c co + _ -> case T.match (cradleCache gmc) (B.pack fp) of + Just (_k, c, _suf) -> cached c + Nothing -> def data CachedCradle = CachedCradle { ccradle :: BIOS.Cradle diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index d55cb7621..405daf121 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -43,7 +43,7 @@ provider _contents _uri _typ _opts = case _typ of FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack "Selection formatting for Ormolu is not currently supported.") Null) FormatText -> pluginGetFile _contents _uri $ \file -> do - opts <- getComponentOptions file + opts <- lookupComponentOptions file let opts' = map DynOption $ filter exop $ join $ maybeToList $ componentOptions <$> opts conf = Config opts' False False True False result <- liftIO $ try @OrmoluException (ormolu conf file (T.unpack _contents)) From 2f25e37ff02568d0ea915c997c3c44387afeba19 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 01:50:42 -0500 Subject: [PATCH 104/270] Update ormolu stack builds --- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.1.yaml | 6 ++---- stack.yaml | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 54cb10395..cac64a192 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -29,7 +29,7 @@ extra-deps: - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 - multistate-0.8.0.1 -- ormolu-0.0.3.0 +- ormolu-0.0.3.1 - parser-combinators-1.2.1 - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index d5bb732dc..8480ea00e 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -27,7 +27,7 @@ extra-deps: - hsimport-0.11.0 - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 -- ormolu-0.0.3.0 +- ormolu-0.0.3.1 - parser-combinators-1.2.1 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 5c887bffc..36e79a1d0 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -22,8 +22,7 @@ extra-deps: - hsimport-0.11.0 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 -- optparse-applicative-0.15.1.0 -- ormolu-0.0.3.0 +- ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 @@ -33,8 +32,7 @@ flags: hie-plugin-api: pedantic: true -# Required to build ormolu with optparse-applicative-0.15.1.0 -allow-newer: true +# allow-newer: true nix: packages: [ icu libcxx zlib ] diff --git a/stack.yaml b/stack.yaml index 64791aa2d..043c61c3d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -29,7 +29,7 @@ extra-deps: - lsp-test-0.10.0.0 - monad-dijkstra-0.1.1.2@rev:1 - parser-combinators-1.2.1 -- ormolu-0.0.3.0 +- ormolu-0.0.3.1 - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 From 1e92a3c017d64fe49efddb384eb1bcba5a84b764 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 01:51:39 -0500 Subject: [PATCH 105/270] Remove cabal allow-newer ormolu --- cabal.project | 1 - 1 file changed, 1 deletion(-) diff --git a/cabal.project b/cabal.project index 98b24fa80..e4a02d086 100644 --- a/cabal.project +++ b/cabal.project @@ -17,4 +17,3 @@ constraints: write-ghc-environment-files: never index-state: 2020-01-21T18:23:31Z -allow-newer: ormolu:optparse-applicative From cdd8b53754cf1c6d90f95071050bbfc4c8a817ed Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 02:10:12 -0500 Subject: [PATCH 106/270] Bump cabal ormolu version --- haskell-ide-engine.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index f95ee16e4..408ff03d2 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -104,7 +104,7 @@ library , unliftio , hlint >= 2.2.8 if impl(ghc >= 8.6) - build-depends: ormolu + build-depends: ormolu >= 0.0.3.1 ghc-options: -Wall -Wredundant-constraints if flag(pedantic) From 1ae19ae1955d6cf9a55c8c3d24da05041a6a1f33 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 02:23:50 -0500 Subject: [PATCH 107/270] Remove redundant imports --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 405daf121..b23109ed9 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -15,10 +15,6 @@ import Data.List import Data.Maybe import qualified Data.Text as T import Ormolu -#if __GLASGOW_HASKELL__ < 808 -import Ormolu.Config (defaultConfig) -import Ormolu.Exception (OrmoluException) -#endif import Haskell.Ide.Engine.PluginUtils import HIE.Bios.Types #endif From 0725e8690e8f5524828656af11bdb44509da6b92 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 09:56:12 -0500 Subject: [PATCH 108/270] Add docs --- hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index d9f8e6bf5..d41617d27 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -101,6 +101,7 @@ lookupCradle :: FilePath -> GhcModuleCache -> LookupCradleResult lookupCradle fp gmc = lookupInCache fp gmc (const $ const ReuseCradle) LoadCradle $ NewCradle fp +-- | Find the cradle wide 'ComponentOptions' that apply to a 'FilePath' lookupComponentOptions :: HasGhcModuleCache m => FilePath -> m (Maybe BIOS.ComponentOptions) lookupComponentOptions fp = do @@ -110,8 +111,11 @@ lookupComponentOptions fp = do lookupInCache :: FilePath -> GhcModuleCache + -- | Called when file is in the current cradle -> (BIOS.Cradle -> BIOS.ComponentOptions -> a) + -- | Called when file is a member of a cached cradle -> (CachedCradle -> a) + -- | Default value to return is a cradle is not found -> a -> a lookupInCache fp gmc cur cached def = case currentCradle gmc of @@ -120,6 +124,7 @@ lookupInCache fp gmc cur cached def = case currentCradle gmc of Just (_k, c, _suf) -> cached c Nothing -> def +-- | A 'Cradle', it's 'HscEnv' and 'ComponentOptions' data CachedCradle = CachedCradle { ccradle :: BIOS.Cradle , hscEnv :: HscEnv @@ -131,12 +136,12 @@ instance Show CachedCradle where data GhcModuleCache = GhcModuleCache { cradleCache :: !(T.Trie CachedCradle) - -- ^ map from FilePath to cradles + -- ^ map from FilePath to cradle and it's config. -- May not include currentCradle , uriCaches :: !UriCaches , currentCradle :: Maybe ([FilePath], BIOS.Cradle, BIOS.ComponentOptions) - -- ^ The current cradle and which FilePath's it is - -- responsible for + -- ^ The current cradle, it's config, + -- and which FilePath's it is responsible for. } deriving (Show) -- --------------------------------------------------------------------- From 83d99efa7ef67bc157382bd4b4d9ff32948af248 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 12:00:20 -0500 Subject: [PATCH 109/270] Update cabal Hackage index --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index e4a02d086..72a4b52e9 100644 --- a/cabal.project +++ b/cabal.project @@ -16,4 +16,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-01-21T18:23:31Z +index-state: 2020-01-24T16:47:33Z From 1ff35921d45c61e44e21f15a65b02f897143b7ce Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 13:33:32 -0500 Subject: [PATCH 110/270] Fix grammar Co-Authored-By: fendor --- hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index d41617d27..79794fd82 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -115,7 +115,7 @@ lookupInCache -> (BIOS.Cradle -> BIOS.ComponentOptions -> a) -- | Called when file is a member of a cached cradle -> (CachedCradle -> a) - -- | Default value to return is a cradle is not found + -- | Default value to return if a cradle is not found -> a -> a lookupInCache fp gmc cur cached def = case currentCradle gmc of From 172e8cfa202974d7e30a23c5114cd426eeae794d Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Fri, 24 Jan 2020 16:12:21 -0500 Subject: [PATCH 111/270] Ormolu range format --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 102 +++++++++++++++++------- 1 file changed, 72 insertions(+), 30 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index b23109ed9..3483db2db 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -1,22 +1,29 @@ +{-# LANGUAGE BlockArguments #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -module Haskell.Ide.Engine.Plugin.Ormolu ( ormoluDescriptor ) where +module Haskell.Ide.Engine.Plugin.Ormolu + ( ormoluDescriptor + ) +where -import Haskell.Ide.Engine.MonadTypes +import Haskell.Ide.Engine.MonadTypes #if __GLASGOW_HASKELL__ >= 806 -import Control.Exception -import Control.Monad -import Control.Monad.IO.Class ( liftIO , MonadIO(..) ) -import Data.Aeson ( Value ( Null ) ) -import Data.List -import Data.Maybe -import qualified Data.Text as T -import Ormolu -import Haskell.Ide.Engine.PluginUtils -import HIE.Bios.Types +import Control.Exception +import Control.Monad +import Control.Monad.IO.Class ( liftIO + , MonadIO(..) + ) +import Data.Aeson ( Value(Null) ) +import Data.Char +import Data.List +import Data.Maybe +import qualified Data.Text as T +import Ormolu +import Haskell.Ide.Engine.PluginUtils +import HIE.Bios.Types #endif ormoluDescriptor :: PluginId -> PluginDescriptor @@ -34,24 +41,59 @@ ormoluDescriptor plId = PluginDescriptor provider :: FormattingProvider -provider _contents _uri _typ _opts = #if __GLASGOW_HASKELL__ >= 806 - case _typ of - FormatRange _ -> return $ IdeResultFail (IdeError PluginError (T.pack "Selection formatting for Ormolu is not currently supported.") Null) - FormatText -> pluginGetFile _contents _uri $ \file -> do - opts <- lookupComponentOptions file - let opts' = map DynOption $ filter exop $ join $ maybeToList $ componentOptions <$> opts - conf = Config opts' False False True False - result <- liftIO $ try @OrmoluException (ormolu conf file (T.unpack _contents)) - - case result of - Left err -> return $ IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) - Right new -> return $ IdeResultOk [TextEdit (fullRange _contents) new] - where - exop s = - "-X" `isPrefixOf` s - || "-fplugin=" `isPrefixOf` s - || "-pgmF=" `isPrefixOf` s +provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do + opts <- lookupComponentOptions fp + let opts' = + map DynOption + $ filter exop + $ join + $ maybeToList + $ componentOptions + <$> opts + conf = Config opts' False False True False + fmt :: T.Text -> IdeM (Either OrmoluException T.Text) + fmt cont = liftIO $ try @OrmoluException (ormolu conf fp $ T.unpack cont) + + case typ of + FormatText -> ret (fullRange contents) <$> fmt contents + FormatRange r -> + let + txt = T.lines $ extractRange r contents + lineRange (Range (Position sl _) (Position el _)) = + Range (Position sl 0) $ Position el $ T.length $ last txt + -- Pragmas will not be picked up in a non standard location. + pragmas = (takeWhile ("{-#" `T.isPrefixOf`) $ T.lines contents) <> [""] + unStrip ws new = + T.init $ T.unlines $ map (ws `T.append`) $ drop (length pragmas) $ T.lines new + mStrip = case txt of + (l : _) -> + let ws = fst $ T.span isSpace l + in (,) ws . T.unlines <$> traverse (T.stripPrefix ws) txt + _ -> Nothing + in + maybe + (return $ IdeResultFail + (IdeError + PluginError + (T.pack + "You must format a whole block of code. Ormolu does not support arbitrary ranges." + ) + Null + ) + ) + (\(ws, striped) -> + ret (lineRange r) + <$> (fmap (unStrip ws) <$> fmt (T.unlines pragmas <> striped)) + ) + mStrip + where + ret _ (Left err) = IdeResultFail + (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) + ret r (Right new) = IdeResultOk [TextEdit r new] + + exop s = + "-X" `isPrefixOf` s || "-fplugin=" `isPrefixOf` s || "-pgmF=" `isPrefixOf` s #else - return $ IdeResultOk [] -- NOP formatter + provider _ _ _ _ = return $ IdeResultOk [] -- NOP formatter #endif From fb85fda9eefc718cfe77416373099d940a61ad33 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 22:20:34 +0100 Subject: [PATCH 112/270] Remove hlint.yaml from release --- .azure/linux-stack.yml | 3 --- .azure/macos-stack.yml | 3 --- .azure/windows-stack.yml | 3 --- 3 files changed, 9 deletions(-) diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 667bb5e2b..e8b3e236d 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -70,9 +70,6 @@ jobs: else GHC_MINOR_VERSION=nightly fi - stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" - mkdir -p data - cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_VERSION-linux-x86_64 tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * displayName: Install `hie` diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index ecb718e33..0f88e67c5 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -70,9 +70,6 @@ jobs: else GHC_VERSION=nightly fi - stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" - mkdir -p data - cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_VERSION-macos-x86_64 tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * displayName: Install `hie` diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 81ec08424..b54adb522 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -73,9 +73,6 @@ jobs: else GHC_VERSION=nightly fi - stack unpack hlint --stack-yaml ../$(YAML_FILE) --to "$(Agent.TempDirectory)" - mkdir -p data - cp "$(Agent.TempDirectory)"/hlint*/data/hlint.yaml data ARTIFACT_NAME=hie-$(hie --numeric-version)-ghc-$GHC_VERSION-windows-x86_64 7z a "$(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.zip" * displayName: Install `hie` From 4906a539c5f38c9a3af3ae8faf17c1e260f885d8 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 24 Jan 2020 22:26:56 +0100 Subject: [PATCH 113/270] Remove ref to hlint.yaml in requirements --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index 97cbfd7db..6a62dbe1e 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,6 @@ HIE builds from source code, so there's a couple of extra steps. * `stack` must be in your PATH * `git` must be in your PATH * Stack local bin directory must be in your PATH. Get it with `stack path --local-bin` -* To make hlint suggestions work, `hie` must locate the [hlint configuration yaml file](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.yaml). The file is searched in order in the following locations: - * In the directory pointed by the environment variable `$HLINT_DATADIR`. - * If hie was installed using stack or cabal, in a tool-specific internal installation directory. - * And finally in a subdirectory named `data` inside the directory where the `hie` executable is. Tip: you can quickly check if some command is in your path by running the command. If you receive some meaningful output instead of "command not found"-like message From bef47a074a9682b298dbcecb320f7a71ca7af9eb Mon Sep 17 00:00:00 2001 From: fendor Date: Fri, 24 Jan 2020 21:12:50 +0100 Subject: [PATCH 114/270] Fix error message parsing to import types Fix error message parsing to enable HsImport plugin to import Types. Moreover, fix generation of Code Actions to avoid cases where the same Code Action was displayed multiple times. --- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 12 +-- src/Haskell/Ide/Engine/Plugin/HsImport.hs | 94 +++++++++++++++------ src/Haskell/Ide/Engine/Support/HieExtras.hs | 16 ++++ src/Haskell/Ide/Engine/Support/Hoogle.hs | 2 +- 4 files changed, 91 insertions(+), 33 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index f75be8901..df0d3a28f 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -787,22 +787,22 @@ isFilePathPrefixOf dir fp = isJust $ stripFilePath dir fp -- -- >>> stripFilePath "app" "app/File.hs" -- Just "File.hs" - +-- -- >>> stripFilePath "src" "app/File.hs" -- Nothing - +-- -- >>> stripFilePath "src" "src-dir/File.hs" -- Nothing - +-- -- >>> stripFilePath "." "src/File.hs" -- Just "src/File.hs" - +-- -- >>> stripFilePath "app/" "./app/Lib/File.hs" -- Just "Lib/File.hs" - +-- -- >>> stripFilePath "/app/" "./app/Lib/File.hs" -- Nothing -- Nothing since '/app/' is absolute - +-- -- >>> stripFilePath "/app" "/app/Lib/File.hs" -- Just "Lib/File.hs" stripFilePath :: FilePath -> FilePath -> Maybe FilePath diff --git a/src/Haskell/Ide/Engine/Plugin/HsImport.hs b/src/Haskell/Ide/Engine/Plugin/HsImport.hs index e08a3b1be..1a2253c26 100644 --- a/src/Haskell/Ide/Engine/Plugin/HsImport.hs +++ b/src/Haskell/Ide/Engine/Plugin/HsImport.hs @@ -339,7 +339,7 @@ codeActionProvider plId docId _ context = do importModuleAction :: SearchStyle -> ImportDiagnostic -> ModuleName -> SymbolName -> IdeM [J.CodeAction] importModuleAction searchStyle impDiagnostic moduleName symbolTerm = - catMaybes <$> sequenceA codeActions + catMaybes <$> sequenceA importListActions where importListActions :: [IdeM (Maybe J.CodeAction)] importListActions = case searchStyle of @@ -353,34 +353,42 @@ codeActionProvider plId docId _ context = do -- If the term to import is a simple symbol, such as a function, -- import only this function Symbol - -> [ mkImportAction moduleName impDiagnostic . Just . Only + -> [ Just importModuleCodeAction + , mkImportAction moduleName impDiagnostic . Just . Only <$> symName symbolTerm - ] + ] -- Constructors can be imported in two ways, either all -- constructors of a type or only a subset. -- We can only import a single constructor at a time though. Constructor - -> [ mkImportAction moduleName impDiagnostic . Just . AllOf - <$> datatypeName symbolTerm - , (\dt sym -> mkImportAction moduleName impDiagnostic . Just - $ OneOf dt sym) - <$> datatypeName symbolTerm - <*> symName symbolTerm - ] + -> case typeDeclaration symbolTerm of + -- If the symbolTerm is actually a data declaration + -- dont generate code actions for them. + Just _ -> [] + Nothing -> + [ Just importModuleCodeAction + , mkImportAction moduleName impDiagnostic . Just . AllOf + <$> datatypeName symbolTerm + , (\dt sym -> mkImportAction moduleName impDiagnostic . Just + $ OneOf dt sym) + <$> datatypeName symbolTerm + <*> symName symbolTerm + ] -- If we are looking for a type, import it as just a symbol Type - -> [ mkImportAction moduleName impDiagnostic . Just . Only - <$> symName symbolTerm] - - -- | All code actions that may be available - -- Currently, omits all - codeActions :: [IdeM (Maybe J.CodeAction)] - codeActions = case termType impDiagnostic of - Hiding _ -> [] {- If we are hiding an import, we can not import - a module hiding everything from it. -} - -- Simple import, import the whole module - Import _ -> [mkImportAction moduleName impDiagnostic Nothing] - ++ importListActions + -> case typeDeclaration symbolTerm of + Nothing -> [] + -- Only generate code actions, + -- if the symbolTerm is actually a data declaration + Just dataTerm -> + [ Just importModuleCodeAction + , Just $ mkImportAction moduleName impDiagnostic (Just $ Only dataTerm) + , Just $ mkImportAction moduleName impDiagnostic (Just $ AllOf dataTerm) + ] + + -- | Plain Code Action to import the given module as a whole. + importModuleCodeAction :: IdeM (Maybe J.CodeAction) + importModuleCodeAction = mkImportAction moduleName impDiagnostic Nothing -- | Retrieve the function signature of a term such as -- >>> signatureOf "take :: Int -> [a] -> [a]" @@ -391,6 +399,40 @@ codeActionProvider plId docId _ context = do typeSig <- S.tailMay parts S.headMay typeSig + -- | Given a term 'data Sum f g a', extract the name of the type 'Sum'. + -- + -- Can be used to obtain the Type name. + -- Can also be used to check whether the given term is from the + -- Type level or Value level. + -- Constructors and Types are sometimes indistinguishable, + -- e.g. querying for 'Sum', possible results include: + -- + -- * "data Sum f g a" + -- * "Sum :: a -> Sum a" + -- + -- Depending on whether we are looking for a Type or Value, + -- we want to generate different Code Actions. + -- Important to generate the correct Code Actions. + -- + -- >>> typeDeclaration "data Sum f g a" + -- Just "Sum" + -- + -- >>> typeDeclaration "Sum :: Int -> Sum a" + -- Nothing + typeDeclaration :: T.Text -> Maybe T.Text + typeDeclaration arg = do + let parts = T.words arg + case parts of + declaration : typeName : _typeArgs + | declaration `elem` typeDeclarations -> + Just typeName + _ -> + Nothing + + -- | Declarations for types in the Haskell language. + typeDeclarations :: [T.Text] + typeDeclarations = ["data", "newtype", "type"] + -- | Retrieve the datatype name of a Constructor. -- -- >>> datatypeName "Null :: Data.Aeson.Internal.Types.Value" @@ -492,13 +534,13 @@ extractImportableTerm dirtyMsg = do extractTerm prefix symTy = importMsg >>= T.stripPrefix prefix + >>= Just . Hie.extractTerm' . T.strip >>= \name -> Just (name, Import symTy) - extractType b = - extractTerm ("Not in scope: type constructor or class " <> b) Type + extractType = + extractTerm "Not in scope: type constructor or class" Type extractedTerm = asum [ extractTerm "Variable not in scope: " Symbol - , extractType "‘" - , extractType "`" -- Needed for windows + , extractType , extractTerm "Data constructor not in scope: " Constructor] diff --git a/src/Haskell/Ide/Engine/Support/HieExtras.hs b/src/Haskell/Ide/Engine/Support/HieExtras.hs index 5103608b1..2238922e6 100644 --- a/src/Haskell/Ide/Engine/Support/HieExtras.hs +++ b/src/Haskell/Ide/Engine/Support/HieExtras.hs @@ -14,6 +14,7 @@ module Haskell.Ide.Engine.Support.HieExtras , getReferencesInDoc , getModule , extractTerm + , extractTerm' , findDef , findTypeDef , showName @@ -239,6 +240,21 @@ extractTerm txt = . T.dropWhileEnd (== e) . T.dropAround (\c -> c /= b && c /= e) +-- | Extract a term from a compiler message. +-- Removes whitespace and tries to extract a message between '‘' and '’' falling back to '`' and '\'' +-- (the used ones in Windows systems). +-- Different to @extractTerm@, it does not require that the term is actually surrounded +-- and can be used to sanitize the input. +extractTerm' :: T.Text -> T.Text +extractTerm' txt = + case extract '‘' '’' txt of + "" -> extract '`' '\'' txt -- Needed for windows + term -> term + where extract b e = T.dropWhile (== b) + . T.dropWhileEnd (== e) + . T.strip + + -- --------------------------------------------------------------------- -- | Return the type definition of the symbol at the given position. diff --git a/src/Haskell/Ide/Engine/Support/Hoogle.hs b/src/Haskell/Ide/Engine/Support/Hoogle.hs index b7d94f582..4d8c8fdbe 100644 --- a/src/Haskell/Ide/Engine/Support/Hoogle.hs +++ b/src/Haskell/Ide/Engine/Support/Hoogle.hs @@ -11,7 +11,7 @@ import Data.Aeson import Data.Bifunctor import Data.Maybe import qualified Data.Text as T -import Data.List +import Data.List import Haskell.Ide.Engine.MonadTypes import Haskell.Ide.Engine.MonadFunctions import Hoogle From 94c4bb8f85a86c5acd567a0059f20b67bada41ec Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sat, 25 Jan 2020 12:04:36 +0000 Subject: [PATCH 115/270] Reword some logging statements Got a bit confused when I saw plain ghc with a cabal cradle! --- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index df0d3a28f..7f9e4b4f2 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -94,7 +94,7 @@ execProjectGhc crdl args = do -- isCabalInstalled <- isJust <$> findExecutable "cabal" ghcOutput <- if isStackCradle crdl && isStackInstalled then do - logm "Use Stack GHC" + logm $ "Executing Stack GHC with args: " <> unwords args catch (Just <$> tryCommand stackCmd) $ \(_ :: IOException) -> do errorm $ "Command `" ++ stackCmd ++"` failed." execWithGhc @@ -109,7 +109,7 @@ execProjectGhc crdl args = do -- errorm $ "Command `" ++ cmd ++ "` failed." -- return Nothing else do - logm "Use Plain GHC" + logm $ "Executing GHC on path with args: " <> unwords args execWithGhc debugm $ "GHC Output: \"" ++ show ghcOutput ++ "\"" return ghcOutput From 0fd7e3f7bed42173c671f53b93095c731d16ffbb Mon Sep 17 00:00:00 2001 From: Pawel Szulc Date: Sat, 25 Jan 2020 12:26:56 +0000 Subject: [PATCH 116/270] Remove compiler warnings There were few functions with some constraints that were redundant. Those constraints got removed. --- hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs | 9 ++++----- hie-plugin-api/Haskell/Ide/Engine/PluginUtils.hs | 4 +--- hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs | 2 +- hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs | 6 +++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs index 67d62e7a7..de81fc745 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs @@ -164,8 +164,7 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do where -- | Initialise the given cradle. This might fail and return an error via `IdeResultFail`. -- Reports its progress to the client. - initialiseCradle :: (MonadIde m, HasGhcModuleCache m, GHC.GhcMonad m) - => Bios.Cradle -> (Progress -> IO ()) -> m (IdeResult a) + initialiseCradle :: Bios.Cradle -> (Progress -> IO ()) -> m (IdeResult a) initialiseCradle cradle f = do res <- initializeFlagsWithCradleWithMessage (Just (toMessager f)) fp cradle case res of @@ -333,7 +332,7 @@ ifCachedModuleM fp k callback = do -- available. -- If you are in IdeDeferM and would like to wait until a cached module is available, -- see also 'withCachedModuleAndData'. -ifCachedModuleAndData :: forall a b m. (ModuleCache a, HasGhcModuleCache m, MonadIO m, MonadMTState IdeState m) +ifCachedModuleAndData :: forall a b m. (ModuleCache a, HasGhcModuleCache m, MonadMTState IdeState m) => FilePath -> b -> (GHC.TypecheckedModule -> CachedInfo -> a -> m b) -> m b ifCachedModuleAndData fp def callback = do muc <- getUriCache fp @@ -388,7 +387,7 @@ deferIfNotCached fp cb = do Just res -> cb res Nothing -> wrap (Defer fp cb) -lookupCachedData :: forall a m. (HasGhcModuleCache m, MonadMTState IdeState m, MonadIO m, Typeable a, ModuleCache a) +lookupCachedData :: forall a m. (HasGhcModuleCache m, MonadMTState IdeState m, ModuleCache a) => FilePath -> GHC.TypecheckedModule -> CachedInfo -> (Map.Map TypeRep Dynamic) -> m a lookupCachedData fp tm info dat = do canonical_fp <- liftIO $ canonicalizePath fp @@ -520,7 +519,7 @@ deleteCachedModule uri = do -- TODO: this name is confusing, given GhcModuleCache. Change it class Typeable a => ModuleCache a where -- | Defines an initial value for the state extension - cacheDataProducer :: (MonadIO m, MonadMTState IdeState m) + cacheDataProducer :: (MonadMTState IdeState m) => GHC.TypecheckedModule -> CachedInfo -> m a instance ModuleCache () where diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginUtils.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginUtils.hs index e369c265a..aa21d692c 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginUtils.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginUtils.hs @@ -293,10 +293,8 @@ getRangeFromVFS uri rg = do data ErrorHandler m a = forall e . Exception e => ErrorHandler (e -> m a) -gcatches :: forall m a . (MonadIO m, ExceptionMonad m) => m a -> [ErrorHandler m a] -> m a +gcatches :: forall m a . (ExceptionMonad m) => m a -> [ErrorHandler m a] -> m a gcatches act handlers = gcatch act h where h :: SomeException -> m a h e = foldr (\(ErrorHandler hand) me -> maybe me hand (fromException e)) (liftIO $ throw e) handlers - - diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs index 5cf82b60b..78b33c42e 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs @@ -440,7 +440,7 @@ getPlugins = idePlugins <$> getIdeEnv -- | 'withProgress' @title cancellable f@ wraps a progress reporting session for long running tasks. -- f is passed a reporting function that can be used to give updates on the progress -- of the task. -withProgress :: (MonadIde m , MonadIO m, MonadBaseControl IO m) +withProgress :: (MonadIde m , MonadBaseControl IO m) => T.Text -> Core.ProgressCancellable -> ((Core.Progress -> IO ()) -> m a) -> m a withProgress t c f = do diff --git a/hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs b/hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs index b3d96f287..e5594146b 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/TypeMap.hs @@ -56,7 +56,7 @@ processBind _ = return IM.empty types :: forall m a . (GhcMonad m, Data a) => a -> m TypeMap types = everythingButTypeM @GHC.Id (ty `combineM` fun `combineM` funBind) where - ty :: forall a' . (GhcMonad m, Data a') => a' -> m TypeMap + ty :: forall a' . (Data a') => a' -> m TypeMap ty term = case cast term of (Just lhsExprGhc@(GHC.L (GHC.RealSrcSpan spn) _)) -> getType lhsExprGhc >>= \case @@ -64,13 +64,13 @@ types = everythingButTypeM @GHC.Id (ty `combineM` fun `combineM` funBind) Just (_, typ) -> return (IM.singleton (rspToInt spn) typ) _ -> return IM.empty - fun :: forall a' . (GhcMonad m, Data a') => a' -> m TypeMap + fun :: forall a' . (Data a') => a' -> m TypeMap fun term = case cast term of (Just (GHC.L (GHC.RealSrcSpan spn) hsPatType)) -> return (IM.singleton (rspToInt spn) (TcHsSyn.hsPatType hsPatType)) _ -> return IM.empty - funBind :: forall a' . (GhcMonad m, Data a') => a' -> m TypeMap + funBind :: forall a' . (Data a') => a' -> m TypeMap funBind term = case cast term of (Just (GHC.L (GHC.RealSrcSpan spn) (Compat.FunBindType t))) -> return (IM.singleton (rspToInt spn) t) From 4bb37bf711597ad26eac6a84412bf798e2199616 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sat, 25 Jan 2020 21:37:15 -0500 Subject: [PATCH 117/270] Fix Ormolu range format edge cases --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 3483db2db..0e429c956 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -62,10 +62,23 @@ provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do txt = T.lines $ extractRange r contents lineRange (Range (Position sl _) (Position el _)) = Range (Position sl 0) $ Position el $ T.length $ last txt - -- Pragmas will not be picked up in a non standard location. - pragmas = (takeWhile ("{-#" `T.isPrefixOf`) $ T.lines contents) <> [""] + -- Pragmas will not be picked up in a non standard location, + -- or when range starts on a Pragma + extPragmas = takeWhile ("{-#" `T.isPrefixOf`) + pragmas = + let cp = extPragmas $ T.lines contents + rp = not $ null $ extPragmas txt + in if null cp || rp + then [] + -- head txt is safe when extractRange txt is safe + else cp <> if T.all isSpace $ head txt then [] else [""] + fixLine t = if T.all isSpace $ last txt then t else T.init t unStrip ws new = - T.init $ T.unlines $ map (ws `T.append`) $ drop (length pragmas) $ T.lines new + fixLine + $ T.unlines + $ map (ws `T.append`) + $ drop (length pragmas) + $ T.lines new mStrip = case txt of (l : _) -> let ws = fst $ T.span isSpace l From 6153a5a276dd7e06cab1ecbecee3c8bca00aae16 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sat, 25 Jan 2020 22:04:58 -0500 Subject: [PATCH 118/270] Move BlockArguments pragma --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 0e429c956..10a68ba1b 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE BlockArguments #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} @@ -42,6 +41,7 @@ ormoluDescriptor plId = PluginDescriptor provider :: FormattingProvider #if __GLASGOW_HASKELL__ >= 806 +{-# LANGUAGE BlockArguments #-} provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do opts <- lookupComponentOptions fp let opts' = From 16a807cefba8d570ab7a51752082f1d5bcc6b227 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sat, 25 Jan 2020 22:13:38 -0500 Subject: [PATCH 119/270] Fix pre 8.6 build --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 10a68ba1b..b15c6944f 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -108,5 +108,5 @@ provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do exop s = "-X" `isPrefixOf` s || "-fplugin=" `isPrefixOf` s || "-pgmF=" `isPrefixOf` s #else - provider _ _ _ _ = return $ IdeResultOk [] -- NOP formatter +provider _ _ _ _ = return $ IdeResultOk [] -- NOP formatter #endif From b73e87f514cbbfb053abf19821e3d2dbb3f6da8c Mon Sep 17 00:00:00 2001 From: wataru86 Date: Sun, 26 Jan 2020 13:11:27 +0900 Subject: [PATCH 120/270] Update required stack version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a62dbe1e..fa5ce912f 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ Using [Aura](https://github.com/aurapm/aura): ### Installation from source -To install HIE, you need stack version >= 1.7.1. +To install HIE, you need stack version >= 2.1.1. HIE builds from source code, so there's a couple of extra steps. From 33c5f8eaa547c198d12c017f51ac03ed605f560d Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Sun, 26 Jan 2020 14:59:20 +0000 Subject: [PATCH 121/270] Add 8.8.2 stack file and CI --- .circleci/config.yml | 12 ++++++++++++ stack-8.8.2.yaml | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 stack-8.8.2.yaml diff --git a/.circleci/config.yml b/.circleci/config.yml index bd3312b1a..6570a80e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,6 +126,16 @@ jobs: - STACK_FILE: "stack-8.6.5.yaml" <<: *defaults + ghc-8.8.1: + environment: + - STACK_FILE: "stack-8.8.1.yaml" + <<: *defaults + + ghc-8.8.2: + environment: + - STACK_FILE: "stack-8.8.2.yaml" + <<: *defaults + ghc-nightly: environment: - STACK_FILE: "stack.yaml" @@ -171,5 +181,7 @@ workflows: - ghc-8.4.4 - ghc-8.6.4 - ghc-8.6.5 + - ghc-8.8.1 + - ghc-8.8.2 - ghc-nightly - cabal diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml new file mode 100644 index 000000000..f2e07f962 --- /dev/null +++ b/stack-8.8.2.yaml @@ -0,0 +1,43 @@ +resolver: nightly-2020-01-25 +packages: +- . +- hie-plugin-api + +extra-deps: +# - ./submodules/HaRe + +- apply-refact-0.7.0.0 +- bytestring-trie-0.2.5.0 +- cabal-helper-1.0.0.0 +- clock-0.7.2 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.2 +- ghc-lib-parser-ex-8.8.2 +- git: https://github.com/haskell/haddock.git + commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 + subdirs: + - haddock-api +- haddock-library-1.8.0 +- haskell-src-exts-1.21.1 +- hie-bios-0.3.2 +- hlint-2.2.8 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- ilist-0.3.1.0 +- monad-dijkstra-0.1.1.2 +- ormolu-0.0.3.1 +- semigroups-0.18.5 +- temporary-1.2.1.1 + +flags: + haskell-ide-engine: + pedantic: true + hie-plugin-api: + pedantic: true + +# allow-newer: true + +nix: + packages: [ icu libcxx zlib ] + +concurrent-tests: false From 4084859bdaa687ed93263f0c2183b4d683ff5535 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Sun, 26 Jan 2020 15:29:58 -0500 Subject: [PATCH 122/270] Get file pragmas from DynFlags --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 68 ++++++++++++------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index b15c6944f..f8137d77a 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -20,9 +20,13 @@ import Data.Char import Data.List import Data.Maybe import qualified Data.Text as T +import GHC import Ormolu import Haskell.Ide.Engine.PluginUtils +import Haskell.Ide.Engine.Support.HieExtras import HIE.Bios.Types +import qualified DynFlags as D +import qualified EnumSet as S #endif ormoluDescriptor :: PluginId -> PluginDescriptor @@ -44,62 +48,58 @@ provider :: FormattingProvider {-# LANGUAGE BlockArguments #-} provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do opts <- lookupComponentOptions fp - let opts' = + let cradleOpts = map DynOption $ filter exop $ join $ maybeToList $ componentOptions <$> opts - conf = Config opts' False False True False - fmt :: T.Text -> IdeM (Either OrmoluException T.Text) - fmt cont = liftIO $ try @OrmoluException (ormolu conf fp $ T.unpack cont) + + fromDyn tcm _ () = + let + df = getDynFlags tcm + pp = + let p = D.sPgm_F $ D.settings df + in if null p then [] else ["-pgmF=" <> p] + pm = map (("-fplugin=" <>) . moduleNameString) $ D.pluginModNames df + ex = map (("-X" <>) . show) $ S.toList $ D.extensionFlags df + in + return $ map DynOption $ pp <> pm <> ex + fileOpts <- ifCachedModuleAndData fp cradleOpts fromDyn + let + conf o = Config o False False True False + fmt :: T.Text -> [DynOption] -> IdeM (Either OrmoluException T.Text) + fmt cont o = + liftIO $ try @OrmoluException (ormolu (conf o) fp $ T.unpack cont) case typ of - FormatText -> ret (fullRange contents) <$> fmt contents + FormatText -> ret (fullRange contents) <$> fmt contents cradleOpts FormatRange r -> let txt = T.lines $ extractRange r contents lineRange (Range (Position sl _) (Position el _)) = Range (Position sl 0) $ Position el $ T.length $ last txt - -- Pragmas will not be picked up in a non standard location, - -- or when range starts on a Pragma - extPragmas = takeWhile ("{-#" `T.isPrefixOf`) - pragmas = - let cp = extPragmas $ T.lines contents - rp = not $ null $ extPragmas txt - in if null cp || rp - then [] - -- head txt is safe when extractRange txt is safe - else cp <> if T.all isSpace $ head txt then [] else [""] fixLine t = if T.all isSpace $ last txt then t else T.init t unStrip ws new = - fixLine - $ T.unlines - $ map (ws `T.append`) - $ drop (length pragmas) - $ T.lines new + fixLine $ T.unlines $ map (ws `T.append`) $ T.lines new mStrip = case txt of (l : _) -> let ws = fst $ T.span isSpace l in (,) ws . T.unlines <$> traverse (T.stripPrefix ws) txt _ -> Nothing - in - maybe - (return $ IdeResultFail - (IdeError - PluginError - (T.pack - "You must format a whole block of code. Ormolu does not support arbitrary ranges." - ) - Null + err = return $ IdeResultFail + (IdeError + PluginError + (T.pack + "You must format a whole block of code. Ormolu does not support arbitrary ranges." ) + Null ) - (\(ws, striped) -> - ret (lineRange r) - <$> (fmap (unStrip ws) <$> fmt (T.unlines pragmas <> striped)) - ) - mStrip + fmt' (ws, striped) = + ret (lineRange r) <$> (fmap (unStrip ws) <$> fmt striped fileOpts) + in + maybe err fmt' mStrip where ret _ (Left err) = IdeResultFail (IdeError PluginError (T.pack $ "ormoluCmd: " ++ show err) Null) From c9d380ca2b4ea2dbc2a2421aec1005c5c46af37c Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 09:15:07 +0100 Subject: [PATCH 123/270] Update macos image (10.13 is deprecated) --- .azure/macos-installhs-stack.yml | 2 +- .azure/macos-stack.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/macos-installhs-stack.yml b/.azure/macos-installhs-stack.yml index 337a7a7c5..4b3a9a04e 100644 --- a/.azure/macos-installhs-stack.yml +++ b/.azure/macos-installhs-stack.yml @@ -2,7 +2,7 @@ jobs: - job: MacOs_installhs_Stack timeoutInMinutes: 0 pool: - vmImage: macOS-10.13 + vmImage: macOS-10.14 variables: YAML_FILE: install/shake.yaml steps: diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index 0f88e67c5..a771bdd77 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -2,7 +2,7 @@ jobs: - job: MacOs_Stack timeoutInMinutes: 0 pool: - vmImage: macOS-10.13 + vmImage: macOS-10.14 strategy: matrix: stack-def: From 7dcede5fad3d2f1b1c1f631966d798a4e206e45d Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 09:17:06 +0100 Subject: [PATCH 124/270] Move ghc install to avoid errors --- .azure/windows-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index b54adb522..4d78751c1 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -48,6 +48,7 @@ jobs: - bash: | source .azure/windows-stack.bashrc stack setup --stack-yaml $(YAML_FILE) + stack setup --resolver=lts-13.20 # for liquidhaskell displayName: Install GHC - bash: | source .azure/windows-stack.bashrc @@ -87,7 +88,6 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/windows-stack.bashrc - stack setup --resolver=lts-13.20 stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | From 9969d153ba0232d0df2515df55f78e9f28a1751b Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 10:15:58 +0100 Subject: [PATCH 125/270] Add ghc-8.8.2 to azure ci --- .azure/linux-stack.yml | 2 ++ .azure/macos-stack.yml | 2 ++ .azure/windows-stack.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index e8b3e236d..d437dfe82 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.2: + YAML_FILE: stack-8.8.2.yaml stack-8.8.1: YAML_FILE: stack-8.8.1.yaml stack-8.6.5: diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index 0f88e67c5..8fe91eb96 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.2: + YAML_FILE: stack-8.8.2.yaml stack-8.8.1: YAML_FILE: stack-8.8.1.yaml stack-8.6.5: diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index b54adb522..6b2aff540 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.2: + YAML_FILE: stack-8.6.5.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: From 997abbb0a82483fdec6487b10abef2e653c83da1 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 10:18:51 +0100 Subject: [PATCH 126/270] Correct yaml file in win+stack --- .azure/windows-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 6b2aff540..6f5bff228 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -8,7 +8,7 @@ jobs: stack-def: YAML_FILE: stack.yaml stack-8.8.2: - YAML_FILE: stack-8.6.5.yaml + YAML_FILE: stack-8.8.2.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: From 559982c19e0aa50181880f58960c724a7342c729 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 11:27:55 +0100 Subject: [PATCH 127/270] Remove ghc-8.8.2 for windows :-( --- .azure/windows-stack.yml | 4 ++-- install/src/Env.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 6f5bff228..72e38efe0 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -7,8 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml - stack-8.8.2: - YAML_FILE: stack-8.8.2.yaml + # ghc versions 8.8.1 and 8.8.2 are not usable in windows + # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: diff --git a/install/src/Env.hs b/install/src/Env.hs index b9b75d1cd..82dec2c7b 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -104,8 +104,8 @@ getHieVersions = do & mapMaybe (T.stripPrefix stackYamlPrefix >=> T.stripSuffix stackYamlSuffix) & map T.unpack - -- the following line excludes `8.6.3` and `8.8.1` on windows systems - & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1"])) + -- the following line excludes `8.6.3`, `8.8.1` and `8.8.2` on windows systems + & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1". "8.8.2"])) & sort return hieVersions From 8cbf3f97318698430647f004e603d83a98f99eab Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 11:33:03 +0100 Subject: [PATCH 128/270] Correct list sep --- install/src/Env.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/src/Env.hs b/install/src/Env.hs index 82dec2c7b..90a1500ae 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -105,7 +105,7 @@ getHieVersions = do (T.stripPrefix stackYamlPrefix >=> T.stripSuffix stackYamlSuffix) & map T.unpack -- the following line excludes `8.6.3`, `8.8.1` and `8.8.2` on windows systems - & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1". "8.8.2"])) + & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1", "8.8.2"])) & sort return hieVersions From fe8034e6d5bcfacbac3a8b637ca20cdb2b879b47 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 27 Jan 2020 11:34:32 +0100 Subject: [PATCH 129/270] Correct formatting --- install/src/Env.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/src/Env.hs b/install/src/Env.hs index 90a1500ae..037e51bc9 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -105,7 +105,7 @@ getHieVersions = do (T.stripPrefix stackYamlPrefix >=> T.stripSuffix stackYamlSuffix) & map T.unpack -- the following line excludes `8.6.3`, `8.8.1` and `8.8.2` on windows systems - & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3","8.8.1", "8.8.2"])) + & filter (\p -> not (isWindowsSystem && p `elem` ["8.6.3", "8.8.1", "8.8.2"])) & sort return hieVersions From de18b2891ed04eb2a39fc15d196e2168cdd950cd Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Mon, 27 Jan 2020 11:08:07 +0000 Subject: [PATCH 130/270] Add stack-8.8.2.yaml to test utils --- test/utils/TestUtils.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index 4d3bcc54d..b703f35c6 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -172,7 +172,9 @@ ghcVersion = GHC84 stackYaml :: FilePath stackYaml = -#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,1,0))) +#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,2,0))) + "stack-8.8.2.yaml" +#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,1,0))) "stack-8.8.1.yaml" #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,5,0))) "stack-8.6.5.yaml" From e8e4ca68763a57fb343db36b5adf259b04ef786d Mon Sep 17 00:00:00 2001 From: Gurkenglas Date: Mon, 27 Jan 2020 13:15:52 +0100 Subject: [PATCH 131/270] Deduplicate main for hie/hie-wrapper Not sure how to merge the CPP'd imports. Note that hie-wrapper now partakes of the hSetBuffer stderr LineBuffering and the "hie-bios". --- app/HieWrapper.hs | 49 ++------------------------- app/MainHie.hs | 56 ++----------------------------- src/Haskell/Ide/Engine/Options.hs | 35 +++++++++++++++++++ 3 files changed, 40 insertions(+), 100 deletions(-) diff --git a/app/HieWrapper.hs b/app/HieWrapper.hs index 9964d077c..4378c7732 100644 --- a/app/HieWrapper.hs +++ b/app/HieWrapper.hs @@ -3,23 +3,15 @@ -- https://github.com/alanz/vscode-hie-server module Main where -#if __GLASGOW_HASKELL__ < 804 -import Data.Semigroup -#endif import Data.List import Data.Foldable -import Data.Version (showVersion) import HIE.Bios import Haskell.Ide.Engine.MonadFunctions import Haskell.Ide.Engine.Cradle (findLocalCradle) import Haskell.Ide.Engine.Options import Haskell.Ide.Engine.Version -import qualified Language.Haskell.LSP.Core as Core -import Options.Applicative.Simple -import qualified Paths_haskell_ide_engine as Meta import System.Directory import System.Environment -import qualified System.Log.Logger as L import System.Process import System.Info import System.FilePath @@ -28,45 +20,8 @@ import System.FilePath main :: IO () main = do - let - numericVersion :: Parser (a -> a) - numericVersion = - infoOption - (showVersion Meta.version) - (long "numeric-version" <> - help "Show only version number") - compiler :: Parser (a -> a) - compiler = - infoOption - hieGhcDisplayVersion - (long "compiler" <> - help "Show only compiler and version supported") - -- Parse the options and run - (global, ()) <- - simpleOptions - hieVersion - "hie-wrapper - Launch the appropriate haskell-ide-engine for a given project" - "" - (numericVersion <*> compiler <*> globalOptsParser) - empty - - run global - --- --------------------------------------------------------------------- - -run :: GlobalOpts -> IO () -run opts = do - let mLogFileName = optLogFile opts - - logLevel = if optDebugOn opts - then L.DEBUG - else L.INFO - - Core.setupLogger mLogFileName ["hie"] logLevel - - maybe (pure ()) setCurrentDirectory $ projectRoot opts - - + _opts <- initApp + "hie-wrapper - Launch the appropriate haskell-ide-engine for a given project" progName <- getProgName logm $ "run entered for hie-wrapper(" ++ progName ++ ") " ++ hieVersion d <- getCurrentDirectory diff --git a/app/MainHie.hs b/app/MainHie.hs index 094e3e4b5..4242cf5b5 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -5,10 +5,6 @@ module Main where import qualified Control.Exception as E import Control.Monad -#if __GLASGOW_HASKELL__ < 808 -import Data.Monoid ((<>)) -#endif -import Data.Version (showVersion) import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Yaml as Yaml @@ -20,15 +16,10 @@ import Haskell.Ide.Engine.Options import Haskell.Ide.Engine.Scheduler import Haskell.Ide.Engine.Server import Haskell.Ide.Engine.Version -import qualified Language.Haskell.LSP.Core as Core -import Options.Applicative.Simple -import qualified Paths_haskell_ide_engine as Meta import System.Directory import System.Environment import System.FilePath import System.Info -import System.IO -import qualified System.Log.Logger as L -- --------------------------------------------------------------------- @@ -84,47 +75,9 @@ plugins includeExamples = pluginDescToIdePlugins allPlugins main :: IO () main = do - let - numericVersion :: Parser (a -> a) - numericVersion = - infoOption - (showVersion Meta.version) - (long "numeric-version" <> - help "Show only version number") - compiler :: Parser (a -> a) - compiler = - infoOption - hieGhcDisplayVersion - (long "compiler" <> - help "Show only compiler and version supported") - -- Parse the options and run - (global, ()) <- - simpleOptions - hieVersion - "haskell-ide-engine - Provide a common engine to power any Haskell IDE" - "" - (numericVersion <*> compiler <*> globalOptsParser) - empty - - run global - --- --------------------------------------------------------------------- - -run :: GlobalOpts -> IO () -run opts = do - hSetBuffering stderr LineBuffering - let mLogFileName = optLogFile opts - - logLevel = if optDebugOn opts - then L.DEBUG - else L.INFO - - Core.setupLogger mLogFileName ["hie", "hie-bios"] logLevel - origDir <- getCurrentDirectory - - maybe (pure ()) setCurrentDirectory $ projectRoot opts - + opts <- initApp + "haskell-ide-engine - Provide a common engine to power any Haskell IDE" progName <- getProgName args <- getArgs @@ -199,10 +152,7 @@ run opts = do -- --------------------------------------------------------------------- getCradleInfo :: FilePath -> IO (Either Yaml.ParseException Cradle) -getCradleInfo currentDir = do - let dummyCradleFile = currentDir "File.hs" - cradleRes <- E.try (findLocalCradle dummyCradleFile) - return cradleRes +getCradleInfo currentDir = E.try $ findLocalCradle $ currentDir "File.hs" -- --------------------------------------------------------------------- diff --git a/src/Haskell/Ide/Engine/Options.hs b/src/Haskell/Ide/Engine/Options.hs index 25a43fb0d..c315a929e 100644 --- a/src/Haskell/Ide/Engine/Options.hs +++ b/src/Haskell/Ide/Engine/Options.hs @@ -1,7 +1,21 @@ {-# LANGUAGE CPP #-} module Haskell.Ide.Engine.Options where +#if __GLASGOW_HASKELL__ < 804 +import Data.Semigroup +#endif +#if __GLASGOW_HASKELL__ < 808 +import Data.Monoid ((<>)) +#endif +import Data.Version (showVersion) +import Haskell.Ide.Engine.Version +import qualified Language.Haskell.LSP.Core as Core import Options.Applicative.Simple +import qualified Paths_haskell_ide_engine as Meta +import System.Directory +import System.IO +import qualified System.Log.Logger as L +import Data.Foldable data GlobalOpts = GlobalOpts { optDebugOn :: Bool @@ -15,6 +29,27 @@ data GlobalOpts = GlobalOpts , optFiles :: [FilePath] } deriving (Show) +initApp :: String -> IO GlobalOpts +initApp namedesc = do + hSetBuffering stderr LineBuffering + let numericVersion :: Parser (a -> a) + numericVersion = infoOption (showVersion Meta.version) + (long "numeric-version" <> help "Show only version number") + compiler :: Parser (a -> a) + compiler = infoOption hieGhcDisplayVersion + (long "compiler" <> help "Show only compiler and version supported") + -- Parse the options and run + (opts, ()) <- simpleOptions + hieVersion + namedesc + "" + (numericVersion <*> compiler <*> globalOptsParser) + empty + Core.setupLogger (optLogFile opts) ["hie", "hie-bios"] + $ if optDebugOn opts then L.DEBUG else L.INFO + traverse_ setCurrentDirectory $ projectRoot opts + return opts + globalOptsParser :: Parser GlobalOpts globalOptsParser = GlobalOpts <$> switch From 7e2db8e139e491714a3ca408b7416c7dc2c5caab Mon Sep 17 00:00:00 2001 From: Gurkenglas Date: Mon, 27 Jan 2020 13:47:46 +0100 Subject: [PATCH 132/270] Incorporate review advice --- src/Haskell/Ide/Engine/Options.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Haskell/Ide/Engine/Options.hs b/src/Haskell/Ide/Engine/Options.hs index c315a929e..4c1917331 100644 --- a/src/Haskell/Ide/Engine/Options.hs +++ b/src/Haskell/Ide/Engine/Options.hs @@ -1,9 +1,6 @@ {-# LANGUAGE CPP #-} module Haskell.Ide.Engine.Options where -#if __GLASGOW_HASKELL__ < 804 -import Data.Semigroup -#endif #if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) #endif @@ -29,6 +26,7 @@ data GlobalOpts = GlobalOpts , optFiles :: [FilePath] } deriving (Show) +-- | Introduced as the common prefix of app/HieWrapper.hs/main and app/MainHie.hs/main initApp :: String -> IO GlobalOpts initApp namedesc = do hSetBuffering stderr LineBuffering From 4a13f8778e4f422ad46a936f80debd52b129c332 Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Mon, 27 Jan 2020 18:47:59 -0500 Subject: [PATCH 133/270] Remove block arguments --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index f8137d77a..1aac1a661 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -45,7 +45,6 @@ ormoluDescriptor plId = PluginDescriptor provider :: FormattingProvider #if __GLASGOW_HASKELL__ >= 806 -{-# LANGUAGE BlockArguments #-} provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do opts <- lookupComponentOptions fp let cradleOpts = From 6d4c312eabcab202d3f8ecac41b0556d4877667d Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 28 Jan 2020 08:08:21 +0100 Subject: [PATCH 134/270] Add note about new haskell-ide --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index fa5ce912f..a00814c9a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +# Integration with `ghcide`: the new `haskell-ide` + +Currently the main development effort is focused in [integrating haskell-ide-engine](https://github.com/haskell/haskell-ide-engine/issues/1416) and [ghcide](https://github.com/digital-asset/ghcide) under a common repository: + +https://github.com/haskell/ide/ + +Until the new `haskell-ide` doesn't reach the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. + +You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in (any of the communication channels)[its-time-to-join-the-project]. + # Haskell IDE Engine (HIE) @@ -14,6 +24,8 @@ [appveyor]: https://ci.appveyor.com/project/Bubba/haskell-ide-engine-74xec + + This project aims to be __the universal interface__ to __a growing number of Haskell tools__, providing a __fully-featured [Language Server Protocol](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md) server__ for editors and IDEs that require Haskell-specific functionality. - [Haskell IDE Engine (HIE)](#haskell-ide-engine-hie) From b3e481481207b75cea51df0d4b3dd402887b1f99 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 28 Jan 2020 08:12:18 +0100 Subject: [PATCH 135/270] Correct links --- README.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a00814c9a..45bfe7550 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Currently the main development effort is focused in [integrating haskell-ide-engine](https://github.com/haskell/haskell-ide-engine/issues/1416) and [ghcide](https://github.com/digital-asset/ghcide) under a common repository: -https://github.com/haskell/ide/ +https://github.com/haskell/ide Until the new `haskell-ide` doesn't reach the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. -You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in (any of the communication channels)[its-time-to-join-the-project]. +You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in [any of the communication channels](#its-time-to-join-the-project). # Haskell IDE Engine (HIE) @@ -705,16 +705,7 @@ Or you can set the environment variable `HIE_HOOGLE_DATABASE` to specify a speci ## Contributing -### Planned Features - - - [x] Multiproject support - - [x] New-build support - - [ ] Project wide references - - [ ] Cross project find definition - - [ ] More HaRe refactorings - - [ ] More code actions - - [ ] Cross project/dependency Find Definition - - [ ] Case splitting, type insertion etc. +Please see the [note above](#integration-with-ghcide-the-new-haskell-ide) about the new `haskell-ide` project. This project is not started from scratch: From 02cef7f2b161adcf0bef111dd507aa7d45c93a9e Mon Sep 17 00:00:00 2001 From: Avi Dessauer Date: Tue, 28 Jan 2020 13:43:14 -0500 Subject: [PATCH 136/270] Fix Ormolu removing preceding empty line --- src/Haskell/Ide/Engine/Plugin/Ormolu.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs index 1aac1a661..fa00aa410 100644 --- a/src/Haskell/Ide/Engine/Plugin/Ormolu.hs +++ b/src/Haskell/Ide/Engine/Plugin/Ormolu.hs @@ -79,9 +79,12 @@ provider contents uri typ _ = pluginGetFile contents uri $ \fp -> do txt = T.lines $ extractRange r contents lineRange (Range (Position sl _) (Position el _)) = Range (Position sl 0) $ Position el $ T.length $ last txt - fixLine t = if T.all isSpace $ last txt then t else T.init t + hIsSpace (h : _) = T.all isSpace h + hIsSpace _ = True + fixS t = if hIsSpace txt && (not $ hIsSpace t) then "" : t else t + fixE t = if T.all isSpace $ last txt then t else T.init t unStrip ws new = - fixLine $ T.unlines $ map (ws `T.append`) $ T.lines new + fixE $ T.unlines $ map (ws `T.append`) $ fixS $ T.lines new mStrip = case txt of (l : _) -> let ws = fst $ T.span isSpace l From 2e4feda6e4e61e68e048a776c8c7a52c11e57390 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 29 Jan 2020 06:16:44 +0100 Subject: [PATCH 137/270] Grammar fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45bfe7550..d324d2d10 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Currently the main development effort is focused in [integrating haskell-ide-eng https://github.com/haskell/ide -Until the new `haskell-ide` doesn't reach the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. +Until the new `haskell-ide` reaches the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in [any of the communication channels](#its-time-to-join-the-project). From 3212557fe62f33d4086c1c55b2fd5c0b6d88a175 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 29 Jan 2020 10:05:58 +0100 Subject: [PATCH 138/270] Add dev target --- install/src/Cabal.hs | 2 +- install/src/Help.hs | 11 ++++++---- install/src/HieInstall.hs | 10 ++++++--- install/src/Stack.hs | 43 ++++++++++++++++++++++++++++++--------- 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index 5ae3dcb30..171cb7667 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -36,7 +36,7 @@ execCabal :: CmdResult r => [String] -> Action r execCabal = command [] "cabal" execCabal_ :: [String] -> Action () -execCabal_ = command [] "cabal" +execCabal_ = execCabal cabalBuildData :: Action () cabalBuildData = do diff --git a/install/src/Help.hs b/install/src/Help.hs index c0f600bc6..a512f2593 100644 --- a/install/src/Help.hs +++ b/install/src/Help.hs @@ -78,7 +78,7 @@ helpMessage versions@BuildableVersions {..} = do [emptyTarget] [ generalTargets , defaultTargets - , if isRunFromCabal then [cabalGhcsTarget] else [] + , if isRunFromCabal then [cabalGhcsTarget] else [stackDevTarget] , [macosIcuTarget] ] @@ -97,13 +97,13 @@ templateTarget = ("", "") hieTarget :: String -> TargetDescription hieTarget version = - ("hie-" ++ version, "Builds hie for GHC version " ++ version) + ("hie-" ++ version, "Install hie for GHC version " ++ version) buildTarget :: TargetDescription -buildTarget = ("hie", "Build hie with the latest available GHC and the data files") +buildTarget = ("hie", "Install hie with the latest available GHC and the data files") buildLatestTarget :: TargetDescription -buildLatestTarget = ("latest", "Build hie with the latest available GHC") +buildLatestTarget = ("latest", "Install hie with the latest available GHC") buildDataTarget :: TargetDescription buildDataTarget = @@ -122,3 +122,6 @@ cabalGhcsTarget = ( "ghcs" , "Show all GHC versions that can be installed via `cabal-build`." ) + +stackDevTarget :: TargetDescription +stackDevTarget = ("dev", "Install hie with the default stack.yaml") \ No newline at end of file diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index b0e723ac3..bb6f36883 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -78,9 +78,8 @@ defaultMain = do (\version -> phony ("hie-" ++ version) $ do need ["submodules"] need ["check"] - if isRunFromStack then do - stackBuildHie version - stackInstallHie version + if isRunFromStack then do + stackInstallHieWithErrMsg (Just version) else cabalInstallHie version ) @@ -88,6 +87,11 @@ defaultMain = do phony "latest" (need ["hie-" ++ latestVersion]) phony "hie" (need ["data", "latest"]) + -- stack specific targets + when isRunFromStack $ do + + phony "dev" $ stackInstallHieWithErrMsg Nothing + -- cabal specific targets when isRunFromCabal $ do diff --git a/install/src/Stack.hs b/install/src/Stack.hs index c33db4432..2aff1d791 100644 --- a/install/src/Stack.hs +++ b/install/src/Stack.hs @@ -15,14 +15,23 @@ import Version import Print import Env -stackBuildHie :: VersionNumber -> Action () -stackBuildHie versionNumber = execStackWithGhc_ versionNumber ["build"] - `actionOnException` liftIO (putStrLn stackBuildFailMsg) +stackInstallHieWithErrMsg :: Maybe VersionNumber -> Action () +stackInstallHieWithErrMsg mbVersionNumber = + stackInstallHie mbVersionNumber + `actionOnException` liftIO (putStrLn stackBuildFailMsg) -- | copy the built binaries into the localBinDir -stackInstallHie :: VersionNumber -> Action () -stackInstallHie versionNumber = do - execStackWithGhc_ versionNumber ["install"] +stackInstallHie :: Maybe VersionNumber -> Action () +stackInstallHie mbVersionNumber = do + versionNumber <- + case mbVersionNumber of + Nothing -> do + execStackWithCfgFile_ "stack.yaml" ["install"] + getGhcVersionOfCfgFile "stack.yaml" + Just vn -> do + execStackWithGhc_ vn ["install"] + return vn + localBinDir <- getLocalBin let hie = "hie" <.> exe liftIO $ do @@ -31,6 +40,12 @@ stackInstallHie versionNumber = do copyFile (localBinDir hie) (localBinDir "hie-" ++ dropExtension versionNumber <.> exe) +getGhcVersionOfCfgFile :: String -> Action VersionNumber +getGhcVersionOfCfgFile stackFile = do + Stdout ghcVersion <- + execStackWithCfgFile stackFile ["exec", "ghc", "--", "--numeric-version"] + return $ trim ghcVersion + -- | check `stack` has the required version checkStack :: Action () checkStack = do @@ -53,14 +68,22 @@ stackBuildData = do -- | Execute a stack command for a specified ghc, discarding the output execStackWithGhc_ :: VersionNumber -> [String] -> Action () -execStackWithGhc_ versionNumber args = do - let stackFile = "stack-" ++ versionNumber ++ ".yaml" - command_ [] "stack" (("--stack-yaml=" ++ stackFile) : args) +execStackWithGhc_ = execStackWithGhc -- | Execute a stack command for a specified ghc execStackWithGhc :: CmdResult r => VersionNumber -> [String] -> Action r execStackWithGhc versionNumber args = do let stackFile = "stack-" ++ versionNumber ++ ".yaml" + execStackWithCfgFile stackFile args + +-- | Execute a stack command for a specified stack.yaml file, discarding the output +execStackWithCfgFile_ :: String -> [String] -> Action () +execStackWithCfgFile_ stackFile args = + command_ [] "stack" (("--stack-yaml=" ++ stackFile) : args) + +-- | Execute a stack command for a specified stack.yaml file +execStackWithCfgFile :: CmdResult r => String -> [String] -> Action r +execStackWithCfgFile stackFile args = command [] "stack" (("--stack-yaml=" ++ stackFile) : args) -- | Execute a stack command with the same resolver as the build script @@ -69,7 +92,7 @@ execStackShake args = command [] "stack" ("--stack-yaml=install/shake.yaml" : ar -- | Execute a stack command with the same resolver as the build script, discarding the output execStackShake_ :: [String] -> Action () -execStackShake_ args = command_ [] "stack" ("--stack-yaml=install/shake.yaml" : args) +execStackShake_ = execStackShake -- | Error message when the `stack` binary is an older version From 40483ba367d648d2cb9770035f7d9b9396a2eb6d Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 29 Jan 2020 10:09:52 +0100 Subject: [PATCH 139/270] Remove duplication --- install/src/Stack.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install/src/Stack.hs b/install/src/Stack.hs index 2aff1d791..ec8aabcd0 100644 --- a/install/src/Stack.hs +++ b/install/src/Stack.hs @@ -78,8 +78,7 @@ execStackWithGhc versionNumber args = do -- | Execute a stack command for a specified stack.yaml file, discarding the output execStackWithCfgFile_ :: String -> [String] -> Action () -execStackWithCfgFile_ stackFile args = - command_ [] "stack" (("--stack-yaml=" ++ stackFile) : args) +execStackWithCfgFile_ = execStackWithCfgFile -- | Execute a stack command for a specified stack.yaml file execStackWithCfgFile :: CmdResult r => String -> [String] -> Action r From d2f555910b48b8ba7f517683760715ca680d5169 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 30 Jan 2020 10:09:22 +0100 Subject: [PATCH 140/270] Change cabal root dir to D: --- .azure/windows-cabal.bashrc | 3 ++- .azure/windows-cabal.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.azure/windows-cabal.bashrc b/.azure/windows-cabal.bashrc index 7ad443a98..8ddab0325 100644 --- a/.azure/windows-cabal.bashrc +++ b/.azure/windows-cabal.bashrc @@ -1,5 +1,6 @@ +export CABAL_DIR=/d/cabal export GHCS_PATH=$(cygpath $ProgramData)/chocolatey/lib/ghc/tools export GHC_PATH=$GHCS_PATH/ghc-$GHC_VERSION -export CABAL_ROOT=$(cygpath $APPDATA)/cabal +export CABAL_ROOT=$CABAL_DIR export Z3_BIN_PATH=/usr/local/z3-4.8.5-x64-win/bin export PATH=$CABAL_ROOT/bin:$GHC_PATH/bin:$Z3_BIN_PATH:$PATH diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 38f6c737a..73a16f888 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -25,10 +25,9 @@ jobs: cacheHitVar: CACHE_RESTORED displayName: "Download cache" - bash: | - df -k source .azure/windows-cabal.bashrc mkdir -p $CABAL_ROOT - tar -vxzf .azure-cache/cabal-root.tar.gz -C /c + tar -vxzf .azure-cache/cabal-root.tar.gz -C /d mkdir -p $CABAL_STORE_DIR tar -vxzf .azure-cache/cabal-store.tar.gz -C /d mkdir -p ${CABAL_STORE_DIR}i @@ -45,6 +44,7 @@ jobs: choco install -y --ignore-dependencies ghc --version=$GHC_VERSION displayName: Install ghc - bash: | + source .azure/windows-cabal.bashrc choco install -y cabal --version=$CABAL_VERSION $(cygpath $ProgramData)/chocolatey/bin/RefreshEnv.cmd displayName: Install cabal From 44b9f58ecad0bc9b96e6564cc128f33a299e12b5 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 30 Jan 2020 10:26:55 +0100 Subject: [PATCH 141/270] Use win path in CABAL_DIR --- .azure/windows-cabal.bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/windows-cabal.bashrc b/.azure/windows-cabal.bashrc index 8ddab0325..1a8b40489 100644 --- a/.azure/windows-cabal.bashrc +++ b/.azure/windows-cabal.bashrc @@ -1,6 +1,6 @@ -export CABAL_DIR=/d/cabal +export CABAL_DIR="D:\cabal" export GHCS_PATH=$(cygpath $ProgramData)/chocolatey/lib/ghc/tools export GHC_PATH=$GHCS_PATH/ghc-$GHC_VERSION -export CABAL_ROOT=$CABAL_DIR +export CABAL_ROOT=$(cygpath $CABAL_DIR) export Z3_BIN_PATH=/usr/local/z3-4.8.5-x64-win/bin export PATH=$CABAL_ROOT/bin:$GHC_PATH/bin:$Z3_BIN_PATH:$PATH From 9634890b8434476f7d2891c4f2fe8a2dbc3545fc Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 30 Jan 2020 13:37:08 +0100 Subject: [PATCH 142/270] Refresh cache of windows-cabal job --- .azure/windows-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 73a16f888..7abbe3926 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -20,7 +20,7 @@ jobs: steps: - task: Cache@2 inputs: - key: '"cabal" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + key: '"cabal-v2" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" From 5b77402846f9e5fbcf4dc9798e5d42eacb7687ca Mon Sep 17 00:00:00 2001 From: GavinRay97 Date: Sat, 1 Feb 2020 18:18:51 -0500 Subject: [PATCH 143/270] Add instructions for installing HIE + GHC as a VS Code Devcontainer --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d324d2d10..3b53620b5 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ This project aims to be __the universal interface__ to __a growing number of Has - [Installation](#installation) - [Installation with Nix](#installation-with-nix) - [Installation on ArchLinux](#installation-on-archlinux) + - [Installation with GHC and HIE as a VS Code Devcontainer](#installation-with-ghc-and-hie-as-a-vs-code-devcontainer) - [Installation from source](#installation-from-source) - [Common pre-requirements](#common-pre-requirements) - [Linux-specific pre-requirements](#linux-specific-pre-requirements) @@ -152,6 +153,15 @@ Using [Aura](https://github.com/aurapm/aura): # aura -A haskell-ide-engine ``` +### Installation with GHC and HIE as a VS Code Devcontainer + +VS Code provides the ability to develop applications inside of a Docker container (called _Devcontainers_) +https://code.visualstudio.com/docs/remote/containers + +There is a community Devcontainer setup which installs and configures GHC + HIE 8.6.5 and the necessary VS Code extensions to integrate them into the editor. + +https://github.com/hmemcpy/haskell-hie-devcontainer + ### Installation from source From f2aec4c30eb0c197aab89a4883f6e52bddb8528f Mon Sep 17 00:00:00 2001 From: Andy Date: Sun, 2 Feb 2020 01:38:51 +0100 Subject: [PATCH 144/270] Readme: haskell-ide -> haskell-language-server See https://github.com/haskell/haskell-language-server/pull/31 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d324d2d10..b3ddd41a9 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Currently the main development effort is focused in [integrating haskell-ide-engine](https://github.com/haskell/haskell-ide-engine/issues/1416) and [ghcide](https://github.com/digital-asset/ghcide) under a common repository: -https://github.com/haskell/ide +https://github.com/haskell/haskell-language-server -Until the new `haskell-ide` reaches the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. +Until the new `haskell-language-server` reaches the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in [any of the communication channels](#its-time-to-join-the-project). From 6a12fb05da8c2ea9647b84a4289b0e77cd3643c1 Mon Sep 17 00:00:00 2001 From: fendor Date: Sat, 25 Jan 2020 16:27:16 +0100 Subject: [PATCH 145/270] Update HIE to use latest hie-bios --- .gitmodules | 2 - app/MainHie.hs | 10 +- cabal.project | 3 +- haskell-ide-engine.cabal | 2 +- .../Haskell/Ide/Engine/ArtifactMap.hs | 2 +- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 127 ++++++++++-------- .../Haskell/Ide/Engine/GhcModuleCache.hs | 28 ++-- hie-plugin-api/Haskell/Ide/Engine/Logger.hs | 16 +++ .../Haskell/Ide/Engine/ModuleCache.hs | 10 +- .../Haskell/Ide/Engine/MonadFunctions.hs | 17 +-- hie-plugin-api/hie-plugin-api.cabal | 3 +- src/Haskell/Ide/Engine/Scheduler.hs | 2 +- src/Haskell/Ide/Engine/Version.hs | 5 +- stack-8.4.2.yaml | 20 ++- stack-8.4.3.yaml | 23 +++- stack-8.4.4.yaml | 25 +++- stack-8.6.4.yaml | 15 ++- stack-8.6.5.yaml | 8 +- stack-8.8.1.yaml | 3 +- stack-8.8.2.yaml | 2 +- stack.yaml | 9 +- test/functional/ProgressSpec.hs | 5 +- test/unit/CabalHelperSpec.hs | 4 +- test/unit/GenericPluginSpec.hs | 38 +++--- 24 files changed, 221 insertions(+), 158 deletions(-) create mode 100644 hie-plugin-api/Haskell/Ide/Engine/Logger.hs diff --git a/.gitmodules b/.gitmodules index 281a9120a..7856aaec3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,3 @@ # Commit git commit -m "Removed submodule " # Delete the now untracked submodule files # rm -rf path_to_submodule - - diff --git a/app/MainHie.hs b/app/MainHie.hs index 4242cf5b5..617695ff3 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -9,7 +9,8 @@ import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Yaml as Yaml import HIE.Bios.Types -import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay, getProjectGhcLibDir) +import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay + , getProjectGhcLibDir, CabalHelper) import Haskell.Ide.Engine.MonadFunctions import Haskell.Ide.Engine.MonadTypes import Haskell.Ide.Engine.Options @@ -151,8 +152,11 @@ main = do -- --------------------------------------------------------------------- -getCradleInfo :: FilePath -> IO (Either Yaml.ParseException Cradle) -getCradleInfo currentDir = E.try $ findLocalCradle $ currentDir "File.hs" +getCradleInfo :: FilePath -> IO (Either Yaml.ParseException (Cradle CabalHelper)) +getCradleInfo currentDir = do + let dummyCradleFile = currentDir "File.hs" + cradleRes <- E.try (findLocalCradle dummyCradleFile) + return cradleRes -- --------------------------------------------------------------------- diff --git a/cabal.project b/cabal.project index 72a4b52e9..8e95039a1 100644 --- a/cabal.project +++ b/cabal.project @@ -1,7 +1,6 @@ packages: ./ ./hie-plugin-api/ - -- ./submodules/HaRe tests: true @@ -16,4 +15,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-01-24T16:47:33Z +index-state: 2020-02-01T17:43:11Z diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 408ff03d2..87ccb0597 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -99,7 +99,7 @@ library , vector , versions , yaml >= 0.8.31 - , hie-bios >= 0.3.2 && < 0.4.0 + , hie-bios >= 0.4 && < 0.5.0 , bytestring-trie , unliftio , hlint >= 2.2.8 diff --git a/hie-plugin-api/Haskell/Ide/Engine/ArtifactMap.hs b/hie-plugin-api/Haskell/Ide/Engine/ArtifactMap.hs index 37258477f..5aceba1dc 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/ArtifactMap.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/ArtifactMap.hs @@ -8,7 +8,7 @@ import qualified GHC import GHC (TypecheckedModule) import qualified SrcLoc as GHC import qualified Var -import Haskell.Ide.Engine.GhcCompat +import Haskell.Ide.Engine.GhcCompat import Language.Haskell.LSP.Types diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 7f9e4b4f2..22297da03 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -5,9 +5,10 @@ module Haskell.Ide.Engine.Cradle where -import HIE.Bios as BIOS -import HIE.Bios.Types as BIOS -import Haskell.Ide.Engine.MonadFunctions +import HIE.Bios as Bios +import qualified HIE.Bios.Cradle as Bios +import HIE.Bios.Types (CradleAction(..)) +import qualified HIE.Bios.Types as Bios import Distribution.Helper (Package, projectPackages, pUnits, pSourceDir, ChComponentInfo(..), unChModuleName, Ex(..), ProjLoc(..), @@ -15,9 +16,8 @@ import Distribution.Helper (Package, projectPackages, pUnits, Unit, unitInfo, uiComponents, ChEntrypoint(..), UnitInfo(..)) import Distribution.Helper.Discover (findProjects, getDefaultDistDir) -import Data.Char (toLower) import Data.Function ((&)) -import Data.List (isPrefixOf, isInfixOf, sortOn, find) +import Data.List (isPrefixOf, sortOn, find) import qualified Data.List.NonEmpty as NonEmpty import Data.List.NonEmpty (NonEmpty) import qualified Data.Map as Map @@ -32,6 +32,8 @@ import System.Directory (getCurrentDirectory, canonicalizePath, findEx import System.Exit import System.Process (readCreateProcessWithExitCode, shell) +import Haskell.Ide.Engine.Logger + -- | Find the cradle that the given File belongs to. -- -- First looks for a "hie.yaml" file in the directory of the file @@ -42,14 +44,15 @@ import System.Process (readCreateProcessWithExitCode, shell) -- If no "hie.yaml" can be found, the implicit config is used. -- The implicit config uses different heuristics to determine the type -- of the project that may or may not be accurate. -findLocalCradle :: FilePath -> IO Cradle +findLocalCradle :: FilePath -> IO (Cradle CabalHelper) findLocalCradle fp = do - cradleConf <- BIOS.findCradle fp - crdl <- case cradleConf of + cradleConf <- Bios.findCradle fp + crdl <- case cradleConf of Just yaml -> do debugm $ "Found \"" ++ yaml ++ "\" for \"" ++ fp ++ "\"" - BIOS.loadCradle yaml - Nothing -> cabalHelperCradle fp + crdl <- Bios.loadCradle yaml + return $ fmap (const CabalNone) crdl + Nothing -> cabalHelperCradle fp logm $ "Module \"" ++ fp ++ "\" is loaded by Cradle: " ++ show crdl return crdl @@ -57,29 +60,33 @@ findLocalCradle fp = do -- This might be used to determine the GHC version to use on the project. -- If it is a stack-cradle, we have to use @"stack path --compiler-exe"@ -- otherwise we may ask `ghc` directly what version it is. -isStackCradle :: Cradle -> Bool -isStackCradle = (`elem` ["stack", "Cabal-Helper-Stack", "Cabal-Helper-Stack-None"]) - . BIOS.actionName - . BIOS.cradleOptsProg +isStackCradle :: Cradle CabalHelper -> Bool +isStackCradle crdl = Bios.isStackCradle crdl || cabalHelperStackCradle crdl + where + cabalHelperStackCradle = + (`elem` [Bios.Other Stack, Bios.Other StackNone]) + . Bios.actionName + . Bios.cradleOptsProg + -- | Check if the given cradle is a cabal cradle. -- This might be used to determine the GHC version to use on the project. -- If it is a stack-cradle, we have to use @"stack path --compiler-exe"@ -- otherwise we may ask @ghc@ directly what version it is. -isCabalCradle :: Cradle -> Bool -isCabalCradle = - (`elem` - [ "cabal" - , "Cabal-Helper-Cabal-V1" - , "Cabal-Helper-Cabal-V2" - , "Cabal-Helper-Cabal-V1-Dir" - , "Cabal-Helper-Cabal-V2-Dir" - , "Cabal-Helper-Cabal-V2-None" - , "Cabal-Helper-Cabal-None" - ] - ) - . BIOS.actionName - . BIOS.cradleOptsProg +isCabalCradle :: Cradle CabalHelper -> Bool +isCabalCradle crdl = Bios.isCabalCradle crdl || cabalHelperCabalCradle crdl + where + cabalHelperCabalCradle = + (`elem` [Bios.Other CabalV2, Bios.Other CabalNone]) + . Bios.actionName + . Bios.cradleOptsProg + +data CabalHelper + = Stack + | StackNone + | CabalV2 + | CabalNone + deriving (Show, Eq, Ord) -- | Execute @ghc@ that is based on the given cradle. -- Output must be a single line. If an error is raised, e.g. the command @@ -88,7 +95,7 @@ isCabalCradle = -- -- E.g. for a stack cradle, we use @stack ghc@ and for a cabal cradle -- we are taking the @ghc@ that is on the path. -execProjectGhc :: Cradle -> [String] -> IO (Maybe String) +execProjectGhc :: Cradle CabalHelper -> [String] -> IO (Maybe String) execProjectGhc crdl args = do isStackInstalled <- isJust <$> findExecutable "stack" -- isCabalInstalled <- isJust <$> findExecutable "cabal" @@ -144,7 +151,7 @@ tryCommand cmd = do -- | Get the directory of the libdir based on the project ghc. -getProjectGhcLibDir :: Cradle -> IO (Maybe FilePath) +getProjectGhcLibDir :: Cradle CabalHelper -> IO (Maybe FilePath) getProjectGhcLibDir crdl = execProjectGhc crdl ["--print-libdir"] >>= \case Nothing -> do @@ -441,7 +448,7 @@ the compiler options obtained from Cabal-Helper are relative to the package source directory, which is "\/Repo\/SubRepo". -} -cabalHelperCradle :: FilePath -> IO Cradle +cabalHelperCradle :: FilePath -> IO (Cradle CabalHelper) cabalHelperCradle file = do projM <- findCabalHelperEntryPoint file case projM of @@ -451,7 +458,7 @@ cabalHelperCradle file = do return Cradle { cradleRootDir = cwd , cradleOptsProg = - CradleAction { actionName = "Direct" + CradleAction { actionName = Bios.Direct , runCradle = \_ _ -> return $ CradleSuccess @@ -467,7 +474,7 @@ cabalHelperCradle file = do let root = projectRootDir proj -- Create a suffix for the cradle name. -- Purpose is mainly for easier debugging. - let actionNameSuffix = projectSuffix proj + let actionNameSuffix = projectType proj debugm $ "Cabal-Helper dirs: " ++ show [root, file] let dist_dir = getDefaultDistDir proj env <- mkQueryEnv proj dist_dir @@ -484,9 +491,7 @@ cabalHelperCradle file = do return Cradle { cradleRootDir = root , cradleOptsProg = - CradleAction { actionName = "Cabal-Helper-" - ++ actionNameSuffix - ++ "-None" + CradleAction { actionName = Bios.Other (projectNoneType proj) , runCradle = \_ _ -> return CradleNone } } @@ -501,8 +506,7 @@ cabalHelperCradle file = do return Cradle { cradleRootDir = normalisedPackageLocation , cradleOptsProg = - CradleAction { actionName = - "Cabal-Helper-" ++ actionNameSuffix + CradleAction { actionName = Bios.Other actionNameSuffix , runCradle = \_ fp -> cabalHelperAction (Ex proj) env @@ -751,12 +755,19 @@ projectRootDir ProjLocV2File { plProjectDirV2 } = plProjectDirV2 projectRootDir ProjLocV2Dir { plProjectDirV2 } = plProjectDirV2 projectRootDir ProjLocStackYaml { plStackYaml } = takeDirectory plStackYaml -projectSuffix :: ProjLoc qt -> FilePath -projectSuffix ProjLocV1CabalFile {} = "Cabal-V1" -projectSuffix ProjLocV1Dir {} = "Cabal-V1-Dir" -projectSuffix ProjLocV2File {} = "Cabal-V2" -projectSuffix ProjLocV2Dir {} = "Cabal-V2-Dir" -projectSuffix ProjLocStackYaml {} = "Stack" +projectType :: ProjLoc qt -> CabalHelper +projectType ProjLocV1CabalFile {} = CabalV2 +projectType ProjLocV1Dir {} = CabalV2 +projectType ProjLocV2File {} = CabalV2 +projectType ProjLocV2Dir {} = CabalV2 +projectType ProjLocStackYaml {} = Stack + +projectNoneType :: ProjLoc qt -> CabalHelper +projectNoneType ProjLocV1CabalFile {} = CabalNone +projectNoneType ProjLocV1Dir {} = CabalNone +projectNoneType ProjLocV2File {} = CabalNone +projectNoneType ProjLocV2Dir {} = CabalNone +projectNoneType ProjLocStackYaml {} = StackNone -- ---------------------------------------------------------------------------- -- @@ -867,14 +878,22 @@ relativeTo file sourceDirs = -- | Returns a user facing display name for the cradle type, -- e.g. "Stack project" or "GHC session" -cradleDisplay :: IsString a => BIOS.Cradle -> a +cradleDisplay :: IsString a => Cradle CabalHelper -> a cradleDisplay cradle = fromString result - where - result - | "stack" `isInfixOf` name = "Stack project" - | "cabal-v1" `isInfixOf` name = "Cabal (V1) project" - | "cabal" `isInfixOf` name = "Cabal project" - | "direct" `isInfixOf` name = "GHC session" - | "multi" `isInfixOf` name = "Multi Component project" - | otherwise = "project" - name = map toLower $ BIOS.actionName (BIOS.cradleOptsProg cradle) + where + result + | Bios.isStackCradle cradle + || name + `elem` [Bios.Other Stack, Bios.Other StackNone] + = "Stack project" + | Bios.isCabalCradle cradle + || name + `elem` [Bios.Other CabalV2, Bios.Other CabalNone] + = "Cabal project" + | Bios.isDirectCradle cradle + = "GHC session" + | Bios.isMultiCradle cradle + = "Multi Component project" + | otherwise + = "project" + name = Bios.actionName (Bios.cradleOptsProg cradle) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index 79794fd82..ea006174b 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -4,21 +4,19 @@ module Haskell.Ide.Engine.GhcModuleCache where -import qualified Data.Map as Map +import qualified Data.ByteString.Char8 as B import Data.Dynamic (Dynamic) -import Data.Typeable (TypeRep) - -import qualified HIE.Bios as BIOS +import Data.List +import qualified Data.Map as Map import qualified Data.Trie as T -import qualified Data.ByteString.Char8 as B +import Data.Typeable (TypeRep) +import qualified HIE.Bios as Bios import GHC (TypecheckedModule, ParsedModule, HscEnv) -import Data.List - -import Haskell.Ide.Engine.ArtifactMap - -import Language.Haskell.LSP.Types +import Haskell.Ide.Engine.ArtifactMap +import Haskell.Ide.Engine.Cradle +import Language.Haskell.LSP.Types type UriCaches = Map.Map FilePath UriCacheResult @@ -103,7 +101,7 @@ lookupCradle fp gmc = -- | Find the cradle wide 'ComponentOptions' that apply to a 'FilePath' lookupComponentOptions - :: HasGhcModuleCache m => FilePath -> m (Maybe BIOS.ComponentOptions) + :: HasGhcModuleCache m => FilePath -> m (Maybe Bios.ComponentOptions) lookupComponentOptions fp = do gmc <- getModuleCache return $ lookupInCache fp gmc (const Just) (Just . compOpts) Nothing @@ -112,7 +110,7 @@ lookupInCache :: FilePath -> GhcModuleCache -- | Called when file is in the current cradle - -> (BIOS.Cradle -> BIOS.ComponentOptions -> a) + -> (Bios.Cradle CabalHelper -> Bios.ComponentOptions -> a) -- | Called when file is a member of a cached cradle -> (CachedCradle -> a) -- | Default value to return if a cradle is not found @@ -126,9 +124,9 @@ lookupInCache fp gmc cur cached def = case currentCradle gmc of -- | A 'Cradle', it's 'HscEnv' and 'ComponentOptions' data CachedCradle = CachedCradle - { ccradle :: BIOS.Cradle + { ccradle :: Bios.Cradle CabalHelper , hscEnv :: HscEnv - , compOpts :: BIOS.ComponentOptions + , compOpts :: Bios.ComponentOptions } instance Show CachedCradle where @@ -139,7 +137,7 @@ data GhcModuleCache = GhcModuleCache -- ^ map from FilePath to cradle and it's config. -- May not include currentCradle , uriCaches :: !UriCaches - , currentCradle :: Maybe ([FilePath], BIOS.Cradle, BIOS.ComponentOptions) + , currentCradle :: Maybe ([FilePath], Bios.Cradle CabalHelper, Bios.ComponentOptions) -- ^ The current cradle, it's config, -- and which FilePath's it is responsible for. } deriving (Show) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Logger.hs b/hie-plugin-api/Haskell/Ide/Engine/Logger.hs new file mode 100644 index 000000000..8ec822fb9 --- /dev/null +++ b/hie-plugin-api/Haskell/Ide/Engine/Logger.hs @@ -0,0 +1,16 @@ +module Haskell.Ide.Engine.Logger where + +import Control.Monad.IO.Class +import System.Log.Logger + +logm :: MonadIO m => String -> m () +logm s = liftIO $ infoM "hie" s + +debugm :: MonadIO m => String -> m () +debugm s = liftIO $ debugM "hie" s + +warningm :: MonadIO m => String -> m () +warningm s = liftIO $ warningM "hie" s + +errorm :: MonadIO m => String -> m () +errorm s = liftIO $ errorM "hie" s diff --git a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs index de81fc745..9363a53e1 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/ModuleCache.hs @@ -56,7 +56,7 @@ import qualified HIE.Bios.Ghc.Api as Bios import qualified Language.Haskell.LSP.Types as J import qualified Language.Haskell.LSP.Diagnostics as J import Haskell.Ide.Engine.ArtifactMap -import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay) +import Haskell.Ide.Engine.Cradle (findLocalCradle, cradleDisplay, CabalHelper) import Haskell.Ide.Engine.TypeMap import Haskell.Ide.Engine.GhcModuleCache import Haskell.Ide.Engine.MultiThreadState @@ -164,7 +164,7 @@ loadCradle publishDiagnostics iniDynFlags (NewCradle fp) def action = do where -- | Initialise the given cradle. This might fail and return an error via `IdeResultFail`. -- Reports its progress to the client. - initialiseCradle :: Bios.Cradle -> (Progress -> IO ()) -> m (IdeResult a) + initialiseCradle :: Bios.Cradle CabalHelper -> (Progress -> IO ()) -> m (IdeResult a) initialiseCradle cradle f = do res <- initializeFlagsWithCradleWithMessage (Just (toMessager f)) fp cradle case res of @@ -239,7 +239,7 @@ initializeFlagsWithCradleWithMessage :: GHC.GhcMonad m => Maybe GHC.Messager -> FilePath -- ^ The file we are loading the 'Cradle' because of - -> Bios.Cradle -- ^ The cradle we want to load + -> Bios.Cradle CabalHelper -- ^ The cradle we want to load -> m (Bios.CradleLoadResult (m GHC.SuccessFlag, Bios.ComponentOptions)) -- ^ Whether we actually loaded the cradle or not. initializeFlagsWithCradleWithMessage msg fp cradle = fmap (initSessionWithMessage msg) <$> liftIO (Bios.getCompilerOptions fp cradle) @@ -260,7 +260,7 @@ initSessionWithMessage msg copts = (do -- that belong to this cradle. -- If the cradle does not load any module, it is responsible for an empty -- list of Modules. -setCurrentCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => Bios.Cradle -> Bios.ComponentOptions -> m () +setCurrentCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => Bios.Cradle CabalHelper -> Bios.ComponentOptions -> m () setCurrentCradle cradle co = do mg <- GHC.getModuleGraph let ps = mapMaybe (GHC.ml_hs_file . GHC.ms_location) (mgModSummaries mg) @@ -273,7 +273,7 @@ setCurrentCradle cradle co = do -- for. -- Via 'lookupCradle' it can be checked if a given FilePath is managed by -- a any Cradle that has already been loaded. -cacheCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => ([FilePath], Bios.Cradle, Bios.ComponentOptions) -> m () +cacheCradle :: (HasGhcModuleCache m, GHC.GhcMonad m) => ([FilePath], Bios.Cradle CabalHelper, Bios.ComponentOptions) -> m () cacheCradle (ds, c, co) = do env <- GHC.getSession let cc = CachedCradle c env co diff --git a/hie-plugin-api/Haskell/Ide/Engine/MonadFunctions.hs b/hie-plugin-api/Haskell/Ide/Engine/MonadFunctions.hs index d4cfdb82e..6d21de3ec 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/MonadFunctions.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/MonadFunctions.hs @@ -16,29 +16,14 @@ module Haskell.Ide.Engine.MonadFunctions , get ) where -import Control.Monad.IO.Class -import System.Log.Logger import Data.Typeable import Data.Dynamic import qualified Data.Map as Map import Haskell.Ide.Engine.MultiThreadState +import Haskell.Ide.Engine.Logger (logm, debugm, warningm, errorm) import Haskell.Ide.Engine.PluginsIdeMonads --- --------------------------------------------------------------------- - -logm :: MonadIO m => String -> m () -logm s = liftIO $ infoM "hie" s - -debugm :: MonadIO m => String -> m () -debugm s = liftIO $ debugM "hie" s - -warningm :: MonadIO m => String -> m () -warningm s = liftIO $ warningM "hie" s - -errorm :: MonadIO m => String -> m () -errorm s = liftIO $ errorM "hie" s - -- --------------------------------------------------------------------- -- Extensible state, based on -- http://xmonad.org/xmonad-docs/xmonad/XMonad-Core.html#t:ExtensionClass diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index c20e9c5e5..59ed4530f 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -29,6 +29,7 @@ library Haskell.Ide.Engine.Context Haskell.Ide.Engine.Ghc Haskell.Ide.Engine.GhcModuleCache + Haskell.Ide.Engine.Logger Haskell.Ide.Engine.ModuleCache Haskell.Ide.Engine.MonadFunctions Haskell.Ide.Engine.MonadTypes @@ -51,7 +52,7 @@ library , fingertree , free , ghc - , hie-bios >= 0.3.2 && < 0.4.0 + , hie-bios , cabal-helper , haskell-lsp == 0.19.* , hslogger diff --git a/src/Haskell/Ide/Engine/Scheduler.hs b/src/Haskell/Ide/Engine/Scheduler.hs index c155d15e8..cc554ff0f 100644 --- a/src/Haskell/Ide/Engine/Scheduler.hs +++ b/src/Haskell/Ide/Engine/Scheduler.hs @@ -149,7 +149,7 @@ runScheduler -> Core.LspFuncs Config -- ^ The LspFuncs provided by haskell-lsp. -> PublishDiagnostics - -> Maybe Bios.Cradle + -> Maybe (Bios.Cradle Bios.CabalHelper) -- ^ Context in which the ghc thread is executed. -- Neccessary to obtain the libdir, for example. -> IO () diff --git a/src/Haskell/Ide/Engine/Version.hs b/src/Haskell/Ide/Engine/Version.hs index 3b1f8da9d..4b1a27982 100644 --- a/src/Haskell/Ide/Engine/Version.hs +++ b/src/Haskell/Ide/Engine/Version.hs @@ -11,7 +11,8 @@ import Distribution.System (buildArch) import Distribution.Text (display) import Options.Applicative.Simple (simpleVersion) import Haskell.Ide.Engine.Cradle (execProjectGhc) -import qualified HIE.Bios.Types as Bios +import qualified HIE.Bios.Types as Bios +import qualified Haskell.Ide.Engine.Cradle as Bios import qualified Paths_haskell_ide_engine as Meta import System.Directory import System.Info @@ -34,7 +35,7 @@ hieVersion = hieGhcDisplayVersion :: String hieGhcDisplayVersion = compilerName ++ "-" ++ VERSION_ghc -getProjectGhcVersion :: Bios.Cradle -> IO String +getProjectGhcVersion :: Bios.Cradle Bios.CabalHelper -> IO String getProjectGhcVersion crdl = fmap (fromMaybe "No System GHC Found.") diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 32a474726..e6b24b6db 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -1,12 +1,16 @@ resolver: nightly-2018-05-30 # last nightly for GHC 8.4.2 packages: - - . - - hie-plugin-api +- . +- hie-plugin-api extra-deps: # - ./submodules/HaRe +- aeson-1.4.6.0 +- aeson-pretty-0.8.8 - base-compat-0.9.3 +- base-orphans-0.8.2 +- bifunctors-5.5.6 - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 @@ -17,6 +21,7 @@ extra-deps: - file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 +- generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 - ghc-lib-parser-ex-8.8.2 @@ -26,27 +31,34 @@ extra-deps: - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- invariant-0.5.3 +- lens-4.18.1 - libyaml-0.1.1.0 - lsp-test-0.10.0.0 +- microlens-th-0.4.3.2 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger - network-bsd-2.8.1.0 # for hslogger - parser-combinators-1.2.1 +- profunctors-5.5.1 - pretty-show-1.8.2 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd - syz-0.2.0.0 - temporary-1.2.1.1 +- type-equality-1 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 -- yaml-0.11.1.2 +- yaml-0.11.2.0 +- th-abstraction-0.3.1.0 # To make build work in windows 7 +- time-compat-1.9.2.2 - time-manager-0.0.0 # for http2 - unix-time-0.4.7 - wai-3.2.2.1 # for network and network-bsd diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index f617d39be..2ae87b493 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -1,12 +1,16 @@ resolver: lts-12.14 # Last for GHC 8.4.3 packages: - - . - - hie-plugin-api +- . +- hie-plugin-api extra-deps: # - ./submodules/HaRe +- aeson-1.4.6.0 +- aeson-pretty-0.8.8 - base-compat-0.9.3 +- base-orphans-0.8.2 +- bifunctors-5.5.6 - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 @@ -17,6 +21,7 @@ extra-deps: - file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 +- generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 - ghc-lib-parser-ex-8.8.2 @@ -26,17 +31,21 @@ extra-deps: - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- invariant-0.5.3 +- lens-4.18.1 - libyaml-0.1.1.0 - lsp-test-0.10.0.0 +- microlens-th-0.4.3.2 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger - network-bsd-2.8.1.0 # for hslogger - parser-combinators-1.2.1 +- profunctors-5.5.1 - pretty-show-1.8.2 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd @@ -44,15 +53,17 @@ extra-deps: - syz-0.2.0.0 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 -- yaml-0.11.1.2 +- yaml-0.11.2.0 +- th-abstraction-0.3.1.0 +- type-equality-1 # To make build work in windows 7 - unix-time-0.4.7 - temporary-1.2.1.1 +- time-compat-1.9.2.2 - time-manager-0.0.0 # for http2 - warp-3.2.28 # for network and network-bsd - wai-3.2.2.1 # for network and network-bsd - flags: haskell-ide-engine: pedantic: true @@ -60,6 +71,6 @@ flags: pedantic: true nix: - packages: [ icu libcxx zlib ] + packages: [icu libcxx zlib] concurrent-tests: false diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index a8f35f4c6..29e513308 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -1,11 +1,15 @@ resolver: lts-12.26 # LTS 12.15 is first to support GHC 8.4.4 packages: - - . - - hie-plugin-api +- . +- hie-plugin-api extra-deps: -# - ./submodules/HaRe + # - ./submodules/HaRe +- aeson-1.4.6.0 +- aeson-pretty-0.8.8 +- base-orphans-0.8.2 +- bifunctors-5.5.6 - brittany-0.12.1.0 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 @@ -16,6 +20,7 @@ extra-deps: - file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 +- generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.1 - ghc-lib-parser-ex-8.8.2 @@ -25,34 +30,40 @@ extra-deps: - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- invariant-0.5.3 +- lens-4.18.1 - libyaml-0.1.1.0 - lsp-test-0.10.0.0 +- microlens-th-0.4.3.2 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger - network-bsd-2.8.1.0 # for hslogger - optparse-simple-0.1.0 - parser-combinators-1.2.1 - pretty-show-1.9.5 +- profunctors-5.5.1 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd - syz-0.2.0.0 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 -- yaml-0.11.1.2 +- yaml-0.11.2.0 +- th-abstraction-0.3.1.0 +- type-equality-1 # To make build work in windows 7 - unix-time-0.4.7 - temporary-1.2.1.1 +- time-compat-1.9.2.2 - time-manager-0.0.0 # for http2 - warp-3.2.28 # for network and network-bsd - wai-3.2.2.1 # for network and network-bsd - flags: haskell-ide-engine: pedantic: true @@ -60,6 +71,6 @@ flags: pedantic: true nix: - packages: [ icu libcxx zlib ] + packages: [icu libcxx zlib] concurrent-tests: false diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index cac64a192..976222ae4 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -1,11 +1,13 @@ resolver: lts-13.19 # GHC 8.6.4 packages: - - . - - hie-plugin-api +- . +- hie-plugin-api extra-deps: # - ./submodules/HaRe +- aeson-1.4.6.0 +- aeson-pretty-0.8.8 - brittany-0.12.1.0 - butcher-1.3.2.1 - bytestring-trie-0.2.5.0 @@ -21,7 +23,7 @@ extra-deps: - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 @@ -34,23 +36,22 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 +- time-compat-1.9.2.2 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 -- yaml-0.11.1.2 +- yaml-0.11.2.0 # To make build work in windows 7 - unix-time-0.4.7 - flags: haskell-ide-engine: pedantic: true hie-plugin-api: pedantic: true - # allow-newer: true nix: - packages: [ icu libcxx zlib ] + packages: [icu libcxx zlib] concurrent-tests: false diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 8480ea00e..bff2bb467 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -1,11 +1,13 @@ resolver: lts-14.20 packages: - - . - - hie-plugin-api +- . +- hie-plugin-api extra-deps: # - ./submodules/HaRe +- aeson-1.4.6.0 +- aeson-pretty-0.8.8 - ansi-terminal-0.8.2 - ansi-wl-pprint-0.6.8.2 - brittany-0.12.1.0 @@ -21,7 +23,7 @@ extra-deps: - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 36e79a1d0..10709ffe1 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -6,6 +6,7 @@ packages: extra-deps: # - ./submodules/HaRe +- aeson-1.4.6.0 - apply-refact-0.7.0.0 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 @@ -16,7 +17,7 @@ extra-deps: - haddock-api-2.23.0 - haddock-library-1.8.0 - haskell-src-exts-1.21.1 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index f2e07f962..7486f1971 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -19,7 +19,7 @@ extra-deps: - haddock-api - haddock-library-1.8.0 - haskell-src-exts-1.21.1 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hoogle-5.0.17.11 - hsimport-0.11.0 diff --git a/stack.yaml b/stack.yaml index 043c61c3d..fbd210934 100644 --- a/stack.yaml +++ b/stack.yaml @@ -6,6 +6,7 @@ packages: extra-deps: # - ./submodules/HaRe +- aeson-1.4.6.0 - ansi-terminal-0.8.2 - ansi-wl-pprint-0.6.8.2 - brittany-0.12.1.0 @@ -23,7 +24,7 @@ extra-deps: - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 -- hie-bios-0.3.2 +- hie-bios-0.4.0 - hlint-2.2.8 - hsimport-0.11.0 - lsp-test-0.10.0.0 @@ -33,7 +34,8 @@ extra-deps: - syz-0.2.0.0 - temporary-1.2.1.1 - unix-compat-0.5.2 -- yaml-0.11.1.2 +- time-compat-1.9.2.2 +- yaml-0.11.2.0 flags: haskell-ide-engine: @@ -41,10 +43,9 @@ flags: hie-plugin-api: pedantic: true - # allow-newer: true nix: - packages: [ icu libcxx zlib ] + packages: [icu libcxx zlib] concurrent-tests: false diff --git a/test/functional/ProgressSpec.hs b/test/functional/ProgressSpec.hs index c9000b98c..70127ef01 100644 --- a/test/functional/ProgressSpec.hs +++ b/test/functional/ProgressSpec.hs @@ -30,8 +30,9 @@ spec = describe "window/workDoneProgress" $ do startNotification <- message :: Session WorkDoneProgressBeginNotification liftIO $ do - -- Expect a multi cradle, since testdata project has multiple executables - startNotification ^. L.params . L.value . L.title `shouldBe` "Initializing Multi Component project" + -- Expect a stack cradle, since the given `hie.yaml` is expected + -- to contain a multi-stack cradle. + startNotification ^. L.params . L.value . L.title `shouldBe` "Initializing Stack project" startNotification ^. L.params . L.token `shouldBe` (ProgressNumericToken 0) reportNotification <- message :: Session WorkDoneProgressReportNotification diff --git a/test/unit/CabalHelperSpec.hs b/test/unit/CabalHelperSpec.hs index 4859ad6e0..5265101f7 100644 --- a/test/unit/CabalHelperSpec.hs +++ b/test/unit/CabalHelperSpec.hs @@ -91,14 +91,14 @@ cabalHelperCradleSpec = do let fp = multiSourceDirsPath cwd "src" "BetterLib.hs" componentTest fp isStackCradle -componentTest :: FilePath -> (Cradle -> Bool) -> Expectation +componentTest :: FilePath -> (Cradle CabalHelper -> Bool) -> Expectation componentTest fp testCradleType = do crdl <- cabalHelperCradle fp crdl `shouldSatisfy` testCradleType -- TODO: this works but CI crashes -- loadComponent crdl fp -loadComponent :: Cradle -> FilePath -> Expectation +loadComponent :: Cradle CabalHelper -> FilePath -> Expectation loadComponent crdl fp = do result <- runCradle (cradleOptsProg crdl) (\_ -> return ()) fp case result of diff --git a/test/unit/GenericPluginSpec.hs b/test/unit/GenericPluginSpec.hs index 2fb58a7d2..5b8396d2e 100644 --- a/test/unit/GenericPluginSpec.hs +++ b/test/unit/GenericPluginSpec.hs @@ -2,7 +2,7 @@ {-# LANGUAGE OverloadedStrings #-} module GenericPluginSpec where -import Control.Exception +-- import Control.Exception import qualified Data.Map as Map import qualified Data.Set as S import qualified Data.Text as T @@ -498,23 +498,25 @@ ghcmodSpec = testCommand testPlugins fp act "generic" "type" arg res -- ---------------------------------------------------------------------------- - it "runs the type command with an absolute path from another folder, correct params" $ do - fp <- makeAbsolute "./test/testdata/HaReRename.hs" - cd <- getCurrentDirectory - cd2 <- getHomeDirectory - bracket (setCurrentDirectory cd2) - (\_->setCurrentDirectory cd) - $ \_-> do - let uri = filePathToUri fp - let act = do - _ <- setTypecheckedModule uri - liftToGhc $ newTypeCmd (toPos (5,9)) uri - let arg = TP False uri (toPos (5,9)) - let res = IdeResultOk - [(Range (toPos (5,9)) (toPos (5,10)), "Int") - , (Range (toPos (5,1)) (toPos (5,14)), "Int -> Int") - ] - testCommand testPlugins fp act "generic" "type" arg res + it "runs the type command with an absolute path from another folder, correct params" $ + pendingWith "Test case fails, for any ghc other than 8.6.5. Needs more investigation!" + -- $ do + -- fp <- makeAbsolute "./test/testdata/HaReRename.hs" + -- cd <- getCurrentDirectory + -- cd2 <- getHomeDirectory + -- bracket (setCurrentDirectory cd2) + -- (\_->setCurrentDirectory cd) + -- $ \_-> do + -- let uri = filePathToUri fp + -- let act = do + -- _ <- setTypecheckedModule uri + -- liftToGhc $ newTypeCmd (toPos (5,9)) uri + -- let arg = TP False uri (toPos (5,9)) + -- let res = IdeResultOk + -- [(Range (toPos (5,9)) (toPos (5,10)), "Int") + -- , (Range (toPos (5,1)) (toPos (5,14)), "Int -> Int") + -- ] + -- testCommand testPlugins fp act "generic" "type" arg res -- --------------------------------- From c209d85654d795a848cddb32b42482dc0f43d0f6 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 2 Feb 2020 21:09:57 +0100 Subject: [PATCH 146/270] Fix cabal-hie-install in windows --- .azure/windows-installhs-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index 16bd6d439..eb3109be8 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -18,7 +18,7 @@ jobs: - bash: | source .azure/windows-cabal.bashrc mkdir -p $CABAL_ROOT - tar -vxzf .azure-cache/cabal-root.tar.gz -C /c + tar -vxzf .azure-cache/cabal-root.tar.gz -C /d mkdir -p $CABAL_STORE_DIR tar -vxzf .azure-cache/cabal-store.tar.gz -C /d mkdir -p ./dist-newstyle From a5de1d8a167afc6e38ce93ed5ee7aa9bdb6d9d4b Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 1 Feb 2020 11:29:11 +0000 Subject: [PATCH 147/270] Bump resolvers, hlint, brittany cabal now index state 2020-01-31T21:11:24Z GHC 8.8.2 is nightly-2020-01-31 GHC 8.6.5 is lts-14.22 hlint is 2.2.10 brittany is 0.12.1.1 --- cabal.project | 2 +- stack-8.4.2.yaml | 8 +++--- stack-8.4.3.yaml | 63 +++++++++++++++++++++++++++++++++--------------- stack-8.4.4.yaml | 8 +++--- stack-8.6.4.yaml | 8 +++--- stack-8.6.5.yaml | 26 +++++++++++--------- stack-8.8.1.yaml | 7 +++--- stack-8.8.2.yaml | 8 +++--- stack.yaml | 40 +++++++++++++----------------- 9 files changed, 97 insertions(+), 73 deletions(-) diff --git a/cabal.project b/cabal.project index 8e95039a1..b1f8ec131 100644 --- a/cabal.project +++ b/cabal.project @@ -15,4 +15,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-02-01T17:43:11Z +index-state: 2020-02-02T17:43:42Z diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index e6b24b6db..48873df73 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -11,7 +11,7 @@ extra-deps: - base-compat-0.9.3 - base-orphans-0.8.2 - bifunctors-5.5.6 -- brittany-0.12.1.0 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 @@ -23,8 +23,8 @@ extra-deps: - floskell-0.10.2 - generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.19.0.0 @@ -32,7 +32,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 2ae87b493..94aa49024 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -6,25 +6,31 @@ packages: extra-deps: # - ./submodules/HaRe +- QuickCheck-2.13.2 - aeson-1.4.6.0 - aeson-pretty-0.8.8 -- base-compat-0.9.3 +- ansi-terminal-0.10.2 +- ansi-wl-pprint-0.6.9 +- assoc-1.0.1 +- async-2.2.2 +- base-compat-0.11.1 - base-orphans-0.8.2 -- bifunctors-5.5.6 -- brittany-0.12.1.0 +- bifunctors-5.5.7 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 -- cabal-plan-0.5.0.0 +- cabal-plan-0.6.2.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 +- dec-0.0.3 - extra-1.6.18 -- file-embed-0.0.11 +- file-embed-0.0.11.1 - filepattern-0.1.1 - floskell-0.10.2 - generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.19.0.0 @@ -32,37 +38,54 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 +- hspec-2.7.1 +- hspec-core-2.7.1 +- hspec-discover-2.7.1 +- indexed-profunctors-0.1 - invariant-0.5.3 - lens-4.18.1 -- libyaml-0.1.1.0 +- libyaml-0.1.1.1 - lsp-test-0.10.0.0 -- microlens-th-0.4.3.2 +- microlens-th-0.4.3.4 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger - network-bsd-2.8.1.0 # for hslogger +- optics-core-0.2 +- optparse-applicative-0.15.1.0 - parser-combinators-1.2.1 - profunctors-5.5.1 -- pretty-show-1.8.2 +- quickcheck-instances-0.3.22 - rope-utf16-splay-0.3.1.0 +- semialign-1.1 +- semigroupoids-5.3.4 - simple-sendfile-0.2.30 # for network and network-bsd +- singleton-bool-0.1.5 - socks-0.6.1 # for network and network-bsd -- syz-0.2.0.0 +- splitmix-0.0.3 +- tagged-0.8.6 +- temporary-1.2.1.1 +- th-abstraction-0.3.1.0 +- these-1.0.1 +- time-compat-1.9.2.2 +- topograph-1 +- type-equality-1 - unix-compat-0.5.2 +- unix-time-0.4.7 - unordered-containers-0.2.10.0 +- vector-0.12.1.2 - yaml-0.11.2.0 -- th-abstraction-0.3.1.0 -- type-equality-1 # To make build work in windows 7 -- unix-time-0.4.7 -- temporary-1.2.1.1 -- time-compat-1.9.2.2 -- time-manager-0.0.0 # for http2 -- warp-3.2.28 # for network and network-bsd -- wai-3.2.2.1 # for network and network-bsd +# - unix-time-0.4.7 +# - temporary-1.2.1.1 +# - time-compat-1.9.2.2 +# - time-manager-0.0.0 # for http2 +# - warp-3.2.28 # for network and network-bsd +# - wai-3.2.2.1 # for network and network-bsd + flags: haskell-ide-engine: diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 29e513308..82de37511 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -10,7 +10,7 @@ extra-deps: - aeson-pretty-0.8.8 - base-orphans-0.8.2 - bifunctors-5.5.6 -- brittany-0.12.1.0 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 - cabal-plan-0.5.0.0 @@ -22,8 +22,8 @@ extra-deps: - floskell-0.10.2 - generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.19.0.0 @@ -31,7 +31,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 976222ae4..aab19aa5f 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -8,7 +8,7 @@ extra-deps: - aeson-1.4.6.0 - aeson-pretty-0.8.8 -- brittany-0.12.1.0 +- brittany-0.12.1.1 - butcher-1.3.2.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 @@ -17,14 +17,14 @@ extra-deps: - extra-1.6.18 - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 - lsp-test-0.10.0.0 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index bff2bb467..284298dff 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -1,4 +1,4 @@ -resolver: lts-14.20 +resolver: lts-14.22 packages: - . - hie-plugin-api @@ -8,32 +8,36 @@ extra-deps: - aeson-1.4.6.0 - aeson-pretty-0.8.8 -- ansi-terminal-0.8.2 -- ansi-wl-pprint-0.6.8.2 -- brittany-0.12.1.0 +- ansi-terminal-0.10.2 +- ansi-wl-pprint-0.6.9 +- base-compat-0.11.1 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 -- cabal-plan-0.5.0.0 +- cabal-plan-0.6.2.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.22.0 - haskell-lsp-0.19.0.0 - haskell-lsp-types-0.19.0.0 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 +- indexed-profunctors-0.1 - lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2@rev:1 +- monad-dijkstra-0.1.1.2 +- optics-core-0.2 +- optparse-applicative-0.15.1.0 - ormolu-0.0.3.1 - parser-combinators-1.2.1 -- syz-0.2.0.0 +- semialign-1.1 - temporary-1.2.1.1 - +- topograph-1 flags: haskell-ide-engine: pedantic: true diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 10709ffe1..f7406c436 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-01-17 +resolver: nightly-2020-01-21 # last GHC 8.8.1 packages: - . - hie-plugin-api @@ -8,17 +8,18 @@ extra-deps: - aeson-1.4.6.0 - apply-refact-0.7.0.0 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.23.0 - haddock-library-1.8.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 7486f1971..6139467ba 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-01-25 +resolver: nightly-2020-01-31 packages: - . - hie-plugin-api @@ -7,20 +7,22 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-ex-8.8.2 +- ghc-lib-parser-ex-8.8.4.0 - git: https://github.com/haskell/haddock.git commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 subdirs: - haddock-api +# - haddock-api-2.23.0 - haddock-library-1.8.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 diff --git a/stack.yaml b/stack.yaml index fbd210934..6139467ba 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-09-21 # Last GHC 8.6.5 +resolver: nightly-2020-01-31 packages: - . - hie-plugin-api @@ -6,36 +6,30 @@ packages: extra-deps: # - ./submodules/HaRe -- aeson-1.4.6.0 -- ansi-terminal-0.8.2 -- ansi-wl-pprint-0.6.8.2 -- brittany-0.12.1.0 +- apply-refact-0.7.0.0 +- brittany-0.12.1.1 - bytestring-trie-0.2.5.0 - cabal-helper-1.0.0.0 -- cabal-plan-0.5.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 -- deque-0.4.3 -- extra-1.6.18 - floskell-0.10.2 -- ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.1 -- ghc-lib-parser-ex-8.8.2 -- haddock-api-2.22.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 +- ghc-lib-parser-ex-8.8.4.0 +- git: https://github.com/haskell/haddock.git + commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 + subdirs: + - haddock-api +# - haddock-api-2.23.0 +- haddock-library-1.8.0 +- haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.8 +- hlint-2.2.10 +- hoogle-5.0.17.11 - hsimport-0.11.0 -- lsp-test-0.10.0.0 -- monad-dijkstra-0.1.1.2@rev:1 -- parser-combinators-1.2.1 +- ilist-0.3.1.0 +- monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 -- syz-0.2.0.0 +- semigroups-0.18.5 - temporary-1.2.1.1 -- unix-compat-0.5.2 -- time-compat-1.9.2.2 -- yaml-0.11.2.0 flags: haskell-ide-engine: @@ -46,6 +40,6 @@ flags: # allow-newer: true nix: - packages: [icu libcxx zlib] + packages: [ icu libcxx zlib ] concurrent-tests: false From 50cd248f0838d66bc4b24b1adff05e6e25fd094b Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 07:24:42 +0100 Subject: [PATCH 148/270] Refresh cache win-cabal-installhs --- .azure/windows-installhs-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index eb3109be8..0fde81dff 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -11,7 +11,7 @@ jobs: steps: - task: Cache@2 inputs: - key: '"cabal-installhs" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + key: '"cabal-installhs-v2" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" From 0f5dedbd15e7727857d10ee0a1b054c535c62de9 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 07:37:11 +0100 Subject: [PATCH 149/270] Disable default stack.yaml for windows --- .azure/windows-stack.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index f15e09ab9..7423a8400 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -5,8 +5,10 @@ jobs: vmImage: windows-2019 strategy: matrix: - stack-def: - YAML_FILE: stack.yaml + # default stack.yaml uses ghc-8.8.2 so we can't use it for windows + # TODO: Enable it when it uses ghc-8.8.3 + # stack-def: + # YAML_FILE: stack.yaml # ghc versions 8.8.1 and 8.8.2 are not usable in windows # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 stack-8.6.5: From 5f52a7769380510ba1fc9d5c3d3cba830b1a1ce2 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 07:42:07 +0100 Subject: [PATCH 150/270] Disable dev target (using ghc-8.8.2) for windows --- install/src/HieInstall.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index bb6f36883..a5cc1fafa 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -88,7 +88,9 @@ defaultMain = do phony "hie" (need ["data", "latest"]) -- stack specific targets - when isRunFromStack $ do + -- Default `stack.yaml` uses ghc-8.8.2 and we can't build hie in windows + -- TODO: Enable for windows when it uses ghc-8.8.3 + when (isRunFromStack && not isWindowsSystem) $ do phony "dev" $ stackInstallHieWithErrMsg Nothing From d6917d399ff5fc6783e1540298f7fbdbb69fafb0 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 08:22:14 +0100 Subject: [PATCH 151/270] Fix build for ghc-8.4.3 --- stack-8.4.3.yaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 94aa49024..8b9a41a0d 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -67,24 +67,21 @@ extra-deps: - socks-0.6.1 # for network and network-bsd - splitmix-0.0.3 - tagged-0.8.6 -- temporary-1.2.1.1 - th-abstraction-0.3.1.0 - these-1.0.1 -- time-compat-1.9.2.2 - topograph-1 - type-equality-1 - unix-compat-0.5.2 -- unix-time-0.4.7 - unordered-containers-0.2.10.0 - vector-0.12.1.2 - yaml-0.11.2.0 # To make build work in windows 7 -# - unix-time-0.4.7 -# - temporary-1.2.1.1 -# - time-compat-1.9.2.2 -# - time-manager-0.0.0 # for http2 -# - warp-3.2.28 # for network and network-bsd -# - wai-3.2.2.1 # for network and network-bsd +- unix-time-0.4.7 +- temporary-1.2.1.1 +- time-compat-1.9.2.2 +- time-manager-0.0.0 # for http2 +- warp-3.2.28 # for network and network-bsd +- wai-3.2.2.1 # for network and network-bsd flags: From b699b9ab44a363a5779f5d498c212a61a4a675e2 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 08:23:30 +0100 Subject: [PATCH 152/270] Make consistent with stack-8.4.X.yaml files --- stack-8.4.2.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 48873df73..40466aa9f 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -51,21 +51,20 @@ extra-deps: - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd - syz-0.2.0.0 -- temporary-1.2.1.1 - type-equality-1 - unix-compat-0.5.2 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 - th-abstraction-0.3.1.0 +- windns-0.1.0.0 +- yi-rope-0.11 # To make build work in windows 7 +- unix-time-0.4.7 +- temporary-1.2.1.1 - time-compat-1.9.2.2 - time-manager-0.0.0 # for http2 -- unix-time-0.4.7 - wai-3.2.2.1 # for network and network-bsd - warp-3.2.28 # for network and network-bsd -- windns-0.1.0.0 -- yi-rope-0.11 - flags: haskell-ide-engine: From 44885e8e3607aa7c158db990e7812f1ae0ce646c Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 10:26:15 +0100 Subject: [PATCH 153/270] Move CABAL_DIR to job vars --- .azure/windows-cabal.bashrc | 1 - .azure/windows-cabal.yml | 1 + .azure/windows-installhs-cabal.yml | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure/windows-cabal.bashrc b/.azure/windows-cabal.bashrc index 1a8b40489..8636283cd 100644 --- a/.azure/windows-cabal.bashrc +++ b/.azure/windows-cabal.bashrc @@ -1,4 +1,3 @@ -export CABAL_DIR="D:\cabal" export GHCS_PATH=$(cygpath $ProgramData)/chocolatey/lib/ghc/tools export GHC_PATH=$GHCS_PATH/ghc-$GHC_VERSION export CABAL_ROOT=$(cygpath $CABAL_DIR) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 7abbe3926..18948e7ee 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -14,6 +14,7 @@ jobs: GHC_VERSION: "8.4.4" variables: CABAL_VERSION: "3.0.0.0" + CABAL_DIR: "D:\\cabal" CABAL_STORE_DIR: "D:\\sd" LIQUID_VERSION: "0.8.6.2" STACK_ROOT: "D:\\sr" diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index 0fde81dff..e2f3c48a9 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -6,8 +6,9 @@ jobs: variables: GHC_VERSION: "8.6.5" CABAL_VERSION: "3.0.0.0" - PROJECT_FILE: "./install/shake.project" + CABAL_DIR: "D:\\cabal" CABAL_STORE_DIR: "D:\\sd" + PROJECT_FILE: "./install/shake.project" steps: - task: Cache@2 inputs: From 56ffc31d0f73738fd0ea5a418013abf5c6f21964 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 3 Feb 2020 22:23:27 +0100 Subject: [PATCH 154/270] Use default CABAL_DIR --- .azure/windows-installhs-cabal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index e2f3c48a9..750f6819e 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -6,13 +6,13 @@ jobs: variables: GHC_VERSION: "8.6.5" CABAL_VERSION: "3.0.0.0" - CABAL_DIR: "D:\\cabal" + CABAL_DIR: "" # To use the default one (cabal-hie-install latest fails with a custom one) CABAL_STORE_DIR: "D:\\sd" PROJECT_FILE: "./install/shake.project" steps: - task: Cache@2 inputs: - key: '"cabal-installhs-v2" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + key: '"cabal-installhs" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" From f6e9ac152448cadd9b090aba41e984d724787028 Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Tue, 4 Feb 2020 00:05:13 +0100 Subject: [PATCH 155/270] Replace one more haskell-ide in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01ded5f91..b5a0445cb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Integration with `ghcide`: the new `haskell-ide` +# Integration with `ghcide`: the new `haskell-language-server` Currently the main development effort is focused in [integrating haskell-ide-engine](https://github.com/haskell/haskell-ide-engine/issues/1416) and [ghcide](https://github.com/digital-asset/ghcide) under a common repository: From ca64cf7e5f5258193647a49ca4f3f331cf2d5e62 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 4 Feb 2020 08:22:28 +0100 Subject: [PATCH 156/270] Check there is one ghc in $PATH --- install/src/Cabal.hs | 3 ++- install/src/Env.hs | 16 ++++++++++++++++ install/src/HieInstall.hs | 25 +++++++++---------------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index 171cb7667..820abb34d 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -113,10 +113,11 @@ cabalInstallIsOldFailMsg cabalVersion = ++ versionToString requiredCabalVersion ++ "`." - requiredCabalVersion :: RequiredVersion requiredCabalVersion | isWindowsSystem = requiredCabalVersionForWindows | otherwise = [2, 4, 1, 0] requiredCabalVersionForWindows :: RequiredVersion requiredCabalVersionForWindows = [3, 0, 0, 0] + + diff --git a/install/src/Env.hs b/install/src/Env.hs index 037e51bc9..83c23b0fc 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -62,6 +62,22 @@ findInstalledGhcs = do -- filter out stack provided GHCs (assuming that stack programs path is the default one in linux) $ filter (not . isInfixOf ".stack" . snd) (knownGhcs ++ availableGhcs) +showInstalledGhcs :: MonadIO m => [(VersionNumber, GhcPath)] -> m () +showInstalledGhcs ghcPaths = do + let msg = "Found the following GHC paths: \n" + ++ unlines + (map (\(version, path) -> "ghc-" ++ version ++ ": " ++ path) + ghcPaths + ) + printInStars msg + +checkInstalledGhcs :: MonadIO m => [(VersionNumber, GhcPath)] -> m () +checkInstalledGhcs ghcPaths = when (null ghcPaths) $ do + let msg = "No ghc installations found in $PATH. \n" + ++ "The script requires at least one ghc in $PATH to be able to build hie.\n" + printInStars msg + error msg + -- | Get the path to a GHC that has the version specified by `VersionNumber` -- If no such GHC can be found, Nothing is returned. -- First, it is checked whether there is a GHC with the name `ghc-$VersionNumber`. diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index a5cc1fafa..d46e2bffe 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -78,34 +78,27 @@ defaultMain = do (\version -> phony ("hie-" ++ version) $ do need ["submodules"] need ["check"] - if isRunFromStack then do + if isRunFromStack then stackInstallHieWithErrMsg (Just version) else cabalInstallHie version ) - - phony "latest" (need ["hie-" ++ latestVersion]) - phony "hie" (need ["data", "latest"]) + + unless (null versions) $ do + phony "latest" (need ["hie-" ++ latestVersion]) + phony "hie" (need ["data", "latest"]) -- stack specific targets -- Default `stack.yaml` uses ghc-8.8.2 and we can't build hie in windows -- TODO: Enable for windows when it uses ghc-8.8.3 - when (isRunFromStack && not isWindowsSystem) $ do - + when (isRunFromStack && not isWindowsSystem) $ phony "dev" $ stackInstallHieWithErrMsg Nothing -- cabal specific targets when isRunFromCabal $ do - - phony "ghcs" $ do - let - msg = - "Found the following GHC paths: \n" - ++ unlines - (map (\(version, path) -> "ghc-" ++ version ++ ": " ++ path) - ghcPaths - ) - printInStars msg + -- It throws an error if there is no ghc in $PATH + checkInstalledGhcs ghcPaths + phony "ghcs" $ showInstalledGhcs ghcPaths -- macos specific targets phony "icu-macos-fix" From 3bc34d7bf6dca8f76a02e2c047545d305cc9a87b Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 4 Feb 2020 08:39:13 +0100 Subject: [PATCH 157/270] Remove new lines --- install/src/Cabal.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index 820abb34d..72fd00b04 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -119,5 +119,3 @@ requiredCabalVersion | isWindowsSystem = requiredCabalVersionForWindows requiredCabalVersionForWindows :: RequiredVersion requiredCabalVersionForWindows = [3, 0, 0, 0] - - From d185b294a222f18fe756945629045c8c2e375200 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 4 Feb 2020 10:41:33 +0100 Subject: [PATCH 158/270] Not trigger pr builds by path --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f9fda27ef..e9345a9cb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,6 +22,14 @@ pr: branches: include: - master + paths: + exclude: + - .circleci + - docs + - licenses + - logos + - LICENSE + - '*.md' jobs: - template: ./.azure/linux-stack.yml From fe30d08ba7dd8cab1c68c4452811905e470365d1 Mon Sep 17 00:00:00 2001 From: flip111 Date: Tue, 4 Feb 2020 15:57:35 +0100 Subject: [PATCH 159/270] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index b5a0445cb..a6056d4f7 100644 --- a/README.md +++ b/README.md @@ -210,6 +210,8 @@ In order to avoid problems with long paths on Windows you can do either one of t 2. If the `Local Group Policy Editor` is available on your system, go to: `Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem` set `Enable Win32 long paths` to `Enabled`. If you don't have the policy editor you can use regedit by using the following instructions [here](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later). You also need to configure git to allow longer paths by using unicode paths. To set this for all your git repositories use `git config --system core.longpaths true` (you probably need an administrative shell for this) or for just this one repository use `git config core.longpaths true`. +In addition make sure `hie.exe` is not running by closing your editor, otherwise in case of an upgrade the executable can not be installed. + #### Download the source code ```bash From 071ccbc16895196587d25a460780986fc97b78f3 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Tue, 4 Feb 2020 18:31:40 +0000 Subject: [PATCH 160/270] Preparing 1.1 release --- Changelog.md | 149 ++++++++++++++++++++++++++++ haskell-ide-engine.cabal | 4 +- hie-plugin-api/hie-plugin-api.cabal | 2 +- 3 files changed, 152 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index ca2fbb319..ac7f8fb75 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,152 @@ +# 1.1 + +- NOTE: haskell-ide-engine is in transition, the new home for it will + be + [haskell-language-server](https://github.com/haskell/haskell-language-server), + which does not currently have feature parity with `hie`. In + particular it does not support multi-cradles, so can only open a + single component of a project, as configured into its `hie.yaml` + file. + + Once that hurdle is crossed, the main emphasis will be there, and + `hie` will eventually be deprecated. + +In this version + +- cabal now index state 2020-01-31T21:11:24Z +- GHC 8.8.2 is nightly-2020-01-31 +- GHC 8.6.5 is lts-14.22 + +- hlint is 2.2.10 +- brittany is 0.12.1.1 + +- Install script with cabal: check there is one ghc in $PATH +([#1632](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Update README.md +([#1636](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @flip111) + +- Azure: not trigger pr builds by path +([#1633](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Add dev target to stack install.hs +([#1615](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Fix cabal-hie-install in windows azure ci +([#1627](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Replace one more haskell-ide in README +([#1630](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Bump resolvers, hlint, brittany +([#1622](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @alanz) + +- Update HIE to use latest hie-bios +([#1601](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- Add instructions for installing HIE + GHC as a VS Code Devcontainer +([#1624](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @GavinRay97) + +- Readme: haskell-ide -> haskell-language-server +([#1625](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @andys8) + +- Deduplicate main for hie/hie-wrapper +([#1610](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Gurkenglas) + +- Azure fix win cabal 8.4.4 +([#1619](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Mention the new haskell-ide in the README +([#1612](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Ormolu range format support +([#1602](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) + +- Add 8.8.2 stack file and CI +([#1607](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @bubba) + +- Azure update macos and try to fix windows+stack builds +([#1609](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Update required stack version +([#1603](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @wataru86) + +- Remove compiler warnings +([#1600](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @EncodePanda) + +- Remove hlint.yaml from azure releases and readme +([#1598](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Fix error message parsing to import types +([#1597](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- Pass Ormolu cradle flags & default-extensions +([#1589](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) + +- Fix multi source directories +([#1577](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- azure: add windows+cabal job and other improvements +([#1595](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Allow newer optparse-applicative for ormolu (stack version) +([#1586](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Azure builds improvements +([#1584](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Drop GHC version 8.6.1, 8.6.2 and 8.6.3 (#1592) +([#1594](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- Demote HsImport func-tests to unit-test +([#1591](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- Update hlint to 2.2.8 and ormolu to 0.0.3 +([#1588](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @alanz) + +- Allow newer optparse-applicative for ormolu +([#1583](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @bubba) + +- Make cabal-hie-install executable +([#1581](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @maoe) + +- Ormolu formatter support +([#1481](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @DavSanchez) + +- GHC 8.8 support +([#1482](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) + +- Load all possible haskell source files +([#1569](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- Enable all working test suites and add linux-cabal job in Azure +([#1571](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Mention hlint data file handling in readme +([#1573](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Enable azure releases and some fixes +([#1545](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) + +- Add cabal freeze files and use them automatically +([#1561](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) + +- Add unit-tests for Cabal-Helper cradles +([#1552](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + +- Don't mix stack with cabal +([#1557](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) + +- Avoid building HIE twice +([#1562](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) + +- Readme lsp flag +([#1559](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Anrock) + +- Fix haddock documentation for Cradle.hs +([#1549](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) + + # 1.0.0.0 - NOTE: 1.0 status does **not** mean it is now stable. diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 87ccb0597..ce3b2b967 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -1,5 +1,5 @@ name: haskell-ide-engine -version: 1.0.0.0 +version: 1.1 synopsis: Provide a common engine to power any Haskell IDE description: Please see README.md homepage: http://github.com/githubuser/haskell-ide-engine#readme @@ -76,7 +76,7 @@ library , haskell-lsp == 0.19.* , haskell-lsp-types == 0.19.* , haskell-src-exts - , hie-plugin-api >= 1.0 + , hie-plugin-api >= 1.1 , hoogle >= 5.0.13 , hsimport , hslogger diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index 59ed4530f..2265d7029 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -1,5 +1,5 @@ name: hie-plugin-api -version: 1.0.0.0 +version: 1.1 synopsis: Haskell IDE API for plugin communication description: Please see README.md license: BSD3 From 946f43d4ced9c05e51bcbfa144f0d399d8d1509a Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Tue, 4 Feb 2020 19:02:01 +0000 Subject: [PATCH 161/270] Tweak formatting on ChangeLog --- Changelog.md | 62 +++++++++------------------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) diff --git a/Changelog.md b/Changelog.md index ac7f8fb75..8afa4cea3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,148 +1,106 @@ # 1.1 -- NOTE: haskell-ide-engine is in transition, the new home for it will - be - [haskell-language-server](https://github.com/haskell/haskell-language-server), - which does not currently have feature parity with `hie`. In - particular it does not support multi-cradles, so can only open a - single component of a project, as configured into its `hie.yaml` - file. +NOTE: haskell-ide-engine is in transition, the new home for it will be +[haskell-language-server](https://github.com/haskell/haskell-language-server), +which does not currently have feature parity with `hie`. In particular +it does not support multi-cradles, so can only open a single component +of a project, as configured into its `hie.yaml` file. - Once that hurdle is crossed, the main emphasis will be there, and - `hie` will eventually be deprecated. +Once that hurdle is crossed, the main emphasis will be there, and +`hie` will eventually be deprecated. -In this version +## In this version - cabal now index state 2020-01-31T21:11:24Z - GHC 8.8.2 is nightly-2020-01-31 - GHC 8.6.5 is lts-14.22 - - hlint is 2.2.10 - brittany is 0.12.1.1 +## Changes + - Install script with cabal: check there is one ghc in $PATH ([#1632](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Update README.md ([#1636](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @flip111) - - Azure: not trigger pr builds by path ([#1633](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Add dev target to stack install.hs ([#1615](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Fix cabal-hie-install in windows azure ci ([#1627](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Replace one more haskell-ide in README ([#1630](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Bump resolvers, hlint, brittany ([#1622](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @alanz) - - Update HIE to use latest hie-bios ([#1601](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - Add instructions for installing HIE + GHC as a VS Code Devcontainer ([#1624](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @GavinRay97) - - Readme: haskell-ide -> haskell-language-server ([#1625](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @andys8) - - Deduplicate main for hie/hie-wrapper ([#1610](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Gurkenglas) - - Azure fix win cabal 8.4.4 ([#1619](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Mention the new haskell-ide in the README ([#1612](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Ormolu range format support ([#1602](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) - - Add 8.8.2 stack file and CI ([#1607](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @bubba) - - Azure update macos and try to fix windows+stack builds ([#1609](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Update required stack version ([#1603](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @wataru86) - - Remove compiler warnings ([#1600](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @EncodePanda) - - Remove hlint.yaml from azure releases and readme ([#1598](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Fix error message parsing to import types ([#1597](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - Pass Ormolu cradle flags & default-extensions ([#1589](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) - - Fix multi source directories ([#1577](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - azure: add windows+cabal job and other improvements ([#1595](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Allow newer optparse-applicative for ormolu (stack version) ([#1586](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Azure builds improvements ([#1584](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Drop GHC version 8.6.1, 8.6.2 and 8.6.3 (#1592) ([#1594](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - Demote HsImport func-tests to unit-test ([#1591](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - Update hlint to 2.2.8 and ormolu to 0.0.3 ([#1588](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @alanz) - - Allow newer optparse-applicative for ormolu ([#1583](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @bubba) - - Make cabal-hie-install executable ([#1581](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @maoe) - - Ormolu formatter support ([#1481](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @DavSanchez) - - GHC 8.8 support ([#1482](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) - - Load all possible haskell source files ([#1569](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - Enable all working test suites and add linux-cabal job in Azure ([#1571](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Mention hlint data file handling in readme ([#1573](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Enable azure releases and some fixes ([#1545](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) - - Add cabal freeze files and use them automatically ([#1561](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) - - Add unit-tests for Cabal-Helper cradles ([#1552](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) - - Don't mix stack with cabal ([#1557](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) - - Avoid building HIE twice ([#1562](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) - - Readme lsp flag ([#1559](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Anrock) - - Fix haddock documentation for Cradle.hs ([#1549](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) From 5e2e93e3974fff4cc019be77d3607e35c1c078f2 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Tue, 4 Feb 2020 20:09:09 +0000 Subject: [PATCH 162/270] Fix silly error in ChangeLog --- Changelog.md | 84 ++++++++++++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/Changelog.md b/Changelog.md index 8afa4cea3..d6c7cce17 100644 --- a/Changelog.md +++ b/Changelog.md @@ -20,89 +20,89 @@ Once that hurdle is crossed, the main emphasis will be there, and ## Changes - Install script with cabal: check there is one ghc in $PATH -([#1632](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1632](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Update README.md -([#1636](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @flip111) +([#1636](https://github.com/haskell/haskell-ide-engine/pull/1551), by @flip111) - Azure: not trigger pr builds by path -([#1633](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1633](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Add dev target to stack install.hs -([#1615](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1615](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Fix cabal-hie-install in windows azure ci -([#1627](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1627](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Replace one more haskell-ide in README -([#1630](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1630](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Bump resolvers, hlint, brittany -([#1622](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @alanz) +([#1622](https://github.com/haskell/haskell-ide-engine/pull/1551), by @alanz) - Update HIE to use latest hie-bios -([#1601](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1601](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - Add instructions for installing HIE + GHC as a VS Code Devcontainer -([#1624](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @GavinRay97) +([#1624](https://github.com/haskell/haskell-ide-engine/pull/1551), by @GavinRay97) - Readme: haskell-ide -> haskell-language-server -([#1625](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @andys8) +([#1625](https://github.com/haskell/haskell-ide-engine/pull/1551), by @andys8) - Deduplicate main for hie/hie-wrapper -([#1610](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Gurkenglas) +([#1610](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Gurkenglas) - Azure fix win cabal 8.4.4 -([#1619](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1619](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Mention the new haskell-ide in the README -([#1612](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1612](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Ormolu range format support -([#1602](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) +([#1602](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Avi-D-coder) - Add 8.8.2 stack file and CI -([#1607](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @bubba) +([#1607](https://github.com/haskell/haskell-ide-engine/pull/1551), by @bubba) - Azure update macos and try to fix windows+stack builds -([#1609](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1609](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Update required stack version -([#1603](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @wataru86) +([#1603](https://github.com/haskell/haskell-ide-engine/pull/1551), by @wataru86) - Remove compiler warnings -([#1600](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @EncodePanda) +([#1600](https://github.com/haskell/haskell-ide-engine/pull/1551), by @EncodePanda) - Remove hlint.yaml from azure releases and readme -([#1598](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1598](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Fix error message parsing to import types -([#1597](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1597](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - Pass Ormolu cradle flags & default-extensions -([#1589](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) +([#1589](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Avi-D-coder) - Fix multi source directories -([#1577](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1577](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - azure: add windows+cabal job and other improvements -([#1595](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1595](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Allow newer optparse-applicative for ormolu (stack version) -([#1586](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1586](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Azure builds improvements -([#1584](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1584](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Drop GHC version 8.6.1, 8.6.2 and 8.6.3 (#1592) -([#1594](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1594](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - Demote HsImport func-tests to unit-test -([#1591](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1591](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - Update hlint to 2.2.8 and ormolu to 0.0.3 -([#1588](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @alanz) +([#1588](https://github.com/haskell/haskell-ide-engine/pull/1551), by @alanz) - Allow newer optparse-applicative for ormolu -([#1583](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @bubba) +([#1583](https://github.com/haskell/haskell-ide-engine/pull/1551), by @bubba) - Make cabal-hie-install executable -([#1581](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @maoe) +([#1581](https://github.com/haskell/haskell-ide-engine/pull/1551), by @maoe) - Ormolu formatter support -([#1481](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @DavSanchez) +([#1481](https://github.com/haskell/haskell-ide-engine/pull/1551), by @DavSanchez) - GHC 8.8 support -([#1482](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Av) +([#1482](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Avi-D-coder) - Load all possible haskell source files -([#1569](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1569](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - Enable all working test suites and add linux-cabal job in Azure -([#1571](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1571](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Mention hlint data file handling in readme -([#1573](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1573](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Enable azure releases and some fixes -([#1545](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @jneira) +([#1545](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) - Add cabal freeze files and use them automatically -([#1561](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) +([#1561](https://github.com/haskell/haskell-ide-engine/pull/1551), by @hasufell) - Add unit-tests for Cabal-Helper cradles -([#1552](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1552](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) - Don't mix stack with cabal -([#1557](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) +([#1557](https://github.com/haskell/haskell-ide-engine/pull/1551), by @hasufell) - Avoid building HIE twice -([#1562](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @hasufell) +([#1562](https://github.com/haskell/haskell-ide-engine/pull/1551), by @hasufell) - Readme lsp flag -([#1559](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @Anrock) +([#1559](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Anrock) - Fix haddock documentation for Cradle.hs -([#1549](https://github.com/haskell/haskell-ide-engine/pull/1551), by by @fendor) +([#1549](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) # 1.0.0.0 From 7283ae2eae069d15a226ff0d458007db59a00f84 Mon Sep 17 00:00:00 2001 From: Nils Martel Date: Wed, 5 Feb 2020 10:49:03 +0100 Subject: [PATCH 163/270] Remove Semicolon Fix trailing comma for consistencies sake and because trailing commas aren't valid json --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a6056d4f7..070320149 100644 --- a/README.md +++ b/README.md @@ -563,7 +563,7 @@ Then issue `:CocConfig` and add the following to your Coc config file. "*.cabal", "stack.yaml", "cabal.project", - "package.yaml", + "package.yaml" ], "filetypes": [ "hs", From 5c25c73e66960da2babd2baaa24e5db07051804b Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 5 Feb 2020 14:36:06 +0100 Subject: [PATCH 164/270] Bump up haskell-lsp version --- cabal.project | 2 +- haskell-ide-engine.cabal | 10 +++++----- hie-plugin-api/hie-plugin-api.cabal | 2 +- stack-8.4.2.yaml | 4 ++-- stack-8.4.3.yaml | 4 ++-- stack-8.4.4.yaml | 4 ++-- stack-8.6.4.yaml | 4 ++-- stack-8.6.5.yaml | 5 +++-- stack-8.8.1.yaml | 1 + stack-8.8.2.yaml | 2 ++ stack.yaml | 2 ++ 11 files changed, 23 insertions(+), 17 deletions(-) diff --git a/cabal.project b/cabal.project index b1f8ec131..cbe2086b9 100644 --- a/cabal.project +++ b/cabal.project @@ -15,4 +15,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-02-02T17:43:42Z +index-state: 2020-02-05T07:49:28Z diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index ce3b2b967..b801f7c2d 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -73,8 +73,8 @@ library , gitrev >= 1.1 , haddock-api , haddock-library - , haskell-lsp == 0.19.* - , haskell-lsp-types == 0.19.* + , haskell-lsp == 0.20.* + , haskell-lsp-types == 0.20.* , haskell-src-exts , hie-plugin-api >= 1.1 , hoogle >= 5.0.13 @@ -219,7 +219,7 @@ test-suite unit-test , free , ghc , haskell-ide-engine - , haskell-lsp-types == 0.19.* + , haskell-lsp-types == 0.20.* , hie-bios , hie-test-utils , hie-plugin-api @@ -312,8 +312,8 @@ test-suite func-test , filepath , lsp-test >= 0.10.0.0 , haskell-ide-engine - , haskell-lsp-types == 0.19.* - , haskell-lsp == 0.19.* + , haskell-lsp-types == 0.20.* + , haskell-lsp == 0.20.* , hie-test-utils , hie-plugin-api , hspec diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index 2265d7029..691839c44 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -54,7 +54,7 @@ library , ghc , hie-bios , cabal-helper - , haskell-lsp == 0.19.* + , haskell-lsp == 0.20.* , hslogger , unliftio , monad-control diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 40466aa9f..9204df423 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -27,8 +27,8 @@ extra-deps: - ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.20.0 - haddock-library-1.6.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 8b9a41a0d..6f12dc21f 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -33,8 +33,8 @@ extra-deps: - ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.20.0 - haddock-library-1.6.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 82de37511..0abb74773 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -26,8 +26,8 @@ extra-deps: - ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.20.0 - haddock-library-1.6.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index aab19aa5f..4f704a5b1 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -20,8 +20,8 @@ extra-deps: - ghc-lib-parser-8.8.2 - ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.22.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 284298dff..6d53f6098 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -22,8 +22,8 @@ extra-deps: - ghc-lib-parser-8.8.2 - ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.22.0 -- haskell-lsp-0.19.0.0 -- haskell-lsp-types-0.19.0.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - hie-bios-0.4.0 - hlint-2.2.10 - hoogle-5.0.17.11 @@ -38,6 +38,7 @@ extra-deps: - semialign-1.1 - temporary-1.2.1.1 - topograph-1 + flags: haskell-ide-engine: pedantic: true diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index f7406c436..3e2683af3 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -27,6 +27,7 @@ extra-deps: - ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 +- haskell-lsp-0.20.0.0 flags: haskell-ide-engine: diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 6139467ba..84db3dbeb 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -20,6 +20,8 @@ extra-deps: - haddock-api # - haddock-api-2.23.0 - haddock-library-1.8.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 diff --git a/stack.yaml b/stack.yaml index 6139467ba..84db3dbeb 100644 --- a/stack.yaml +++ b/stack.yaml @@ -20,6 +20,8 @@ extra-deps: - haddock-api # - haddock-api-2.23.0 - haddock-library-1.8.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 From 33bcbdd5664bf766521e1e831dd6256698630504 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 6 Feb 2020 07:33:26 +0100 Subject: [PATCH 165/270] Use lsp-0.20 for ghc-8.8.1 --- stack-8.8.1.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 3e2683af3..7474a0ed1 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -17,6 +17,8 @@ extra-deps: - ghc-lib-parser-ex-8.8.4.0 - haddock-api-2.23.0 - haddock-library-1.8.0 +- haskell-lsp-0.20.0.0 +- haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 @@ -27,7 +29,6 @@ extra-deps: - ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 -- haskell-lsp-0.20.0.0 flags: haskell-ide-engine: From 2ee0aa2f77e5391dffaead031df648a1e60a414a Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 6 Feb 2020 09:14:00 +0100 Subject: [PATCH 166/270] Fix ToJSON instance for Diagnostics --- hie-plugin-api/Haskell/Ide/Engine/Ghc.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs index e40514b30..d819b5815 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs @@ -26,7 +26,6 @@ import qualified Data.Map.Strict as Map import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.Aeson -import Data.Coerce import ErrUtils import Haskell.Ide.Engine.MonadFunctions @@ -73,7 +72,8 @@ instance Monoid Diagnostics where instance Data.Aeson.ToJSON Diagnostics where toJSON (Diagnostics d) = Data.Aeson.toJSON - (Map.mapKeys coerce d :: Map.Map T.Text (Set.Set Diagnostic)) + (Map.mapKeys extractUri d :: Map.Map T.Text (Set.Set Diagnostic)) + where extractUri (NormalizedUri _ t) = t type AdditionalErrs = [T.Text] From 2aa40be684a1bb1b1914383fa7af94478186fca7 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 6 Feb 2020 11:01:25 +0100 Subject: [PATCH 167/270] Bump up lsp-test to 0.10.1.0 --- stack-8.4.2.yaml | 2 +- stack-8.4.3.yaml | 2 +- stack-8.4.4.yaml | 2 +- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.1.yaml | 1 + stack-8.8.2.yaml | 1 + stack.yaml | 1 + 8 files changed, 8 insertions(+), 5 deletions(-) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 9204df423..ecd86545c 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -39,7 +39,7 @@ extra-deps: - invariant-0.5.3 - lens-4.18.1 - libyaml-0.1.1.0 -- lsp-test-0.10.0.0 +- lsp-test-0.10.1.0 - microlens-th-0.4.3.2 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 6f12dc21f..ea534dbf4 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -49,7 +49,7 @@ extra-deps: - invariant-0.5.3 - lens-4.18.1 - libyaml-0.1.1.1 -- lsp-test-0.10.0.0 +- lsp-test-0.10.1.0 - microlens-th-0.4.3.4 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 0abb74773..50f15caa4 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -38,7 +38,7 @@ extra-deps: - invariant-0.5.3 - lens-4.18.1 - libyaml-0.1.1.0 -- lsp-test-0.10.0.0 +- lsp-test-0.10.1.0 - microlens-th-0.4.3.2 - monad-dijkstra-0.1.1.2 - network-3.1.1.1 # for hslogger diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 4f704a5b1..2fab67abb 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -27,7 +27,7 @@ extra-deps: - hlint-2.2.10 - hoogle-5.0.17.11 - hsimport-0.11.0 -- lsp-test-0.10.0.0 +- lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 - multistate-0.8.0.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 6d53f6098..e8a77c1e3 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -29,7 +29,7 @@ extra-deps: - hoogle-5.0.17.11 - hsimport-0.11.0 - indexed-profunctors-0.1 -- lsp-test-0.10.0.0 +- lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2 - optics-core-0.2 - optparse-applicative-0.15.1.0 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 7474a0ed1..53441bb5a 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -19,6 +19,7 @@ extra-deps: - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 +- lsp-test-0.10.1.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 84db3dbeb..3037a3d81 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -22,6 +22,7 @@ extra-deps: - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 +- lsp-test-0.10.1.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 diff --git a/stack.yaml b/stack.yaml index 84db3dbeb..3037a3d81 100644 --- a/stack.yaml +++ b/stack.yaml @@ -22,6 +22,7 @@ extra-deps: - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 +- lsp-test-0.10.1.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.10 From 91c5938387a620c9b241362177df5eacdc59002a Mon Sep 17 00:00:00 2001 From: Javier Neira Date: Wed, 12 Feb 2020 14:14:09 +0100 Subject: [PATCH 168/270] Replace one more haskell-ide ocurrence --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 070320149..297ec595f 100644 --- a/README.md +++ b/README.md @@ -717,7 +717,7 @@ Or you can set the environment variable `HIE_HOOGLE_DATABASE` to specify a speci ## Contributing -Please see the [note above](#integration-with-ghcide-the-new-haskell-ide) about the new `haskell-ide` project. +Please see the [note above](#integration-with-ghcide-the-new-haskell-ide) about the new `haskell-language-server` project. This project is not started from scratch: From 9f5bce46deda9fc4fecf74b0e037deab66f1bd95 Mon Sep 17 00:00:00 2001 From: fendor Date: Fri, 14 Feb 2020 13:18:39 +0100 Subject: [PATCH 169/270] Set current working directory when executing project ghc --- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 22297da03..2615e61b8 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -30,7 +30,7 @@ import Control.Exception import System.FilePath import System.Directory (getCurrentDirectory, canonicalizePath, findExecutable) import System.Exit -import System.Process (readCreateProcessWithExitCode, shell) +import System.Process (readCreateProcessWithExitCode, shell, CreateProcess(..)) import Haskell.Ide.Engine.Logger @@ -102,7 +102,7 @@ execProjectGhc crdl args = do ghcOutput <- if isStackCradle crdl && isStackInstalled then do logm $ "Executing Stack GHC with args: " <> unwords args - catch (Just <$> tryCommand stackCmd) $ \(_ :: IOException) -> do + catch (Just <$> tryCommand crdl stackCmd) $ \(_ :: IOException) -> do errorm $ "Command `" ++ stackCmd ++"` failed." execWithGhc -- The command `cabal v2-exec -v0 ghc` only works if the project has been @@ -112,7 +112,7 @@ execProjectGhc crdl args = do -- -- else if isCabalCradle crdl && isCabalInstalled then do -- let cmd = "cabal v2-exec -v0 ghc -- " ++ unwords args - -- catch (Just <$> tryCommand cmd) $ \(_ ::IOException) -> do + -- catch (Just <$> tryCommand crdl cmd) $ \(_ ::IOException) -> do -- errorm $ "Command `" ++ cmd ++ "` failed." -- return Nothing else do @@ -125,13 +125,14 @@ execProjectGhc crdl args = do plainCmd = "ghc " ++ unwords args execWithGhc = - catch (Just <$> tryCommand plainCmd) $ \(_ :: IOException) -> do + catch (Just <$> tryCommand crdl plainCmd) $ \(_ :: IOException) -> do errorm $ "Command `" ++ plainCmd ++"` failed." return Nothing -tryCommand :: String -> IO String -tryCommand cmd = do - (code, sout, serr) <- readCreateProcessWithExitCode (shell cmd) "" +tryCommand :: Cradle CabalHelper -> String -> IO String +tryCommand crdl cmd = do + let p = (shell cmd) { cwd = Just (cradleRootDir crdl) } + (code, sout, serr) <- readCreateProcessWithExitCode p "" case code of ExitFailure e -> do let errmsg = concat From b288907b91dbc8ecc9860276a899cd6169a2a060 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 14 Feb 2020 13:56:23 +0100 Subject: [PATCH 170/270] Change default drive to C: and enable CabalHelper tests --- .azure/windows-cabal.bashrc | 3 +++ .azure/windows-cabal.yml | 25 ++++++++++--------------- .azure/windows-installhs-cabal.yml | 8 ++++---- .azure/windows-installhs-stack.yml | 7 +++---- .azure/windows-stack.bashrc | 4 ++++ .azure/windows-stack.yml | 20 +++++++++++--------- 6 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.azure/windows-cabal.bashrc b/.azure/windows-cabal.bashrc index 8636283cd..de43edfc8 100644 --- a/.azure/windows-cabal.bashrc +++ b/.azure/windows-cabal.bashrc @@ -1,3 +1,6 @@ +if [ -z "$CABAL_DIR" ]; then + CABAL_DIR="$APPDATA\\cabal" +fi export GHCS_PATH=$(cygpath $ProgramData)/chocolatey/lib/ghc/tools export GHC_PATH=$GHCS_PATH/ghc-$GHC_VERSION export CABAL_ROOT=$(cygpath $CABAL_DIR) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 18948e7ee..4687d0af0 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -14,25 +14,25 @@ jobs: GHC_VERSION: "8.4.4" variables: CABAL_VERSION: "3.0.0.0" - CABAL_DIR: "D:\\cabal" - CABAL_STORE_DIR: "D:\\sd" + CABAL_DIR: "" + CABAL_STORE_DIR: "C:\\sd" LIQUID_VERSION: "0.8.6.2" - STACK_ROOT: "D:\\sr" + STACK_ROOT: "C:\\sr" steps: - task: Cache@2 inputs: - key: '"cabal-v2" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + key: '"cabal-v3" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" - bash: | source .azure/windows-cabal.bashrc mkdir -p $CABAL_ROOT - tar -vxzf .azure-cache/cabal-root.tar.gz -C /d + tar -vxzf .azure-cache/cabal-root.tar.gz -C /c mkdir -p $CABAL_STORE_DIR - tar -vxzf .azure-cache/cabal-store.tar.gz -C /d + tar -vxzf .azure-cache/cabal-store.tar.gz -C /c mkdir -p ${CABAL_STORE_DIR}i - tar -vxzf .azure-cache/cabal-store-install.tar.gz -C /d + tar -vxzf .azure-cache/cabal-store-install.tar.gz -C /c mkdir -p dist-newstyle tar -vxzf .azure-cache/cabal-dist.tar.gz displayName: "Unpack cache" @@ -95,17 +95,12 @@ jobs: curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ mkdir -p "$STACK_ROOT" - echo "local-programs-path: D:/bin/stack" > $STACK_ROOT/config.yaml # If we don't install the ghc used in test projects in advance, tests fail - stack setup --resolver=lts-14.20 + stack setup --stack-yaml stack-${GHC_VERSION}.yaml displayName: "Install Runtime Unit Test-Dependencies: stack" - bash: | source .azure/windows-cabal.bashrc - # TODO: Enable CabalHelper tests - if [ $GHC_VERSION = "8.4.4" ]; then - TEST_OPTIONS=--test-options="--skip=CabalHelper" - fi - cabal v2-test :unit-test $TEST_OPTIONS + cabal v2-test :unit-test displayName: "Run Test: unit-test" # TODO: Enable rest of test suites in windows - bash: | @@ -117,7 +112,7 @@ jobs: source .azure/windows-cabal.bashrc # TODO: Enable for 8.4.4 if [ $GHC_VERSION != "8.4.4" ]; then - cabal v2-test :func-test $TEST_OPTIONS + cabal v2-test :func-test fi displayName: "Run Test: func-test" - bash: | diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index 750f6819e..662931078 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -7,21 +7,21 @@ jobs: GHC_VERSION: "8.6.5" CABAL_VERSION: "3.0.0.0" CABAL_DIR: "" # To use the default one (cabal-hie-install latest fails with a custom one) - CABAL_STORE_DIR: "D:\\sd" + CABAL_STORE_DIR: "C:\\sd" PROJECT_FILE: "./install/shake.project" steps: - task: Cache@2 inputs: - key: '"cabal-installhs" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + key: '"cabal-installhs-v1" | "$(Agent.OS)" | "$(CABAL_VERSION)" | "$(GHC_VERSION)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" - bash: | source .azure/windows-cabal.bashrc mkdir -p $CABAL_ROOT - tar -vxzf .azure-cache/cabal-root.tar.gz -C /d + tar -vxzf .azure-cache/cabal-root.tar.gz -C /c mkdir -p $CABAL_STORE_DIR - tar -vxzf .azure-cache/cabal-store.tar.gz -C /d + tar -vxzf .azure-cache/cabal-store.tar.gz -C /c mkdir -p ./dist-newstyle tar -vxzf .azure-cache/cabal-dist.tar.gz displayName: "Unpack cache" diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 747bb716a..21ed96e88 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -5,17 +5,17 @@ jobs: vmImage: windows-2019 variables: YAML_FILE: install/shake.yaml - STACK_ROOT: "D:\\sr" + STACK_ROOT: "C:\\sr" steps: - task: Cache@2 inputs: - key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE) | $(Build.SourcesDirectory)/install/shake.yaml' + key: '"stack-installhs-v1" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE) | $(Build.SourcesDirectory)/install/shake.yaml' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Cache stack-root" - bash: | mkdir -p "$STACK_ROOT" - tar -vxzf .azure-cache/stack-root.tar.gz -C /d + tar -vxzf .azure-cache/stack-root.tar.gz -C /c mkdir -p .stack-work tar -vxzf .azure-cache/stack-work.tar.gz mkdir -p ./install/.stack-work @@ -26,7 +26,6 @@ jobs: curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ mkdir -p "$STACK_ROOT" - echo "local-programs-path: D:/bin/stack" > "$STACK_ROOT/config.yaml" displayName: Install stack - bash: | source .azure/windows-stack.bashrc diff --git a/.azure/windows-stack.bashrc b/.azure/windows-stack.bashrc index 724f2795d..76c2e73f3 100644 --- a/.azure/windows-stack.bashrc +++ b/.azure/windows-stack.bashrc @@ -1,3 +1,7 @@ +if [ -z "$CABAL_DIR" ]; then + CABAL_DIR="$APPDATA\\cabal" +fi export LOCAL_BIN_PATH=$(cygpath $APPDATA\\local\\bin) +export CABAL_ROOT=$(cygpath $CABAL_DIR) export Z3_BIN_PATH=/usr/local/z3-4.8.5-x64-win/bin export PATH=$Z3_BIN_PATH:$LOCAL_BIN_PATH:$PATH diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 7423a8400..a6a92006b 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -22,19 +22,20 @@ jobs: stack-8.4.2: YAML_FILE: stack-8.4.2.yaml variables: - STACK_ROOT: "D:\\sr" + STACK_ROOT: "C:\\sr" CABAL_VERSION: "3.0.0.0" + CABAL_STORE_DIR: "C:\\sd" steps: - task: Cache@2 inputs: - key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' + key: '"stack-v3" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Cache stack-root" - bash: | mkdir -p $STACK_ROOT - tar -vxzf .azure-cache/stack-root.tar.gz -C /d + tar -vxzf .azure-cache/stack-root.tar.gz -C /c mkdir -p .stack-work tar -vxzf .azure-cache/stack-work.tar.gz displayName: "Unpack cache" @@ -47,7 +48,6 @@ jobs: curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ mkdir -p "$STACK_ROOT" - echo "local-programs-path: D:/bin/stack" > "$STACK_ROOT/config.yaml" displayName: Install stack - bash: | source .azure/windows-stack.bashrc @@ -92,6 +92,8 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/windows-stack.bashrc + # To make stack not pick default stack.yaml if it uses the same ghc than lts-13.20 + cd "$(Agent.TempDirectory)" stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | @@ -103,14 +105,14 @@ jobs: source .azure/windows-stack.bashrc choco install -y cabal --version $CABAL_VERSION /C/ProgramData/chocolatey/bin/RefreshEnv.cmd + cabal v2-update + echo "store-dir: $CABAL_STORE_DIR" >> /config displayName: "Install Runtime Test-Dependencies: cabal" - bash: | source .azure/windows-stack.bashrc - # TODO: Enable CabalHelper unit tests, see https://github.com/DanielG/cabal-helper/issues/91 - if [ $YAML_FILE = "stack-8.6.4.yaml" ]; then - TEST_ARGS=--test-arguments="--skip=CabalHelper" - fi - stack test :unit-test $TEST_ARGS --stack-yaml $(YAML_FILE) + # hie assumes that ghc is in path for cabal cradles (Haskell.Ide.Engine.Cradle.execProjectGhc) + export PATH="$(stack path --compiler-bin --stack-yaml $YAML_FILE)":$PATH + stack test :unit-test --stack-yaml $(YAML_FILE) displayName: "Run Test: unit-test" # TODO: Enable rest of test suites in windows - bash: | From 16a8c087fdd5da3ffd583ac7f1af178bcd680dda Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 14 Feb 2020 14:01:37 +0100 Subject: [PATCH 171/270] Use patched version of cabal-helper --- cabal.project | 6 ++++++ stack-8.4.2.yaml | 4 +++- stack-8.4.3.yaml | 4 +++- stack-8.4.4.yaml | 4 +++- stack-8.6.4.yaml | 4 +++- stack-8.6.5.yaml | 4 +++- stack-8.8.1.yaml | 4 +++- stack-8.8.2.yaml | 4 +++- stack.yaml | 4 +++- 9 files changed, 30 insertions(+), 8 deletions(-) diff --git a/cabal.project b/cabal.project index cbe2086b9..8499512e2 100644 --- a/cabal.project +++ b/cabal.project @@ -1,8 +1,14 @@ packages: ./ ./hie-plugin-api/ + -- ./submodules/HaRe +source-repository-package + type: git + location: https://github.com/jneira/cabal-helper.git + tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 + tests: true package haskell-ide-engine diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index ecd86545c..32cd8a3a1 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -13,7 +13,9 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index ea534dbf4..9dbfa3b6f 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -18,7 +18,9 @@ extra-deps: - bifunctors-5.5.7 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - cabal-plan-0.6.2.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 50f15caa4..41645d97b 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,7 +12,9 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 2fab67abb..a9eafff06 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -11,7 +11,9 @@ extra-deps: - brittany-0.12.1.1 - butcher-1.3.2.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 - extra-1.6.18 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index e8a77c1e3..2f9596bfe 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -13,7 +13,9 @@ extra-deps: - base-compat-0.11.1 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - cabal-plan-0.6.2.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 53441bb5a..be8253566 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -10,7 +10,9 @@ extra-deps: - apply-refact-0.7.0.0 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 3037a3d81..da9ba0672 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -9,7 +9,9 @@ extra-deps: - apply-refact-0.7.0.0 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/stack.yaml b/stack.yaml index 3037a3d81..da9ba0672 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,7 +9,9 @@ extra-deps: - apply-refact-0.7.0.0 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -- cabal-helper-1.0.0.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 From 5934d2a80f9b6ae00b3af4f8c3674d651e5b917e Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 15 Feb 2020 22:32:10 +0100 Subject: [PATCH 172/270] Enable all tests in windows --- .azure/windows-cabal.yml | 6 ++---- .azure/windows-stack.yml | 7 +------ 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 4687d0af0..2b64ce330 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -105,15 +105,13 @@ jobs: # TODO: Enable rest of test suites in windows - bash: | source .azure/windows-cabal.bashrc + stack setup --stack-yaml stack-8.8.1.yaml cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" condition: False - bash: | source .azure/windows-cabal.bashrc - # TODO: Enable for 8.4.4 - if [ $GHC_VERSION != "8.4.4" ]; then - cabal v2-test :func-test - fi + cabal v2-test :func-test displayName: "Run Test: func-test" - bash: | source .azure/windows-cabal.bashrc diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index a6a92006b..6771c2144 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -119,14 +119,9 @@ jobs: source .azure/windows-stack.bashrc stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - condition: False - bash: | source .azure/windows-stack.bashrc - if [ $YAML_FILE != "stack-8.6.4.yaml" ]; then - stack test --stack-yaml $(YAML_FILE) :func-test - else - stack test --stack-yaml $(YAML_FILE) :func-test --ta="--skip \"/Hover/hover/works\"" - fi + stack test --stack-yaml $(YAML_FILE) :func-test displayName: "Run Test: func-test" - task: PublishBuildArtifacts@1 inputs: From 58ab40577ee28acb8c8cd9543854ef3462226350 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 16 Feb 2020 18:53:52 +0100 Subject: [PATCH 173/270] Try to fix wrapper tests in windows --- .azure/windows-cabal.yml | 2 +- .azure/windows-stack.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 2b64ce330..a40a82652 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -105,10 +105,10 @@ jobs: # TODO: Enable rest of test suites in windows - bash: | source .azure/windows-cabal.bashrc + # Needed for wrapper-test stack setup --stack-yaml stack-8.8.1.yaml cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - condition: False - bash: | source .azure/windows-cabal.bashrc cabal v2-test :func-test diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 6771c2144..df1468dbe 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -114,9 +114,10 @@ jobs: export PATH="$(stack path --compiler-bin --stack-yaml $YAML_FILE)":$PATH stack test :unit-test --stack-yaml $(YAML_FILE) displayName: "Run Test: unit-test" - # TODO: Enable rest of test suites in windows - bash: | source .azure/windows-stack.bashrc + # Needed for wrapper-test + stack setup --stack-yaml stack-8.8.1.yaml stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | From dda36b2534494e5894cae27c988e7df1f8c9e7ff Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 16 Feb 2020 21:39:15 +0100 Subject: [PATCH 174/270] Install ghc-8.6.5 for wrapper test --- .azure/windows-cabal.yml | 1 + .azure/windows-stack.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index a40a82652..6c324783b 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -107,6 +107,7 @@ jobs: source .azure/windows-cabal.bashrc # Needed for wrapper-test stack setup --stack-yaml stack-8.8.1.yaml + stack setup --stack-yaml stack-8.6.5.yaml cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index df1468dbe..d95fa5eac 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -118,6 +118,7 @@ jobs: source .azure/windows-stack.bashrc # Needed for wrapper-test stack setup --stack-yaml stack-8.8.1.yaml + stack setup --stack-yaml stack-8.6.5.yaml stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | From f0608c89908871a8d5f28020b91668d83b513851 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 17 Feb 2020 08:38:06 +0100 Subject: [PATCH 175/270] Disable failing tests --- .azure/windows-cabal.yml | 4 ++-- .azure/windows-stack.yml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 6c324783b..ee3e185de 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -102,13 +102,13 @@ jobs: source .azure/windows-cabal.bashrc cabal v2-test :unit-test displayName: "Run Test: unit-test" - # TODO: Enable rest of test suites in windows - bash: | source .azure/windows-cabal.bashrc # Needed for wrapper-test stack setup --stack-yaml stack-8.8.1.yaml stack setup --stack-yaml stack-8.6.5.yaml - cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test + # TODO Enable :dispatcher-test suite + cabal v2-test :plugin-dispatcher-test :wrapper-test # :dispatcher-test displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | source .azure/windows-cabal.bashrc diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index d95fa5eac..61bb1109f 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -123,7 +123,12 @@ jobs: displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | source .azure/windows-stack.bashrc - stack test --stack-yaml $(YAML_FILE) :func-test + # TODO: Enable hover test for ghc-8.6.4 + if [ $YAML_FILE != "stack-8.6.4.yaml" ]; then + stack test --stack-yaml $(YAML_FILE) :func-test + else + stack test --stack-yaml $(YAML_FILE) :func-test --ta="--skip \"/Hover/hover/works\"" + fi displayName: "Run Test: func-test" - task: PublishBuildArtifacts@1 inputs: From f6853ec1cccadcb29209afd2a5df006e72ad9a97 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 17 Feb 2020 13:37:56 +0100 Subject: [PATCH 176/270] Disable dispatcher-test suite for stack windows --- .azure/windows-stack.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index 61bb1109f..af18cba58 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -119,7 +119,8 @@ jobs: # Needed for wrapper-test stack setup --stack-yaml stack-8.8.1.yaml stack setup --stack-yaml stack-8.6.5.yaml - stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) + # TODO: Enable :dispatcher-test suite + stack test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | source .azure/windows-stack.bashrc From ab0e97f79fd314b4f5acbbda9b520148bf4f8fbb Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 17 Feb 2020 13:39:18 +0100 Subject: [PATCH 177/270] Correct cabal config location --- .azure/windows-stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index af18cba58..e3ed26766 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -106,7 +106,7 @@ jobs: choco install -y cabal --version $CABAL_VERSION /C/ProgramData/chocolatey/bin/RefreshEnv.cmd cabal v2-update - echo "store-dir: $CABAL_STORE_DIR" >> /config + echo "store-dir: $CABAL_STORE_DIR" >> $CABAL_ROOT/config displayName: "Install Runtime Test-Dependencies: cabal" - bash: | source .azure/windows-stack.bashrc From 5e825835a8c16d4f85084262437251e8b9740c35 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 18 Feb 2020 09:08:18 +0100 Subject: [PATCH 178/270] Add azure badge to README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 297ec595f..f78c9b28b 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ You still can contribute to improve the haskell ide experience! If you are not s [![License BSD3][badge-license]][license] [![CircleCI][badge-circleci]][circleci] +[![Azure Pipeline][badge-azure-pipeline]][azure-pipeline] [![AppVeyor][badge-appveyor]][appveyor] [![Open Source Helpers](https://www.codetriage.com/haskell/haskell-ide-engine/badges/users.svg)](https://www.codetriage.com/haskell/haskell-ide-engine) @@ -22,9 +23,8 @@ You still can contribute to improve the haskell ide experience! If you are not s [circleci]: https://circleci.com/gh/haskell/haskell-ide-engine/ [badge-appveyor]: https://ci.appveyor.com/api/projects/status/6hit7mxvgdrao3q0?svg=true [appveyor]: https://ci.appveyor.com/project/Bubba/haskell-ide-engine-74xec - - - +[azure-pipeline]: https://dev.azure.com/hvriedel/hvriedel/_build?definitionId=1&_a=summary +[badge-azure-pipeline]: https://dev.azure.com/hvriedel/hvriedel/_apis/build/status/haskell.haskell-ide-engine?branchName=master This project aims to be __the universal interface__ to __a growing number of Haskell tools__, providing a __fully-featured [Language Server Protocol](https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md) server__ for editors and IDEs that require Haskell-specific functionality. From c579fabb6ec1fd0d329bda691f8a9559f566daeb Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 18 Feb 2020 12:35:15 +0100 Subject: [PATCH 179/270] Try to generate hoogle twice to avoid 403 --- .azure/macos-stack.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index b582df838..4b0cfd90b 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -92,7 +92,8 @@ jobs: - bash: | source .azure/macos.bashrc stack build hoogle --stack-yaml=$(YAML_FILE) - stack exec hoogle generate --stack-yaml=$(YAML_FILE) + # This step frequently fails with http 403 + stack exec hoogle generate --stack-yaml=$(YAML_FILE) || stack exec hoogle generate --stack-yaml=$(YAML_FILE) displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | source .azure/macos.bashrc From 008ef208b98f788c7bc8fead8a19b5fcf2dc5ac8 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 23 Feb 2020 23:55:06 +0100 Subject: [PATCH 180/270] Use ghc-8.2.2 for linux+cabal --- .azure/linux-cabal.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.azure/linux-cabal.yml b/.azure/linux-cabal.yml index 1e93abedb..3f5e8081b 100644 --- a/.azure/linux-cabal.yml +++ b/.azure/linux-cabal.yml @@ -5,11 +5,8 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: - # Fail with compilation error building haddock-api - # ghc-8.8.2: - # GHC_VERSION: "8.8.2" - ghc-8.8.1: - GHC_VERSION: "8.8.1" + ghc-8.8.2: + GHC_VERSION: "8.8.2" ghc-8.6.5: GHC_VERSION: "8.6.5" ghc-8.4.4: From 0af983c31d8cc03ebe4f2b5456af7a77f73bce8b Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 23 Feb 2020 23:56:11 +0100 Subject: [PATCH 181/270] Change macos stack bashrc file --- .azure/{macos.bashrc => macos-stack.bashrc} | 0 .azure/macos-stack.yml | 22 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) rename .azure/{macos.bashrc => macos-stack.bashrc} (100%) diff --git a/.azure/macos.bashrc b/.azure/macos-stack.bashrc similarity index 100% rename from .azure/macos.bashrc rename to .azure/macos-stack.bashrc diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index 4b0cfd90b..fad15c141 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -47,19 +47,19 @@ jobs: tar vxz --strip-components=1 --include '*/stack' -C ~/.local/bin; displayName: Install stack - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack setup --stack-yaml $(YAML_FILE) displayName: Install GHC - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack --stack-yaml $(YAML_FILE) --install-ghc build --only-dependencies displayName: Build dependencies - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie` - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack install --stack-yaml $(YAML_FILE) # `hie` binary required locally for tests mkdir .azure-deploy stack install --stack-yaml $(YAML_FILE) --local-bin-path .azure-deploy @@ -76,7 +76,7 @@ jobs: tar -vczf $(Build.ArtifactStagingDirectory)/$ARTIFACT_NAME.tar.xz * displayName: Install `hie` - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack build --stack-yaml $(YAML_FILE) --test --bench --only-dependencies displayName: Build Test-dependencies - bash: | @@ -86,26 +86,26 @@ jobs: brew install z3 displayName: "Install Runtime Test-Dependencies: z3" - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack build hoogle --stack-yaml=$(YAML_FILE) # This step frequently fails with http 403 stack exec hoogle generate --stack-yaml=$(YAML_FILE) || stack exec hoogle generate --stack-yaml=$(YAML_FILE) displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc brew install cabal-install displayName: "Install Runtime Unit Test-Dependencies: cabal" - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack test :unit-test --stack-yaml $(YAML_FILE) displayName: "Run Test: unit-test" # TODO: Enable dispatcher-test for ghc-8.4.* - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc GHC_MAJOR_VERSION=${YAML_FILE:6:3} if [ $GHC_MAJOR_VERSION != "8.4" ]; then TEST_TARGETS=:dispatcher-test :plugin-dispatcher-test :wrapper-test @@ -117,7 +117,7 @@ jobs: condition: False # TODO: Enable func-test for ghc-8.4.* - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc GHC_MAJOR_VERSION=${YAML_FILE:6:3} if [ $GHC_MAJOR_VERSION != "8.4" ]; then stack test :func-test --stack-yaml $(YAML_FILE) From 2cebb0817ad23c23b8dc1e9415ae105931e74d03 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 23 Feb 2020 23:57:14 +0100 Subject: [PATCH 182/270] Correct target name --- .azure/windows-installhs-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/windows-installhs-cabal.yml b/.azure/windows-installhs-cabal.yml index 662931078..84500a0b4 100644 --- a/.azure/windows-installhs-cabal.yml +++ b/.azure/windows-installhs-cabal.yml @@ -46,7 +46,7 @@ jobs: - bash: | source .azure/windows-cabal.bashrc cabal v2-run ./install.hs --project-file $PROJECT_FILE latest - displayName: Run build-latest target of `install.hs` + displayName: Run latest target of `install.hs` - bash: | source .azure/windows-cabal.bashrc mkdir -p .azure-cache From eb294f7a872d2b5c9757635e949a93f2c05b21f3 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 23 Feb 2020 23:57:58 +0100 Subject: [PATCH 183/270] Add installhs cabal for macos --- .azure/macos-cabal.bashrc | 2 ++ .azure/macos-installhs-cabal.yml | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .azure/macos-cabal.bashrc create mode 100644 .azure/macos-installhs-cabal.yml diff --git a/.azure/macos-cabal.bashrc b/.azure/macos-cabal.bashrc new file mode 100644 index 000000000..90489c404 --- /dev/null +++ b/.azure/macos-cabal.bashrc @@ -0,0 +1,2 @@ +export CABAL_ROOT=$HOME/.cabal +export PATH=$CABAL_ROOT/bin:$PATH diff --git a/.azure/macos-installhs-cabal.yml b/.azure/macos-installhs-cabal.yml new file mode 100644 index 000000000..7a84007b6 --- /dev/null +++ b/.azure/macos-installhs-cabal.yml @@ -0,0 +1,42 @@ +jobs: +- job: MacOs_installhs_Cabal + timeoutInMinutes: 0 + pool: + vmImage: macOS-10.14 + variables: + PROJECT_FILE: "./install/shake.project" + steps: + - task: Cache@2 + inputs: + key: '"cabal-installhs" | "$(Agent.OS)" | $(Build.SourcesDirectory)/cabal.project | $(Build.SourcesDirectory)/haskell-ide-engine.cabal | $(Build.SourcesDirectory)/hie-plugin-api/hie-plugin-api.cabal' + path: .azure-cache + cacheHitVar: CACHE_RESTORED + displayName: "Download cache" + - bash: | + source .azure/macos-cabal.bashrc + mkdir -p $CABAL_ROOT + tar -vxzf .azure-cache/cabal-root.tar.gz -C / + mkdir -p dist-newstyle + tar -vxzf .azure-cache/cabal-dist.tar.gz + displayName: "Unpack cache" + condition: eq(variables.CACHE_RESTORED, 'true') + - bash: | + brew install cabal-install + which cabal + which ghc + cabal update + displayName: Install cabal and ghc + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-run ./install.hs --project-file $PROJECT_FILE -- help + displayName: Run help of `install.hs` + - bash: | + source .azure/windows-cabal.bashrc + cabal v2-run ./install.hs --project-file $PROJECT_FILE -- latest + displayName: Run latest target of `install.hs` + - bash: | + source .azure/macos-cabal.bashrc + mkdir -p .azure-cache + tar -vczf .azure-cache/cabal-root.tar.gz $CABAL_ROOT + tar -vczf .azure-cache/cabal-dist.tar.gz dist-newstyle + displayName: "Pack cache" From 70dca0e14c785812cf4b7d587dc935b985ae377a Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 00:04:51 +0100 Subject: [PATCH 184/270] Add new installhs job with cabal on macos --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e9345a9cb..0ed02f2c3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -40,4 +40,5 @@ jobs: - template: ./.azure/linux-installhs-stack.yml - template: ./.azure/windows-installhs-stack.yml - template: ./.azure/windows-installhs-cabal.yml +- template: ./.azure/macos-installhs-cabal.yml - template: ./.azure/macos-installhs-stack.yml From e23352ec6cb514a2961fbbaf016077a98ca3fbb5 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 00:09:53 +0100 Subject: [PATCH 185/270] Correct identation --- .azure/macos-installhs-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/macos-installhs-cabal.yml b/.azure/macos-installhs-cabal.yml index 7a84007b6..1d0b16013 100644 --- a/.azure/macos-installhs-cabal.yml +++ b/.azure/macos-installhs-cabal.yml @@ -26,7 +26,7 @@ jobs: which ghc cabal update displayName: Install cabal and ghc - - bash: | + - bash: | source .azure/windows-cabal.bashrc cabal v2-run ./install.hs --project-file $PROJECT_FILE -- help displayName: Run help of `install.hs` From 16707b7231493f6bbfa9f356d7d81d093bee1ed1 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 00:10:45 +0100 Subject: [PATCH 186/270] Disable all jobs but the new one --- azure-pipelines.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0ed02f2c3..a52db7e23 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,13 +32,13 @@ pr: - '*.md' jobs: -- template: ./.azure/linux-stack.yml -- template: ./.azure/linux-cabal.yml -- template: ./.azure/windows-stack.yml -- template: ./.azure/windows-cabal.yml -- template: ./.azure/macos-stack.yml -- template: ./.azure/linux-installhs-stack.yml -- template: ./.azure/windows-installhs-stack.yml -- template: ./.azure/windows-installhs-cabal.yml +# - template: ./.azure/linux-stack.yml +# - template: ./.azure/linux-cabal.yml +# - template: ./.azure/windows-stack.yml +# - template: ./.azure/windows-cabal.yml +# - template: ./.azure/macos-stack.yml +# - template: ./.azure/linux-installhs-stack.yml +# - template: ./.azure/windows-installhs-stack.yml +#- template: ./.azure/windows-installhs-cabal.yml - template: ./.azure/macos-installhs-cabal.yml -- template: ./.azure/macos-installhs-stack.yml +# - template: ./.azure/macos-installhs-stack.yml From d5a13a2d59e9d589f1721c4f2ad9ba2a2d0e2903 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 00:41:56 +0100 Subject: [PATCH 187/270] Enable all macos jobs --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a52db7e23..33b7989de 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,9 +36,9 @@ jobs: # - template: ./.azure/linux-cabal.yml # - template: ./.azure/windows-stack.yml # - template: ./.azure/windows-cabal.yml -# - template: ./.azure/macos-stack.yml +- template: ./.azure/macos-stack.yml # - template: ./.azure/linux-installhs-stack.yml # - template: ./.azure/windows-installhs-stack.yml #- template: ./.azure/windows-installhs-cabal.yml - template: ./.azure/macos-installhs-cabal.yml -# - template: ./.azure/macos-installhs-stack.yml +- template: ./.azure/macos-installhs-stack.yml From 4d048938d46742c2ce795b7c36d25f92af963eaa Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 06:27:23 +0100 Subject: [PATCH 188/270] Use new macos-stack.bashrc for installhs --- .azure/macos-installhs-stack.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.azure/macos-installhs-stack.yml b/.azure/macos-installhs-stack.yml index 4b3a9a04e..0de8c9bdb 100644 --- a/.azure/macos-installhs-stack.yml +++ b/.azure/macos-installhs-stack.yml @@ -28,23 +28,23 @@ jobs: tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin; displayName: Install stack - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack setup --stack-yaml $(YAML_FILE) displayName: Install GHC - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack --stack-yaml $(YAML_FILE) --install-ghc build --only-dependencies displayName: Build dependencies - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack build --stack-yaml $(YAML_FILE) displayName: Build `hie-install` - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack install.hs help displayName: Run help of `install.hs` - bash: | - source .azure/macos.bashrc + source .azure/macos-stack.bashrc stack install.hs latest displayName: Run latest target of `install.hs` - bash: | From b46a5314546a6d7ff3f06eaa4dc8aea212c6be83 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 12:17:24 +0100 Subject: [PATCH 189/270] Several improvements to install script * Remove unused imports * Pass number of jobs and verbosity shake args to build tools * Use custom cabal.project-${ghcVersion} if exists * Add comments with the possible resolvers to shake.yaml --- install/hie-install.cabal | 2 +- install/shake.yaml | 14 ++++++- install/src/Cabal.hs | 75 ++++++++++++++++++++++------------- install/src/Env.hs | 6 +-- install/src/Help.hs | 21 ++++++---- install/src/HieInstall.hs | 83 +++++++++++++++++---------------------- install/src/Print.hs | 12 +++--- install/src/Stack.hs | 79 +++++++++++++++++++++---------------- install/src/Version.hs | 1 - 9 files changed, 163 insertions(+), 130 deletions(-) diff --git a/install/hie-install.cabal b/install/hie-install.cabal index 013d246fe..39e73f636 100644 --- a/install/hie-install.cabal +++ b/install/hie-install.cabal @@ -1,5 +1,5 @@ name: hie-install -version: 0.8.0.0 +version: 0.8.1.0 synopsis: Install the haskell-ide-engine license: BSD3 author: Many, TBD when we release diff --git a/install/shake.yaml b/install/shake.yaml index 8c30114fa..17b5d4abc 100644 --- a/install/shake.yaml +++ b/install/shake.yaml @@ -1,8 +1,20 @@ # Used to provide a different environment for the shake build script -resolver: lts-14.11 # GHC 8.6.5 +resolver: lts-13.19 # last lts with GHC 8.6.5 +# resolver: nightly-2020-01-31 # GHC 8.8.2 +# resolver: nightly-2020-01-21 # last nightly GHC 8.8.1 +# resolver: lts-13.19 # last lts GHC 8.6.4 +# resolver: lts-12.26 # last lts GHC 8.4.4 +# resolver: lts-12.14 # last lts GHC 8.4.3 +# resolver: nightly-2018-05-30 # last nightly for GHC 8.4.2 packages: - . +extra-deps: +- shake-0.18.5 +# for resolvers with ghc < 8.6 +# - shake-0.17 + + nix: packages: [ zlib ] diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index 72fd00b04..205d75716 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -1,23 +1,14 @@ {-# LANGUAGE CPP #-} - module Cabal where import Development.Shake -import Development.Shake.Command import Development.Shake.FilePath import Control.Monad -import Data.Maybe ( isNothing - , isJust - ) -import Control.Monad.Extra ( whenMaybe ) -import System.Directory ( findExecutable - , copyFile - ) +import System.Directory ( copyFile ) import Version import Print import Env -import Data.Functor.Identity #if RUN_FROM_STACK import Control.Exception ( throwIO ) #else @@ -38,23 +29,23 @@ execCabal = command [] "cabal" execCabal_ :: [String] -> Action () execCabal_ = execCabal -cabalBuildData :: Action () -cabalBuildData = do - execCabal_ ["v2-build", "hoogle"] - execCabal_ ["v2-exec", "hoogle", "generate"] +cabalBuildData :: [String] -> Action () +cabalBuildData args = do + execCabal_ $ ["v2-build", "hoogle"] ++ args + execCabal_ $ ["v2-exec", "hoogle", "generate"] ++ args getGhcPathOfOrThrowError :: VersionNumber -> Action GhcPath -getGhcPathOfOrThrowError versionNumber = +getGhcPathOfOrThrowError versionNumber = getGhcPathOf versionNumber >>= \case Nothing -> do printInStars $ ghcVersionNotFoundFailMsg versionNumber error (ghcVersionNotFoundFailMsg versionNumber) Just p -> return p -cabalInstallHie :: VersionNumber -> Action () -cabalInstallHie versionNumber = do +cabalInstallHie :: VersionNumber -> [String] -> Action () +cabalInstallHie versionNumber args = do localBin <- liftIO $ getInstallDir - cabalVersion <- getCabalVersion + cabalVersion <- getCabalVersion args ghcPath <- getGhcPathOfOrThrowError versionNumber let isCabal3 = checkVersion [3,0,0,0] cabalVersion @@ -62,19 +53,24 @@ cabalInstallHie versionNumber = do | otherwise = "--symlink-bindir" installMethod | isWindowsSystem && isCabal3 = ["--install-method=copy"] | otherwise = [] + + projectFile <- getProjectFile versionNumber + execCabal_ $ [ "v2-install" , "-w", ghcPath , "--write-ghc-environment-files=never" , installDirOpt, localBin , "--max-backjumps=5000" - , "exe:hie" + , "exe:hie", "exe:hie-wrapper" , "--overwrite-policy=always" + , "--project-file=" ++ projectFile ] ++ installMethod + ++ args let minorVerExe = "hie-" ++ versionNumber <.> exe - majorVerExe = "hie-" ++ dropExtension versionNumber <.> exe + majorVerExe = "hie-" ++ dropExtension versionNumber <.> exe liftIO $ do copyFile (localBin "hie" <.> exe) (localBin minorVerExe) @@ -87,20 +83,27 @@ cabalInstallHie versionNumber = do ++ minorVerExe ++ " to " ++ localBin -checkCabal_ :: Action () -checkCabal_ = checkCabal >> return () +getProjectFile :: VersionNumber -> Action FilePath +getProjectFile ver = do + existFile <- doesFileExist $ "cabal.project-" ++ ver + return $ if existFile + then "cabal.project-" ++ ver + else "cabal.project" + +checkCabal_ :: [String] -> Action () +checkCabal_ args = checkCabal args >> return () -- | check `cabal` has the required version -checkCabal :: Action String -checkCabal = do - cabalVersion <- getCabalVersion +checkCabal :: [String] -> Action String +checkCabal args = do + cabalVersion <- getCabalVersion args unless (checkVersion requiredCabalVersion cabalVersion) $ do printInStars $ cabalInstallIsOldFailMsg cabalVersion error $ cabalInstallIsOldFailMsg cabalVersion return cabalVersion -getCabalVersion :: Action String -getCabalVersion = trimmedStdout <$> execCabal ["--numeric-version"] +getCabalVersion :: [String] -> Action String +getCabalVersion args = trimmedStdout <$> (execCabal $ ["--numeric-version"] ++ args) -- | Error message when the `cabal` binary is an older version cabalInstallIsOldFailMsg :: String -> String @@ -119,3 +122,21 @@ requiredCabalVersion | isWindowsSystem = requiredCabalVersionForWindows requiredCabalVersionForWindows :: RequiredVersion requiredCabalVersionForWindows = [3, 0, 0, 0] + +getVerbosityArg :: Verbosity -> String +getVerbosityArg v = "-v" ++ cabalVerbosity + where cabalVerbosity = case v of + Silent -> "0" +#if MIN_VERSION_shake(0,18,4) + Error -> "0" + Warn -> "1" + Info -> "1" + Verbose -> "2" +#else + Quiet -> "0" + Normal -> "1" + Loud -> "2" + Chatty -> "2" +#endif + Diagnostic -> "3" + diff --git a/install/src/Env.hs b/install/src/Env.hs index 83c23b0fc..c53557aa4 100644 --- a/install/src/Env.hs +++ b/install/src/Env.hs @@ -1,15 +1,11 @@ module Env where import Development.Shake -import Development.Shake.Command import Control.Monad.IO.Class import Control.Monad import Development.Shake.FilePath -import System.Info ( os - , arch - ) +import System.Info ( os ) import Data.Maybe ( isJust - , isNothing , mapMaybe ) import System.Directory ( findExecutable diff --git a/install/src/Help.hs b/install/src/Help.hs index a512f2593..547cf39a5 100644 --- a/install/src/Help.hs +++ b/install/src/Help.hs @@ -2,21 +2,18 @@ module Help where import Development.Shake -import Data.List ( intersperse - , intercalate - ) +import Data.List ( intercalate ) import Env import Print import Version import BuildSystem -import Cabal stackCommand :: TargetDescription -> String -stackCommand target = "stack install.hs " ++ fst target +stackCommand target = "stack install.hs " ++ fst target ++ " [options]" cabalCommand :: TargetDescription -> String -cabalCommand target = "cabal v2-run install.hs --project-file install/shake.project " ++ fst target +cabalCommand target = "cabal v2-run install.hs --project-file install/shake.project -- " ++ fst target ++ " [options]" buildCommand :: TargetDescription -> String buildCommand | isRunFromCabal = cabalCommand @@ -37,7 +34,7 @@ shortHelpMessage = do printUsage printLine "" printLine "Targets:" - mapM_ (printLineIndented . showTarget (spaces hieVersions)) (targets hieVersions) + mapM_ (printLineIndented . showHelpItem (spaces hieVersions)) (targets hieVersions) printLine "" where spaces hieVersions = space (targets hieVersions) @@ -68,7 +65,10 @@ helpMessage versions@BuildableVersions {..} = do printUsage printLine "" printLine "Targets:" - mapM_ (printLineIndented . showTarget spaces) targets + mapM_ (printLineIndented . showHelpItem spaces) targets + printLine "" + printLine "Options:" + mapM_ (printLineIndented . showHelpItem spaces) options printLine "" where spaces = space targets @@ -81,6 +81,11 @@ helpMessage versions@BuildableVersions {..} = do , if isRunFromCabal then [cabalGhcsTarget] else [stackDevTarget] , [macosIcuTarget] ] + options = [ ("-j[N], --jobs[=N]", "Allow N jobs/threads at once [default number of CPUs].") + , ("-s, --silent", "Don't print anything.") + , ("-q, --quiet", "Print less (pass repeatedly for even less).") + , ("-V, --verbose", "Print more (pass repeatedly for even more).") + ] -- All targets with their respective help message. generalTargets = [helpTarget] diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index d46e2bffe..b2afbde1b 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -1,43 +1,13 @@ module HieInstall where import Development.Shake -import Development.Shake.Command -import Development.Shake.FilePath import Control.Monad -import Control.Monad.IO.Class -import Control.Monad.Extra ( unlessM - , mapMaybeM - ) -import Data.Maybe ( isJust ) -import System.Directory ( listDirectory ) import System.Environment ( unsetEnv ) -import System.Info ( os - , arch - ) - -import Data.Maybe ( isNothing - , mapMaybe - ) -import Data.List ( dropWhileEnd - , intersperse - , intercalate - , sort - , sortOn - ) -import qualified Data.Text as T -import Data.Char ( isSpace ) -import Data.Version ( parseVersion - , makeVersion - , showVersion - ) -import Data.Function ( (&) ) -import Text.ParserCombinators.ReadP ( readP_to_S ) import BuildSystem import Stack import Cabal import Version -import Print import Env import Help @@ -53,37 +23,53 @@ defaultMain = do -- used for stack-based targets stackVersions <- getHieVersions - let versions = if isRunFromStack then stackVersions else cabalVersions + let versions = if isRunFromStack then stackVersions else cabalVersions let toolsVersions = BuildableVersions stackVersions cabalVersions let latestVersion = last versions - shakeArgs shakeOptions { shakeFiles = "_build" } $ do + shakeArgs shakeOptions { shakeFiles = "_build", shakeThreads = 0 } $ do + + shakeOptionsRules <- getShakeOptionsRules + + let jobsArg = "-j" ++ show (shakeThreads shakeOptionsRules) + + let verbosityArg = if isRunFromStack then Stack.getVerbosityArg else Cabal.getVerbosityArg + + let args = [jobsArg, verbosityArg (shakeVerbosity shakeOptionsRules)] + + phony "show-options" $ do + putNormal $ "Options:" + putNormal $ " Number of jobs: " ++ show (shakeThreads shakeOptionsRules) + putNormal $ " Verbosity level: " ++ show (shakeVerbosity shakeOptionsRules) + want ["short-help"] -- general purpose targets phony "submodules" updateSubmodules phony "short-help" shortHelpMessage phony "help" (helpMessage toolsVersions) - - phony "check" (if isRunFromStack then checkStack else checkCabal_) + + phony "check" (if isRunFromStack then checkStack args else checkCabal_ args) phony "data" $ do + need ["show-options"] need ["submodules"] need ["check"] - if isRunFromStack then stackBuildData else cabalBuildData + if isRunFromStack then stackBuildData args else cabalBuildData args forM_ versions (\version -> phony ("hie-" ++ version) $ do + need ["show-options"] need ["submodules"] need ["check"] if isRunFromStack then - stackInstallHieWithErrMsg (Just version) + stackInstallHieWithErrMsg (Just version) args else - cabalInstallHie version + cabalInstallHie version args ) - + unless (null versions) $ do phony "latest" (need ["hie-" ++ latestVersion]) phony "hie" (need ["data", "latest"]) @@ -92,7 +78,9 @@ defaultMain = do -- Default `stack.yaml` uses ghc-8.8.2 and we can't build hie in windows -- TODO: Enable for windows when it uses ghc-8.8.3 when (isRunFromStack && not isWindowsSystem) $ - phony "dev" $ stackInstallHieWithErrMsg Nothing + phony "dev" $ do + need ["show-options"] + stackInstallHieWithErrMsg Nothing args -- cabal specific targets when isRunFromCabal $ do @@ -101,20 +89,23 @@ defaultMain = do phony "ghcs" $ showInstalledGhcs ghcPaths -- macos specific targets - phony "icu-macos-fix" - (need ["icu-macos-fix-install"] >> need ["icu-macos-fix-build"]) + phony "icu-macos-fix" $ do + need ["show-options"] + need ["icu-macos-fix-install"] + need ["icu-macos-fix-build"] + phony "icu-macos-fix-install" (command_ [] "brew" ["install", "icu4c"]) - phony "icu-macos-fix-build" $ mapM_ buildIcuMacosFix versions + phony "icu-macos-fix-build" $ mapM_ (flip buildIcuMacosFix $ args) versions -buildIcuMacosFix :: VersionNumber -> Action () -buildIcuMacosFix version = execStackWithGhc_ - version +buildIcuMacosFix :: VersionNumber -> [String] -> Action () +buildIcuMacosFix version args = execStackWithGhc_ + version $ [ "build" , "text-icu" , "--extra-lib-dirs=/usr/local/opt/icu4c/lib" , "--extra-include-dirs=/usr/local/opt/icu4c/include" - ] + ] ++ args -- | update the submodules that the project is in the state as required by the `stack.yaml` files updateSubmodules :: Action () diff --git a/install/src/Print.hs b/install/src/Print.hs index 41216022b..063525e7e 100644 --- a/install/src/Print.hs +++ b/install/src/Print.hs @@ -1,10 +1,8 @@ module Print where import Development.Shake -import Development.Shake.Command import Control.Monad.IO.Class import Data.List ( dropWhileEnd - , dropWhile ) import Data.Char ( isSpace ) @@ -37,11 +35,11 @@ type TargetDescription = (String, String) -- | Number of spaces the target name including whitespace should have. -- At least twenty, maybe more if target names are long. At most the length of the longest target plus five. -space :: [TargetDescription] -> Int -space phonyTargets = maximum (20 : map ((+ 5) . length . fst) phonyTargets) +space :: [(String,String)] -> Int +space helpItems = maximum (20 : map ((+ 5) . length . fst) helpItems) -- | Show a target. -- Concatenates the target with its help message and inserts whitespace between them. -showTarget :: Int -> TargetDescription -> String -showTarget spaces (target, msg) = - target ++ replicate (spaces - length target) ' ' ++ msg +showHelpItem :: Int -> (String,String) -> String +showHelpItem spaces (helpItemKey, msg) = + helpItemKey ++ replicate (spaces - length helpItemKey) ' ' ++ msg diff --git a/install/src/Stack.hs b/install/src/Stack.hs index ec8aabcd0..3049ec9cb 100644 --- a/install/src/Stack.hs +++ b/install/src/Stack.hs @@ -1,38 +1,32 @@ +{-# LANGUAGE CPP #-} module Stack where import Development.Shake -import Development.Shake.Command import Development.Shake.FilePath -import Control.Exception import Control.Monad -import Data.List import System.Directory ( copyFile ) -import System.FilePath ( splitSearchPath, searchPathSeparator, () ) -import System.Environment ( lookupEnv, setEnv, getEnvironment ) -import System.IO.Error ( isDoesNotExistError ) -import BuildSystem +-- import System.FilePath ( () ) import Version import Print -import Env -stackInstallHieWithErrMsg :: Maybe VersionNumber -> Action () -stackInstallHieWithErrMsg mbVersionNumber = - stackInstallHie mbVersionNumber +stackInstallHieWithErrMsg :: Maybe VersionNumber -> [String] -> Action () +stackInstallHieWithErrMsg mbVersionNumber args = + stackInstallHie mbVersionNumber args `actionOnException` liftIO (putStrLn stackBuildFailMsg) -- | copy the built binaries into the localBinDir -stackInstallHie :: Maybe VersionNumber -> Action () -stackInstallHie mbVersionNumber = do - versionNumber <- +stackInstallHie :: Maybe VersionNumber -> [String] -> Action () +stackInstallHie mbVersionNumber args = do + versionNumber <- case mbVersionNumber of Nothing -> do - execStackWithCfgFile_ "stack.yaml" ["install"] - getGhcVersionOfCfgFile "stack.yaml" + execStackWithCfgFile_ "stack.yaml" $ ["install"] ++ args + getGhcVersionOfCfgFile "stack.yaml" args Just vn -> do - execStackWithGhc_ vn ["install"] + execStackWithGhc_ vn $ ["install"] ++ args return vn - - localBinDir <- getLocalBin + + localBinDir <- getLocalBin args let hie = "hie" <.> exe liftIO $ do copyFile (localBinDir hie) @@ -40,31 +34,31 @@ stackInstallHie mbVersionNumber = do copyFile (localBinDir hie) (localBinDir "hie-" ++ dropExtension versionNumber <.> exe) -getGhcVersionOfCfgFile :: String -> Action VersionNumber -getGhcVersionOfCfgFile stackFile = do - Stdout ghcVersion <- - execStackWithCfgFile stackFile ["exec", "ghc", "--", "--numeric-version"] +getGhcVersionOfCfgFile :: String -> [String] -> Action VersionNumber +getGhcVersionOfCfgFile stackFile args = do + Stdout ghcVersion <- + execStackWithCfgFile stackFile $ ["exec", "ghc"] ++ args ++ ["--", "--numeric-version"] return $ trim ghcVersion -- | check `stack` has the required version -checkStack :: Action () -checkStack = do - stackVersion <- trimmedStdout <$> execStackShake ["--numeric-version"] +checkStack :: [String] -> Action () +checkStack args = do + stackVersion <- trimmedStdout <$> (execStackShake $ ["--numeric-version"] ++ args) unless (checkVersion requiredStackVersion stackVersion) $ do printInStars $ stackExeIsOldFailMsg stackVersion error $ stackExeIsOldFailMsg stackVersion -- | Get the local binary path of stack. -- Equal to the command `stack path --local-bin` -getLocalBin :: Action FilePath -getLocalBin = do - Stdout stackLocalDir' <- execStackShake ["path", "--local-bin"] +getLocalBin :: [String] -> Action FilePath +getLocalBin args = do + Stdout stackLocalDir' <- execStackShake $ ["path", "--local-bin"] ++ args return $ trim stackLocalDir' -stackBuildData :: Action () -stackBuildData = do - execStackShake_ ["build", "hoogle"] - execStackShake_ ["exec", "hoogle", "generate"] +stackBuildData :: [String] -> Action () +stackBuildData args = do + execStackShake_ $ ["build", "hoogle"] ++ args + execStackShake_ $ ["exec", "hoogle", "generate"] ++ args -- | Execute a stack command for a specified ghc, discarding the output execStackWithGhc_ :: VersionNumber -> [String] -> Action () @@ -82,7 +76,7 @@ execStackWithCfgFile_ = execStackWithCfgFile -- | Execute a stack command for a specified stack.yaml file execStackWithCfgFile :: CmdResult r => String -> [String] -> Action r -execStackWithCfgFile stackFile args = +execStackWithCfgFile stackFile args = command [] "stack" (("--stack-yaml=" ++ stackFile) : args) -- | Execute a stack command with the same resolver as the build script @@ -118,3 +112,20 @@ stackBuildFailMsg = ++ "If this does not work, open an issue at \n" ++ "\thttps://github.com/haskell/haskell-ide-engine" +getVerbosityArg :: Verbosity -> String +getVerbosityArg v = "--verbosity=" ++ stackVerbosity + where stackVerbosity = case v of + Silent -> "silent" +#if MIN_VERSION_shake(0,18,4) + Error -> "error" + Warn -> "warn" + Info -> "info" + Verbose -> "info" +#else + Quiet -> "error" + Normal -> "warn" + Loud -> "info" + Chatty -> "info" +#endif + + Diagnostic -> "debug" \ No newline at end of file diff --git a/install/src/Version.hs b/install/src/Version.hs index 0d89b4b95..464700414 100644 --- a/install/src/Version.hs +++ b/install/src/Version.hs @@ -6,7 +6,6 @@ import Data.Version ( Version , showVersion ) import Text.ParserCombinators.ReadP ( readP_to_S ) -import Control.Monad.IO.Class type VersionNumber = String From b7f93eed53315593d6fccf009be298cddfc07eea Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 12:22:05 +0100 Subject: [PATCH 190/270] Add specific cabal.project for ghc-8.8.2 --- cabal.project-8.8.2 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cabal.project-8.8.2 diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 new file mode 100644 index 000000000..e38f8b79e --- /dev/null +++ b/cabal.project-8.8.2 @@ -0,0 +1,32 @@ +packages: + ./ + ./hie-plugin-api/ + + -- ./submodules/HaRe + +-- To avoid build error with ghc-8.8.2 +-- See https://github.com/haskell/haddock/issues/1123 +source-repository-package + type: git + location: https://github.com/haskell/haddock.git + subdir: haddock-api + tag: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 + +source-repository-package + type: git + location: https://github.com/jneira/cabal-helper.git + tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 + +tests: true + +package haskell-ide-engine + test-show-details: direct + +-- Match the flag settings we use in stac builds +constraints: + haskell-ide-engine +pedantic + hie-plugin-api +pedantic + +write-ghc-environment-files: never + +index-state: 2020-02-05T07:49:28Z From a66c6e750af7b792ea11c6768f54134af9b65f15 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 12:22:56 +0100 Subject: [PATCH 191/270] Explain why we are using a custom haddock-api --- stack-8.8.2.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index da9ba0672..fd4ed7b89 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -16,6 +16,8 @@ extra-deps: - constrained-dynamic-0.1.0.0 - floskell-0.10.2 - ghc-lib-parser-ex-8.8.4.0 +# To avoid build error with ghc-8.8.2 +# See https://github.com/haskell/haddock/issues/1123 - git: https://github.com/haskell/haddock.git commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 subdirs: From 1a4dd8fc756f468785fa73a62cef090c0463bb93 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 12:25:24 +0100 Subject: [PATCH 192/270] Use custom cabal.project-${ghcVersion} if exists --- .azure/linux-cabal.bashrc | 6 ++++++ .azure/linux-cabal.yml | 18 +++++++++--------- .azure/macos-cabal.bashrc | 6 ++++++ .azure/windows-cabal.bashrc | 6 ++++++ .azure/windows-cabal.yml | 25 +++++++++++++------------ 5 files changed, 40 insertions(+), 21 deletions(-) diff --git a/.azure/linux-cabal.bashrc b/.azure/linux-cabal.bashrc index 864dfa2ae..6e087c538 100644 --- a/.azure/linux-cabal.bashrc +++ b/.azure/linux-cabal.bashrc @@ -1 +1,7 @@ +if [ -z "$PROJECT_FILE" ]; then + export PROJECT_FILE="cabal.project" + if [ -f "cabal.project-$GHC_VERSION" ]; then + export PROJECT_FILE="cabal.project-$GHC_VERSION" + fi +fi export PATH=$HOME/.cabal/bin:/opt/cabal/$CABAL_VERSION/bin:/opt/ghc/$GHC_VERSION/bin:$HOME/.local/bin:$PATH diff --git a/.azure/linux-cabal.yml b/.azure/linux-cabal.yml index 3f5e8081b..c63d29fb2 100644 --- a/.azure/linux-cabal.yml +++ b/.azure/linux-cabal.yml @@ -45,19 +45,19 @@ jobs: displayName: Update cabal - bash: | source .azure/linux-cabal.bashrc - cabal v2-build --disable-tests --disable-benchmarks --only-dependencies + cabal v2-build --disable-tests --disable-benchmarks --only-dependencies --project-file $PROJECT_FILE displayName: Build dependencies - bash: | source .azure/linux-cabal.bashrc - cabal v2-build --disable-tests --disable-benchmarks + cabal v2-build --disable-tests --disable-benchmarks --project-file $PROJECT_FILE displayName: Build `hie` - bash: | source .azure/linux-cabal.bashrc - cabal v2-install # `hie` binary required locally for tests + cabal v2-install --project-file $PROJECT_FILE # `hie` binary required locally for tests displayName: Install `hie` - bash: | source .azure/linux-cabal.bashrc - cabal v2-build --enable-tests --enable-benchmarks --only-dependencies + cabal v2-build --enable-tests --enable-benchmarks --only-dependencies --project-file $PROJECT_FILE displayName: Build Test-dependencies - bash: | sudo apt update @@ -70,20 +70,20 @@ jobs: displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | source .azure/linux-cabal.bashrc - cabal v2-build hoogle - cabal v2-exec hoogle generate + cabal v2-build hoogle --project-file $PROJECT_FILE + cabal v2-exec hoogle generate --project-file $PROJECT_FILE displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | source .azure/linux-cabal.bashrc - cabal v2-test :unit-test + cabal v2-test :unit-test --project-file $PROJECT_FILE displayName: "Run Test: unit-test" - bash: | source .azure/linux-cabal.bashrc - cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test + cabal v2-test :dispatcher-test :plugin-dispatcher-test :wrapper-test --project-file $PROJECT_FILE displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | source .azure/linux-cabal.bashrc - cabal v2-test :func-test + cabal v2-test :func-test --project-file $PROJECT_FILE displayName: "Run Test: func-test" - bash: | mkdir -p .azure-cache diff --git a/.azure/macos-cabal.bashrc b/.azure/macos-cabal.bashrc index 90489c404..44deaa783 100644 --- a/.azure/macos-cabal.bashrc +++ b/.azure/macos-cabal.bashrc @@ -1,2 +1,8 @@ +if [ -z "$PROJECT_FILE" ]; then + export PROJECT_FILE="cabal.project" + if [ -f "cabal.project-$GHC_VERSION" ]; then + export PROJECT_FILE="cabal.project-$GHC_VERSION" + fi +fi export CABAL_ROOT=$HOME/.cabal export PATH=$CABAL_ROOT/bin:$PATH diff --git a/.azure/windows-cabal.bashrc b/.azure/windows-cabal.bashrc index de43edfc8..4530c4f40 100644 --- a/.azure/windows-cabal.bashrc +++ b/.azure/windows-cabal.bashrc @@ -1,3 +1,9 @@ +if [ -z "$PROJECT_FILE" ]; then + export PROJECT_FILE="cabal.project" + if [ -f "cabal.project-$GHC_VERSION" ]; then + export PROJECT_FILE="cabal.project-$GHC_VERSION" + fi +fi if [ -z "$CABAL_DIR" ]; then CABAL_DIR="$APPDATA\\cabal" fi diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index ee3e185de..bf4e9b9ab 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -5,7 +5,8 @@ jobs: vmImage: windows-2019 strategy: matrix: - # It still is not in chocolatey + # ghc versions 8.8.1 and 8.8.2 are not usable in windows + # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 # ghc-8.8.2: # GHC_VERSION: "8.8.2" ghc-8.6.5: @@ -51,28 +52,28 @@ jobs: displayName: Install cabal - bash: | source .azure/windows-cabal.bashrc - cabal v2-update + cabal v2-update --project-file $PROJECT_FILE echo "store-dir: $CABAL_STORE_DIR" >> $CABAL_ROOT/config echo "overwrite-policy: always" >> $CABAL_ROOT/config displayName: Update cabal - bash: | source .azure/windows-cabal.bashrc - cabal v2-build all --disable-tests --disable-benchmarks --only-dependencies + cabal v2-build all --disable-tests --disable-benchmarks --only-dependencies --project-file $PROJECT_FILE displayName: Build dependencies - bash: | source .azure/windows-cabal.bashrc - cabal v2-build all --disable-tests --disable-benchmarks + cabal v2-build all --disable-tests --disable-benchmarks --project-file $PROJECT_FILE displayName: Build `hie` - bash: | source .azure/windows-cabal.bashrc # `hie` binary required locally for tests # we have to use a separate store for install and builds # to workaround https://github.com/haskell/cabal/issues/6483 - cabal --store-dir ${CABAL_STORE_DIR}i v2-install + cabal --store-dir ${CABAL_STORE_DIR}i v2-install --project-file $PROJECT_FILE displayName: Install `hie` - bash: | source .azure/windows-cabal.bashrc - cabal v2-build all --enable-tests --enable-benchmarks --only-dependencies + cabal v2-build all --enable-tests --enable-benchmarks --only-dependencies --project-file $PROJECT_FILE displayName: Build Test-dependencies - bash: | mkdir -p /usr/local @@ -88,19 +89,19 @@ jobs: displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | source .azure/windows-cabal.bashrc - cabal v2-build hoogle - cabal v2-exec hoogle generate + cabal v2-build hoogle --project-file $PROJECT_FILE + cabal v2-exec hoogle generate --project-file $PROJECT_FILE displayName: "Install Runtime Test-Dependencies: hoogle database" - bash: | curl -sSkL http://www.stackage.org/stack/windows-x86_64 -o /usr/bin/stack.zip unzip -o /usr/bin/stack.zip -d /usr/bin/ mkdir -p "$STACK_ROOT" - # If we don't install the ghc used in test projects in advance, tests fail + # If we don't install the ghc used in test projects in advance, tests fail stack setup --stack-yaml stack-${GHC_VERSION}.yaml displayName: "Install Runtime Unit Test-Dependencies: stack" - bash: | source .azure/windows-cabal.bashrc - cabal v2-test :unit-test + cabal v2-test :unit-test --project-file $PROJECT_FILE displayName: "Run Test: unit-test" - bash: | source .azure/windows-cabal.bashrc @@ -108,11 +109,11 @@ jobs: stack setup --stack-yaml stack-8.8.1.yaml stack setup --stack-yaml stack-8.6.5.yaml # TODO Enable :dispatcher-test suite - cabal v2-test :plugin-dispatcher-test :wrapper-test # :dispatcher-test + cabal v2-test :plugin-dispatcher-test :wrapper-test # :dispatcher-test --project-file $PROJECT_FILE displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | source .azure/windows-cabal.bashrc - cabal v2-test :func-test + cabal v2-test :func-test --project-file $PROJECT_FILE displayName: "Run Test: func-test" - bash: | source .azure/windows-cabal.bashrc From d84147eecaac62e09541b4924e348ddede3143b5 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 12:26:21 +0100 Subject: [PATCH 193/270] Enable all jobs --- azure-pipelines.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33b7989de..0ed02f2c3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -32,13 +32,13 @@ pr: - '*.md' jobs: -# - template: ./.azure/linux-stack.yml -# - template: ./.azure/linux-cabal.yml -# - template: ./.azure/windows-stack.yml -# - template: ./.azure/windows-cabal.yml +- template: ./.azure/linux-stack.yml +- template: ./.azure/linux-cabal.yml +- template: ./.azure/windows-stack.yml +- template: ./.azure/windows-cabal.yml - template: ./.azure/macos-stack.yml -# - template: ./.azure/linux-installhs-stack.yml -# - template: ./.azure/windows-installhs-stack.yml -#- template: ./.azure/windows-installhs-cabal.yml +- template: ./.azure/linux-installhs-stack.yml +- template: ./.azure/windows-installhs-stack.yml +- template: ./.azure/windows-installhs-cabal.yml - template: ./.azure/macos-installhs-cabal.yml - template: ./.azure/macos-installhs-stack.yml From 5882356d9a4f0afff3df37ab648956fa618005d6 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 12:36:11 +0100 Subject: [PATCH 194/270] Use project file in cabal update --- .azure/linux-cabal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure/linux-cabal.yml b/.azure/linux-cabal.yml index c63d29fb2..362c8585f 100644 --- a/.azure/linux-cabal.yml +++ b/.azure/linux-cabal.yml @@ -40,7 +40,7 @@ jobs: displayName: Install ghc - bash: | source .azure/linux-cabal.bashrc - cabal v2-update + cabal v2-update --project-file $PROJECT_FILE echo "overwrite-policy: always" >> $HOME/.cabal/config displayName: Update cabal - bash: | From d773cfdab85d1b137c0ffa57edd49b5ee886d406 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 24 Feb 2020 14:21:55 +0100 Subject: [PATCH 195/270] Add missing import if built with cabal --- install/src/Cabal.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index 205d75716..8429b59d9 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -13,6 +13,7 @@ import Env import Control.Exception ( throwIO ) #else import Cabal.Config +import Data.Functor.Identity #endif getInstallDir :: IO FilePath From 7e45d349632fa1874a5c8bd07b35937968e6f63f Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 26 Feb 2020 19:50:10 +0100 Subject: [PATCH 196/270] Not share jobs arg between shake and build --- install/src/HieInstall.hs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index b2afbde1b..c98cb157d 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -29,19 +29,16 @@ defaultMain = do let latestVersion = last versions - shakeArgs shakeOptions { shakeFiles = "_build", shakeThreads = 0 } $ do + shakeArgs shakeOptions { shakeFiles = "_build" } $ do shakeOptionsRules <- getShakeOptionsRules - let jobsArg = "-j" ++ show (shakeThreads shakeOptionsRules) - let verbosityArg = if isRunFromStack then Stack.getVerbosityArg else Cabal.getVerbosityArg - let args = [jobsArg, verbosityArg (shakeVerbosity shakeOptionsRules)] + let args = [verbosityArg (shakeVerbosity shakeOptionsRules)] phony "show-options" $ do putNormal $ "Options:" - putNormal $ " Number of jobs: " ++ show (shakeThreads shakeOptionsRules) putNormal $ " Verbosity level: " ++ show (shakeVerbosity shakeOptionsRules) want ["short-help"] From 0718c12cc81c6bd6b692574b415d741297b0c58b Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Mon, 2 Mar 2020 22:29:43 +0000 Subject: [PATCH 197/270] Bump resolvers and hlint to 2.2.11 --- cabal.project | 2 +- cabal.project-8.8.2 | 2 +- haskell-ide-engine.cabal | 2 +- stack-8.4.2.yaml | 9 +++++---- stack-8.4.3.yaml | 9 +++++---- stack-8.4.4.yaml | 9 +++++---- stack-8.6.4.yaml | 9 +++++---- stack-8.6.5.yaml | 7 ++++--- stack-8.8.1.yaml | 5 +++-- stack-8.8.2.yaml | 7 ++++--- stack.yaml | 7 ++++--- 11 files changed, 38 insertions(+), 30 deletions(-) diff --git a/cabal.project b/cabal.project index 8499512e2..38c3947e1 100644 --- a/cabal.project +++ b/cabal.project @@ -21,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-02-05T07:49:28Z +index-state: 2020-03-02T20:56:02Z \ No newline at end of file diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 index e38f8b79e..5c899090d 100644 --- a/cabal.project-8.8.2 +++ b/cabal.project-8.8.2 @@ -29,4 +29,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-02-05T07:49:28Z +index-state: 2020-03-02T20:56:02Z \ No newline at end of file diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index b801f7c2d..248b9557c 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -102,7 +102,7 @@ library , hie-bios >= 0.4 && < 0.5.0 , bytestring-trie , unliftio - , hlint >= 2.2.8 + , hlint >= 2.2.11 if impl(ghc >= 8.6) build-depends: ormolu >= 0.0.3.1 diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 32cd8a3a1..cabd203c8 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -19,14 +19,14 @@ extra-deps: - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 -- extra-1.6.18 +- extra-1.6.21 - file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 - generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 @@ -34,7 +34,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 @@ -55,6 +55,7 @@ extra-deps: - syz-0.2.0.0 - type-equality-1 - unix-compat-0.5.2 +- unliftio-0.2.12 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 - th-abstraction-0.3.1.0 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 9dbfa3b6f..95c1aed05 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -25,14 +25,14 @@ extra-deps: - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 - dec-0.0.3 -- extra-1.6.18 +- extra-1.6.21 - file-embed-0.0.11.1 - filepattern-0.1.1 - floskell-0.10.2 - generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 @@ -40,7 +40,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 @@ -74,6 +74,7 @@ extra-deps: - topograph-1 - type-equality-1 - unix-compat-0.5.2 +- unliftio-0.2.12 - unordered-containers-0.2.10.0 - vector-0.12.1.2 - yaml-0.11.2.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 41645d97b..8d6ffa54f 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -18,14 +18,14 @@ extra-deps: - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 -- extra-1.6.18 +- extra-1.6.21 - file-embed-0.0.11 - filepattern-0.1.1 - floskell-0.10.2 - generic-deriving-1.13.1 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.20.0 - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 @@ -33,7 +33,7 @@ extra-deps: - haskell-src-exts-1.21.1 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - hslogger-1.3.1.0 @@ -54,6 +54,7 @@ extra-deps: - socks-0.6.1 # for network and network-bsd - syz-0.2.0.0 - unix-compat-0.5.2 +- unliftio-0.2.12 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 - th-abstraction-0.3.1.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index a9eafff06..ca707f7e0 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -16,17 +16,17 @@ extra-deps: commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 -- extra-1.6.18 +- extra-1.6.21 - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.22.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - lsp-test-0.10.1.0 @@ -40,6 +40,7 @@ extra-deps: - temporary-1.2.1.1 - time-compat-1.9.2.2 - unix-compat-0.5.2 +- unliftio-0.2.12 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 # To make build work in windows 7 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 2f9596bfe..0ca019c97 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -19,15 +19,16 @@ extra-deps: - cabal-plan-0.6.2.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 +- extra-1.6.21 - floskell-0.10.2 - ghc-exactprint-0.6.2 # for HaRe -- ghc-lib-parser-8.8.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.22.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - indexed-profunctors-0.1 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index be8253566..f8a9582a0 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -15,8 +15,9 @@ extra-deps: commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - clock-0.7.2 - constrained-dynamic-0.1.0.0 +- extra-1.6.21 - floskell-0.10.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.23.0 - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 @@ -24,7 +25,7 @@ extra-deps: - lsp-test-0.10.1.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index fd4ed7b89..d0e8a662d 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-01-31 +resolver: lts-15.2 packages: - . - hie-plugin-api @@ -15,7 +15,8 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 # To avoid build error with ghc-8.8.2 # See https://github.com/haskell/haddock/issues/1123 - git: https://github.com/haskell/haddock.git @@ -29,7 +30,7 @@ extra-deps: - lsp-test-0.10.1.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 diff --git a/stack.yaml b/stack.yaml index da9ba0672..8d7f30ae1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-01-31 +resolver: nightly-2020-03-01 packages: - . - hie-plugin-api @@ -15,7 +15,8 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-ex-8.8.4.0 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - git: https://github.com/haskell/haddock.git commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 subdirs: @@ -27,7 +28,7 @@ extra-deps: - lsp-test-0.10.1.0 - haskell-src-exts-1.21.1 - hie-bios-0.4.0 -- hlint-2.2.10 +- hlint-2.2.11 - hoogle-5.0.17.11 - hsimport-0.11.0 - ilist-0.3.1.0 From 7538134e8b509b3b008955af135c4115c05a8531 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Tue, 3 Mar 2020 18:58:51 +0000 Subject: [PATCH 198/270] Stick with older unliftio-core There is a breaking change in version 0.2.0.1, see #1680 --- cabal.project | 2 +- cabal.project-8.8.2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 38c3947e1..325e70d66 100644 --- a/cabal.project +++ b/cabal.project @@ -21,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-03-02T20:56:02Z \ No newline at end of file +index-state: 2020-03-01T07:49:28Z \ No newline at end of file diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 index 5c899090d..d92568a1d 100644 --- a/cabal.project-8.8.2 +++ b/cabal.project-8.8.2 @@ -29,4 +29,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-03-02T20:56:02Z \ No newline at end of file +index-state: 2020-03-01T07:49:28Z From de19fbfb03fd28e9c13855a11b41ffd3173387b3 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 3 Mar 2020 00:00:27 +0100 Subject: [PATCH 199/270] Set haskell-src-exts lower bound to 1.22 --- haskell-ide-engine.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 248b9557c..0efc2dbea 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -75,7 +75,7 @@ library , haddock-library , haskell-lsp == 0.20.* , haskell-lsp-types == 0.20.* - , haskell-src-exts + , haskell-src-exts >= 1.22 , hie-plugin-api >= 1.1 , hoogle >= 5.0.13 , hsimport From d5162dee974a1b9f111e1812a88672a00b14ba00 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 3 Mar 2020 00:00:59 +0100 Subject: [PATCH 200/270] Use master versions of hsimport and floskell --- cabal.project | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cabal.project b/cabal.project index 325e70d66..f627c70b6 100644 --- a/cabal.project +++ b/cabal.project @@ -9,8 +9,21 @@ source-repository-package location: https://github.com/jneira/cabal-helper.git tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +source-repository-package + type: git + location: https://github.com/dan-t/hsimport + tag: 9528ba4aac4cd70b29cfdda166e94923b61ff23b + +source-repository-package + type: git + location: https://github.com/ennocramer/floskell + tag: 8434743f1b82f9da9bb6888d1c09cc95b641ba5c + tests: true +package hsimport + tests:false + package haskell-ide-engine test-show-details: direct From 59dc5b209de7f054c0c28879769a1d9af01d6ce2 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 3 Mar 2020 10:05:02 +0100 Subject: [PATCH 201/270] Remove unnecessary floskell source-repo-pkg --- cabal.project | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cabal.project b/cabal.project index f627c70b6..4a49169e9 100644 --- a/cabal.project +++ b/cabal.project @@ -9,16 +9,12 @@ source-repository-package location: https://github.com/jneira/cabal-helper.git tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +-- TODO: Use released version when https://github.com/dan-t/hsimport/issues/23 is addressed source-repository-package type: git location: https://github.com/dan-t/hsimport tag: 9528ba4aac4cd70b29cfdda166e94923b61ff23b -source-repository-package - type: git - location: https://github.com/ennocramer/floskell - tag: 8434743f1b82f9da9bb6888d1c09cc95b641ba5c - tests: true package hsimport From 2c279e3e385b77612d7470b61811bb60128336b7 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 3 Mar 2020 10:05:39 +0100 Subject: [PATCH 202/270] Add hsimport as source repo package --- cabal.project | 11 +---------- cabal.project-8.8.2 | 2 +- stack-8.4.2.yaml | 6 +++--- stack-8.4.3.yaml | 4 ++-- stack-8.4.4.yaml | 4 ++-- stack-8.6.4.yaml | 6 +++--- stack-8.6.5.yaml | 5 +++-- stack-8.8.1.yaml | 5 ++--- stack-8.8.2.yaml | 5 ++--- stack.yaml | 7 +++---- 10 files changed, 22 insertions(+), 33 deletions(-) diff --git a/cabal.project b/cabal.project index 4a49169e9..2e077831c 100644 --- a/cabal.project +++ b/cabal.project @@ -9,17 +9,8 @@ source-repository-package location: https://github.com/jneira/cabal-helper.git tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 --- TODO: Use released version when https://github.com/dan-t/hsimport/issues/23 is addressed -source-repository-package - type: git - location: https://github.com/dan-t/hsimport - tag: 9528ba4aac4cd70b29cfdda166e94923b61ff23b - tests: true -package hsimport - tests:false - package haskell-ide-engine test-show-details: direct @@ -30,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-03-01T07:49:28Z \ No newline at end of file +index-state: 2020-03-03T21:13:56Z \ No newline at end of file diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 index d92568a1d..cffb5319f 100644 --- a/cabal.project-8.8.2 +++ b/cabal.project-8.8.2 @@ -29,4 +29,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-03-01T07:49:28Z +index-state: 2020-03-03T21:13:56Z diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index cabd203c8..d57e18d53 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -31,12 +31,12 @@ extra-deps: - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 -- haskell-src-exts-1.21.1 +- haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 -- hsimport-0.11.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@rev1 - hslogger-1.3.1.0 - invariant-0.5.3 - lens-4.18.1 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 95c1aed05..583e49946 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -37,11 +37,11 @@ extra-deps: - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 -- haskell-src-exts-1.21.1 +- haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 +- hoogle-5.0.17.15 - hsimport-0.11.0 - hslogger-1.3.1.0 - hspec-2.7.1 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 8d6ffa54f..37419c663 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -30,11 +30,11 @@ extra-deps: - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 -- haskell-src-exts-1.21.1 +- haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 +- hoogle-5.0.17.15 - hsimport-0.11.0 - hslogger-1.3.1.0 - invariant-0.5.3 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index ca707f7e0..fda00f4fc 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -24,11 +24,11 @@ extra-deps: - haddock-api-2.22.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 -- haskell-src-exts-1.21.1 +- haskell-src-exts-1.22.0 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 -- hsimport-0.11.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@rev1 - lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 0ca019c97..3f239f7cf 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -27,10 +27,11 @@ extra-deps: - haddock-api-2.22.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 +- haskell-src-exts-1.22.0 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 -- hsimport-0.11.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@rev1 - indexed-profunctors-0.1 - lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index f8a9582a0..4c34461ad 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -23,11 +23,10 @@ extra-deps: - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - lsp-test-0.10.1.0 -- haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 -- hsimport-0.11.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@rev1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index d0e8a662d..bef19da55 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -28,11 +28,10 @@ extra-deps: - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - lsp-test-0.10.1.0 -- haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 -- hsimport-0.11.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@rev1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 diff --git a/stack.yaml b/stack.yaml index 8d7f30ae1..f3ef8b777 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,20 +17,19 @@ extra-deps: - floskell-0.10.2 - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 +# - haddock-api-2.23.0 - git: https://github.com/haskell/haddock.git commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 subdirs: - haddock-api -# - haddock-api-2.23.0 - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - lsp-test-0.10.1.0 -- haskell-src-exts-1.21.1 - hie-bios-0.4.0 - hlint-2.2.11 -- hoogle-5.0.17.11 -- hsimport-0.11.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@rev1 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 From 02c1d248d35c3093863b25dc42614326f2ae251b Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 4 Mar 2020 20:11:02 +0000 Subject: [PATCH 203/270] Preparing 1.2 release --- Changelog.md | 129 +++++++++++++++++++--------- haskell-ide-engine.cabal | 4 +- hie-plugin-api/hie-plugin-api.cabal | 2 +- 3 files changed, 90 insertions(+), 45 deletions(-) diff --git a/Changelog.md b/Changelog.md index d6c7cce17..4ec0bc8ee 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,48 @@ +# 1.2 + +NOTE: haskell-ide-engine is in transition, the new home for it will be +[haskell-language-server](https://github.com/haskell/haskell-language-server), +which does not currently have feature parity with `hie`. In particular +it does not support multi-cradles, so can only open a single component +of a project, as configured into its `hie.yaml` file. + +Once that hurdle is crossed, the main emphasis will be there, and +`hie` will eventually be deprecated. + +## In this version + +- cabal now index state 2020-03-01T07:49:28Z +- GHC 8.8.2 is lts-15.2 +- GHC 8.6.5 is lts-14.22 +- hlint is 2.2.11 +- brittany is 0.12.1.1 + +## Changes + +- Bump resolvers and hlint to 2.2.11 +([#1678](https://github.com/haskell/haskell-ide-engine/pull/1678), by @alanz) +- Improvements of install script and macos-installhs-cabal new azure job +([#1665](https://github.com/haskell/haskell-ide-engine/pull/1665), by @jneira) +- Azure: try to generate hoogle twice to avoid 403 http errors for macos +([#1662](https://github.com/haskell/haskell-ide-engine/pull/1662), by @jneira) +- Enable some more tests in windows +([#1659](https://github.com/haskell/haskell-ide-engine/pull/1659), by @jneira) +- Add azure badge to README +([#1661](https://github.com/haskell/haskell-ide-engine/pull/1661), by @jneira) +- Azure: not trigger pr builds by path +([#1633](https://github.com/haskell/haskell-ide-engine/pull/1633), by @jneira) +- Fix failing tests in windows (reloaded) +([#1655](https://github.com/haskell/haskell-ide-engine/pull/1655), by @jneira) +- Replace one more haskell-ide ocurrence +([#1652](https://github.com/haskell/haskell-ide-engine/pull/1652), by @jneira) +- Set current working directory when executing project ghc +([#1654](https://github.com/haskell/haskell-ide-engine/pull/1654), by @fendor) +- Use haskell-lsp-0.20 +([#1645](https://github.com/haskell/haskell-ide-engine/pull/1645), by @jneira) +- Remove Comma +([#1642](https://github.com/haskell/haskell-ide-engine/pull/1642), by @nilsmartel) + + # 1.1 NOTE: haskell-ide-engine is in transition, the new home for it will be @@ -20,89 +65,89 @@ Once that hurdle is crossed, the main emphasis will be there, and ## Changes - Install script with cabal: check there is one ghc in $PATH -([#1632](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1632](https://github.com/haskell/haskell-ide-engine/pull/1632), by @jneira) - Update README.md -([#1636](https://github.com/haskell/haskell-ide-engine/pull/1551), by @flip111) +([#1636](https://github.com/haskell/haskell-ide-engine/pull/1636), by @flip111) - Azure: not trigger pr builds by path -([#1633](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1633](https://github.com/haskell/haskell-ide-engine/pull/1633), by @jneira) - Add dev target to stack install.hs -([#1615](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1615](https://github.com/haskell/haskell-ide-engine/pull/1615), by @jneira) - Fix cabal-hie-install in windows azure ci -([#1627](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1627](https://github.com/haskell/haskell-ide-engine/pull/1627), by @jneira) - Replace one more haskell-ide in README -([#1630](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1630](https://github.com/haskell/haskell-ide-engine/pull/1630), by @jneira) - Bump resolvers, hlint, brittany -([#1622](https://github.com/haskell/haskell-ide-engine/pull/1551), by @alanz) +([#1622](https://github.com/haskell/haskell-ide-engine/pull/1622), by @alanz) - Update HIE to use latest hie-bios -([#1601](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1601](https://github.com/haskell/haskell-ide-engine/pull/1601), by @fendor) - Add instructions for installing HIE + GHC as a VS Code Devcontainer -([#1624](https://github.com/haskell/haskell-ide-engine/pull/1551), by @GavinRay97) +([#1624](https://github.com/haskell/haskell-ide-engine/pull/1624), by @GavinRay97) - Readme: haskell-ide -> haskell-language-server -([#1625](https://github.com/haskell/haskell-ide-engine/pull/1551), by @andys8) +([#1625](https://github.com/haskell/haskell-ide-engine/pull/1625), by @andys8) - Deduplicate main for hie/hie-wrapper -([#1610](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Gurkenglas) +([#1610](https://github.com/haskell/haskell-ide-engine/pull/1610), by @Gurkenglas) - Azure fix win cabal 8.4.4 -([#1619](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1619](https://github.com/haskell/haskell-ide-engine/pull/1619), by @jneira) - Mention the new haskell-ide in the README -([#1612](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1612](https://github.com/haskell/haskell-ide-engine/pull/1612), by @jneira) - Ormolu range format support -([#1602](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Avi-D-coder) +([#1602](https://github.com/haskell/haskell-ide-engine/pull/1602), by @Avi-D-coder) - Add 8.8.2 stack file and CI -([#1607](https://github.com/haskell/haskell-ide-engine/pull/1551), by @bubba) +([#1607](https://github.com/haskell/haskell-ide-engine/pull/1607), by @bubba) - Azure update macos and try to fix windows+stack builds -([#1609](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1609](https://github.com/haskell/haskell-ide-engine/pull/1609), by @jneira) - Update required stack version -([#1603](https://github.com/haskell/haskell-ide-engine/pull/1551), by @wataru86) +([#1603](https://github.com/haskell/haskell-ide-engine/pull/1603), by @wataru86) - Remove compiler warnings -([#1600](https://github.com/haskell/haskell-ide-engine/pull/1551), by @EncodePanda) +([#1600](https://github.com/haskell/haskell-ide-engine/pull/1600), by @EncodePanda) - Remove hlint.yaml from azure releases and readme -([#1598](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1598](https://github.com/haskell/haskell-ide-engine/pull/1598), by @jneira) - Fix error message parsing to import types -([#1597](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1597](https://github.com/haskell/haskell-ide-engine/pull/1597), by @fendor) - Pass Ormolu cradle flags & default-extensions -([#1589](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Avi-D-coder) +([#1589](https://github.com/haskell/haskell-ide-engine/pull/1589), by @Avi-D-coder) - Fix multi source directories -([#1577](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1577](https://github.com/haskell/haskell-ide-engine/pull/1577), by @fendor) - azure: add windows+cabal job and other improvements -([#1595](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1595](https://github.com/haskell/haskell-ide-engine/pull/1595), by @jneira) - Allow newer optparse-applicative for ormolu (stack version) -([#1586](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1586](https://github.com/haskell/haskell-ide-engine/pull/1586), by @jneira) - Azure builds improvements -([#1584](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1584](https://github.com/haskell/haskell-ide-engine/pull/1584), by @jneira) - Drop GHC version 8.6.1, 8.6.2 and 8.6.3 (#1592) -([#1594](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1594](https://github.com/haskell/haskell-ide-engine/pull/1594), by @fendor) - Demote HsImport func-tests to unit-test -([#1591](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1591](https://github.com/haskell/haskell-ide-engine/pull/1591), by @fendor) - Update hlint to 2.2.8 and ormolu to 0.0.3 -([#1588](https://github.com/haskell/haskell-ide-engine/pull/1551), by @alanz) +([#1588](https://github.com/haskell/haskell-ide-engine/pull/1588), by @alanz) - Allow newer optparse-applicative for ormolu -([#1583](https://github.com/haskell/haskell-ide-engine/pull/1551), by @bubba) +([#1583](https://github.com/haskell/haskell-ide-engine/pull/1583), by @bubba) - Make cabal-hie-install executable -([#1581](https://github.com/haskell/haskell-ide-engine/pull/1551), by @maoe) +([#1581](https://github.com/haskell/haskell-ide-engine/pull/1581), by @maoe) - Ormolu formatter support -([#1481](https://github.com/haskell/haskell-ide-engine/pull/1551), by @DavSanchez) +([#1481](https://github.com/haskell/haskell-ide-engine/pull/1481), by @DavSanchez) - GHC 8.8 support -([#1482](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Avi-D-coder) +([#1482](https://github.com/haskell/haskell-ide-engine/pull/1482), by @Avi-D-coder) - Load all possible haskell source files -([#1569](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1569](https://github.com/haskell/haskell-ide-engine/pull/1569), by @fendor) - Enable all working test suites and add linux-cabal job in Azure -([#1571](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1571](https://github.com/haskell/haskell-ide-engine/pull/1571), by @jneira) - Mention hlint data file handling in readme -([#1573](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1573](https://github.com/haskell/haskell-ide-engine/pull/1573), by @jneira) - Enable azure releases and some fixes -([#1545](https://github.com/haskell/haskell-ide-engine/pull/1551), by @jneira) +([#1545](https://github.com/haskell/haskell-ide-engine/pull/1545), by @jneira) - Add cabal freeze files and use them automatically -([#1561](https://github.com/haskell/haskell-ide-engine/pull/1551), by @hasufell) +([#1561](https://github.com/haskell/haskell-ide-engine/pull/1561), by @hasufell) - Add unit-tests for Cabal-Helper cradles -([#1552](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1552](https://github.com/haskell/haskell-ide-engine/pull/1552), by @fendor) - Don't mix stack with cabal -([#1557](https://github.com/haskell/haskell-ide-engine/pull/1551), by @hasufell) +([#1557](https://github.com/haskell/haskell-ide-engine/pull/1557), by @hasufell) - Avoid building HIE twice -([#1562](https://github.com/haskell/haskell-ide-engine/pull/1551), by @hasufell) +([#1562](https://github.com/haskell/haskell-ide-engine/pull/1562), by @hasufell) - Readme lsp flag -([#1559](https://github.com/haskell/haskell-ide-engine/pull/1551), by @Anrock) +([#1559](https://github.com/haskell/haskell-ide-engine/pull/1559), by @Anrock) - Fix haddock documentation for Cradle.hs -([#1549](https://github.com/haskell/haskell-ide-engine/pull/1551), by @fendor) +([#1549](https://github.com/haskell/haskell-ide-engine/pull/1549), by @fendor) # 1.0.0.0 diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 248b9557c..f50d90d5c 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -1,5 +1,5 @@ name: haskell-ide-engine -version: 1.1 +version: 1.2 synopsis: Provide a common engine to power any Haskell IDE description: Please see README.md homepage: http://github.com/githubuser/haskell-ide-engine#readme @@ -76,7 +76,7 @@ library , haskell-lsp == 0.20.* , haskell-lsp-types == 0.20.* , haskell-src-exts - , hie-plugin-api >= 1.1 + , hie-plugin-api >= 1.2 , hoogle >= 5.0.13 , hsimport , hslogger diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index 691839c44..2c2608e38 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -1,5 +1,5 @@ name: hie-plugin-api -version: 1.1 +version: 1.2 synopsis: Haskell IDE API for plugin communication description: Please see README.md license: BSD3 From ba8ee55cdab2644fcc9415abaaff7d3dbd12e3e5 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 5 Mar 2020 09:06:52 +0100 Subject: [PATCH 204/270] Avoid unliftio-core >= 0.2 --- cabal.project | 4 +++- cabal.project-8.8.2 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 2e077831c..5cda0668c 100644 --- a/cabal.project +++ b/cabal.project @@ -16,7 +16,9 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: - haskell-ide-engine +pedantic + -- to avoid temporary a breaking change: https://github.com/haskell/haskell-ide-engine/issues/1680 + unliftio-core < 0.2.0.0, + haskell-ide-engine +pedantic, hie-plugin-api +pedantic write-ghc-environment-files: never diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 index cffb5319f..4b061f363 100644 --- a/cabal.project-8.8.2 +++ b/cabal.project-8.8.2 @@ -24,7 +24,9 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: - haskell-ide-engine +pedantic + -- to avoid temporary a breaking change: https://github.com/haskell/haskell-ide-engine/issues/1680 + unliftio-core < 0.2.0.0, + haskell-ide-engine +pedantic, hie-plugin-api +pedantic write-ghc-environment-files: never From 1072b60b3b1418713ba6839e3fd1031da4b40512 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 5 Mar 2020 22:26:37 +0000 Subject: [PATCH 205/270] Update Changelog.md Co-Authored-By: Javier Neira --- Changelog.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 4ec0bc8ee..0b603f871 100644 --- a/Changelog.md +++ b/Changelog.md @@ -19,6 +19,9 @@ Once that hurdle is crossed, the main emphasis will be there, and ## Changes +- Use haskell-src-exts 1.22 +([#1679](https://github.com/haskell/haskell-ide-engine/pull/1679/files), by @jneira) + - Bump resolvers and hlint to 2.2.11 ([#1678](https://github.com/haskell/haskell-ide-engine/pull/1678), by @alanz) - Improvements of install script and macos-installhs-cabal new azure job @@ -796,4 +799,3 @@ Add more code actions for various diagnostics: Include case split command, from @txsmith # 0.2.0.0 - From cb2cab0904d99239b5ccd92ed00d3c050660c436 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 5 Mar 2020 22:26:46 +0000 Subject: [PATCH 206/270] Update Changelog.md Co-Authored-By: Javier Neira --- Changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 0b603f871..30d4cc562 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,7 +11,7 @@ Once that hurdle is crossed, the main emphasis will be there, and ## In this version -- cabal now index state 2020-03-01T07:49:28Z +- cabal now index state 2020-03-03T21:13:56Z - GHC 8.8.2 is lts-15.2 - GHC 8.6.5 is lts-14.22 - hlint is 2.2.11 From 81acf2abc18acd965e5d50605470f9eb71b6808f Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Thu, 5 Mar 2020 22:43:58 +0000 Subject: [PATCH 207/270] Update Changelog.md Co-Authored-By: Javier Neira --- Changelog.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog.md b/Changelog.md index 30d4cc562..1e71937d6 100644 --- a/Changelog.md +++ b/Changelog.md @@ -16,6 +16,8 @@ Once that hurdle is crossed, the main emphasis will be there, and - GHC 8.6.5 is lts-14.22 - hlint is 2.2.11 - brittany is 0.12.1.1 +- hoogle is 5.0.17.15 +- haskell-src-exts is 1.22.0 ## Changes From a043333c57e5acbdc9f9381fa69ba98b461c358b Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 6 Mar 2020 12:15:20 +0100 Subject: [PATCH 208/270] Correct pr url and formatting --- Changelog.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index 1e71937d6..5ffa1d0cf 100644 --- a/Changelog.md +++ b/Changelog.md @@ -22,8 +22,7 @@ Once that hurdle is crossed, the main emphasis will be there, and ## Changes - Use haskell-src-exts 1.22 -([#1679](https://github.com/haskell/haskell-ide-engine/pull/1679/files), by @jneira) - +([#1679](https://github.com/haskell/haskell-ide-engine/pull/1679), by @jneira) - Bump resolvers and hlint to 2.2.11 ([#1678](https://github.com/haskell/haskell-ide-engine/pull/1678), by @alanz) - Improvements of install script and macos-installhs-cabal new azure job From 5ba1655e75c65039ae6961fb1cd3a327b7ae40b8 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 7 Mar 2020 10:12:47 +0100 Subject: [PATCH 209/270] Fix typos in README. Add hint to speed up HIE compilation --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f78c9b28b..c1af70d15 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ This project aims to be __the universal interface__ to __a growing number of Has - [Features](#features) - [Installation](#installation) - [Installation with Nix](#installation-with-nix) - - [Installation on ArchLinux](#installation-on-archlinux) + - [Installation on Arch Linux](#installation-on-arch-linux) - [Installation with GHC and HIE as a VS Code Devcontainer](#installation-with-ghc-and-hie-as-a-vs-code-devcontainer) - [Installation from source](#installation-from-source) - [Common pre-requirements](#common-pre-requirements) @@ -143,16 +143,27 @@ This project aims to be __the universal interface__ to __a growing number of Has Follow the instructions at https://github.com/Infinisil/all-hies -### Installation on ArchLinux +### Installation on Arch Linux -An [haskell-ide-engine](https://aur.archlinux.org/packages/haskell-ide-engine/) package is available on the AUR. +A [haskell-ide-engine](https://aur.archlinux.org/packages/haskell-ide-engine/) package is available on the AUR. -Using [Aura](https://github.com/aurapm/aura): +Install it using [Aura](https://github.com/aurapm/aura): ``` # aura -A haskell-ide-engine ``` +To change which GHC versions are supported by HIE, use + +``` +# aura -A --hotedit haskell-ide-engine +``` + +and modify the value of `_enabled_ghc_versions`. + +Reducing the number of supported GHC versions makes HIE compile faster. + + ### Installation with GHC and HIE as a VS Code Devcontainer VS Code provides the ability to develop applications inside of a Docker container (called _Devcontainers_) @@ -858,4 +869,3 @@ ghc-events-analyze hie.eventlog -b 100 This support is similar to the logging capabilities [built into GHC](https://www.haskell.org/ghc/blog/20190924-eventful-ghc.html). - From f340cf1a5eb3f93906bf855c86a738bc9555cec2 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Wed, 11 Mar 2020 14:47:07 +0800 Subject: [PATCH 210/270] Report progress as a percentage Previously it was displayed as a value from 0% to 1% As specified https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workDoneProgress See also https://github.com/alanz/haskell-lsp/blob/1f85ef3c150dc8b2626a181c47d8635015e67ee5/src/Language/Haskell/LSP/Core.hs#L150-L154 --- hie-plugin-api/Haskell/Ide/Engine/GhcUtils.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcUtils.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcUtils.hs index fbe5a1e63..bc48f98cb 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcUtils.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcUtils.hs @@ -17,7 +17,7 @@ import Haskell.Ide.Engine.PluginUtils (ErrorHandler(..)) -- Convert progress continuation to a messager toMessager :: (Core.Progress -> IO ()) -> G.Messager toMessager k _hsc_env (nk, n) _rc_reason ms = - let prog = Core.Progress (Just (fromIntegral nk/ fromIntegral n)) (Just mod_name) + let prog = Core.Progress (Just (100 * fromIntegral nk / fromIntegral n)) (Just mod_name) mod_name = T.pack $ moduleNameString (moduleName (ms_mod ms)) in k prog From 0fc1c7280d859eb1a0b016623d810bb9b8903137 Mon Sep 17 00:00:00 2001 From: gdziadkiewicz Date: Fri, 14 Feb 2020 13:54:23 +0100 Subject: [PATCH 211/270] Redesign option parsing for executables. Fix #1578 --- app/MainHie.hs | 10 ++--- haskell-ide-engine.cabal | 2 + src/Haskell/Ide/Engine/Options.hs | 67 ++++++++++++++++++----------- test/unit/OptionsSpec.hs | 70 +++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 29 deletions(-) create mode 100644 test/unit/OptionsSpec.hs diff --git a/app/MainHie.hs b/app/MainHie.hs index 617695ff3..eb4654a7b 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -84,8 +84,8 @@ main = do let plugins' = plugins (optExamplePlugin opts) - if optLsp opts - then do + case optMode opts of + LspMode -> do -- Start up in LSP mode logm $ "Run entered for HIE(" ++ progName ++ ") " ++ hieVersion logm $ "Operating as a LSP server on stdio" @@ -106,7 +106,7 @@ main = do -- launch the dispatcher. scheduler <- newScheduler plugins' initOpts server scheduler origDir plugins' (optCaptureFile opts) - else do + ProjectLoadingMode projectLoadingOpts -> do -- Provide debug info cliOut $ "Running HIE(" ++ progName ++ ")" cliOut $ " " ++ hieVersion @@ -128,7 +128,7 @@ main = do cliOut $ "Project Ghc version: " ++ projGhc cliOut $ "Libdir: " ++ show mlibdir cliOut "Searching for Haskell source files..." - targets <- case optFiles opts of + targets <- case optFiles projectLoadingOpts of [] -> findAllSourceFiles origDir xs -> concat <$> mapM findAllSourceFiles xs @@ -138,7 +138,7 @@ main = do mapM_ cliOut targets cliOut "" - unless (optDryRun opts) $ do + unless (optDryRun projectLoadingOpts) $ do cliOut "\nLoad them all now. This may take a very long time.\n" loadDiagnostics <- runServer mlibdir plugins' targets diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 817dd7d11..5f6404e1f 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -203,6 +203,7 @@ test-suite unit-test HsImportSpec JsonSpec LiquidSpec + OptionsSpec PackagePluginSpec Spec -- Technically cabal-helper should be a 'run-tool-depends', but that doesn't exist yet @@ -225,6 +226,7 @@ test-suite unit-test , hie-plugin-api , hoogle > 5.0.11 , hspec + , optparse-applicative , process , quickcheck-instances , text diff --git a/src/Haskell/Ide/Engine/Options.hs b/src/Haskell/Ide/Engine/Options.hs index 4c1917331..1341c87c3 100644 --- a/src/Haskell/Ide/Engine/Options.hs +++ b/src/Haskell/Ide/Engine/Options.hs @@ -14,40 +14,66 @@ import System.IO import qualified System.Log.Logger as L import Data.Foldable +data ProjectLoadingOpts = ProjectLoadingOpts + { optDryRun :: Bool + , optFiles :: [FilePath] + } deriving (Show, Eq) + +data RunMode = LspMode | ProjectLoadingMode ProjectLoadingOpts + deriving (Show, Eq) + data GlobalOpts = GlobalOpts { optDebugOn :: Bool , optLogFile :: Maybe String - , optLsp :: Bool , projectRoot :: Maybe String , optBiosVerbose :: Bool , optCaptureFile :: Maybe FilePath , optExamplePlugin :: Bool - , optDryRun :: Bool - , optFiles :: [FilePath] - } deriving (Show) + , optMode :: RunMode + } deriving (Show, Eq) -- | Introduced as the common prefix of app/HieWrapper.hs/main and app/MainHie.hs/main initApp :: String -> IO GlobalOpts initApp namedesc = do hSetBuffering stderr LineBuffering - let numericVersion :: Parser (a -> a) - numericVersion = infoOption (showVersion Meta.version) - (long "numeric-version" <> help "Show only version number") - compiler :: Parser (a -> a) - compiler = infoOption hieGhcDisplayVersion - (long "compiler" <> help "Show only compiler and version supported") -- Parse the options and run (opts, ()) <- simpleOptions hieVersion namedesc "" - (numericVersion <*> compiler <*> globalOptsParser) + optionParser empty Core.setupLogger (optLogFile opts) ["hie", "hie-bios"] $ if optDebugOn opts then L.DEBUG else L.INFO traverse_ setCurrentDirectory $ projectRoot opts return opts +optionParser :: Parser GlobalOpts +optionParser = numericVersion <*> compiler <*> globalOptsParser + +numericVersion :: Parser (a -> a) +numericVersion = infoOption (showVersion Meta.version) + (long "numeric-version" <> help "Show only version number") + +compiler :: Parser (a -> a) +compiler = infoOption hieGhcDisplayVersion + (long "compiler" <> help "Show only compiler and version supported") + +projectLoadingModeParser :: Parser RunMode +projectLoadingModeParser = + ProjectLoadingMode + <$> (ProjectLoadingOpts + <$> flag False True + ( long "dry-run" + <> help "Perform a dry-run of loading files. Only searches for Haskell source files to load. Does nothing if run as LSP server." + ) + <*> many + ( argument str + ( metavar "FILES..." + <> help "Directories and Filepaths to load. Does nothing if run as LSP server.") + ) + ) + globalOptsParser :: Parser GlobalOpts globalOptsParser = GlobalOpts <$> switch @@ -61,9 +87,6 @@ globalOptsParser = GlobalOpts <> metavar "LOGFILE" <> help "File to log to, defaults to stdout" )) - <*> flag False True - ( long "lsp" - <> help "Start HIE as an LSP server. Otherwise it dumps debug info to stdout") <*> optional (strOption ( long "project-root" <> short 'r' @@ -88,13 +111,9 @@ globalOptsParser = GlobalOpts <*> switch ( long "example" <> help "Enable Example2 plugin. Useful for developers only") - <*> flag False True - ( long "dry-run" - <> help "Perform a dry-run of loading files. Only searches for Haskell source files to load. Does nothing if run as LSP server." - ) - <*> many - ( argument str - ( metavar "FILES..." - <> help "Directories and Filepaths to load. Does nothing if run as LSP server.") - ) - + <*> (flag' LspMode + ( long "lsp" + <> help "Start HIE as an LSP server. Otherwise it dumps debug info to stdout") + <|> + projectLoadingModeParser + ) diff --git a/test/unit/OptionsSpec.hs b/test/unit/OptionsSpec.hs new file mode 100644 index 000000000..ca3862a04 --- /dev/null +++ b/test/unit/OptionsSpec.hs @@ -0,0 +1,70 @@ +module OptionsSpec where + +import Prelude hiding (unzip) +import Data.List.NonEmpty(unzip) +import Test.Hspec +import Options.Applicative +import Haskell.Ide.Engine.Options(GlobalOpts(..), RunMode(..), ProjectLoadingOpts(..), optionParser) +import System.Exit(ExitCode(..)) +import Data.List(isPrefixOf) + +main :: IO () +main = hspec spec + +spec :: Spec +spec = do + let defaultGlobalOptions = GlobalOpts False Nothing Nothing False Nothing False (ProjectLoadingMode $ ProjectLoadingOpts False []) + let getParseFailure (Failure x) = Just (renderFailure x "hie") + getParseFailure _ = Nothing + let sut = optionParser + let parserInfo = info sut mempty + let parserPrefs = prefs mempty + let runSut :: [String] -> ParserResult GlobalOpts + runSut = execParserPure parserPrefs parserInfo + + describe "cmd option parsing" $ do + describe "compiler flag" $ do + let input = ["--compiler"] + let result = runSut input + let (maybeMessage, maybeStatusCode) = unzip $ getParseFailure result + + it "should return ghc version" $ + maybeMessage `shouldSatisfy` any ("ghc" `isPrefixOf`) + it "should return exit code 0" $ + maybeStatusCode `shouldBe` Just ExitSuccess + + describe "numeric version flag" $ do + let input = ["--numeric-version"] + let result = runSut input + let (maybeMessage, maybeStatusCode) = unzip $ getParseFailure result + + it "should return version" $ + maybeMessage `shouldBe` Just "1.1" + it "shoud return exit code 0" $ + maybeStatusCode `shouldBe` Just ExitSuccess + + describe "not providing arguments" $ do + let input = [] + let result = runSut input + let maybeGlobalOptions = getParseResult result + + it "should result in default options" $ + maybeGlobalOptions `shouldBe` Just defaultGlobalOptions + + describe "lsp flag" $ do + let input = ["--lsp"] + let result = runSut input + let maybeGlobalOptions = getParseResult result + + it "should result in default lsp options" $ + maybeGlobalOptions `shouldBe` Just (GlobalOpts False Nothing Nothing False Nothing False LspMode) + + describe "providing two unmatching arguments" $ do + let input = ["--lsp", "--dry-run"] + let result = runSut input + let (maybeMessage, maybeStatusCode) = unzip $ getParseFailure result + + it "should return expected error message" $ + maybeMessage `shouldSatisfy` any ("Invalid option `--dry-run'" `isPrefixOf`) + it "should return error exit code 1" $ + maybeStatusCode `shouldBe` Just (ExitFailure 1) From 1d10408d6e34a974b7e852aa1c84e50ca26f95d8 Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 12 Mar 2020 12:02:35 +0100 Subject: [PATCH 212/270] Fix: haddock for hie-plugin-api --- hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs index ea006174b..cc1e36d1b 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/GhcModuleCache.hs @@ -109,12 +109,12 @@ lookupComponentOptions fp = do lookupInCache :: FilePath -> GhcModuleCache - -- | Called when file is in the current cradle -> (Bios.Cradle CabalHelper -> Bios.ComponentOptions -> a) - -- | Called when file is a member of a cached cradle + -- ^ Called when file is in the current cradle -> (CachedCradle -> a) - -- | Default value to return if a cradle is not found + -- ^ Called when file is a member of a cached cradle -> a + -- ^ Default value to return if a cradle is not found -> a lookupInCache fp gmc cur cached def = case currentCradle gmc of Just (dirs, c, co) | any (`isPrefixOf` fp) dirs -> cur c co From 4b8b573a559308094da5c33665f3e7167de446ba Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 11 Mar 2020 21:03:43 +0100 Subject: [PATCH 213/270] Use sha instead revision for hsimport --- stack-8.4.2.yaml | 2 +- stack-8.4.3.yaml | 2 +- stack-8.4.4.yaml | 2 +- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.1.yaml | 2 +- stack-8.8.2.yaml | 2 +- stack.yaml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index d57e18d53..12e17be77 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -36,7 +36,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@rev1 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - hslogger-1.3.1.0 - invariant-0.5.3 - lens-4.18.1 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 583e49946..081d19ca8 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -42,7 +42,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - hslogger-1.3.1.0 - hspec-2.7.1 - hspec-core-2.7.1 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 37419c663..61dcfbe4f 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -35,7 +35,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - hslogger-1.3.1.0 - invariant-0.5.3 - lens-4.18.1 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index fda00f4fc..fac8d7fe9 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -28,7 +28,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@rev1 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 3f239f7cf..4167d2893 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -31,7 +31,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@rev1 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - indexed-profunctors-0.1 - lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 4c34461ad..66fb02a95 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -26,7 +26,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@rev1 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index bef19da55..bfb79f143 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -31,7 +31,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@rev1 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 diff --git a/stack.yaml b/stack.yaml index f3ef8b777..9d5aca435 100644 --- a/stack.yaml +++ b/stack.yaml @@ -29,7 +29,7 @@ extra-deps: - hie-bios-0.4.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@rev1 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 From a47a876c0b67d513e1622cc6bda25405600918db Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 08:44:24 +0100 Subject: [PATCH 214/270] Fix unit test checking hie version --- haskell-ide-engine.cabal | 1 + test/unit/OptionsSpec.hs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 5f6404e1f..295d1c6d6 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -205,6 +205,7 @@ test-suite unit-test LiquidSpec OptionsSpec PackagePluginSpec + Paths_haskell_ide_engine Spec -- Technically cabal-helper should be a 'run-tool-depends', but that doesn't exist yet build-tool-depends: cabal-helper:cabal-helper-main, hspec-discover:hspec-discover diff --git a/test/unit/OptionsSpec.hs b/test/unit/OptionsSpec.hs index ca3862a04..fcb339948 100644 --- a/test/unit/OptionsSpec.hs +++ b/test/unit/OptionsSpec.hs @@ -2,11 +2,13 @@ module OptionsSpec where import Prelude hiding (unzip) import Data.List.NonEmpty(unzip) +import Data.Version (showVersion) import Test.Hspec import Options.Applicative import Haskell.Ide.Engine.Options(GlobalOpts(..), RunMode(..), ProjectLoadingOpts(..), optionParser) import System.Exit(ExitCode(..)) import Data.List(isPrefixOf) +import Paths_haskell_ide_engine as HIE (version) main :: IO () main = hspec spec @@ -39,7 +41,7 @@ spec = do let (maybeMessage, maybeStatusCode) = unzip $ getParseFailure result it "should return version" $ - maybeMessage `shouldBe` Just "1.1" + maybeMessage `shouldBe` Just (showVersion HIE.version) it "shoud return exit code 0" $ maybeStatusCode `shouldBe` Just ExitSuccess From f5b8118f18ecd026fc99018aeb26a5b7eedda724 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 10:58:25 +0100 Subject: [PATCH 215/270] Use ghc-8.6.5 for macos-installhs-cabal --- .azure/macos-installhs-cabal.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure/macos-installhs-cabal.yml b/.azure/macos-installhs-cabal.yml index 1d0b16013..ac014b7f4 100644 --- a/.azure/macos-installhs-cabal.yml +++ b/.azure/macos-installhs-cabal.yml @@ -21,7 +21,9 @@ jobs: displayName: "Unpack cache" condition: eq(variables.CACHE_RESTORED, 'true') - bash: | - brew install cabal-install + # TODO Install ghc-8.8.3 when adding stack-8.8.3.yaml + brew install ghc@8.6 + brew install cabal-install --ignore-dependencies ghc which cabal which ghc cabal update From b32ff3a56c33514ffeed70387988ba2c179398ec Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 11:48:15 +0100 Subject: [PATCH 216/270] Install ghc-8.6 with homebrew needs manual PATH update --- .azure/macos-installhs-cabal.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure/macos-installhs-cabal.yml b/.azure/macos-installhs-cabal.yml index ac014b7f4..b73b0dbdd 100644 --- a/.azure/macos-installhs-cabal.yml +++ b/.azure/macos-installhs-cabal.yml @@ -29,10 +29,12 @@ jobs: cabal update displayName: Install cabal and ghc - bash: | + export PATH="/usr/local/opt/ghc@8.6/bin:$PATH" source .azure/windows-cabal.bashrc cabal v2-run ./install.hs --project-file $PROJECT_FILE -- help displayName: Run help of `install.hs` - bash: | + export PATH="/usr/local/opt/ghc@8.6/bin:$PATH" source .azure/windows-cabal.bashrc cabal v2-run ./install.hs --project-file $PROJECT_FILE -- latest displayName: Run latest target of `install.hs` From 2bbc536670c0c66cc0d720129bb183f8bfb9eae7 Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 12 Mar 2020 13:47:15 +0100 Subject: [PATCH 217/270] Update hie-plugin-api to use unliftio-core 0.2.0.1 --- cabal.project | 2 -- cabal.project-8.8.2 | 2 -- hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs | 10 ---------- hie-plugin-api/hie-plugin-api.cabal | 1 + stack-8.4.2.yaml | 3 ++- stack-8.4.3.yaml | 3 ++- stack-8.4.4.yaml | 3 ++- stack-8.6.4.yaml | 3 ++- stack-8.6.5.yaml | 2 ++ stack-8.8.1.yaml | 2 ++ stack-8.8.2.yaml | 2 ++ stack.yaml | 2 ++ 12 files changed, 17 insertions(+), 18 deletions(-) diff --git a/cabal.project b/cabal.project index 5cda0668c..5d9fd6002 100644 --- a/cabal.project +++ b/cabal.project @@ -16,8 +16,6 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: - -- to avoid temporary a breaking change: https://github.com/haskell/haskell-ide-engine/issues/1680 - unliftio-core < 0.2.0.0, haskell-ide-engine +pedantic, hie-plugin-api +pedantic diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 index 4b061f363..b374ee657 100644 --- a/cabal.project-8.8.2 +++ b/cabal.project-8.8.2 @@ -24,8 +24,6 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: - -- to avoid temporary a breaking change: https://github.com/haskell/haskell-ide-engine/issues/1680 - unliftio-core < 0.2.0.0, haskell-ide-engine +pedantic, hie-plugin-api +pedantic diff --git a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs index 78b33c42e..e43bb37fb 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/PluginsIdeMonads.hs @@ -585,11 +585,6 @@ instance MonadTrans GhcT where instance MonadUnliftIO Ghc where - {-# INLINE askUnliftIO #-} - askUnliftIO = Ghc $ \s -> - withUnliftIO $ \u -> - return (UnliftIO (unliftIO u . flip unGhc s)) - {-# INLINE withRunInIO #-} withRunInIO inner = Ghc $ \s -> @@ -597,11 +592,6 @@ instance MonadUnliftIO Ghc where inner (run . flip unGhc s) instance MonadUnliftIO (GhcT IdeM) where - {-# INLINE askUnliftIO #-} - askUnliftIO = GhcT $ \s -> - withUnliftIO $ \u -> - return (UnliftIO (unliftIO u . flip unGhcT s)) - {-# INLINE withRunInIO #-} withRunInIO inner = GhcT $ \s -> diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index 2c2608e38..ded2caf83 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -57,6 +57,7 @@ library , haskell-lsp == 0.20.* , hslogger , unliftio + , unliftio-core ^>= 0.2.0.1 , monad-control , mtl , process diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 12e17be77..400196cd0 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -55,7 +55,8 @@ extra-deps: - syz-0.2.0.0 - type-equality-1 - unix-compat-0.5.2 -- unliftio-0.2.12 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 - th-abstraction-0.3.1.0 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 081d19ca8..94cb3f808 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -74,7 +74,8 @@ extra-deps: - topograph-1 - type-equality-1 - unix-compat-0.5.2 -- unliftio-0.2.12 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 - unordered-containers-0.2.10.0 - vector-0.12.1.2 - yaml-0.11.2.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 61dcfbe4f..21a501e7c 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -54,7 +54,8 @@ extra-deps: - socks-0.6.1 # for network and network-bsd - syz-0.2.0.0 - unix-compat-0.5.2 -- unliftio-0.2.12 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 - th-abstraction-0.3.1.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index fac8d7fe9..f285f5d79 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -40,7 +40,8 @@ extra-deps: - temporary-1.2.1.1 - time-compat-1.9.2.2 - unix-compat-0.5.2 -- unliftio-0.2.12 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 - unordered-containers-0.2.10.0 - yaml-0.11.2.0 # To make build work in windows 7 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 4167d2893..eddcd6528 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -42,6 +42,8 @@ extra-deps: - semialign-1.1 - temporary-1.2.1.1 - topograph-1 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 flags: haskell-ide-engine: diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 66fb02a95..6fe0ac0fc 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -32,6 +32,8 @@ extra-deps: - ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 flags: haskell-ide-engine: diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index bfb79f143..69e034580 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -37,6 +37,8 @@ extra-deps: - ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 flags: haskell-ide-engine: diff --git a/stack.yaml b/stack.yaml index 9d5aca435..dce98d9f4 100644 --- a/stack.yaml +++ b/stack.yaml @@ -35,6 +35,8 @@ extra-deps: - ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 +- unliftio-0.2.12.1 +- unliftio-core-0.2.0.1 flags: haskell-ide-engine: From 6bd219d0ef76e3252df3baa147815bd3ed8baeb7 Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 12 Mar 2020 17:18:41 +0100 Subject: [PATCH 218/270] Bump minimum version of resourcet for stack files --- stack-8.4.2.yaml | 1 + stack-8.4.3.yaml | 1 + stack-8.4.4.yaml | 1 + stack-8.6.4.yaml | 1 + stack-8.6.5.yaml | 1 + stack-8.8.1.yaml | 1 + stack-8.8.2.yaml | 1 + stack.yaml | 1 + 8 files changed, 8 insertions(+) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 400196cd0..77a3c6b00 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -49,6 +49,7 @@ extra-deps: - parser-combinators-1.2.1 - profunctors-5.5.1 - pretty-show-1.8.2 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 94cb3f808..e95b4c6ce 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -61,6 +61,7 @@ extra-deps: - parser-combinators-1.2.1 - profunctors-5.5.1 - quickcheck-instances-0.3.22 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - rope-utf16-splay-0.3.1.0 - semialign-1.1 - semigroupoids-5.3.4 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 21a501e7c..49f451cef 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -49,6 +49,7 @@ extra-deps: - parser-combinators-1.2.1 - pretty-show-1.9.5 - profunctors-5.5.1 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - rope-utf16-splay-0.3.1.0 - simple-sendfile-0.2.30 # for network and network-bsd - socks-0.6.1 # for network and network-bsd diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index f285f5d79..7ee969612 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -35,6 +35,7 @@ extra-deps: - multistate-0.8.0.1 - ormolu-0.0.3.1 - parser-combinators-1.2.1 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index eddcd6528..598a810d1 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -39,6 +39,7 @@ extra-deps: - optparse-applicative-0.15.1.0 - ormolu-0.0.3.1 - parser-combinators-1.2.1 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - semialign-1.1 - temporary-1.2.1.1 - topograph-1 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 6fe0ac0fc..8d1bb6c89 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -30,6 +30,7 @@ extra-deps: - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - semigroups-0.18.5 - temporary-1.2.1.1 - unliftio-0.2.12.1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 69e034580..ab1f55293 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -35,6 +35,7 @@ extra-deps: - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - semigroups-0.18.5 - temporary-1.2.1.1 - unliftio-0.2.12.1 diff --git a/stack.yaml b/stack.yaml index dce98d9f4..85421ce64 100644 --- a/stack.yaml +++ b/stack.yaml @@ -33,6 +33,7 @@ extra-deps: - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 +- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - semigroups-0.18.5 - temporary-1.2.1.1 - unliftio-0.2.12.1 From 134035c0e593ccc0cd78201e8c2bdd432da01eb8 Mon Sep 17 00:00:00 2001 From: Pawel Szulc Date: Sun, 26 Jan 2020 12:20:56 +0000 Subject: [PATCH 219/270] Extend FormatSpec with a data types Show how different formatters are formatting code with a data type definition --- test/functional/FormatSpec.hs | 29 ++++++++++++++++++----------- test/testdata/Format.hs | 4 +++- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index bbb8052cd..25533b670 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -95,7 +95,7 @@ spec = do describe "ormolu" $ do let formatLspConfig provider = object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] - + it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu")) doc <- openDoc "Format.hs" "haskell" @@ -117,7 +117,8 @@ formattedDocTabSize2 = \bar :: String -> IO String\n\ \bar s = do\n\ \ x <- return \"hello\"\n\ - \ return \"asdf\"\n\n" + \ return \"asdf\"\n\n\ + \data Baz = Baz { a :: Int, b :: String }\n\n" formattedDocTabSize5 :: T.Text formattedDocTabSize5 = @@ -128,7 +129,8 @@ formattedDocTabSize5 = \bar :: String -> IO String\n\ \bar s = do\n\ \ x <- return \"hello\"\n\ - \ return \"asdf\"\n\n" + \ return \"asdf\"\n\n\ + \data Baz = Baz { a :: Int, b :: String }\n\n" formattedRangeTabSize2 :: T.Text formattedRangeTabSize2 = @@ -140,7 +142,8 @@ formattedRangeTabSize2 = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n\ - \ \n" + \\n\ + \data Baz = Baz { a :: Int, b :: String }\n\n" formattedRangeTabSize5 :: T.Text formattedRangeTabSize5 = @@ -152,7 +155,8 @@ formattedRangeTabSize5 = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n\ - \ \n" + \\n\ + \data Baz = Baz { a :: Int, b :: String }\n\n" formattedFloskell :: T.Text formattedFloskell = @@ -166,7 +170,7 @@ formattedFloskell = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n\n\ - \" + \data Baz = Baz { a :: Int, b :: String }\n\n" formattedBrittanyPostFloskell :: T.Text formattedBrittanyPostFloskell = @@ -179,7 +183,8 @@ formattedBrittanyPostFloskell = \bar :: String -> IO String\n\ \bar s = do\n\ \ x <- return \"hello\"\n\ - \ return \"asdf\"\n\n" + \ return \"asdf\"\n\n\ + \data Baz = Baz { a :: Int, b :: String }\n\n" formattedOrmolu :: T.Text formattedOrmolu = @@ -192,10 +197,11 @@ formattedOrmolu = \bar :: String -> IO String\n\ \bar s = do\n\ \ x <- return \"hello\"\n\ - \ return \"asdf\"\n" - + \ return \"asdf\"\n\n\ + \data Baz = Baz {a :: Int, b :: String}\n" + unchangedOrmolu :: T.Text -unchangedOrmolu = +unchangedOrmolu = "module Format where\n\ \foo :: Int -> Int\n\ \foo 3 = 2\n\ @@ -204,4 +210,5 @@ unchangedOrmolu = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n\ - \ \n" + \ \n\ + \data Baz = Baz { a :: Int, b :: String }\n\n" diff --git a/test/testdata/Format.hs b/test/testdata/Format.hs index 76e40c981..d4682acaa 100644 --- a/test/testdata/Format.hs +++ b/test/testdata/Format.hs @@ -6,4 +6,6 @@ bar :: String -> IO String bar s = do x <- return "hello" return "asdf" - + +data Baz = Baz { a :: Int, b :: String } + From d2b3237419694e07e45c4c77b86f96809effcf2c Mon Sep 17 00:00:00 2001 From: fendor Date: Thu, 12 Mar 2020 23:08:27 +0100 Subject: [PATCH 220/270] Remove unused spaces --- test/functional/FormatSpec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 25533b670..6afa5dce3 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -210,5 +210,5 @@ unchangedOrmolu = \bar s = do\n\ \ x <- return \"hello\"\n\ \ return \"asdf\"\n\ - \ \n\ + \\n\ \data Baz = Baz { a :: Int, b :: String }\n\n" From 35f62cffb6bae6c3f86113cb0c55f52b7192689d Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Sat, 14 Mar 2020 15:29:54 +0800 Subject: [PATCH 221/270] HsImport: Return codeactions importing from Internal modules last Fixes #1702 --- src/Haskell/Ide/Engine/Plugin/HsImport.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Haskell/Ide/Engine/Plugin/HsImport.hs b/src/Haskell/Ide/Engine/Plugin/HsImport.hs index 1a2253c26..cc061e9c7 100644 --- a/src/Haskell/Ide/Engine/Plugin/HsImport.hs +++ b/src/Haskell/Ide/Engine/Plugin/HsImport.hs @@ -13,6 +13,7 @@ import Control.Monad.IO.Class import Control.Monad import Data.Aeson import Data.Foldable +import Data.List ( partition ) import Data.Maybe #if __GLASGOW_HASKELL__ < 808 import Data.Monoid ( (<>) ) @@ -294,12 +295,18 @@ codeActionProvider plId docId _ context = do -- Diagnostic that is supposed to import the appropriate term. -- -- Result may produce several import actions, or none. + -- + -- Actions which import from a module whose name components contain + -- 'Internal' are returned last for each diagnostic. importActionsForTerms :: SearchStyle -> [ImportDiagnostic] -> IdeM [J.CodeAction] importActionsForTerms style importDiagnostics = do let searchTerms = map (applySearchStyle style . term) importDiagnostics searchResults <- mapM Hoogle.searchModules' searchTerms - let importTerms = zip searchResults importDiagnostics + let deprioritizeInternal = uncurry (++) + . partition (("Internal" `notElem`) . T.splitOn "." . fst) + prioritizedSearchResults = deprioritizeInternal <$> searchResults + importTerms = zip prioritizedSearchResults importDiagnostics concat <$> mapM (uncurry (termToActions style)) importTerms -- | Apply the search style to given term. From 144351b6e4fc0d7022e87ca8c99431fad810f17c Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 28 Mar 2020 21:22:36 +0100 Subject: [PATCH 222/270] Make install script use unix-time-0.4.7 --- install/shake.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/install/shake.yaml b/install/shake.yaml index 17b5d4abc..629cd0d81 100644 --- a/install/shake.yaml +++ b/install/shake.yaml @@ -13,6 +13,7 @@ extra-deps: - shake-0.18.5 # for resolvers with ghc < 8.6 # - shake-0.17 +- unix-time-0.4.7 nix: From d9697bd9f4f2c5441899f472fc9b0f371fdd2b33 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Mon, 6 Apr 2020 16:00:54 +0530 Subject: [PATCH 223/270] Haddock source file names may use either dot or dash as separator --- src/Haskell/Ide/Engine/Plugin/Haddock.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Haddock.hs b/src/Haskell/Ide/Engine/Plugin/Haddock.hs index 1c1daef57..b12e4cc57 100644 --- a/src/Haskell/Ide/Engine/Plugin/Haddock.hs +++ b/src/Haskell/Ide/Engine/Plugin/Haddock.hs @@ -63,14 +63,15 @@ lookupSrcHtmlForModule = lookupHtmlForModule :: (FilePath -> FilePath -> FilePath) -> DynFlags -> Module -> IO (Maybe FilePath) lookupHtmlForModule mkDocPath df m = do - let mfp = go <$> (listToMaybe =<< lookupHtmls df ui) - exists <- maybe (pure False) doesFileExist mfp - return $ if exists then mfp else Nothing + let mfs = go <$> (listToMaybe =<< lookupHtmls df ui) + htmls <- filterM doesFileExist (concat . maybeToList $ mfs) + return $ listToMaybe htmls where - go pkgDocDir = mkDocPath pkgDocDir mn + -- The file might use "." or "-" as separator + go pkgDocDir = [mkDocPath pkgDocDir mn | mn <- [mndot,mndash]] ui = moduleUnitId m - mn = map (\x -> if x == '.' then '-' else x) mns - mns = moduleNameString $ moduleName m + mndash = map (\x -> if x == '.' then '-' else x) mndot + mndot = moduleNameString $ moduleName m nameCacheFromGhcMonad :: GhcMonad m => NameCacheAccessor m nameCacheFromGhcMonad = ( read_from_session , write_to_session ) From c8ed3e5680f0f0eca106eeb1c368831bad080bd8 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Mon, 6 Apr 2020 21:32:12 +0100 Subject: [PATCH 224/270] Bump resolvers --- stack-8.8.2.yaml | 2 +- stack.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index ab1f55293..6f9ec1275 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -1,4 +1,4 @@ -resolver: lts-15.2 +resolver: lts-15.3 # Last 8.8.2 packages: - . - hie-plugin-api diff --git a/stack.yaml b/stack.yaml index 85421ce64..fafce0ef8 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-03-01 +resolver: nightly-2020-03-09 # Last GHC 8.8.2 packages: - . - hie-plugin-api From 1d7fd9a9ac09e64c8b009ebe6f77692fb7ef61c7 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Mon, 6 Apr 2020 22:19:49 +0100 Subject: [PATCH 225/270] Use haddock-api-2.23.1 now it is (finally) published --- cabal.project | 2 +- cabal.project-8.8.2 | 32 -------------------------------- stack-8.8.2.yaml | 8 +------- stack.yaml | 6 +----- 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 cabal.project-8.8.2 diff --git a/cabal.project b/cabal.project index 5d9fd6002..39d508a1a 100644 --- a/cabal.project +++ b/cabal.project @@ -21,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-03-03T21:13:56Z \ No newline at end of file +index-state: 2020-04-06T20:27:36Z diff --git a/cabal.project-8.8.2 b/cabal.project-8.8.2 deleted file mode 100644 index b374ee657..000000000 --- a/cabal.project-8.8.2 +++ /dev/null @@ -1,32 +0,0 @@ -packages: - ./ - ./hie-plugin-api/ - - -- ./submodules/HaRe - --- To avoid build error with ghc-8.8.2 --- See https://github.com/haskell/haddock/issues/1123 -source-repository-package - type: git - location: https://github.com/haskell/haddock.git - subdir: haddock-api - tag: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 - -source-repository-package - type: git - location: https://github.com/jneira/cabal-helper.git - tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - -tests: true - -package haskell-ide-engine - test-show-details: direct - --- Match the flag settings we use in stac builds -constraints: - haskell-ide-engine +pedantic, - hie-plugin-api +pedantic - -write-ghc-environment-files: never - -index-state: 2020-03-03T21:13:56Z diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 6f9ec1275..0c82609af 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -17,13 +17,7 @@ extra-deps: - floskell-0.10.2 - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -# To avoid build error with ghc-8.8.2 -# See https://github.com/haskell/haddock/issues/1123 -- git: https://github.com/haskell/haddock.git - commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 - subdirs: - - haddock-api -# - haddock-api-2.23.0 +- haddock-api-2.23.1 - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 diff --git a/stack.yaml b/stack.yaml index fafce0ef8..a5d850083 100644 --- a/stack.yaml +++ b/stack.yaml @@ -17,11 +17,7 @@ extra-deps: - floskell-0.10.2 - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -# - haddock-api-2.23.0 -- git: https://github.com/haskell/haddock.git - commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 - subdirs: - - haddock-api +- haddock-api-2.23.1 - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 From 76ed58ae448df141db27c54b4e181007d59fcfa2 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Mon, 6 Apr 2020 22:30:04 +0100 Subject: [PATCH 226/270] Use current cabal-helper master --- cabal.project | 4 ++-- stack-8.4.2.yaml | 4 ++-- stack-8.4.3.yaml | 4 ++-- stack-8.4.4.yaml | 4 ++-- stack-8.6.4.yaml | 4 ++-- stack-8.6.5.yaml | 4 ++-- stack-8.8.1.yaml | 4 ++-- stack-8.8.2.yaml | 4 ++-- stack.yaml | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/cabal.project b/cabal.project index 39d508a1a..d23dce890 100644 --- a/cabal.project +++ b/cabal.project @@ -6,8 +6,8 @@ packages: source-repository-package type: git - location: https://github.com/jneira/cabal-helper.git - tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 + location: https://github.com/DanielG/cabal-helper.git + tag: a18bbb2af92e9b4337e7f930cb80754f2408bcfd tests: true diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 77a3c6b00..a23b7191c 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -14,8 +14,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index e95b4c6ce..213304fc5 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -19,8 +19,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - cabal-plan-0.6.2.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 49f451cef..63494f6c2 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -13,8 +13,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 7ee969612..e1a011db6 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -12,8 +12,8 @@ extra-deps: - butcher-1.3.2.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 - extra-1.6.21 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 598a810d1..b8bf410cc 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -14,8 +14,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - cabal-plan-0.6.2.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml index 8d1bb6c89..63215b320 100644 --- a/stack-8.8.1.yaml +++ b/stack-8.8.1.yaml @@ -11,8 +11,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - clock-0.7.2 - constrained-dynamic-0.1.0.0 - extra-1.6.21 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 0c82609af..1cc09d18c 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -10,8 +10,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/stack.yaml b/stack.yaml index a5d850083..dc95ce7a0 100644 --- a/stack.yaml +++ b/stack.yaml @@ -10,8 +10,8 @@ extra-deps: - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 From ac6495877bffdae2784e7ca445f3664a12ec41b5 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Tue, 7 Apr 2020 20:07:16 +0100 Subject: [PATCH 227/270] Prepare version 1.3 --- Changelog.md | 42 ++++++++++++++++++++++++++++- haskell-ide-engine.cabal | 4 +-- hie-plugin-api/hie-plugin-api.cabal | 2 +- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/Changelog.md b/Changelog.md index 5ffa1d0cf..e90ba3637 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,4 +1,44 @@ -# 1.2 +## 1.3 + +NOTE: haskell-ide-engine is in transition, the new home for it will be +[haskell-language-server](https://github.com/haskell/haskell-language-server), +which does not currently have feature parity with `hie`. In particular +it does not support multi-cradles, so can only open a single component +of a project, as configured into its `hie.yaml` file. + +Once that hurdle is crossed, the main emphasis will be there, and +`hie` will eventually be deprecated. + +## In this version + +- cabal now index state 2020-04-06T20:27:36Z +- GHC 8.8.2 is lts-15.3 + +## Changes + +- Make install script use unix-time-0.4.7 +([#1715](https://github.com/haskell/haskell-ide-engine/pull/1715) by @jneira) +- HsImport: Return codeactions importing from Internal modules last +([#1703](https://github.com/haskell/haskell-ide-engine/pull/1703) by @expipiplus1) +- Extend FormatSpec with a data types +([#1605](https://github.com/haskell/haskell-ide-engine/pull/1605) by @EncodePanda) +- Update hie-plugin-api to use unliftio-core 0.2.0.1 +([#1698](https://github.com/haskell/haskell-ide-engine/pull/1698) by @fendor) +- Use sha instead revision for hsimport and other fixes +([#1694](https://github.com/haskell/haskell-ide-engine/pull/1694) by @jneira) +- Fix: haddock for hie-plugin-api +([#1696](https://github.com/haskell/haskell-ide-engine/pull/1696) by @fendor) +- Fix #1578 - Redesign option parsing for main executable +([#1671](https://github.com/haskell/haskell-ide-engine/pull/1671) by @gdziadkiewicz) +- Report progress as a percentage +([#1692](https://github.com/haskell/haskell-ide-engine/pull/1692) by @expipiplus1) +- Correct pull request url and formatting in the changelog +([#1684](https://github.com/haskell/haskell-ide-engine/pull/1684) by @jneira) +- Fix typos in README. Add hint to speed up HIE compilation +([#1685](https://github.com/haskell/haskell-ide-engine/pull/1685) by @mb720) + + +## 1.2 NOTE: haskell-ide-engine is in transition, the new home for it will be [haskell-language-server](https://github.com/haskell/haskell-language-server), diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 295d1c6d6..c1d2d9567 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -1,5 +1,5 @@ name: haskell-ide-engine -version: 1.2 +version: 1.3 synopsis: Provide a common engine to power any Haskell IDE description: Please see README.md homepage: http://github.com/githubuser/haskell-ide-engine#readme @@ -76,7 +76,7 @@ library , haskell-lsp == 0.20.* , haskell-lsp-types == 0.20.* , haskell-src-exts >= 1.22 - , hie-plugin-api >= 1.2 + , hie-plugin-api >= 1.3 , hoogle >= 5.0.13 , hsimport , hslogger diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index ded2caf83..dfdf68cb8 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -1,5 +1,5 @@ name: hie-plugin-api -version: 1.2 +version: 1.3 synopsis: Haskell IDE API for plugin communication description: Please see README.md license: BSD3 From 8ff9c673d426c898123cbd63ce50952aea4a313a Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 27 Feb 2020 09:12:53 +0100 Subject: [PATCH 228/270] Add cabal.project for ghc-8.8.3 --- cabal.project-8.8.3 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 cabal.project-8.8.3 diff --git a/cabal.project-8.8.3 b/cabal.project-8.8.3 new file mode 100644 index 000000000..fee4bce9b --- /dev/null +++ b/cabal.project-8.8.3 @@ -0,0 +1,32 @@ +packages: + ./ + ./hie-plugin-api/ + + -- ./submodules/HaRe + +-- To avoid build error with ghc-8.8.2 +-- See https://github.com/haskell/haddock/issues/1123 +source-repository-package + type: git + location: https://github.com/haskell/haddock.git + subdir: haddock-api + tag: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 + +source-repository-package + type: git + location: https://github.com/jneira/cabal-helper.git + tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 + +tests: true + +package haskell-ide-engine + test-show-details: direct + +-- Match the flag settings we use in stac builds +constraints: + haskell-ide-engine +pedantic + hie-plugin-api +pedantic + +write-ghc-environment-files: never + +index-state: 2020-02-24T08:44:25Z From 73f20027539334f605c3c823fa178ee5fefca8ae Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 27 Feb 2020 09:13:27 +0100 Subject: [PATCH 229/270] Add ghc-8.8.3 to the matrix of cabal jobs --- .azure/linux-cabal.yml | 2 ++ .azure/windows-cabal.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.azure/linux-cabal.yml b/.azure/linux-cabal.yml index 362c8585f..5d7dc0524 100644 --- a/.azure/linux-cabal.yml +++ b/.azure/linux-cabal.yml @@ -5,6 +5,8 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: + ghc-8.8.3: + GHC_VERSION: "8.8.3" ghc-8.8.2: GHC_VERSION: "8.8.2" ghc-8.6.5: diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index bf4e9b9ab..42ddd038f 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -7,8 +7,8 @@ jobs: matrix: # ghc versions 8.8.1 and 8.8.2 are not usable in windows # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 - # ghc-8.8.2: - # GHC_VERSION: "8.8.2" + ghc-8.8.3: + GHC_VERSION: "8.8.3" ghc-8.6.5: GHC_VERSION: "8.6.5" ghc-8.4.4: From 5fd1ed5040e1e0367ec881a2a3470b451eb44ce5 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 10:28:10 +0100 Subject: [PATCH 230/270] Add stack-8.8.3.yaml --- stack-8.8.3.yaml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 stack-8.8.3.yaml diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml new file mode 100644 index 000000000..0fa785af6 --- /dev/null +++ b/stack-8.8.3.yaml @@ -0,0 +1,42 @@ +resolver: nightly-2020-03-12 +packages: +- . +- hie-plugin-api + +extra-deps: +# - ./submodules/HaRe + +- apply-refact-0.7.0.0 +- bytestring-trie-0.2.5.0 +# - cabal-helper-1.0.0.0 +- github: jneira/cabal-helper + commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- clock-0.7.2 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.2 +# To avoid build error with ghc-8.8.2 +# See https://github.com/haskell/haddock/issues/1123 +- git: https://github.com/haskell/haddock.git + commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 + subdirs: + - haddock-api +# - haddock-api-2.23.0 +- hoogle-5.0.17.15 +- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- ilist-0.3.1.0 +- monad-dijkstra-0.1.1.2 +- semigroups-0.18.5 +- temporary-1.2.1.1 + +flags: + haskell-ide-engine: + pedantic: true + hie-plugin-api: + pedantic: true + +# allow-newer: true + +nix: + packages: [ icu libcxx zlib ] + +concurrent-tests: false From 7d71a48c4527bf8d9503d7435f8c501c4d5c362c Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 10:33:55 +0100 Subject: [PATCH 231/270] Add ghc-8.8.3 to ci --- .azure/linux-stack.yml | 2 ++ .azure/macos-stack.yml | 2 ++ .azure/windows-stack.yml | 2 ++ .circleci/config.yml | 5 +++++ 4 files changed, 11 insertions(+) diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index d437dfe82..67a4c0b4a 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.3: + YAML_FILE: stack-8.8.3.yaml stack-8.8.2: YAML_FILE: stack-8.8.2.yaml stack-8.8.1: diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index fad15c141..f5a82d1a9 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -7,6 +7,8 @@ jobs: matrix: stack-def: YAML_FILE: stack.yaml + stack-8.8.3: + YAML_FILE: stack-8.8.3.yaml stack-8.8.2: YAML_FILE: stack-8.8.2.yaml stack-8.8.1: diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index e3ed26766..e6d350a91 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -9,6 +9,8 @@ jobs: # TODO: Enable it when it uses ghc-8.8.3 # stack-def: # YAML_FILE: stack.yaml + stack-8.8.3: + YAML_FILE: stack-8.8.3.yaml # ghc versions 8.8.1 and 8.8.2 are not usable in windows # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 stack-8.6.5: diff --git a/.circleci/config.yml b/.circleci/config.yml index 6570a80e9..275fc2c9d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,6 +136,11 @@ jobs: - STACK_FILE: "stack-8.8.2.yaml" <<: *defaults + ghc-8.8.3: + environment: + - STACK_FILE: "stack-8.8.3.yaml" + <<: *defaults + ghc-nightly: environment: - STACK_FILE: "stack.yaml" From 41deffa992977a33ee8332aa7288d4c04b906702 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 10:36:34 +0100 Subject: [PATCH 232/270] Update index state to use hsimport rev --- cabal.project-8.8.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project-8.8.3 b/cabal.project-8.8.3 index fee4bce9b..cffb5319f 100644 --- a/cabal.project-8.8.3 +++ b/cabal.project-8.8.3 @@ -29,4 +29,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-02-24T08:44:25Z +index-state: 2020-03-03T21:13:56Z From 07d603368b8cac558dcc6ff8a1f04d5ad363c11e Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 10:39:31 +0100 Subject: [PATCH 233/270] Remove ghc-8.8.1 (version without lts) --- .azure/linux-stack.yml | 2 -- .azure/macos-stack.yml | 2 -- .circleci/config.yml | 5 ----- stack-8.8.1.yaml | 50 ------------------------------------------ 4 files changed, 59 deletions(-) delete mode 100644 stack-8.8.1.yaml diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index 67a4c0b4a..f69f85d95 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -11,8 +11,6 @@ jobs: YAML_FILE: stack-8.8.3.yaml stack-8.8.2: YAML_FILE: stack-8.8.2.yaml - stack-8.8.1: - YAML_FILE: stack-8.8.1.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: diff --git a/.azure/macos-stack.yml b/.azure/macos-stack.yml index f5a82d1a9..68729b44b 100644 --- a/.azure/macos-stack.yml +++ b/.azure/macos-stack.yml @@ -11,8 +11,6 @@ jobs: YAML_FILE: stack-8.8.3.yaml stack-8.8.2: YAML_FILE: stack-8.8.2.yaml - stack-8.8.1: - YAML_FILE: stack-8.8.1.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: diff --git a/.circleci/config.yml b/.circleci/config.yml index 275fc2c9d..a07341824 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,11 +126,6 @@ jobs: - STACK_FILE: "stack-8.6.5.yaml" <<: *defaults - ghc-8.8.1: - environment: - - STACK_FILE: "stack-8.8.1.yaml" - <<: *defaults - ghc-8.8.2: environment: - STACK_FILE: "stack-8.8.2.yaml" diff --git a/stack-8.8.1.yaml b/stack-8.8.1.yaml deleted file mode 100644 index 63215b320..000000000 --- a/stack-8.8.1.yaml +++ /dev/null @@ -1,50 +0,0 @@ -resolver: nightly-2020-01-21 # last GHC 8.8.1 -packages: -- . -- hie-plugin-api - -extra-deps: -# - ./submodules/HaRe - -- aeson-1.4.6.0 -- apply-refact-0.7.0.0 -- brittany-0.12.1.1 -- bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd -- clock-0.7.2 -- constrained-dynamic-0.1.0.0 -- extra-1.6.21 -- floskell-0.10.2 -- ghc-lib-parser-ex-8.8.5.3 -- haddock-api-2.23.0 -- haddock-library-1.8.0 -- haskell-lsp-0.20.0.0 -- haskell-lsp-types-0.20.0.0 -- lsp-test-0.10.1.0 -- hie-bios-0.4.0 -- hlint-2.2.11 -- hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 -- ilist-0.3.1.0 -- monad-dijkstra-0.1.1.2 -- ormolu-0.0.3.1 -- resourcet-1.2.3 # forced by unliftio-core >= 0.2 -- semigroups-0.18.5 -- temporary-1.2.1.1 -- unliftio-0.2.12.1 -- unliftio-core-0.2.0.1 - -flags: - haskell-ide-engine: - pedantic: true - hie-plugin-api: - pedantic: true - -# allow-newer: true - -nix: - packages: [ icu libcxx zlib ] - -concurrent-tests: false From 68a57bb61c25c3fcbbc6b4e52b4a2fc9edc64ef1 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 11:12:34 +0100 Subject: [PATCH 234/270] Avoid unlift-core-0.2.0.0 --- cabal.project-8.8.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cabal.project-8.8.3 b/cabal.project-8.8.3 index cffb5319f..4b061f363 100644 --- a/cabal.project-8.8.3 +++ b/cabal.project-8.8.3 @@ -24,7 +24,9 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: - haskell-ide-engine +pedantic + -- to avoid temporary a breaking change: https://github.com/haskell/haskell-ide-engine/issues/1680 + unliftio-core < 0.2.0.0, + haskell-ide-engine +pedantic, hie-plugin-api +pedantic write-ghc-environment-files: never From 9ec87df18e3d07ceee61905461db4aa0d8679a17 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 11:39:55 +0100 Subject: [PATCH 235/270] Use ghc-8.8.3 for macos-installhs-cabal --- .azure/macos-installhs-cabal.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.azure/macos-installhs-cabal.yml b/.azure/macos-installhs-cabal.yml index b73b0dbdd..735d7fdc0 100644 --- a/.azure/macos-installhs-cabal.yml +++ b/.azure/macos-installhs-cabal.yml @@ -21,8 +21,7 @@ jobs: displayName: "Unpack cache" condition: eq(variables.CACHE_RESTORED, 'true') - bash: | - # TODO Install ghc-8.8.3 when adding stack-8.8.3.yaml - brew install ghc@8.6 + brew install ghc@8.8 brew install cabal-install --ignore-dependencies ghc which cabal which ghc From 8e7739498eed12174a9acb2334ebac9e47f52121 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 12 Mar 2020 13:48:52 +0100 Subject: [PATCH 236/270] Change ghc-8.8.1 -> ghc-8.8.3 in circle ci config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a07341824..d468859ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -181,7 +181,7 @@ workflows: - ghc-8.4.4 - ghc-8.6.4 - ghc-8.6.5 - - ghc-8.8.1 - ghc-8.8.2 + - ghc-8.8.3 - ghc-nightly - cabal From 0bdf8ccd9cfffff74bb2d3eb1950856ee1abed02 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 22 Mar 2020 22:55:32 +0100 Subject: [PATCH 237/270] Update ghc-8.8.3 stackage resolvers --- stack-8.8.3.yaml | 7 +++---- stack.yaml | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 0fa785af6..66afc0091 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-03-12 +resolver: lts-15.4 packages: - . - hie-plugin-api @@ -7,7 +7,7 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 -- bytestring-trie-0.2.5.0 +- bytestring-trie-0.2.5.0@rev1 # - cabal-helper-1.0.0.0 - github: jneira/cabal-helper commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 @@ -27,6 +27,7 @@ extra-deps: - monad-dijkstra-0.1.1.2 - semigroups-0.18.5 - temporary-1.2.1.1 +- unliftio-core-0.2.0.1 flags: haskell-ide-engine: @@ -34,8 +35,6 @@ flags: hie-plugin-api: pedantic: true -# allow-newer: true - nix: packages: [ icu libcxx zlib ] diff --git a/stack.yaml b/stack.yaml index dc95ce7a0..d4062253c 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,5 @@ -resolver: nightly-2020-03-09 # Last GHC 8.8.2 +resolver: nightly-2020-03-18 + packages: - . - hie-plugin-api @@ -7,14 +8,14 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 -- brittany-0.12.1.1 -- bytestring-trie-0.2.5.0 +- bytestring-trie-0.2.5.0@sha256:9efa9c6f556314d28486be2470ff789419c5238ed2e354870623a3cbbd28fbe2,3349 # - cabal-helper-1.0.0.0 - github: DanielG/cabal-helper commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 +<<<<<<< HEAD - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.23.1 @@ -24,15 +25,21 @@ extra-deps: - lsp-test-0.10.1.0 - hie-bios-0.4.0 - hlint-2.2.11 +======= +# To avoid build error with ghc-8.8.2 +# See https://github.com/haskell/haddock/issues/1123 +- git: https://github.com/haskell/haddock.git + commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 + subdirs: + - haddock-api +# - haddock-api-2.23.0 +>>>>>>> a8e55590... Update ghc-8.8.3 stackage resolvers - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 -- ormolu-0.0.3.1 -- resourcet-1.2.3 # forced by unliftio-core >= 0.2 - semigroups-0.18.5 - temporary-1.2.1.1 -- unliftio-0.2.12.1 - unliftio-core-0.2.0.1 flags: @@ -41,8 +48,6 @@ flags: hie-plugin-api: pedantic: true -# allow-newer: true - nix: packages: [ icu libcxx zlib ] From 5465d913caa8a367afe334de890e5c48a03a2664 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 5 Apr 2020 22:40:28 +0200 Subject: [PATCH 238/270] Use last versions of haddock and unlift-io-core --- cabal.project-8.8.3 | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cabal.project-8.8.3 b/cabal.project-8.8.3 index 4b061f363..f10624e9f 100644 --- a/cabal.project-8.8.3 +++ b/cabal.project-8.8.3 @@ -4,14 +4,6 @@ packages: -- ./submodules/HaRe --- To avoid build error with ghc-8.8.2 --- See https://github.com/haskell/haddock/issues/1123 -source-repository-package - type: git - location: https://github.com/haskell/haddock.git - subdir: haddock-api - tag: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 - source-repository-package type: git location: https://github.com/jneira/cabal-helper.git @@ -24,8 +16,6 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: - -- to avoid temporary a breaking change: https://github.com/haskell/haskell-ide-engine/issues/1680 - unliftio-core < 0.2.0.0, haskell-ide-engine +pedantic, hie-plugin-api +pedantic From 385ee03b3a9fa3c73388bcf6ef39eee0d81031a9 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 6 Apr 2020 00:08:08 +0200 Subject: [PATCH 239/270] Update index-state to latest --- cabal.project-8.8.3 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cabal.project-8.8.3 b/cabal.project-8.8.3 index f10624e9f..a0eb21d08 100644 --- a/cabal.project-8.8.3 +++ b/cabal.project-8.8.3 @@ -4,6 +4,8 @@ packages: -- ./submodules/HaRe +with-compiler: ghc-8.8.3 + source-repository-package type: git location: https://github.com/jneira/cabal-helper.git @@ -21,4 +23,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-03-03T21:13:56Z +index-state: 2020-04-05T19:55:18Z From e8e801fbecb2f76a4f81e934d26c8fe1dd2ac0b5 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 6 Apr 2020 09:58:33 +0200 Subject: [PATCH 240/270] Remove not needed project files --- cabal.project-8.8.3 | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 cabal.project-8.8.3 diff --git a/cabal.project-8.8.3 b/cabal.project-8.8.3 deleted file mode 100644 index a0eb21d08..000000000 --- a/cabal.project-8.8.3 +++ /dev/null @@ -1,26 +0,0 @@ -packages: - ./ - ./hie-plugin-api/ - - -- ./submodules/HaRe - -with-compiler: ghc-8.8.3 - -source-repository-package - type: git - location: https://github.com/jneira/cabal-helper.git - tag: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 - -tests: true - -package haskell-ide-engine - test-show-details: direct - --- Match the flag settings we use in stac builds -constraints: - haskell-ide-engine +pedantic, - hie-plugin-api +pedantic - -write-ghc-environment-files: never - -index-state: 2020-04-05T19:55:18Z From 9073c3997bf901b9e85885e67066b9e8493ca925 Mon Sep 17 00:00:00 2001 From: fendor Date: Tue, 7 Apr 2020 19:34:00 +0200 Subject: [PATCH 241/270] Update Testutils to use the correct stack.yaml --- test/utils/TestUtils.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index b703f35c6..9214f5eff 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -172,7 +172,9 @@ ghcVersion = GHC84 stackYaml :: FilePath stackYaml = -#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,2,0))) +#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,3,0))) + "stack-8.8.3.yaml" +#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,2,0))) "stack-8.8.2.yaml" #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,1,0))) "stack-8.8.1.yaml" From 3fb74dc88011f20b272179a9007ea47bf8d893e4 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 8 Apr 2020 23:58:37 +0200 Subject: [PATCH 242/270] Use resolver instead yaml files to download ghc --- .azure/windows-cabal.yml | 4 ++-- .azure/windows-stack.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 42ddd038f..4dee160e1 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -106,8 +106,8 @@ jobs: - bash: | source .azure/windows-cabal.bashrc # Needed for wrapper-test - stack setup --stack-yaml stack-8.8.1.yaml - stack setup --stack-yaml stack-8.6.5.yaml + stack setup --resolver ghc-8.8.1 + stack setup --resolver ghc-8.6.5 # TODO Enable :dispatcher-test suite cabal v2-test :plugin-dispatcher-test :wrapper-test # :dispatcher-test --project-file $PROJECT_FILE displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index e6d350a91..f0b94f6b8 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -119,8 +119,8 @@ jobs: - bash: | source .azure/windows-stack.bashrc # Needed for wrapper-test - stack setup --stack-yaml stack-8.8.1.yaml - stack setup --stack-yaml stack-8.6.5.yaml + stack setup --resolver ghc-8.8.1 + stack setup --resolver ghc-8.6.5 # TODO: Enable :dispatcher-test suite stack test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" From b580f7bd4be8cfaafd20909370f68e00c48c6645 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 9 Apr 2020 14:34:14 +0200 Subject: [PATCH 243/270] Dont build windows with stack-8.8.3.yaml --- .azure/windows-stack.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index f0b94f6b8..b13a39d6a 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -5,14 +5,16 @@ jobs: vmImage: windows-2019 strategy: matrix: - # default stack.yaml uses ghc-8.8.2 so we can't use it for windows - # TODO: Enable it when it uses ghc-8.8.3 + # default stack.yaml uses ghc-8.8.3 so we can't use it for windows + # TODO: Enable it when it uses a version without bugs for windows # stack-def: # YAML_FILE: stack.yaml - stack-8.8.3: - YAML_FILE: stack-8.8.3.yaml # ghc versions 8.8.1 and 8.8.2 are not usable in windows # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 + # ghc-8.8.3 throws segfaults in ci envs so we can't use it neither + # due to https://gitlab.haskell.org/ghc/ghc/issues/17926 + stack-8.8.3: + YAML_FILE: stack-8.8.3.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: From 49c76b919ed4547ca8eed1ea9377f831a15ac1fb Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 9 Apr 2020 15:57:38 +0200 Subject: [PATCH 244/270] Don't use ghc-8.8.3 for windows cabal --- .azure/windows-cabal.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure/windows-cabal.yml b/.azure/windows-cabal.yml index 4dee160e1..150b728eb 100644 --- a/.azure/windows-cabal.yml +++ b/.azure/windows-cabal.yml @@ -7,8 +7,8 @@ jobs: matrix: # ghc versions 8.8.1 and 8.8.2 are not usable in windows # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 - ghc-8.8.3: - GHC_VERSION: "8.8.3" + # ghc-8.8.3 throws segfaults in ci envs so we can't use it neither + # due to https://gitlab.haskell.org/ghc/ghc/issues/17926 ghc-8.6.5: GHC_VERSION: "8.6.5" ghc-8.4.4: From d4a6a17a0290134850db1784742adbdfcbdff771 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 9 Apr 2020 16:17:51 +0200 Subject: [PATCH 245/270] Update resolvers of install/shake.yaml --- install/shake.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/shake.yaml b/install/shake.yaml index 629cd0d81..65a438409 100644 --- a/install/shake.yaml +++ b/install/shake.yaml @@ -1,7 +1,7 @@ # Used to provide a different environment for the shake build script -resolver: lts-13.19 # last lts with GHC 8.6.5 -# resolver: nightly-2020-01-31 # GHC 8.8.2 -# resolver: nightly-2020-01-21 # last nightly GHC 8.8.1 +resolver: lts-14.27 # last lts GHC 8.6.5 +# resolver: lts-15.7 # lts GHC 8.8.3 +# resolver: lts-15.3 # last lts GHC 8.8.2 # resolver: lts-13.19 # last lts GHC 8.6.4 # resolver: lts-12.26 # last lts GHC 8.4.4 # resolver: lts-12.14 # last lts GHC 8.4.3 From 6765fa6f6c58d32004dc1130a8996b2133be8f70 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 9 Apr 2020 21:30:02 +0200 Subject: [PATCH 246/270] Install hie-8.6.5 to avoid segfaults with ghc-8.8.3 --- .azure/windows-installhs-stack.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure/windows-installhs-stack.yml b/.azure/windows-installhs-stack.yml index 21ed96e88..622e03298 100644 --- a/.azure/windows-installhs-stack.yml +++ b/.azure/windows-installhs-stack.yml @@ -6,6 +6,7 @@ jobs: variables: YAML_FILE: install/shake.yaml STACK_ROOT: "C:\\sr" + GHC_VERSION: "8.6.5" steps: - task: Cache@2 inputs: @@ -46,7 +47,8 @@ jobs: - bash: | source .azure/windows-stack.bashrc # Some executions fails with spurious errors installing executables - stack install.hs latest || stack install.hs latest + # We can't install the latest target cause it is ghc-8.8.3 and throws segfaults + stack install.hs hie-${GHC_VERSION} || stack install.hs hie-${GHC_VERSION} displayName: Run latest target of `install.hs` - bash: | mkdir -p .azure-cache From 9327f6389eb81d8ea74362fbf908b42995d416c7 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 9 Apr 2020 22:14:32 +0200 Subject: [PATCH 247/270] Correct ghc-8.8.3 stack.yaml's --- stack-8.8.3.yaml | 14 +++++--------- stack.yaml | 15 ++------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 66afc0091..2f11c3834 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -9,20 +9,16 @@ extra-deps: - apply-refact-0.7.0.0 - bytestring-trie-0.2.5.0@rev1 # - cabal-helper-1.0.0.0 -- github: jneira/cabal-helper - commit: ffb1f57a5ffc6b7ac3c46a9974c4420a6d2bb9b2 +- github: DanielG/cabal-helper + commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -# To avoid build error with ghc-8.8.2 -# See https://github.com/haskell/haddock/issues/1123 -- git: https://github.com/haskell/haddock.git - commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 - subdirs: - - haddock-api -# - haddock-api-2.23.0 +- haddock-api-2.23.1 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-ex-8.8.5.3 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - semigroups-0.18.5 diff --git a/stack.yaml b/stack.yaml index d4062253c..13b12fec9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-03-18 +resolver: nightly-2020-04-09 packages: - . @@ -15,25 +15,14 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -<<<<<<< HEAD - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.23.1 - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 +- haskell-src-exts-1.22.0 - lsp-test-0.10.1.0 -- hie-bios-0.4.0 -- hlint-2.2.11 -======= -# To avoid build error with ghc-8.8.2 -# See https://github.com/haskell/haddock/issues/1123 -- git: https://github.com/haskell/haddock.git - commit: be8b02c4e3cffe7d45b3dad0a0f071d35a274d65 - subdirs: - - haddock-api -# - haddock-api-2.23.0 ->>>>>>> a8e55590... Update ghc-8.8.3 stackage resolvers - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - ilist-0.3.1.0 From 6aa0e39be55463de101168368fef4366989687b0 Mon Sep 17 00:00:00 2001 From: jneira Date: Thu, 9 Apr 2020 22:53:58 +0200 Subject: [PATCH 248/270] Drop ghc-8.8.3 from azure stack jobs --- .azure/windows-stack.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.azure/windows-stack.yml b/.azure/windows-stack.yml index b13a39d6a..7f2e090ed 100644 --- a/.azure/windows-stack.yml +++ b/.azure/windows-stack.yml @@ -13,8 +13,6 @@ jobs: # due to https://gitlab.haskell.org/ghc/ghc/issues/17575 # ghc-8.8.3 throws segfaults in ci envs so we can't use it neither # due to https://gitlab.haskell.org/ghc/ghc/issues/17926 - stack-8.8.3: - YAML_FILE: stack-8.8.3.yaml stack-8.6.5: YAML_FILE: stack-8.6.5.yaml stack-8.6.4: From a5d8c1968c7bf1bcbec6160235a3fa024ad7c55f Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 13 Apr 2020 15:45:29 +0200 Subject: [PATCH 249/270] Use installed ghc in stack linux build To avoid download it again and not waste disk space --- .azure/linux-stack.bashrc | 2 +- .azure/linux-stack.yml | 38 ++++++++++++++++++++++---------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.azure/linux-stack.bashrc b/.azure/linux-stack.bashrc index 61f790fa8..877250f01 100644 --- a/.azure/linux-stack.bashrc +++ b/.azure/linux-stack.bashrc @@ -1 +1 @@ -export PATH=$HOME/.local/bin:$PATH +export PATH=$HOME/.local/bin:/opt/ghc/$GHC_VERSION/bin:$PATH diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index f69f85d95..f36871614 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -5,29 +5,31 @@ jobs: vmImage: ubuntu-16.04 strategy: matrix: - stack-def: + default: YAML_FILE: stack.yaml - stack-8.8.3: - YAML_FILE: stack-8.8.3.yaml - stack-8.8.2: - YAML_FILE: stack-8.8.2.yaml - stack-8.6.5: - YAML_FILE: stack-8.6.5.yaml - stack-8.6.4: - YAML_FILE: stack-8.6.4.yaml - stack-8.4.4: - YAML_FILE: stack-8.4.4.yaml - stack-8.4.3: - YAML_FILE: stack-8.4.3.yaml - stack-8.4.2: - YAML_FILE: stack-8.4.2.yaml + GHC_VERSION: "8.8.3" + ghc-8.8.3: + GHC_VERSION: "8.8.3" + ghc-8.8.2: + GHC_VERSION: "8.8.2" + ghc-8.6.5: + GHC_VERSION: "8.6.5" + ghc-8.6.4: + GHC_VERSION: "8.6.4" + ghc-8.4.4: + GHC_VERSION: "8.4.4" + ghc-8.4.3: + GHC_VERSION: "8.4.3" + ghc-8.4.2: + GHC_VERSION: "8.4.2" variables: STACK_ROOT: /home/vsts/.stack CABAL_VERSION: "3.0" + YAML_FILE: stack-$(GHC_VERSION).yaml steps: - task: Cache@2 inputs: - key: '"stack" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' + key: '"stack-v1" | "$(Agent.OS)" | $(Build.SourcesDirectory)/$(YAML_FILE)' path: .azure-cache cacheHitVar: CACHE_RESTORED displayName: "Download cache" @@ -45,6 +47,9 @@ jobs: mkdir -p ~/.local/bin curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | \ tar vxz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' + stack update + echo "system-ghc: true" >> $STACK_ROOT/config.yaml + echo "install-ghc: false" >> $STACK_ROOT/config.yaml displayName: Install stack - bash: | source .azure/linux-stack.bashrc @@ -85,6 +90,7 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/linux-stack.bashrc + PATH=/opt/ghc/8.6.5/bin:$PATH stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | From e61670f75f6e1218bc4c8024a3359d9a134c121d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 13 Apr 2020 15:59:50 +0200 Subject: [PATCH 250/270] Strip RTS flags, since we cant honor them Issue that caused it: https://github.com/haskell/haskell-ide-engine/issues/1725 the problem is that we cant honour the `+RTS` flags, since these need to be known when GHC is started. However, HIE is the compiler and is started before we load any component. Therefore, these options for the different component are unusable and we strip them here to avoid a bug. This commit is inspired by https://github.com/mpickering/hie-bios/issues/102 --- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 2615e61b8..722f62a3c 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -543,7 +543,7 @@ cabalHelperAction proj env package root fp = do let fs' = getFlags comp let fs = map (fixImportDirs root) fs' let targets = getTargets comp relativeFp - let ghcOptions = fs ++ targets + let ghcOptions = removeRTS (fs ++ targets) debugm $ "Flags for \"" ++ fp ++ "\": " ++ show ghcOptions debugm $ "Component Infos: " ++ show comp return @@ -556,6 +556,16 @@ cabalHelperAction proj env package root fp = do $ CradleError (ExitFailure 2) err + where + -- | Strip out any ["+RTS", ..., "-RTS"] sequences in the command string list. + removeRTS :: [String] -> [String] + removeRTS ("+RTS" : xs) = + case dropWhile (/= "-RTS") xs of + [] -> [] + (_ : ys) -> removeRTS ys + removeRTS (y:ys) = y : removeRTS ys + removeRTS [] = [] + -- | Fix occurrences of "-i." to "-i" -- Flags obtained from cabal-helper are relative to the package From 4fdd91105e76c7affc3bec09273650bdee0807b6 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 14 Apr 2020 22:31:00 +0200 Subject: [PATCH 251/270] Put ghcs used by wrapper-test in path --- .azure/linux-stack.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.azure/linux-stack.yml b/.azure/linux-stack.yml index f36871614..eda1bf7a6 100644 --- a/.azure/linux-stack.yml +++ b/.azure/linux-stack.yml @@ -90,7 +90,7 @@ jobs: displayName: "Install Runtime Test-Dependencies: z3" - bash: | source .azure/linux-stack.bashrc - PATH=/opt/ghc/8.6.5/bin:$PATH + export PATH=/opt/ghc/8.6.5/bin:$PATH stack install --resolver=lts-13.20 liquid-fixpoint-0.8.0.2 liquidhaskell-0.8.6.2 displayName: "Install Runtime Test-Dependencies: liquidhaskell" - bash: | @@ -106,6 +106,8 @@ jobs: displayName: "Run Test: unit-test" - bash: | source .azure/linux-stack.bashrc + # we need the ghc versions used by wrapper-test suite + export PATH=$PATH:/opt/ghc/8.8.1/bin:/opt/ghc/8.6.5/bin stack test :dispatcher-test :plugin-dispatcher-test :wrapper-test --stack-yaml $(YAML_FILE) displayName: "Run Test: dispatcher-test, plugin-dispatcher-test and wrapper-test" - bash: | From 06fd0628ba61f8ab345a1593171b6cd39f12d6cf Mon Sep 17 00:00:00 2001 From: Sanjiv Sahayam Date: Sat, 18 Apr 2020 22:25:57 +1000 Subject: [PATCH 252/270] Update Sublime Text HIE command The `hie` command needs to include the `--lsp` parameter for it to work as an LSP server. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c1af70d15..44f52bd1c 100644 --- a/README.md +++ b/README.md @@ -539,7 +539,7 @@ in { "clients": { "haskell-ide-engine": { - "command": ["hie"], + "command": ["hie", "--lsp"], "scopes": ["source.haskell"], "syntaxes": ["Packages/Haskell/Haskell.sublime-syntax"], "languageId": "haskell", From 6dc7d4302b3dd644163a318d66a2cebd29e37b0b Mon Sep 17 00:00:00 2001 From: fendor Date: Wed, 22 Apr 2020 11:00:44 +0200 Subject: [PATCH 253/270] Move finding the package for a filepath Currently, hie-wrapper uses the cradle type to find the ghc version to use on the project. Cabal-Helper does not only return the cradle type but also initialises the packages of the project, which may take a long time since it starts building dependencies. Moreover, it causes hie-wrapper to take way longer than necessary to find the project type, and thus, the ghc version to use on the project. This violates the isolation of the cradle, some work happens before loading the options for a filepath, some during it. This commit unifies the behaviour with hie-bios: * All the work happens during loading the options for the given filepath. It speeds up the initial start-up of hie if users use the implicit cradle discovery mechanism. It makes the implementation a bit less hacky. While there are behavioural changes, nothing should change for everyday users. --- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 144 ++++++++++---------- 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index 722f62a3c..a6794ced2 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -14,10 +14,11 @@ import Distribution.Helper (Package, projectPackages, pUnits, unChModuleName, Ex(..), ProjLoc(..), QueryEnv, mkQueryEnv, runQuery, Unit, unitInfo, uiComponents, - ChEntrypoint(..), UnitInfo(..)) + ChEntrypoint(..), UnitInfo(..), + pPackageName) import Distribution.Helper.Discover (findProjects, getDefaultDistDir) import Data.Function ((&)) -import Data.List (isPrefixOf, sortOn, find) +import Data.List (isPrefixOf, sortOn, find, intercalate) import qualified Data.List.NonEmpty as NonEmpty import Data.List.NonEmpty (NonEmpty) import qualified Data.Map as Map @@ -304,18 +305,23 @@ FilePath is part of and decide which unit to load when 'runCradle' is executed. Thus, to find the options required to compile and load the given FilePath, we have to do the following: - 1. Identify the package that contains the FilePath (should be unique) + 1. Find the project type of the project. Happens in 'cabalHelperCradle' - 2. Find the unit that that contains the FilePath (May be non-unique) + 2. Identify the package that contains the FilePath (should be unique). Happens in 'cabalHelperAction' - 3. Find the component that exposes the FilePath (May be non-unique) + 3. Find the unit that that contains the FilePath (May be non-unique). + Happens in 'cabalHelperAction' + 4. Find the component that exposes the FilePath (May be non-unique). Happens in 'cabalHelperAction' -=== Identify the package that contains the FilePath +=== Find the project type of the project. The function 'cabalHelperCradle' does the first step only. It starts by querying Cabal-Helper to find the project's root. See 'findCabalHelperEntryPoint' for details how this is done. + +=== Identify the package that contains the FilePath + Once the root of the project is defined, we query Cabal-Helper for all packages that are defined in the project and match by the packages source directory which package the given FilePath is most likely to be a part of. @@ -479,43 +485,16 @@ cabalHelperCradle file = do debugm $ "Cabal-Helper dirs: " ++ show [root, file] let dist_dir = getDefaultDistDir proj env <- mkQueryEnv proj dist_dir - packages <- runQuery projectPackages env - -- Find the package the given file may belong to. - -- If it does not belong to any package, create a none-cradle. - -- We might want to find a cradle without actually loading anything. - -- Useful if we only want to determine a ghc version to use. - case packages `findPackageFor` file of - Nothing -> do - debugm $ "Could not find a package for the file: " ++ file - debugm - "This is perfectly fine if we only want to determine the GHC version." - return - Cradle { cradleRootDir = root - , cradleOptsProg = - CradleAction { actionName = Bios.Other (projectNoneType proj) - , runCradle = \_ _ -> return CradleNone - } - } - Just realPackage -> do - debugm $ "Cabal-Helper cradle package: " ++ show realPackage - -- Field `pSourceDir` often has the form `/./plugin` - -- but we only want `/plugin` - normalisedPackageLocation <- canonicalizePath $ pSourceDir realPackage - debugm - $ "Cabal-Helper normalisedPackageLocation: " - ++ normalisedPackageLocation - return - Cradle { cradleRootDir = normalisedPackageLocation - , cradleOptsProg = - CradleAction { actionName = Bios.Other actionNameSuffix - , runCradle = \_ fp -> cabalHelperAction - (Ex proj) - env - realPackage - normalisedPackageLocation - fp - } - } + return + Cradle { cradleRootDir = root + , cradleOptsProg = + CradleAction { actionName = Bios.Other actionNameSuffix + , runCradle = \_ fp -> cabalHelperAction + (Ex proj) + env + fp + } + } -- | Cradle Action to query for the ComponentOptions that are needed -- to load the given FilePath. @@ -526,36 +505,59 @@ cabalHelperAction :: Ex ProjLoc -- ^ Project location, can be used -- agnostic error messages. -> QueryEnv v -- ^ Query Env created by 'mkQueryEnv' -- with the appropriate 'distdir' - -> Package v -- ^ Package this cradle is part for. - -> FilePath -- ^ Root directory of the cradle - -- this action belongs to. -> FilePath -- ^ FilePath to load, expected to be an absolute path. -> IO (CradleLoadResult ComponentOptions) -cabalHelperAction proj env package root fp = do - -- Get all unit infos the given FilePath may belong to - let units = pUnits package - -- make the FilePath to load relative to the root of the cradle. - let relativeFp = makeRelative root fp - debugm $ "Relative Module FilePath: " ++ relativeFp - getComponent proj env (toList units) relativeFp - >>= \case - Right comp -> do - let fs' = getFlags comp - let fs = map (fixImportDirs root) fs' - let targets = getTargets comp relativeFp - let ghcOptions = removeRTS (fs ++ targets) - debugm $ "Flags for \"" ++ fp ++ "\": " ++ show ghcOptions - debugm $ "Component Infos: " ++ show comp - return - $ CradleSuccess - ComponentOptions { componentOptions = ghcOptions - , componentDependencies = [] - } - Left err -> return - $ CradleFail - $ CradleError - (ExitFailure 2) - err +cabalHelperAction proj env fp = do + -- This builds all packages in the project. + packages <- runQuery projectPackages env + -- Find the package the given file may belong to. + -- If it does not belong to any package, fail the loading process + case packages `findPackageFor` fp of + Nothing -> do + debugm $ "Failed to find a package for: " ++ fp + return $ CradleFail $ + CradleError + (ExitFailure 1) + [ "Failed to find a package for: " ++ fp, + "No Prefix matched.", + "Following packages were searched: " + ++ intercalate "; " + (map + (\p -> pPackageName p ++ "(" ++ pSourceDir p ++ ")") + $ NonEmpty.toList packages) + ] + Just package -> do + debugm $ "Cabal-Helper cradle package: " ++ show package + -- Field `pSourceDir` often has the form `/./plugin` + -- but we only want `/plugin` + packageRoot <- canonicalizePath $ pSourceDir package + debugm + $ "Cabal-Helper normalisedPackageLocation: " + ++ packageRoot + -- Get all unit infos the given FilePath may belong to + let units = pUnits package + -- make the FilePath to load relative to the root of the cradle. + let relativeFp = makeRelative packageRoot fp + debugm $ "Relative Module FilePath: " ++ relativeFp + getComponent proj env (toList units) relativeFp + >>= \case + Right comp -> do + let fs' = getFlags comp + let fs = map (fixImportDirs packageRoot) fs' + let targets = getTargets comp relativeFp + let ghcOptions = removeRTS (fs ++ targets) + debugm $ "Flags for \"" ++ fp ++ "\": " ++ show ghcOptions + debugm $ "Component Infos: " ++ show comp + return + $ CradleSuccess + ComponentOptions { componentOptions = ghcOptions + , componentDependencies = [] + } + Left err -> return + $ CradleFail + $ CradleError + (ExitFailure 2) + err where -- | Strip out any ["+RTS", ..., "-RTS"] sequences in the command string list. removeRTS :: [String] -> [String] From 6c8e8477f63aec5be88466e9291bb71c3fc97a84 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 2 May 2020 14:10:38 +0100 Subject: [PATCH 254/270] Bump resolvers cabal to 2020-05-02T10:11:15Z stack-8.8.3 to lts-15.10 stack to nightly-2020-05-01 --- cabal.project | 2 +- stack-8.8.3.yaml | 8 ++++---- stack.yaml | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cabal.project b/cabal.project index d23dce890..4b7d2226b 100644 --- a/cabal.project +++ b/cabal.project @@ -21,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-04-06T20:27:36Z +index-state: 2020-05-02T10:11:15Z \ No newline at end of file diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 2f11c3834..ad6ba871d 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -1,4 +1,4 @@ -resolver: lts-15.4 +resolver: lts-15.10 packages: - . - hie-plugin-api @@ -14,11 +14,11 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- haddock-api-2.23.1 -- hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 +- haddock-api-2.23.1 +- hoogle-5.0.17.15 +- hsimport-0.11.0 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - semigroups-0.18.5 diff --git a/stack.yaml b/stack.yaml index 13b12fec9..e1fd0152a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-04-09 +resolver: nightly-2020-05-01 packages: - . @@ -8,24 +8,24 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 -- bytestring-trie-0.2.5.0@sha256:9efa9c6f556314d28486be2470ff789419c5238ed2e354870623a3cbbd28fbe2,3349 +- bytestring-trie-0.2.5.0 # - cabal-helper-1.0.0.0 - github: DanielG/cabal-helper commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-8.8.2.20200205 +- ghc-lib-parser-8.10.1.20200412 - ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.23.1 - haddock-library-1.8.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 -- lsp-test-0.10.1.0 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0 - ilist-0.3.1.0 +- lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2 - semigroups-0.18.5 - temporary-1.2.1.1 From 55a82ee3d4c8435b707036263997fd5a08bc0f65 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 2 May 2020 16:59:55 +0100 Subject: [PATCH 255/270] Fix cabal build for GHC 8.8.3 --- haskell-ide-engine.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index c1d2d9567..3fed6cc3c 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -104,7 +104,7 @@ library , unliftio , hlint >= 2.2.11 if impl(ghc >= 8.6) - build-depends: ormolu >= 0.0.3.1 + build-depends: ormolu == 0.0.3.* ghc-options: -Wall -Wredundant-constraints if flag(pedantic) From 73a9f773349c23580d14f5219d11010dce563efc Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sat, 2 May 2020 19:23:27 +0100 Subject: [PATCH 256/270] Sort out ghc-nightly build --- stack.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack.yaml b/stack.yaml index e1fd0152a..5a28c0362 100644 --- a/stack.yaml +++ b/stack.yaml @@ -15,7 +15,7 @@ extra-deps: - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 -- ghc-lib-parser-8.10.1.20200412 +- ghc-lib-parser-8.8.3.20200412.1 - ghc-lib-parser-ex-8.8.5.3 - haddock-api-2.23.1 - haddock-library-1.8.0 @@ -27,6 +27,7 @@ extra-deps: - ilist-0.3.1.0 - lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2 +- ormolu-0.0.3.1 - semigroups-0.18.5 - temporary-1.2.1.1 - unliftio-core-0.2.0.1 From 03475904588ae24f5aa78e08bdcbdef212a5bfd7 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 3 May 2020 11:21:55 +0100 Subject: [PATCH 257/270] Prepare 1.4 release --- Changelog.md | 31 +++++++++++++++++++++++++++++ haskell-ide-engine.cabal | 4 ++-- hie-plugin-api/hie-plugin-api.cabal | 2 +- 3 files changed, 34 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index e90ba3637..e540ac5da 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,34 @@ +## 1.4 + +NOTE: haskell-ide-engine is in transition, the new home for it will be +[haskell-language-server](https://github.com/haskell/haskell-language-server), +which does not currently have feature parity with `hie`. +Once that hurdle is crossed, the main emphasis will be there, and +`hie` will eventually be deprecated. + +## In this version + +- cabal to 2020-05-02T10:11:15Z +- stack-8.8.3 to lts-15.10 +- stack to nightly-2020-05-01 + +## Changes + +- Bump resolvers +([#1757](https://github.com/haskell/haskell-ide-engine/pull/1757) by @alanz) +- Move finding the package for a filepath +([#1750](https://github.com/haskell/haskell-ide-engine/pull/1750) by @fendor) +- Update Sublime Text HIE command +([#1742](https://github.com/haskell/haskell-ide-engine/pull/1742) by @ssanj) +- Use installed ghc in stack linux builds +([#1737](https://github.com/haskell/haskell-ide-engine/pull/1737) by @jneira) +- Strip RTS flags, since we cant honor them +([#1736](https://github.com/haskell/haskell-ide-engine/pull/1736) by @fendor) +- Support for ghc-8.8.3 +([#1697](https://github.com/haskell/haskell-ide-engine/pull/1697) by @jneira) +- Haddock source file names may use either dot or dash as separator +([#1723](https://github.com/haskell/haskell-ide-engine/pull/1723) by @wz1000) + ## 1.3 NOTE: haskell-ide-engine is in transition, the new home for it will be diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 3fed6cc3c..ac18bcdcd 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -1,5 +1,5 @@ name: haskell-ide-engine -version: 1.3 +version: 1.4 synopsis: Provide a common engine to power any Haskell IDE description: Please see README.md homepage: http://github.com/githubuser/haskell-ide-engine#readme @@ -76,7 +76,7 @@ library , haskell-lsp == 0.20.* , haskell-lsp-types == 0.20.* , haskell-src-exts >= 1.22 - , hie-plugin-api >= 1.3 + , hie-plugin-api >= 1.4 , hoogle >= 5.0.13 , hsimport , hslogger diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index dfdf68cb8..bca7f9c22 100644 --- a/hie-plugin-api/hie-plugin-api.cabal +++ b/hie-plugin-api/hie-plugin-api.cabal @@ -1,5 +1,5 @@ name: hie-plugin-api -version: 1.3 +version: 1.4 synopsis: Haskell IDE API for plugin communication description: Please see README.md license: BSD3 From aca3241eb0ea00de171f791d48a4861820327132 Mon Sep 17 00:00:00 2001 From: fendor Date: Fri, 8 May 2020 11:24:01 +0200 Subject: [PATCH 258/270] Update to hie-bios 0.5.0 --- cabal.project | 2 +- haskell-ide-engine.cabal | 2 +- hie-plugin-api/Haskell/Ide/Engine/Cradle.hs | 5 +++-- stack-8.4.2.yaml | 2 +- stack-8.4.3.yaml | 2 +- stack-8.4.4.yaml | 2 +- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.2.yaml | 2 +- stack-8.8.3.yaml | 1 + stack.yaml | 1 + 11 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cabal.project b/cabal.project index 4b7d2226b..52dc2bdff 100644 --- a/cabal.project +++ b/cabal.project @@ -21,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-05-02T10:11:15Z \ No newline at end of file +index-state: 2020-05-08T10:11:15Z \ No newline at end of file diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index ac18bcdcd..e532b56a1 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -99,7 +99,7 @@ library , vector , versions , yaml >= 0.8.31 - , hie-bios >= 0.4 && < 0.5.0 + , hie-bios >= 0.5 && < 0.6.0 , bytestring-trie , unliftio , hlint >= 2.2.11 diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index a6794ced2..09cdc64a0 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -471,6 +471,7 @@ cabalHelperCradle file = do $ CradleSuccess ComponentOptions { componentOptions = [file, fixImportDirs cwd "-i."] + , componentRoot = cwd , componentDependencies = [] } } @@ -542,8 +543,7 @@ cabalHelperAction proj env fp = do getComponent proj env (toList units) relativeFp >>= \case Right comp -> do - let fs' = getFlags comp - let fs = map (fixImportDirs packageRoot) fs' + let fs = getFlags comp let targets = getTargets comp relativeFp let ghcOptions = removeRTS (fs ++ targets) debugm $ "Flags for \"" ++ fp ++ "\": " ++ show ghcOptions @@ -551,6 +551,7 @@ cabalHelperAction proj env fp = do return $ CradleSuccess ComponentOptions { componentOptions = ghcOptions + , componentRoot = packageRoot , componentDependencies = [] } Left err -> return diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index a23b7191c..2bcbd5d9d 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -33,7 +33,7 @@ extra-deps: - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 -- hie-bios-0.4.0 +- hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 213304fc5..29319e028 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -39,7 +39,7 @@ extra-deps: - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 -- hie-bios-0.4.0 +- hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 63494f6c2..4506146e5 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -32,7 +32,7 @@ extra-deps: - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 -- hie-bios-0.4.0 +- hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index e1a011db6..13adc304f 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -25,7 +25,7 @@ extra-deps: - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 -- hie-bios-0.4.0 +- hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index b8bf410cc..5a235550e 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -28,7 +28,7 @@ extra-deps: - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 -- hie-bios-0.4.0 +- hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 1cc09d18c..055a0e27b 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -22,7 +22,7 @@ extra-deps: - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - lsp-test-0.10.1.0 -- hie-bios-0.4.0 +- hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index ad6ba871d..45229ee06 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -24,6 +24,7 @@ extra-deps: - semigroups-0.18.5 - temporary-1.2.1.1 - unliftio-core-0.2.0.1 +- hie-bios-0.5.0 flags: haskell-ide-engine: diff --git a/stack.yaml b/stack.yaml index 5a28c0362..72e32158b 100644 --- a/stack.yaml +++ b/stack.yaml @@ -23,6 +23,7 @@ extra-deps: - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 - hoogle-5.0.17.15 +- hie-bios-0.5.0 - hsimport-0.11.0 - ilist-0.3.1.0 - lsp-test-0.10.1.0 From 384e6827c577b036e136e934c41964ad8260b7ab Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Sun, 10 May 2020 19:46:47 +0100 Subject: [PATCH 259/270] Bump cabal index-state to include hie-bios-0.5.0 Fixes #1767 --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 52dc2bdff..c5850cb31 100644 --- a/cabal.project +++ b/cabal.project @@ -21,4 +21,4 @@ constraints: write-ghc-environment-files: never -index-state: 2020-05-08T10:11:15Z \ No newline at end of file +index-state: 2020-05-10T18:26:01Z \ No newline at end of file From 495d6cf513e090a8c5a40b95890440c8322d5d0c Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 12 May 2020 18:35:08 +0200 Subject: [PATCH 260/270] Fix stack.yaml syntax for a specific revision See also https://github.com/haskell/haskell-ide-engine/pull/1694#issuecomment-627456134 --- stack-8.8.3.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 45229ee06..52c956948 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -7,7 +7,7 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 -- bytestring-trie-0.2.5.0@rev1 +- bytestring-trie-0.2.5.0@rev:1 # - cabal-helper-1.0.0.0 - github: DanielG/cabal-helper commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd From cecd7c49bf55f99f9e6847c90abcef77369899f7 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 12 May 2020 23:00:53 +0200 Subject: [PATCH 261/270] Use cabal-helper-1.1 in stack config --- stack-8.4.2.yaml | 12 ++++++++---- stack-8.4.3.yaml | 12 ++++++++---- stack-8.4.4.yaml | 12 ++++++++---- stack-8.6.4.yaml | 14 ++++++++++---- stack-8.6.5.yaml | 9 +++++---- stack-8.8.2.yaml | 5 ++--- stack-8.8.3.yaml | 7 +++---- stack.yaml | 4 +--- 8 files changed, 45 insertions(+), 30 deletions(-) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 2bcbd5d9d..3801e7013 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -13,9 +13,9 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- Cabal-3.0.2.0 +- cabal-doctest-1.0.8 +- cabal-helper-1.1.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 @@ -27,8 +27,10 @@ extra-deps: - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -- haddock-api-2.20.0 +- ghc-paths-0.1.0.12 +- haddock-api-2.20.0@rev:1 - haddock-library-1.6.0 +- happy-1.19.12 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 @@ -77,6 +79,8 @@ flags: hie-plugin-api: pedantic: true +# allow-newer: true + nix: packages: [ icu libcxx zlib ] diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 29319e028..18b1f96bb 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -18,9 +18,9 @@ extra-deps: - bifunctors-5.5.7 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- Cabal-3.0.2.0 +- cabal-doctest-1.0.8 +- cabal-helper-1.1.0.0 - cabal-plan-0.6.2.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 @@ -33,12 +33,14 @@ extra-deps: - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -- haddock-api-2.20.0 +- ghc-paths-0.1.0.12 +- haddock-api-2.20.0@rev:1 - haddock-library-1.6.0 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 - haskell-src-exts-util-0.2.5 +- happy-1.19.12 - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 @@ -95,6 +97,8 @@ flags: hie-plugin-api: pedantic: true +# allow-newer: true + nix: packages: [icu libcxx zlib] diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 4506146e5..270ee652e 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -12,9 +12,9 @@ extra-deps: - bifunctors-5.5.6 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- Cabal-3.0.2.0 +- cabal-doctest-1.0.8 +- cabal-helper-1.1.0.0 - cabal-plan-0.5.0.0 - connection-0.3.1 # for network and network-bsd - constrained-dynamic-0.1.0.0 @@ -26,8 +26,10 @@ extra-deps: - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -- haddock-api-2.20.0 +- ghc-paths-0.1.0.12 +- haddock-api-2.20.0@rev:1 - haddock-library-1.6.0 +- happy-1.19.12 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 @@ -75,6 +77,8 @@ flags: hie-plugin-api: pedantic: true +# allow-newer: true + nix: packages: [icu libcxx zlib] diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 13adc304f..4bd7eb167 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -11,9 +11,9 @@ extra-deps: - brittany-0.12.1.1 - butcher-1.3.2.1 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- Cabal-3.0.2.0 +- cabal-doctest-1.0.8 +- cabal-helper-1.1.0.0 - cabal-plan-0.5.0.0 - constrained-dynamic-0.1.0.0 - extra-1.6.21 @@ -21,7 +21,9 @@ extra-deps: - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -- haddock-api-2.22.0 +- ghc-paths-0.1.0.12 +- haddock-api-2.22.0@rev:1 +- happy-1.19.12 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 @@ -29,7 +31,9 @@ extra-deps: - hlint-2.2.11 - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- lens-4.18 - lsp-test-0.10.1.0 +- microlens-th-0.4.2.3@rev:1 - monad-dijkstra-0.1.1.2@rev:1 - monad-memo-0.4.1 - multistate-0.8.0.1 @@ -39,7 +43,9 @@ extra-deps: - rope-utf16-splay-0.3.1.0 - syz-0.2.0.0 - temporary-1.2.1.1 +- th-abstraction-0.3.1.0 - time-compat-1.9.2.2 +- type-equality-1 - unix-compat-0.5.2 - unliftio-0.2.12.1 - unliftio-core-0.2.0.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 5a235550e..bf14833cc 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -13,9 +13,8 @@ extra-deps: - base-compat-0.11.1 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- Cabal-3.0.2.0 +- cabal-helper-1.1.0.0 - cabal-plan-0.6.2.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 @@ -24,7 +23,7 @@ extra-deps: - ghc-exactprint-0.6.2 # for HaRe - ghc-lib-parser-8.8.2.20200205 - ghc-lib-parser-ex-8.8.5.3 -- haddock-api-2.22.0 +- haddock-api-2.22.0@rev:1 - haskell-lsp-0.20.0.0 - haskell-lsp-types-0.20.0.0 - haskell-src-exts-1.22.0 @@ -33,6 +32,7 @@ extra-deps: - hoogle-5.0.17.15 - hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 - indexed-profunctors-0.1 +- lens-4.18 - lsp-test-0.10.1.0 - monad-dijkstra-0.1.1.2 - optics-core-0.2 @@ -43,6 +43,7 @@ extra-deps: - semialign-1.1 - temporary-1.2.1.1 - topograph-1 +- type-equality-1 - unliftio-0.2.12.1 - unliftio-core-0.2.0.1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 055a0e27b..52aacabe7 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -9,9 +9,8 @@ extra-deps: - apply-refact-0.7.0.0 - brittany-0.12.1.1 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- Cabal-3.0.2.0 +- cabal-helper-1.1.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 52c956948..6a87a97f7 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -7,10 +7,9 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 -- bytestring-trie-0.2.5.0@rev:1 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- bytestring-trie-0.2.5.0@rev1 +- Cabal-3.0.2.0 +- cabal-helper-1.1.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 diff --git a/stack.yaml b/stack.yaml index 72e32158b..fb7cd6180 100644 --- a/stack.yaml +++ b/stack.yaml @@ -9,9 +9,7 @@ extra-deps: - apply-refact-0.7.0.0 - bytestring-trie-0.2.5.0 -# - cabal-helper-1.0.0.0 -- github: DanielG/cabal-helper - commit: a18bbb2af92e9b4337e7f930cb80754f2408bcfd +- cabal-helper-1.1.0.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.2 From bf3ce5096ab4ab846593314125f2b92f09db3b0c Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 12 May 2020 23:02:03 +0200 Subject: [PATCH 262/270] Add cabal-helper-1.1 to cabal config --- cabal.project | 10 +++------- haskell-ide-engine.cabal | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cabal.project b/cabal.project index c5850cb31..803bb6af0 100644 --- a/cabal.project +++ b/cabal.project @@ -4,11 +4,6 @@ packages: -- ./submodules/HaRe -source-repository-package - type: git - location: https://github.com/DanielG/cabal-helper.git - tag: a18bbb2af92e9b4337e7f930cb80754f2408bcfd - tests: true package haskell-ide-engine @@ -17,8 +12,9 @@ package haskell-ide-engine -- Match the flag settings we use in stac builds constraints: haskell-ide-engine +pedantic, - hie-plugin-api +pedantic + hie-plugin-api +pedantic, + ghc-lib-parser == 8.8.2.20200205 write-ghc-environment-files: never -index-state: 2020-05-10T18:26:01Z \ No newline at end of file +index-state: 2020-05-12T16:28:12Z diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index e532b56a1..cf5b8f3ce 100644 --- a/haskell-ide-engine.cabal +++ b/haskell-ide-engine.cabal @@ -61,7 +61,7 @@ library , brittany , bytestring , Cabal - , cabal-helper >= 1.0 && < 1.1 + , cabal-helper >= 1.1 && < 1.2 , containers , data-default , directory From e45ea115c5ded6deea90e8921ebac810b7a14478 Mon Sep 17 00:00:00 2001 From: jneira Date: Tue, 12 May 2020 23:02:55 +0200 Subject: [PATCH 263/270] Use Cabal version in CPP conditions instead GHC --- src/Haskell/Ide/Engine/Plugin/Package.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Haskell/Ide/Engine/Plugin/Package.hs b/src/Haskell/Ide/Engine/Plugin/Package.hs index 481cb7224..ea0c0a2ad 100644 --- a/src/Haskell/Ide/Engine/Plugin/Package.hs +++ b/src/Haskell/Ide/Engine/Plugin/Package.hs @@ -27,7 +27,8 @@ import qualified Data.Text.Encoding as T import Data.Maybe #if __GLASGOW_HASKELL__ < 808 import Data.Monoid ((<>)) -#else +#endif +#if MIN_VERSION_Cabal(3,0,0) import qualified Data.Set as S #endif #if MIN_VERSION_Cabal(2,2,0) @@ -301,7 +302,7 @@ editCabalPackage file modulePath pkgName fileMap = do -- Add it to the bottom of the dependencies list -- TODO: we could sort the depencies and then insert it, -- or insert it in order iff the list is already sorted. -#if __GLASGOW_HASKELL__ >= 808 +#if MIN_VERSION_Cabal(3,0,0) newDeps = oldDeps ++ [Dependency (mkPackageName (T.unpack dep)) anyVersion S.empty] #else newDeps = oldDeps ++ [Dependency (mkPackageName (T.unpack dep)) anyVersion] From 40fdd59d26143ca307c6aeb0853073a03650644d Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 13 May 2020 15:12:38 +0200 Subject: [PATCH 264/270] Use correct rev:n instead sha --- stack-8.4.2.yaml | 2 +- stack-8.4.3.yaml | 2 +- stack-8.4.4.yaml | 2 +- stack-8.6.4.yaml | 2 +- stack-8.6.5.yaml | 2 +- stack-8.8.2.yaml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 3801e7013..1b7adb16a 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -38,7 +38,7 @@ extra-deps: - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0@rev:2 - hslogger-1.3.1.0 - invariant-0.5.3 - lens-4.18.1 diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 18b1f96bb..2955c828b 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -44,7 +44,7 @@ extra-deps: - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0@rev:2 - hslogger-1.3.1.0 - hspec-2.7.1 - hspec-core-2.7.1 diff --git a/stack-8.4.4.yaml b/stack-8.4.4.yaml index 270ee652e..0c203a3e3 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -37,7 +37,7 @@ extra-deps: - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0@rev:2 - hslogger-1.3.1.0 - invariant-0.5.3 - lens-4.18.1 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 4bd7eb167..011ed7af8 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -30,7 +30,7 @@ extra-deps: - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0@rev:2 - lens-4.18 - lsp-test-0.10.1.0 - microlens-th-0.4.2.3@rev:1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index bf14833cc..429f266aa 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -30,7 +30,7 @@ extra-deps: - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0@rev:2 - indexed-profunctors-0.1 - lens-4.18 - lsp-test-0.10.1.0 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 52aacabe7..68348ae4e 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -24,7 +24,7 @@ extra-deps: - hie-bios-0.5.0 - hlint-2.2.11 - hoogle-5.0.17.15 -- hsimport-0.11.0@sha256:e8f1774aff97215d7cc3a6c81635fae75b80af182f732f8fe28d1ed6eb9c7401,3170 +- hsimport-0.11.0@rev:2 - ilist-0.3.1.0 - monad-dijkstra-0.1.1.2 - ormolu-0.0.3.1 From ae315a3648b64b962939b488552d945e2c151407 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 13 May 2020 15:14:50 +0200 Subject: [PATCH 265/270] Correct revision again (lost in rebase) --- stack-8.8.3.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 6a87a97f7..9200adfe1 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -7,7 +7,7 @@ extra-deps: # - ./submodules/HaRe - apply-refact-0.7.0.0 -- bytestring-trie-0.2.5.0@rev1 +- bytestring-trie-0.2.5.0@rev:1 - Cabal-3.0.2.0 - cabal-helper-1.1.0.0 - clock-0.7.2 From e348acda6f597d26a10926f5b55f22b4e2242315 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 20 May 2020 11:05:18 +0200 Subject: [PATCH 266/270] Avoid building docs for haddock-api --- cabal.project-8.6.5 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 cabal.project-8.6.5 diff --git a/cabal.project-8.6.5 b/cabal.project-8.6.5 new file mode 100644 index 000000000..fb9fa7ea6 --- /dev/null +++ b/cabal.project-8.6.5 @@ -0,0 +1,25 @@ +packages: + ./ + ./hie-plugin-api/ + + -- ./submodules/HaRe + +tests: true + +-- The build is failing due a cabal bug involving haddock +-- see https://github.com/haskell/haskell-ide-engine/issues/1741 +package haddock-api + documentation: False + +package haskell-ide-engine + test-show-details: direct + +-- Match the flag settings we use in stac builds +constraints: + haskell-ide-engine +pedantic, + hie-plugin-api +pedantic, + ghc-lib-parser == 8.8.2.20200205 + +write-ghc-environment-files: never + +index-state: 2020-05-12T16:28:12Z From 60c5d3a8a92c9e8ea6d23b4cd46e3f4e5aca6fbb Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Fri, 22 May 2020 19:31:22 -0700 Subject: [PATCH 267/270] README.md: Change display of settings.json sample The `settings.json` sample is not valid JSON, it's more of a JSON schema. Using JSON highlighting causes github to (un)helpfully highlights the "errors". Also fix a minor grammar mistake. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44f52bd1c..aa8de52c8 100644 --- a/README.md +++ b/README.md @@ -311,7 +311,7 @@ In general, executing targets with `cabal` instead of `stack` have the same beha If you installed multiple versions of HIE then you will need to use a wrapper script. Wrapper script will analyze your project, find suitable version of HIE and launch it. -Enable it by editing VS Code settings like that: +Enable it by editing VS Code settings like this: ```json "languageServerHaskell.useCustomHieWrapper": true, @@ -321,7 +321,7 @@ Enable it by editing VS Code settings like that: ## Configuration There are some settings that can be configured via a `settings.json` file: -```json +``` { "languageServerHaskell": { "hlintOn": Boolean, From fe9a88506fdd01c9061b718365d9b62baf618e81 Mon Sep 17 00:00:00 2001 From: John Tasto <5026892+JohnTasto@users.noreply.github.com> Date: Mon, 15 Jun 2020 21:44:55 -0700 Subject: [PATCH 268/270] Update README.md `zlib1g-dev` is missing in at least the WSL2 version of Ubuntu 20.04, which causes the build to fail. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa8de52c8..c2a453d19 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ sudo apt install libicu-dev libtinfo-dev libgmp-dev **Debian 10/Ubuntu 18.10 or later**: ```bash -sudo apt install libicu-dev libncurses-dev libgmp-dev +sudo apt install libicu-dev libncurses-dev libgmp-dev # also zlib1g-dev if not installed ``` **Fedora**: From be5b41c4d95fb09d3c385aa6fa6f39099f8b3fa6 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Thu, 23 Jul 2020 15:53:58 +0100 Subject: [PATCH 269/270] Rename configuration section languageServerHaskell => haskell Brings it inline with other language servers, and also fixes it with vscode-hie-server 0.1 --- README.md | 12 ++++++------ hie-plugin-api/Haskell/Ide/Engine/Config.hs | 9 +++++---- test/functional/CompletionSpec.hs | 2 +- test/functional/FormatSpec.hs | 6 +++--- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c2a453d19..56eb31aa2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ https://github.com/haskell/haskell-language-server Until the new `haskell-language-server` reaches the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. -You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in [any of the communication channels](#its-time-to-join-the-project). +You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in [any of the communication channels](#its-time-to-join-the-project). # Haskell IDE Engine (HIE) @@ -314,8 +314,8 @@ Wrapper script will analyze your project, find suitable version of HIE and launc Enable it by editing VS Code settings like this: ```json -"languageServerHaskell.useCustomHieWrapper": true, -"languageServerHaskell.useCustomHieWrapperPath": "hie-wrapper", +"haskell.useCustomHieWrapper": true, +"haskell.useCustomHieWrapperPath": "hie-wrapper", ``` ## Configuration @@ -323,7 +323,7 @@ There are some settings that can be configured via a `settings.json` file: ``` { - "languageServerHaskell": { + "haskell": { "hlintOn": Boolean, "maxNumberOfProblems": Number "diagnosticsDebounceDuration" : Number @@ -344,7 +344,7 @@ There are some settings that can be configured via a `settings.json` file: **For a full explanation of possible configurations, refer to [hie-bios/README](https://github.com/mpickering/hie-bios/blob/master/README.md).** HIE will attempt to automatically detect your project configuration and set up -the environment for GHC. +the environment for GHC. | `cabal.project` | `stack.yaml` | `*.cabal` | Project selected | |-----------------|--------------|-----------|------------------| @@ -582,7 +582,7 @@ Then issue `:CocConfig` and add the following to your Coc config file. "haskell" ], "initializationOptions": { - "languageServerHaskell": { + "haskell": { } } } diff --git a/hie-plugin-api/Haskell/Ide/Engine/Config.hs b/hie-plugin-api/Haskell/Ide/Engine/Config.hs index 36d76bb9e..22b62cb91 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Config.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Config.hs @@ -1,6 +1,7 @@ {-# LANGUAGE OverloadedStrings #-} module Haskell.Ide.Engine.Config where +import Control.Applicative import Data.Aeson import Data.Default import qualified Data.Text as T @@ -54,7 +55,7 @@ instance Default Config where -- TODO: Add API for plugins to expose their own LSP config options instance FromJSON Config where parseJSON = withObject "Config" $ \v -> do - s <- v .: "languageServerHaskell" + s <- v .: "haskell" <|> v.: "languageServerHaskell" flip (withObject "Config.settings") s $ \o -> Config <$> o .:? "hlintOn" .!= hlintOn def <*> o .:? "diagnosticsOnChange" .!= diagnosticsOnChange def @@ -65,17 +66,17 @@ instance FromJSON Config where <*> o .:? "formatOnImportOn" .!= formatOnImportOn def <*> o .:? "formattingProvider" .!= formattingProvider def --- 2017-10-09 23:22:00.710515298 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"languageServerHaskell":{"maxNumberOfProblems":100,"hlintOn":true}}}} +-- 2017-10-09 23:22:00.710515298 [ThreadId 11] - ---> {"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"haskell":{"maxNumberOfProblems":100,"hlintOn":true}}}} -- 2017-10-09 23:22:00.710667381 [ThreadId 15] - reactor:got didChangeConfiguration notification: -- NotificationMessage -- {_jsonrpc = "2.0" -- , _method = WorkspaceDidChangeConfiguration -- , _params = DidChangeConfigurationParams --- {_settings = Object (fromList [("languageServerHaskell",Object (fromList [("hlintOn",Bool True) +-- {_settings = Object (fromList [("haskell",Object (fromList [("hlintOn",Bool True) -- ,("maxNumberOfProblems",Number 100.0)]))])}} instance ToJSON Config where - toJSON (Config h diag m d l c f fp) = object [ "languageServerHaskell" .= r ] + toJSON (Config h diag m d l c f fp) = object [ "haskell" .= r ] where r = object [ "hlintOn" .= h , "diagnosticsOnChange" .= diag diff --git a/test/functional/CompletionSpec.hs b/test/functional/CompletionSpec.hs index 274fbc4bc..36404f915 100644 --- a/test/functional/CompletionSpec.hs +++ b/test/functional/CompletionSpec.hs @@ -330,7 +330,7 @@ spec = describe "completions" $ do doc <- openDoc "Completion.hs" "haskell" _ <- count 2 $ skipManyTill loggingNotification noDiagnostics - let config = object ["languageServerHaskell" .= (object ["completionSnippetsOn" .= False])] + let config = object ["haskell" .= (object ["completionSnippetsOn" .= False])] sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams config) diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index 6afa5dce3..b211ffd55 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -33,7 +33,7 @@ spec = do describe "formatting provider" $ do let formatLspConfig provider = - object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] + object [ "haskell" .= object ["formattingProvider" .= (provider :: Value)] ] formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) } it "respects none" $ runSessionWithConfig (formatConfig "none") hieCommand fullCaps "test/testdata" $ do @@ -94,7 +94,7 @@ spec = do describe "ormolu" $ do let formatLspConfig provider = - object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] + object [ "haskell" .= object ["formattingProvider" .= (provider :: Value)] ] it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu")) @@ -199,7 +199,7 @@ formattedOrmolu = \ x <- return \"hello\"\n\ \ return \"asdf\"\n\n\ \data Baz = Baz {a :: Int, b :: String}\n" - + unchangedOrmolu :: T.Text unchangedOrmolu = "module Format where\n\ From d84b84322ccac81bf4963983d55cc4e6e98ad418 Mon Sep 17 00:00:00 2001 From: Alan Zimmerman Date: Wed, 7 Oct 2020 17:52:00 +0100 Subject: [PATCH 270/270] Add deprecation notice to README This is prior to archiving in favour of https://github.com/haskell/haskell-language-server See https://github.com/haskell/haskell-language-server/issues/473 --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 56eb31aa2..03e4923ee 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,9 @@ -# Integration with `ghcide`: the new `haskell-language-server` +# Deprecated -Currently the main development effort is focused in [integrating haskell-ide-engine](https://github.com/haskell/haskell-ide-engine/issues/1416) and [ghcide](https://github.com/digital-asset/ghcide) under a common repository: +This repository is now an historical artifact. It was the original LSP support for haskell, which is now provided by https://github.com/haskell/haskell-language-server -Until the new `haskell-language-server` reaches the feature level and stability of `haskell-ide-engine`, we aim to continue doing monthly releases. However, in general, bug fixes will be favored over new features and refactorings. They could be redirected to the new repo to avoid duplicated efforts. - -You still can contribute to improve the haskell ide experience! If you are not sure if you contribution should belong to this repo or the new one, feel free to ask in [any of the communication channels](#its-time-to-join-the-project). # Haskell IDE Engine (HIE)