diff --git a/.circleci/config.yml b/.circleci/config.yml index 798cdf129..0858f26e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,6 +26,10 @@ defaults: &defaults - stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }} - stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }} + # - run: + # name: Stack upgrade + # command: stack upgrade + - run: name: Stack setup command: stack -j 2 --stack-yaml=${STACK_FILE} setup @@ -36,7 +40,7 @@ defaults: &defaults - run: name: Install Hoogle - command: stack --stack-yaml=${STACK_FILE} install hoogle + command: stack -j 1 --stack-yaml=${STACK_FILE} install hoogle - run: name: Build (we need the exe for tests) diff --git a/.gitignore b/.gitignore index ac2acc891..05da255bc 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ /test/testdata/wErrorTest/stack.yaml TAGS cabal-dev/ +cabal.project.freeze cabal.sandbox.config dist-newstyle/ dist diff --git a/Changelog.md b/Changelog.md index b8f7b7631..c610a620f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,86 @@ +# 0.13.0.0 + +- Bump resolvers and deps `lts-14.11` for GHC 8.6.5, and +`nightly-2019-09-21` for nightyly build, the last one to support GHC +8.6.5. + + Key deps updated + - brittany-0.12.1 + - floskell-0.10.1 + - hlint-2.2.3 + - hsimport-0.11.0 + + ([#1419](https://github.com/haskell/haskell-ide-engine/pull/1419), by @alanz) + +- Update haskell-lsp to 0.17 +([#1418](https://github.com/haskell/haskell-ide-engine/pull/1418), by @alanz) + +- Add instructions about install cabal with stack in the README +([#1414](https://github.com/haskell/haskell-ide-engine/pull/1414), by @jneira) + +- Robust tests +([#1413](https://github.com/haskell/haskell-ide-engine/pull/1413), by @alanz) + +- Find and run cabal in user original $PATH +([#1406](https://github.com/haskell/haskell-ide-engine/pull/1406), by @jneira) + +- Add stack-install-cabal target and confirmation messages +([#1405](https://github.com/haskell/haskell-ide-engine/pull/1405), by @jneira) + +- Haskell lsp 0.16 +([#1402](https://github.com/haskell/haskell-ide-engine/pull/1402), by @alanz) + +- Handling Windows specific delimiters in func tests +([#1400](https://github.com/haskell/haskell-ide-engine/pull/1400), by @jneira) + +- Fix more code actions in windows +([#1399](https://github.com/haskell/haskell-ide-engine/pull/1399), by @jneira) + +- Upgrade network to 3.0.1.1 +([#1395](https://github.com/haskell/haskell-ide-engine/pull/1395), by @jneira) + +- Use the new key format in one line for azure cache +([#1394](https://github.com/haskell/haskell-ide-engine/pull/1394), by @jneira) + +- Fix code renaming in windows +([#1392](https://github.com/haskell/haskell-ide-engine/pull/1392), by @jneira) + +- Add CodeTriage badge +([#1381](https://github.com/haskell/haskell-ide-engine/pull/1381), by @NickSeagull) + +- Add support for building with cabal-3.0.0.0 +([#1379](https://github.com/haskell/haskell-ide-engine/pull/1379), by @jneira) + +- Refactor backtick aware completion +([#1377](https://github.com/haskell/haskell-ide-engine/pull/1377), by @fendor) + +- Add different Contexts for Module, import etc... +([#1375](https://github.com/haskell/haskell-ide-engine/pull/1375), by @fendor) + +- Do not traverse into Generated bindings when creating TypeMap +([#1372](https://github.com/haskell/haskell-ide-engine/pull/1372), by @fendor) + +- Readme: Mention cabal configure and restarting HIE for troubleshooting +([#1370](https://github.com/haskell/haskell-ide-engine/pull/1370), by @Infinisil) + +- Split out completion from HieExtras +([#1369](https://github.com/haskell/haskell-ide-engine/pull/1369), by @bubba) + +- Remove cabal check from stack builds +([#1368](https://github.com/haskell/haskell-ide-engine/pull/1368), by @ollef) + +- Recommend Coc over LanguageClient-neovim +([#1367](https://github.com/haskell/haskell-ide-engine/pull/1367), by @Avi-D-coder) + +- Install: Fix broken stack-build target and fix cabal run help msg +([#1363](https://github.com/haskell/haskell-ide-engine/pull/1363), by @fendor) + +- Fix error message if outdated cabal dependency +([#1361](https://github.com/haskell/haskell-ide-engine/pull/1361), by @fendor) + +- Made hlint dependency properly depend on version of ghc. +([#1355](https://github.com/haskell/haskell-ide-engine/pull/1355), by @LinuxUser404) + # 0.12.0.0 - Monthly resolver bump, `lts-13.30` for GHC 8.6.5, and `nightly-2019-07-31` for diff --git a/README.md b/README.md index 7a41506b5..5e5b6a677 100644 --- a/README.md +++ b/README.md @@ -214,12 +214,22 @@ The install-script can be invoked via `cabal` instead of `stack` with the comman cabal v2-run ./install.hs --project-file install/shake.project ``` -Running the script with cabal on windows seems to have some issues and is currently not fully supported. +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. 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 appropiate cabal version using stack by running: + +```bash +stack ./install.hs stack-install-cabal +``` + ##### Install specific GHC Version Install **Nightly** (and hoogle docs): diff --git a/app/MainHie.hs b/app/MainHie.hs index 4a7717b88..9375f92eb 100644 --- a/app/MainHie.hs +++ b/app/MainHie.hs @@ -127,6 +127,8 @@ run opts = do progName <- getProgName logm $ "Run entered for HIE(" ++ progName ++ ") " ++ version logm $ "Current directory:" ++ d + args <- getArgs + logm $ "args:" ++ show args let initOpts = defaultCradleOpts { cradleOptsVerbosity = verbosity } verbosity = if optBiosVerbose opts then Verbose else Silent diff --git a/haskell-ide-engine.cabal b/haskell-ide-engine.cabal index 018a24242..1dd3ea349 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: 0.13.0.0 synopsis: Provide a common engine to power any Haskell IDE description: Please see README.md homepage: http://github.com/githubuser/haskell-ide-engine#readme @@ -69,8 +69,8 @@ library , gitrev >= 1.1 , haddock-api , haddock-library - , haskell-lsp == 0.16.* - , haskell-lsp-types == 0.16.* + , haskell-lsp == 0.17.* + , haskell-lsp-types == 0.17.* , haskell-src-exts , hie-plugin-api , hoogle >= 5.0.13 @@ -203,7 +203,7 @@ test-suite unit-test , free , ghc , haskell-ide-engine - , haskell-lsp-types == 0.16.* + , haskell-lsp-types == 0.17.* , hie-test-utils , hie-plugin-api , hoogle > 5.0.11 @@ -289,10 +289,10 @@ test-suite func-test , data-default , directory , filepath - , lsp-test >= 0.6.0.0 + , lsp-test >= 0.8.0.0 , haskell-ide-engine - , haskell-lsp-types == 0.16.* - , haskell-lsp == 0.16.* + , haskell-lsp-types == 0.17.* + , haskell-lsp == 0.17.* , hie-test-utils , hie-plugin-api , hspec diff --git a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs index ffbdc41e0..9a41d8f7e 100644 --- a/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs +++ b/hie-plugin-api/Haskell/Ide/Engine/Cradle.hs @@ -13,7 +13,6 @@ import Data.Function ((&)) import qualified Data.List.NonEmpty as NonEmpty import Data.List.NonEmpty (NonEmpty) import System.FilePath -import System.Directory import qualified Data.Map as M import Data.List (inits, sortOn, isPrefixOf, find) import Data.Maybe (listToMaybe) diff --git a/hie-plugin-api/hie-plugin-api.cabal b/hie-plugin-api/hie-plugin-api.cabal index 8b3b1979d..adbe689e9 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: 0.12.0.0 +version: 0.13.0.0 synopsis: Haskell IDE API for plugin communication license: BSD3 license-file: LICENSE @@ -52,7 +52,7 @@ library , hie-bios , ghc-project-types >= 5.9.0.0 , cabal-helper - , haskell-lsp == 0.16.* + , haskell-lsp == 0.17.* , hslogger , unliftio , monad-control diff --git a/install/hie-install.cabal b/install/hie-install.cabal index 287b56f6a..342f87695 100644 --- a/install/hie-install.cabal +++ b/install/hie-install.cabal @@ -21,6 +21,7 @@ library build-depends: base >= 4.9 && < 5 , shake == 0.17.8 , directory + , filepath , extra , text default-extensions: LambdaCase diff --git a/install/src/Cabal.hs b/install/src/Cabal.hs index 68f530049..0c0ca380d 100644 --- a/install/src/Cabal.hs +++ b/install/src/Cabal.hs @@ -17,12 +17,14 @@ import Print import Env import Stack - execCabal :: CmdResult r => [String] -> Action r -execCabal = command [] "cabal" +execCabal = execCabalWithOriginalPath execCabal_ :: [String] -> Action () -execCabal_ = command_ [] "cabal" +execCabal_ = execCabalWithOriginalPath + +execCabalWithOriginalPath :: CmdResult r => [String] -> Action r +execCabalWithOriginalPath = withoutStackCachedBinaries . (command [] "cabal") cabalBuildData :: Action () cabalBuildData = do @@ -57,22 +59,32 @@ cabalInstallHie versionNumber = do , "--overwrite-policy=always" ] ++ installMethod - liftIO $ do - copyFile (localBin "hie" <.> exe) - (localBin "hie-" ++ versionNumber <.> exe) - copyFile (localBin "hie" <.> exe) - (localBin "hie-" ++ dropExtension versionNumber <.> exe) -installCabal :: Action () -installCabal = do + let minorVerExe = "hie-" ++ versionNumber <.> exe + majorVerExe = "hie-" ++ dropExtension versionNumber <.> exe + + liftIO $ do + copyFile (localBin "hie" <.> exe) (localBin minorVerExe) + copyFile (localBin "hie" <.> exe) (localBin majorVerExe) + + printLine $ "Copied executables " + ++ ("hie-wrapper" <.> exe) ++ ", " + ++ ("hie" <.> exe) ++ ", " + ++ majorVerExe ++ " and " + ++ minorVerExe + ++ " to " ++ localBin + +installCabalWithStack :: Action () +installCabalWithStack = do -- try to find existing `cabal` executable with appropriate version - cabalExeOk <- do - c <- liftIO (findExecutable "cabal") - when (isJust c) checkCabal - return $ isJust c + mbc <- withoutStackCachedBinaries (liftIO (findExecutable "cabal")) - -- install `cabal-install` if not already installed - unless cabalExeOk $ execStackShake_ ["install", "cabal-install"] + case mbc of + Just c -> do + checkCabal + printLine "There is already a cabal executable in $PATH with the required minimum version." + -- install `cabal-install` if not already installed + Nothing -> execStackShake_ ["install", "cabal-install"] -- | check `cabal` has the required version checkCabal :: Action () @@ -106,7 +118,7 @@ cabalInstallNotSuportedFailMsg = -- | Error message when the `cabal` binary is an older version cabalInstallIsOldFailMsg :: String -> String cabalInstallIsOldFailMsg cabalVersion = - "The `cabal` executable is outdated.\n" + "The `cabal` executable found in $PATH is outdated.\n" ++ "found version is `" ++ cabalVersion ++ "`.\n" diff --git a/install/src/Help.hs b/install/src/Help.hs index bb9e65363..7a8b347e6 100644 --- a/install/src/Help.hs +++ b/install/src/Help.hs @@ -10,6 +10,7 @@ import Env import Print import Version import BuildSystem +import Cabal printUsage :: Action () printUsage = do @@ -83,6 +84,7 @@ helpMessage versions@BuildableVersions {..} = do , stackTarget buildAllTarget , stackTarget buildDataTarget ] + ++ (if isRunFromStack then [stackTarget installCabalTarget] else []) ++ map (stackTarget . hieTarget) stackVersions cabalTargets = @@ -136,6 +138,12 @@ cabalGhcsTarget = , "Show all GHC versions that can be installed via `cabal-build` and `cabal-build-all`." ) +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 diff --git a/install/src/HieInstall.hs b/install/src/HieInstall.hs index 223dde39b..b05f1714d 100644 --- a/install/src/HieInstall.hs +++ b/install/src/HieInstall.hs @@ -63,7 +63,7 @@ defaultMain = do want ["short-help"] -- general purpose targets phony "submodules" updateSubmodules - phony "cabal" installCabal + phony "cabal" installCabalWithStack phony "short-help" shortHelpMessage phony "all" shortHelpMessage phony "help" (helpMessage versions) @@ -91,6 +91,7 @@ defaultMain = do ) -- stack specific targets + when isRunFromStack (phony "stack-install-cabal" (need ["cabal"])) phony "stack-build" (need (reverse $ map ("stack-hie-" ++) hieVersions)) phony "stack-build-all" (need ["build-data", "build"]) phony "stack-build-data" $ do @@ -116,9 +117,9 @@ defaultMain = do forM_ ghcVersions (\version -> phony ("cabal-hie-" ++ version) $ do - validateCabalNewInstallIsSupported need ["submodules"] need ["cabal"] + validateCabalNewInstallIsSupported cabalBuildHie version cabalInstallHie version ) diff --git a/install/src/Stack.hs b/install/src/Stack.hs index 279bfe9ca..eef3126a6 100644 --- a/install/src/Stack.hs +++ b/install/src/Stack.hs @@ -4,13 +4,15 @@ import Development.Shake import Development.Shake.Command import Development.Shake.FilePath import Control.Monad +import Data.List import System.Directory ( copyFile ) - +import System.FilePath ( searchPathSeparator, () ) +import System.Environment ( lookupEnv, setEnv, getEnvironment ) +import BuildSystem import Version import Print import Env - stackBuildHie :: VersionNumber -> Action () stackBuildHie versionNumber = execStackWithGhc_ versionNumber ["build"] `actionOnException` liftIO (putStrLn stackBuildFailMsg) @@ -96,3 +98,36 @@ stackBuildFailMsg = ++ "Try running `stack clean` and restart the build\n" ++ "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) (splitPaths path)) + where containsAny p = any (`isInfixOf` p) strs + + joinPaths = intercalate [searchPathSeparator] + + splitPaths s = + case dropWhile (== searchPathSeparator) s of + "" -> [] + s' -> w : words s'' + where (w, s'') = break (== searchPathSeparator) s' diff --git a/stack-8.2.2.yaml b/stack-8.2.2.yaml index 1e162f714..3ecd8bbed 100644 --- a/stack-8.2.2.yaml +++ b/stack-8.2.2.yaml @@ -22,14 +22,14 @@ extra-deps: - ghc-exactprint-0.5.8.2 - haddock-api-2.18.1 - haddock-library-1.4.4 -- haskell-lsp-0.16.0.0 -- haskell-lsp-types-0.16.0.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 - haskell-src-exts-1.21.0 - haskell-src-exts-util-0.2.5 - hlint-2.1.17 # last hlint supporting GHC 8.2 - hoogle-5.0.17.9 - hsimport-0.8.8 -- lsp-test-0.7.0.0 +- lsp-test-0.8.0.0 - monad-dijkstra-0.1.1.2 - pretty-show-1.8.2 - rope-utf16-splay-0.3.1.0 diff --git a/stack-8.4.2.yaml b/stack-8.4.2.yaml index 3363ecaa6..3fc221f59 100644 --- a/stack-8.4.2.yaml +++ b/stack-8.4.2.yaml @@ -4,46 +4,46 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - brittany-0.12.0.0 - - base-compat-0.9.3 - - bytestring-trie-0.2.5.0 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-exactprint-0.5.8.2 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.20.0 - - haddock-library-1.6.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - haskell-src-exts-util-0.2.5 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - - temporary-1.2.1.1 - # To make build work in windows 7 - - unix-time-0.4.7 - - windns-0.1.0.0 - - yi-rope-0.11 - - pretty-show-1.8.2 - # - hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 +- brittany-0.12.1.0 +- base-compat-0.9.3 +- bytestring-trie-0.2.5.0 +- cabal-plan-0.5.0.0 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.1 +- ghc-exactprint-0.5.8.2 +- ghc-lib-parser-8.8.1 +- haddock-api-2.20.0 +- haddock-library-1.6.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- haskell-src-exts-util-0.2.5 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2 +- pretty-show-1.8.2 +- rope-utf16-splay-0.3.1.0 +- syz-0.2.0.0 +- temporary-1.2.1.1 +# To make build work in windows 7 +- unix-time-0.4.7 +- windns-0.1.0.0 +- yi-rope-0.11 +# - 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 - - file-embed-0.0.11@sha256:77bb3b1dc219ccd682706b1d3dfbc5bf2db5beb1af6c108ed9e0f5b4d58a5a0a,1325 - - libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 - - unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 +- 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: @@ -52,6 +52,6 @@ flags: pedantic: true nix: - packages: [icu libcxx zlib] + packages: [ icu libcxx zlib ] concurrent-tests: false diff --git a/stack-8.4.3.yaml b/stack-8.4.3.yaml index 159eb65ef..baada8b0f 100644 --- a/stack-8.4.3.yaml +++ b/stack-8.4.3.yaml @@ -4,44 +4,44 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - base-compat-0.9.3 - - brittany-0.12.0.0 - - bytestring-trie-0.2.5.0 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-exactprint-0.5.8.2 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.20.0 - - haddock-library-1.6.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - haskell-src-exts-util-0.2.5 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - # To make build work in windows 7 - - unix-time-0.4.7 - - temporary-1.2.1.1 - - pretty-show-1.8.2 - # - hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 +- base-compat-0.9.3 +- brittany-0.12.1.0 +- bytestring-trie-0.2.5.0 +- cabal-plan-0.5.0.0 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.1 +- ghc-exactprint-0.5.8.2 +- ghc-lib-parser-8.8.1 +- haddock-api-2.20.0 +- haddock-library-1.6.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- haskell-src-exts-util-0.2.5 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2 +- pretty-show-1.8.2 +- rope-utf16-splay-0.3.1.0 +- syz-0.2.0.0 +# To make build work in windows 7 +- unix-time-0.4.7 +- temporary-1.2.1.1 +# - 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 - - file-embed-0.0.11@sha256:77bb3b1dc219ccd682706b1d3dfbc5bf2db5beb1af6c108ed9e0f5b4d58a5a0a,1325 - - libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 - - unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 +- 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: @@ -50,6 +50,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 5d7f76683..521d3ca32 100644 --- a/stack-8.4.4.yaml +++ b/stack-8.4.4.yaml @@ -4,44 +4,44 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - brittany-0.12.0.0 - - bytestring-trie-0.2.5.0 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-exactprint-0.5.8.2 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.20.0 - - haddock-library-1.6.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - haskell-src-exts-util-0.2.5 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2 - - optparse-simple-0.1.0 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - # To make build work in windows 7 - - unix-time-0.4.7 - - temporary-1.2.1.1 - - pretty-show-1.8.2 - #- hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 +- brittany-0.12.1.0 +- bytestring-trie-0.2.5.0 +- cabal-plan-0.5.0.0 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.1 +- ghc-exactprint-0.5.8.2 +- ghc-lib-parser-8.8.1 +- haddock-api-2.20.0 +- haddock-library-1.6.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- haskell-src-exts-util-0.2.5 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2 +- optparse-simple-0.1.0 +- pretty-show-1.9.5 +- rope-utf16-splay-0.3.1.0 +- syz-0.2.0.0 +# To make build work in windows 7 +- unix-time-0.4.7 +- temporary-1.2.1.1 +#- 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 - - unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 - - file-embed-0.0.11@sha256:77bb3b1dc219ccd682706b1d3dfbc5bf2db5beb1af6c108ed9e0f5b4d58a5a0a,1325 - - libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090 +- 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: @@ -50,6 +50,6 @@ flags: pedantic: true nix: - packages: [icu libcxx zlib] + packages: [ icu libcxx zlib ] concurrent-tests: false diff --git a/stack-8.6.1.yaml b/stack-8.6.1.yaml index 5ce3cc00d..dae8407f1 100644 --- a/stack-8.6.1.yaml +++ b/stack-8.6.1.yaml @@ -4,50 +4,51 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - apply-refact-0.6.0.0 - - brittany-0.12.0.0 - - butcher-1.3.2.1 - - bytestring-trie-0.2.5.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 - - floskell-0.10.0 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.21.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - haskell-src-exts-util-0.2.5 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2 - - monad-memo-0.4.1 - - monoid-subclasses-0.4.6.1 - - multistate-0.8.0.1 - - primes-0.2.1.0 - - resolv-0.1.1.2 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - - temporary-1.2.1.1 - # To make build work in windows 7 - - unix-time-0.4.7 - - pretty-show-1.8.2 - # - hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 +- apply-refact-0.6.0.0 +- brittany-0.12.1.0 +- butcher-1.3.2.3 +- bytestring-trie-0.2.5.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 +- floskell-0.10.1 +- ghc-lib-parser-8.8.1 +- haddock-api-2.21.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- haskell-src-exts-util-0.2.5 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2 +- monad-memo-0.4.1 +- monoid-subclasses-0.4.6.1 +- multistate-0.8.0.1 +- 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 +# 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 +- 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: @@ -56,6 +57,6 @@ flags: pedantic: true nix: - packages: [icu libcxx zlib] + packages: [ icu libcxx zlib ] concurrent-tests: false diff --git a/stack-8.6.2.yaml b/stack-8.6.2.yaml index faab8aa96..58fbb0145 100644 --- a/stack-8.6.2.yaml +++ b/stack-8.6.2.yaml @@ -4,43 +4,44 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - brittany-0.12.0.0 - - butcher-1.3.2.1 - - bytestring-trie-0.2.5.0 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.21.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - haskell-src-exts-util-0.2.5 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2 - - monad-memo-0.4.1 - - multistate-0.8.0.1 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - - temporary-1.2.1.1 - # To make build work in windows 7 - - unix-time-0.4.7 - - pretty-show-1.8.2 - #- hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 +- brittany-0.12.1.0 +- butcher-1.3.2.3 +- bytestring-trie-0.2.5.0 +- cabal-plan-0.5.0.0 +- constrained-dynamic-0.1.0.0 +- deque-0.4.3 +- floskell-0.10.1 +- ghc-lib-parser-8.8.1 +- haddock-api-2.21.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- haskell-src-exts-util-0.2.5 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2 +- monad-memo-0.4.1 +- multistate-0.8.0.1 +- rope-utf16-splay-0.3.1.0 +- strict-list-0.1.5 +- syz-0.2.0.0 +- temporary-1.2.1.1 +# 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 +- 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: @@ -49,6 +50,6 @@ flags: pedantic: true nix: - packages: [icu libcxx zlib] + packages: [ icu libcxx zlib ] concurrent-tests: false diff --git a/stack-8.6.3.yaml b/stack-8.6.3.yaml index 890741758..c61598fd3 100644 --- a/stack-8.6.3.yaml +++ b/stack-8.6.3.yaml @@ -4,42 +4,42 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - brittany-0.12.0.0 - - bytestring-trie-0.2.5.0 - - butcher-1.3.2.1 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.21.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - haskell-src-exts-util-0.2.5 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2 - - monad-memo-0.4.1 - - multistate-0.8.0.1 - - optparse-simple-0.1.0 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - - temporary-1.2.1.1 - # To make build work in windows 7 - - unix-time-0.4.7 - # - hie-bios-0.2.1@sha256:5f98a3516ce65e0a3ffd88bf6fb416b04cc084371d0fbf0e1762780de1d652ce,3219 +- brittany-0.12.1.0 +- bytestring-trie-0.2.5.0 +- butcher-1.3.2.1 +- cabal-plan-0.5.0.0 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.1 +- ghc-lib-parser-8.8.1 +- haddock-api-2.21.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- haskell-src-exts-util-0.2.5 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2 +- monad-memo-0.4.1 +- multistate-0.8.0.1 +- optparse-simple-0.1.0 +- rope-utf16-splay-0.3.1.0 +- syz-0.2.0.0 +- temporary-1.2.1.1 +# 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 - - unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 +- 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: @@ -48,6 +48,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 bc09bfee5..cac2b21bd 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -4,40 +4,40 @@ packages: - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types - - - brittany-0.12.0.0 - - butcher-1.3.2.1 - - bytestring-trie-0.2.5.0 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.22.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - hlint-2.2.2 - - hoogle-5.0.17.9 - - hsimport-0.10.0 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2@rev:1 - - monad-memo-0.4.1 - - multistate-0.8.0.1 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - - temporary-1.2.1.1 - # 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 - - unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types + +- brittany-0.12.1.0 +- butcher-1.3.2.1 +- bytestring-trie-0.2.5.0 +- cabal-plan-0.5.0.0 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.1 +- ghc-lib-parser-8.8.1 +- haddock-api-2.22.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- haskell-src-exts-1.21.1 +- hlint-2.2.3 +- hoogle-5.0.17.11 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2@rev:1 +- monad-memo-0.4.1 +- multistate-0.8.0.1 +- rope-utf16-splay-0.3.1.0 +- syz-0.2.0.0 +- temporary-1.2.1.1 +# 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 +- unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 flags: @@ -50,6 +50,6 @@ flags: # 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 6c5c03a81..221657800 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -1,42 +1,35 @@ -resolver: lts-13.30 +resolver: lts-14.11 packages: - . - hie-plugin-api extra-deps: - - ./hie-bios - - ./submodules/HaRe - - ./submodules/cabal-helper - - ./submodules/ghc-mod/ghc-project-types +- ./hie-bios +- ./submodules/HaRe +- ./submodules/cabal-helper +- ./submodules/ghc-mod/ghc-project-types - - brittany-0.12.0.0 - - butcher-1.3.2.1 - - bytestring-trie-0.2.5.0 - - cabal-plan-0.5.0.0 - - constrained-dynamic-0.1.0.0 - - floskell-0.10.0 - - ghc-lib-parser-8.8.0.20190723 - - haddock-api-2.22.0 - - haskell-lsp-0.16.0.0 - - haskell-lsp-types-0.16.0.0 - - haskell-src-exts-1.21.0 - - hlint-2.2.2 - - hsimport-0.10.0 - - hoogle-5.0.17.9 - - lsp-test-0.7.0.0 - - monad-dijkstra-0.1.1.2@rev:1 - - monad-memo-0.4.1 - - multistate-0.8.0.1 - - rope-utf16-splay-0.3.1.0 - - syz-0.2.0.0 - - temporary-1.2.1.1 +- ansi-terminal-0.8.2 +- ansi-wl-pprint-0.6.8.2 +- brittany-0.12.1.0 +- bytestring-trie-0.2.5.0 +- cabal-plan-0.5.0.0 +- clock-0.7.2 +- constrained-dynamic-0.1.0.0 +- floskell-0.10.1 +- ghc-lib-parser-8.8.1 +- haddock-api-2.22.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- hlint-2.2.3 +- hsimport-0.11.0 +- hoogle-5.0.17.11 +- lsp-test-0.8.0.0 +- monad-dijkstra-0.1.1.2@rev:1 +- syz-0.2.0.0 +- temporary-1.2.1.1 # - 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 - - unordered-containers-0.2.10.0@sha256:5e9b095a9283d9e2f064fec73a81a6b6ea0b7fda3f219a8175785d2d2a3de204 - flags: haskell-ide-engine: pedantic: true @@ -46,6 +39,6 @@ flags: # allow-newer: true nix: - packages: [icu libcxx zlib] + packages: [ icu libcxx zlib ] concurrent-tests: false diff --git a/stack.yaml b/stack.yaml index f38370f05..f89d66346 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2019-07-31 # GHC 8.6.5 +resolver: nightly-2019-09-21 # Last GHC 8.6.5 packages: - . - hie-plugin-api @@ -9,30 +9,27 @@ extra-deps: - ./submodules/cabal-helper - ./submodules/ghc-mod/ghc-project-types -- deque-0.2.7@sha256:ab8ac7a379347fdb8e083297d3bc95372e420c8a96833ddb10a9c8d11ae1f278,1202 +- deque-0.4.3@sha256:b988c70a1599b10c7cb643e9c8b0ae4d0166bb2f39c1e13c06a0aeaff29bd9cb,1873 - ansi-terminal-0.8.2 -- butcher-1.3.2.1 - bytestring-trie-0.2.5.0 - ansi-wl-pprint-0.6.8.2 -- brittany-0.12.0.0 +- brittany-0.12.1.0 - cabal-plan-0.5.0.0 +- clock-0.7.2 - constrained-dynamic-0.1.0.0 - floskell-0.10.1 -- ghc-lib-parser-8.8.0.20190723 +- ghc-lib-parser-8.8.1 - haddock-api-2.22.0 -- haskell-lsp-0.16.0.0 -- haskell-lsp-types-0.16.0.0 -- hlint-2.2.2 -- hsimport-0.10.0 -- lsp-test-0.7.0.0 +- haskell-lsp-0.17.0.0 +- haskell-lsp-types-0.17.0.0 +- hlint-2.2.3 +- hsimport-0.11.0 +- lsp-test-0.8.0.0 - monad-dijkstra-0.1.1.2@rev:1 - syz-0.2.0.0 - temporary-1.2.1.1 -- clock-0.7.2 + # - 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 flags: haskell-ide-engine: diff --git a/submodules/cabal-helper b/submodules/cabal-helper index 447814db7..a1c4a3746 160000 --- a/submodules/cabal-helper +++ b/submodules/cabal-helper @@ -1 +1 @@ -Subproject commit 447814db7ecda25afa13a7a699a72c5223649d98 +Subproject commit a1c4a3746311055c2100471aeb98606345496eb3 diff --git a/test/functional/CommandSpec.hs b/test/functional/CommandSpec.hs index c85fa0654..fbeb6c8d0 100644 --- a/test/functional/CommandSpec.hs +++ b/test/functional/CommandSpec.hs @@ -24,7 +24,7 @@ spec = describe "commands" $ do it "get de-prefixed" $ runSession hieCommand fullCaps "test/testdata/" $ do ResponseMessage _ _ _ (Just err) <- request WorkspaceExecuteCommand - (ExecuteCommandParams "1234:package:add" (Just (List []))) :: Session ExecuteCommandResponse + (ExecuteCommandParams "1234:package:add" (Just (List [])) Nothing) :: Session ExecuteCommandResponse let ResponseError _ msg _ = err -- We expect an error message about the dud arguments, but should pickup "add" and "package" liftIO $ msg `shouldSatisfy` T.isInfixOf "while parsing args for add in plugin package" diff --git a/test/functional/CompletionSpec.hs b/test/functional/CompletionSpec.hs index 136fdb5c1..cce4d22d2 100644 --- a/test/functional/CompletionSpec.hs +++ b/test/functional/CompletionSpec.hs @@ -16,7 +16,7 @@ spec :: Spec spec = describe "completions" $ do it "works" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "put" _ <- applyEdit doc te @@ -38,7 +38,7 @@ spec = describe "completions" $ do it "completes imports" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 1 17) (Position 1 26)) "Data.M" _ <- applyEdit doc te @@ -52,7 +52,7 @@ spec = describe "completions" $ do it "completes qualified imports" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 2 17) (Position 1 25)) "Dat" _ <- applyEdit doc te @@ -66,7 +66,7 @@ spec = describe "completions" $ do it "completes language extensions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 0 24) (Position 0 31)) "" _ <- applyEdit doc te @@ -79,7 +79,7 @@ spec = describe "completions" $ do it "completes pragmas" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 0 4) (Position 0 34)) "" _ <- applyEdit doc te @@ -94,7 +94,7 @@ spec = describe "completions" $ do it "completes pragmas no close" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 0 4) (Position 0 24)) "" _ <- applyEdit doc te @@ -109,7 +109,7 @@ spec = describe "completions" $ do it "completes options pragma" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 0 4) (Position 0 34)) "OPTIONS" _ <- applyEdit doc te @@ -127,7 +127,7 @@ spec = describe "completions" $ do it "completes ghc options pragma values" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 0 0) (Position 0 0)) "{-# OPTIONS_GHC -Wno-red #-}\n" _ <- applyEdit doc te @@ -144,14 +144,14 @@ spec = describe "completions" $ do it "completes with no prefix" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics compls <- getCompletions doc (Position 5 7) liftIO $ filter ((== "!!") . (^. label)) compls `shouldNotSatisfy` null -- See https://github.com/haskell/haskell-ide-engine/issues/903 it "strips compiler generated stuff from completions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "DupRecFields.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 0) (Position 5 2)) "acc" _ <- applyEdit doc te @@ -167,7 +167,7 @@ spec = describe "completions" $ do describe "contexts" $ do it "only provides type suggestions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Context.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics compls <- getCompletions doc (Position 2 17) liftIO $ do compls `shouldContainCompl` "Integer" @@ -175,7 +175,7 @@ spec = describe "completions" $ do it "only provides type suggestions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Context.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics compls <- getCompletions doc (Position 3 9) liftIO $ do compls `shouldContainCompl` "abs" @@ -184,7 +184,7 @@ spec = describe "completions" $ do -- This currently fails if it takes too long to typecheck the module -- it "completes qualified type suggestions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do -- doc <- openDoc "Context.hs" "haskell" - -- _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + -- _ <- count 2 $ skipManyTill loggingNotification noDiagnostics -- let te = TextEdit (Range (Position 2 17) (Position 2 17)) " -> Conc." -- _ <- applyEdit doc te -- compls <- getCompletions doc (Position 2 26) @@ -195,7 +195,7 @@ spec = describe "completions" $ do it "have implicit foralls on basic polymorphic types" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 9)) "id" _ <- applyEdit doc te compls <- getCompletions doc (Position 5 9) @@ -207,7 +207,7 @@ spec = describe "completions" $ do it "have implicit foralls with multiple type variables" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "flip" _ <- applyEdit doc te compls <- getCompletions doc (Position 5 11) @@ -220,7 +220,7 @@ spec = describe "completions" $ do describe "snippets" $ do it "work for argumentless constructors" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "Nothing" _ <- applyEdit doc te @@ -233,7 +233,7 @@ spec = describe "completions" $ do it "work for polymorphic types" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "fold" _ <- applyEdit doc te @@ -250,7 +250,7 @@ spec = describe "completions" $ do it "work for complex types" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "mapM" _ <- applyEdit doc te @@ -267,7 +267,7 @@ spec = describe "completions" $ do it "work for infix functions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "even `filte" _ <- applyEdit doc te @@ -282,7 +282,7 @@ spec = describe "completions" $ do it "work for infix functions in backticks" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "even `filte`" _ <- applyEdit doc te @@ -297,7 +297,7 @@ spec = describe "completions" $ do it "work for qualified infix functions" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "\"\" `Data.List.interspe" _ <- applyEdit doc te @@ -312,7 +312,7 @@ spec = describe "completions" $ do it "work for qualified infix functions in backticks" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let te = TextEdit (Range (Position 5 7) (Position 5 24)) "\"\" `Data.List.interspe`" _ <- applyEdit doc te @@ -328,7 +328,7 @@ spec = describe "completions" $ do it "respects lsp configuration" $ runSession hieCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics let config = object ["languageServerHaskell" .= (object ["completionSnippetsOn" .= False])] @@ -338,7 +338,7 @@ spec = describe "completions" $ do it "respects client capabilities" $ runSession hieCommand noSnippetsCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- skipManyTill loggingNotification (count 2 noDiagnostics) + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics checkNoSnippets doc where diff --git a/test/functional/DeferredSpec.hs b/test/functional/DeferredSpec.hs index be9df63b5..9c8cf6b55 100644 --- a/test/functional/DeferredSpec.hs +++ b/test/functional/DeferredSpec.hs @@ -25,18 +25,18 @@ spec = do it "do not affect hover requests" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "FuncTest.hs" "haskell" - id1 <- sendRequest TextDocumentHover (TextDocumentPositionParams doc (Position 4 2)) + id1 <- sendRequest TextDocumentHover (TextDocumentPositionParams doc (Position 4 2) Nothing) skipMany anyNotification hoverRsp <- message :: Session HoverResponse liftIO $ hoverRsp ^? result . _Just . _Just . contents `shouldBe` Nothing liftIO $ hoverRsp ^. LSP.id `shouldBe` responseId id1 - id2 <- sendRequest TextDocumentDocumentSymbol (DocumentSymbolParams doc) + id2 <- sendRequest TextDocumentDocumentSymbol (DocumentSymbolParams doc Nothing) symbolsRsp <- skipManyTill anyNotification message :: Session DocumentSymbolsResponse liftIO $ symbolsRsp ^. LSP.id `shouldBe` responseId id2 - id3 <- sendRequest TextDocumentHover (TextDocumentPositionParams doc (Position 4 2)) + id3 <- sendRequest TextDocumentHover (TextDocumentPositionParams doc (Position 4 2) Nothing) hoverRsp2 <- skipManyTill anyNotification message :: Session HoverResponse liftIO $ hoverRsp2 ^. LSP.id `shouldBe` responseId id3 @@ -44,8 +44,8 @@ spec = do liftIO $ contents2 `shouldNotSatisfy` null -- Now that we have cache the following request should be instant - let highlightParams = TextDocumentPositionParams doc (Position 7 0) - highlightRsp <- request TextDocumentDocumentHighlight highlightParams :: Session DocumentHighlightsResponse + let highlightParams = TextDocumentPositionParams doc (Position 7 0) Nothing + highlightRsp <- request TextDocumentDocumentHighlight highlightParams let (Just (List locations)) = highlightRsp ^. result liftIO $ locations `shouldBe` [ DocumentHighlight { _range = Range @@ -128,7 +128,7 @@ spec = do let args' = H.fromList [("pos", toJSON (Position 7 0)), ("file", toJSON testUri)] args = List [Object args'] - executeRsp <- request WorkspaceExecuteCommand (ExecuteCommandParams "hare:demote" (Just args)) + executeRsp <- request WorkspaceExecuteCommand (ExecuteCommandParams "hare:demote" (Just args) Nothing) liftIO $ executeRsp ^. result `shouldBe` Just (Object H.empty) editReq <- message :: Session ApplyWorkspaceEditRequest diff --git a/test/functional/DiagnosticsSpec.hs b/test/functional/DiagnosticsSpec.hs index 0b3b84d8e..d9444ed9e 100644 --- a/test/functional/DiagnosticsSpec.hs +++ b/test/functional/DiagnosticsSpec.hs @@ -2,6 +2,7 @@ module DiagnosticsSpec where +import Control.Applicative.Combinators import Control.Lens hiding (List) import Control.Monad.IO.Class import Data.Aeson (toJSON) @@ -87,7 +88,7 @@ spec = describe "diagnostics providers" $ do let te = TextEdit (Range (Position 0 0) (Position 0 13)) "" _ <- applyEdit doc te - noDiagnostics + skipManyTill loggingNotification noDiagnostics sendNotification TextDocumentDidSave (DidSaveTextDocumentParams doc) diags2 <- waitForDiagnostics diff --git a/test/functional/FormatSpec.hs b/test/functional/FormatSpec.hs index fbbe919cb..2b8524617 100644 --- a/test/functional/FormatSpec.hs +++ b/test/functional/FormatSpec.hs @@ -30,7 +30,7 @@ spec = do doc <- openDoc "Format.hs" "haskell" formatRange doc (FormattingOptions 5 True) (Range (Position 4 0) (Position 7 19)) documentContents doc >>= liftIO . (`shouldBe` formattedRangeTabSize5) - + describe "formatting provider" $ do let formatLspConfig provider = object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ] @@ -42,7 +42,7 @@ spec = do formatDoc doc (FormattingOptions 2 True) documentContents doc >>= liftIO . (`shouldBe` orig) - + formatRange doc (FormattingOptions 2 True) (Range (Position 1 0) (Position 3 10)) documentContents doc >>= liftIO . (`shouldBe` orig) @@ -60,18 +60,18 @@ spec = do sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany")) formatDoc doc (FormattingOptions 2 True) documentContents doc >>= liftIO . (`shouldBe` formattedBrittanyPostFloskell) - + describe "brittany" $ do it "formats a document with LF endings" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "BrittanyLF.hs" "haskell" - let opts = DocumentFormattingParams doc (FormattingOptions 4 True) + let opts = DocumentFormattingParams doc (FormattingOptions 4 True) Nothing ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0) (Position 3 0)) "foo :: Int -> String -> IO ()\nfoo x y = do\n print x\n return 42\n"] it "formats a document with CRLF endings" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "BrittanyCRLF.hs" "haskell" - let opts = DocumentFormattingParams doc (FormattingOptions 4 True) + let opts = DocumentFormattingParams doc (FormattingOptions 4 True) Nothing ResponseMessage _ _ (Just edits) _ <- request TextDocumentFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 0 0) (Position 3 0)) "foo :: Int -> String -> IO ()\nfoo x y = do\n print x\n return 42\n"] @@ -79,7 +79,7 @@ spec = do it "formats a range with LF endings" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "BrittanyLF.hs" "haskell" let range = Range (Position 1 0) (Position 2 22) - opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) + opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) Nothing ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 1 0) (Position 3 0)) "foo x y = do\n print x\n return 42\n"] @@ -87,7 +87,7 @@ spec = do it "formats a range with CRLF endings" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "BrittanyCRLF.hs" "haskell" let range = Range (Position 1 0) (Position 2 22) - opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) + opts = DocumentRangeFormattingParams doc range (FormattingOptions 4 True) Nothing ResponseMessage _ _ (Just edits) _ <- request TextDocumentRangeFormatting opts liftIO $ edits `shouldBe` [TextEdit (Range (Position 1 0) (Position 3 0)) "foo x y = do\n print x\n return 42\n"] diff --git a/test/functional/FunctionalCodeActionsSpec.hs b/test/functional/FunctionalCodeActionsSpec.hs index c77ace61f..ef176d4d1 100644 --- a/test/functional/FunctionalCodeActionsSpec.hs +++ b/test/functional/FunctionalCodeActionsSpec.hs @@ -503,9 +503,9 @@ spec = describe "code actions" $ do doc <- openDoc "CodeActionOnly.hs" "haskell" _ <- count 2 waitForDiagnostics -- need to wait for both hlint and ghcmod diags <- getCurrentDiagnostics doc - let params = CodeActionParams doc (Range (Position 2 10) (Position 4 0)) caContext + let params = CodeActionParams doc (Range (Position 2 10) (Position 4 0)) caContext Nothing caContext = CodeActionContext (List diags) (Just (List [CodeActionRefactorInline])) - ResponseMessage _ _ (Just (List res)) _ <- request TextDocumentCodeAction params :: Session CodeActionResponse + ResponseMessage _ _ (Just (List res)) _ <- request TextDocumentCodeAction params let cas = map fromAction res kinds = map (^. L.kind) cas liftIO $ do diff --git a/test/functional/HighlightSpec.hs b/test/functional/HighlightSpec.hs index 35a8ef934..3b0de3349 100644 --- a/test/functional/HighlightSpec.hs +++ b/test/functional/HighlightSpec.hs @@ -12,7 +12,7 @@ spec :: Spec spec = describe "highlight" $ it "works" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "Highlight.hs" "haskell" - _ <- skipManyTill loggingNotification $ count 2 noDiagnostics + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics highlights <- getHighlights doc (Position 2 2) liftIO $ do let hls = diff --git a/test/functional/HoverSpec.hs b/test/functional/HoverSpec.hs index f3553c17a..54816e63a 100644 --- a/test/functional/HoverSpec.hs +++ b/test/functional/HoverSpec.hs @@ -15,7 +15,7 @@ spec :: Spec spec = describe "hover" $ it "works" $ runSession hieCommand fullCaps "test/testdata" $ do doc <- openDoc "Hover.hs" "haskell" - _ <- skipManyTill loggingNotification $ count 2 noDiagnostics + _ <- count 2 $ skipManyTill loggingNotification noDiagnostics Just h <- getHover doc (Position 1 19) liftIO $ do h ^. range `shouldBe` Just (Range (Position 1 16) (Position 1 19)) diff --git a/test/functional/ProgressSpec.hs b/test/functional/ProgressSpec.hs index 2e41037f5..aaede8ff5 100644 --- a/test/functional/ProgressSpec.hs +++ b/test/functional/ProgressSpec.hs @@ -16,7 +16,7 @@ import Test.Hspec import TestUtils spec :: Spec -spec = describe "window/progress" $ do +spec = describe "window/workDoneProgress" $ do it "sends indefinite progress notifications" $ -- Testing that ghc-mod sends progress notifications runSession hieCommand progressCaps "test/testdata" $ do @@ -24,21 +24,25 @@ spec = describe "window/progress" $ do skipMany loggingNotification - startNotification <- message :: Session ProgressStartNotification + createRequest <- message :: Session WorkDoneProgressCreateRequest liftIO $ do - startNotification ^. L.params . L.title `shouldBe` "Initialising Cradle" - startNotification ^. L.params . L.id `shouldBe` "0" + createRequest ^. L.params `shouldBe` WorkDoneProgressCreateParams (ProgressNumericToken 0) - reportNotification <- message :: Session ProgressReportNotification + startNotification <- message :: Session WorkDoneProgressBeginNotification liftIO $ do - reportNotification ^. L.params . L.message `shouldBe` Just "Main" - reportNotification ^. L.params . L.id `shouldBe` "0" + startNotification ^. L.params . L.value . L.title `shouldBe` "Initialising Cradle" + startNotification ^. L.params . L.token `shouldBe` (ProgressNumericToken 0) + + reportNotification <- message :: Session WorkDoneProgressReportNotification + liftIO $ do + reportNotification ^. L.params . L.value . L.message `shouldBe` Just "Main" + reportNotification ^. L.params . L.token `shouldBe` (ProgressNumericToken 0) -- may produce diagnostics skipMany publishDiagnosticsNotification - - doneNotification <- message :: Session ProgressDoneNotification - liftIO $ doneNotification ^. L.params . L.id `shouldBe` "0" + + doneNotification <- message :: Session WorkDoneProgressEndNotification + liftIO $ doneNotification ^. L.params . L.token `shouldBe` (ProgressNumericToken 0) -- Initial hlint notifications _ <- publishDiagnosticsNotification @@ -46,20 +50,24 @@ spec = describe "window/progress" $ do -- Test incrementing ids sendNotification TextDocumentDidSave (DidSaveTextDocumentParams doc) - startNotification' <- message :: Session ProgressStartNotification + createRequest' <- skipManyTill loggingNotification (message :: Session WorkDoneProgressCreateRequest) + liftIO $ do + createRequest' ^. L.params `shouldBe` WorkDoneProgressCreateParams (ProgressNumericToken 1) + + startNotification' <- message :: Session WorkDoneProgressBeginNotification liftIO $ do - startNotification' ^. L.params . L.title `shouldBe` "loading" - startNotification' ^. L.params . L.id `shouldBe` "1" + startNotification' ^. L.params . L.value . L.title `shouldBe` "loading" + startNotification' ^. L.params . L.token `shouldBe` (ProgressNumericToken 1) - reportNotification' <- message :: Session ProgressReportNotification + reportNotification' <- message :: Session WorkDoneProgressReportNotification liftIO $ do - reportNotification' ^. L.params . L.message `shouldBe` Just "Main" - reportNotification' ^. L.params . L.id `shouldBe` "1" + reportNotification' ^. L.params . L.value . L.message `shouldBe` Just "Main" + reportNotification' ^. L.params . L.token `shouldBe` (ProgressNumericToken 1) - doneNotification' <- message :: Session ProgressDoneNotification - liftIO $ doneNotification' ^. L.params . L.id `shouldBe` "1" + doneNotification' <- message :: Session WorkDoneProgressEndNotification + liftIO $ doneNotification' ^. L.params . L.token `shouldBe` (ProgressNumericToken 1) - -- hlint notifications + -- Initial hlint notifications _ <- publishDiagnosticsNotification return () @@ -70,9 +78,13 @@ spec = describe "window/progress" $ do skipMany loggingNotification - -- Initial project setup progress notifications - _ <- message :: Session ProgressStartNotification - _ <- message :: Session ProgressDoneNotification + _ <- message :: Session WorkDoneProgressCreateRequest + _ <- message :: Session WorkDoneProgressBeginNotification + _ <- message :: Session WorkDoneProgressReportNotification + _ <- message :: Session WorkDoneProgressEndNotification + + -- the hie-bios diagnostics + _ <- skipManyTill loggingNotification publishDiagnosticsNotification -- Enable liquid haskell plugin let config = def { liquidOn = True, hlintOn = False } @@ -84,13 +96,13 @@ spec = describe "window/progress" $ do -- hlint notifications -- TODO: potential race between typechecking, e.g. context intialisation -- TODO: and disabling hlint notifications - -- _ <- publishDiagnosticsNotification + -- _ <- skipManyTill loggingNotification publishDiagnosticsNotification - let startPred (NotProgressStart m) = - m ^. L.params . L.title == "Running Liquid Haskell on Evens.hs" + let startPred (NotWorkDoneProgressBegin m) = + m ^. L.params . L.value . L.title == "Running Liquid Haskell on Evens.hs" startPred _ = False - let donePred (NotProgressDone _) = True + let donePred (NotWorkDoneProgressEnd _) = True donePred _ = False _ <- skipManyTill anyMessage $ between (satisfy startPred) (satisfy donePred) $ diff --git a/test/testdata/addPackageTest/cabal-exe/AddPackage.hs b/test/testdata/addPackageTest/cabal-exe/AddPackage.hs index 963020508..e1bbc6678 100644 --- a/test/testdata/addPackageTest/cabal-exe/AddPackage.hs +++ b/test/testdata/addPackageTest/cabal-exe/AddPackage.hs @@ -1,2 +1,3 @@ import Data.Text -foo = pack "I'm a Text" \ No newline at end of file +foo = pack "I'm a Text" +main = putStrLn "hello" diff --git a/test/unit/JsonSpec.hs b/test/unit/JsonSpec.hs index 6b13ee182..12e1af9c5 100644 --- a/test/unit/JsonSpec.hs +++ b/test/unit/JsonSpec.hs @@ -12,6 +12,7 @@ import Haskell.Ide.Engine.Plugin.Generic import Haskell.Ide.Engine.Plugin.HaRe import Haskell.Ide.Engine.Support.HieExtras import Haskell.Ide.Engine.Config +import Language.Haskell.LSP.Types import Data.Aeson import Test.Hspec @@ -87,7 +88,10 @@ instance Arbitrary TextDocumentIdentifier where arbitrary = TextDocumentIdentifier <$> arbitrary instance Arbitrary TextDocumentPositionParams where - arbitrary = TextDocumentPositionParams <$> arbitrary <*> arbitrary + arbitrary = TextDocumentPositionParams <$> arbitrary <*> arbitrary <*> arbitrary + +instance Arbitrary ProgressToken where + arbitrary = oneof [ProgressTextToken <$> arbitrary, ProgressNumericToken <$> arbitrary] instance Arbitrary IdeErrorCode where arbitrary = arbitraryBoundedEnum diff --git a/test/unit/PackagePluginSpec.hs b/test/unit/PackagePluginSpec.hs index 488a8ca55..d9b950858 100644 --- a/test/unit/PackagePluginSpec.hs +++ b/test/unit/PackagePluginSpec.hs @@ -47,7 +47,7 @@ packageSpec = do let fp = testdata cabal packageType <- findPackageType fp packageType `shouldBe` CabalPackage "add-package-test.cabal" - it "Find no project description if none is present " $ do + it "Find no project description if none is present" $ do let fp = cwd testdata "invalid" packageType <- findPackageType fp packageType `shouldBe` NoPackage @@ -55,7 +55,7 @@ packageSpec = do let fp = testdata "unknownPath" findPackageType fp `shouldThrow` anyIOException describe "Add the package to the correct file" $ do - it "Add package to .cabal to executable component" + it "Adds package to .cabal to executable component" $ withCurrentDirectory (testdata "cabal-exe") $ do let @@ -167,7 +167,7 @@ packageSpec = do testCommand testPlugins act "package" "add" args res - it "Add package to package.yaml to executable component" + it "Adds package to package.yaml to executable component" $ withCurrentDirectory (testdata "hpack-exe") $ do let diff --git a/test/utils/TestUtils.hs b/test/utils/TestUtils.hs index d99f32c38..75b7cf67a 100644 --- a/test/utils/TestUtils.hs +++ b/test/utils/TestUtils.hs @@ -135,7 +135,7 @@ ghcVersion = GHCPre84 stackYaml :: FilePath stackYaml = #if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,5,0))) - "stack.yaml" + "stack-8.6.5.yaml" #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,4,0))) "stack-8.6.4.yaml" #elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,3,0)))