From: Luke Lau Date: Tue, 31 Jul 2018 15:26:08 +0000 (+0100) Subject: Bring in my pathetic attempts to fix travis X-Git-Tag: 0.1.0.0~13 X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=4dce1170b5433bbad129b19b225c9fa533fc0e7e Bring in my pathetic attempts to fix travis Squashed commit of the following: commit 38a29ee38abd42afffc380f4911c9ebf99108ffb Author: Luke Lau Date: Tue Jul 31 13:11:34 2018 +0100 Remove o2 commit 476b1c64cdeccfc63fe9d06a999d90b50de3a5df Author: Luke Lau Date: Tue Jul 31 12:37:49 2018 +0100 Use old test with streaming commit d1d3ee853d05e1c042119312d0e9d60206ed1bc6 Author: Luke Lau Date: Tue Jul 31 11:48:40 2018 +0100 Update session.log commit 19f8f8c406d50454b79fdc3dd669d4090a06ae1d Merge: bca6e9f 82a682c Author: Luke Lau Date: Tue Jul 31 11:36:27 2018 +0100 Merge branch 'master' into travis-investigation commit bca6e9f14d7f0b49361787ec0601fd2e6ad8854a Author: Luke Lau Date: Mon Jul 30 23:53:05 2018 +0100 cd back to build dir commit b613d081a9df93cfc4b76e50f6d8258499929963 Author: Luke Lau Date: Mon Jul 30 23:24:30 2018 +0100 Shift comment one line to make it not look like a motivational quote commit 32d088525bbf4bb2ea3615bb1940c59335b4cb7e Author: Luke Lau Date: Mon Jul 30 23:17:02 2018 +0100 Try caching haskell-ide-engine commit 752ff47e002d4f6062c9fcd3e8f1e6395a6531b6 Author: Luke Lau Date: Mon Jul 30 22:58:06 2018 +0100 Investigate travis stuff --- diff --git a/.travis.yml b/.travis.yml index a85c52a..2883617 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ sudo: false cache: directories: - $HOME/.stack + - $HOME/haskell-ide-engine addons: apt: @@ -22,20 +23,25 @@ before_install: - export PATH=$HOME/.local/bin:$PATH - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' - - git clone https://github.com/haskell/haskell-ide-engine.git --recursive + - cd $HOME + # It's ok to fail + - git clone https://github.com/haskell/haskell-ide-engine.git --recursive || true - cd haskell-ide-engine + - git pull - git submodule sync - git submodule update # - cabal new-update # - cabal new-configure # - cabal new-build - # - export PATH=dist-newstyle/build/*/ghc-*/haskell-ide-engine-*/x/hie/build:$PATH + # - export PATH=$HOME/haskell-ide-engine/dist-newstyle/build/*/ghc-*/haskell-ide-engine-*/x/hie/build:$PATH - stack --no-terminal --skip-ghc-check install -j2 - stack exec hoogle generate - - cd .. + - cd $TRAVIS_BUILD_DIR - npm update - npm i -g javascript-typescript-langserver script: - - cabal new-configure - - cabal new-test -O2 + - pwd + - ls -a + - cabal configure --enable-tests + - cabal test -j2 --show-details=streaming diff --git a/test/data/renamePass/session.log b/test/data/renamePass/session.log index 1648ff7..36c25fe 100644 --- a/test/data/renamePass/session.log +++ b/test/data/renamePass/session.log @@ -1,5 +1,5 @@ {"tag":"FromClient","contents":["2018-06-03T04:08:38.856591Z",{"tag":"ReqInitialize","contents":{"jsonrpc":"2.0","params":{"rootUri":"file:///Users/luke","processId":7558,"rootPath":"/Users/luke","capabilities":{"textDocument":{"completion":{"completionItem":{"snippetSupport":false}}}},"trace":"off"},"method":"initialize","id":9}}]} -{"tag":"FromServer","contents":["2018-06-03T04:08:38.873087Z",{"tag":"RspInitialize","contents":{"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["7796:applyrefact:applyOne","7796:applyrefact:applyAll","7796:applyrefact:lint","7796:base:version","7796:base:plugins","7796:base:commands","7796:base:commandDetail","7796:brittany:format","7796:build:prepare","7796:build:isConfigured","7796:build:configure","7796:build:listTargets","7796:build:listFlags","7796:build:buildDirectory","7796:build:buildTarget","7796:eg2:sayHello","7796:eg2:sayHelloTo ","7796:ghcmod:check","7796:ghcmod:lint","7796:ghcmod:info","7796:ghcmod:type","7796:ghcmod:casesplit","7796:hare:demote","7796:hare:dupdef","7796:hare:iftocase","7796:hare:liftonelevel","7796:hare:lifttotoplevel","7796:hare:rename","7796:hare:deletedef","7796:hare:genapplicative","7796:hoogle:info","7796:hoogle:lookup","7796:hsimport:import","7796:package:add"]},"renameProvider":true,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":true},"documentSymbolProvider":true,"documentFormattingProvider":true,"referencesProvider":true}},"jsonrpc":"2.0","id":9}}]} +{"tag":"FromServer","contents":["2018-06-03T04:08:38.873087Z",{"tag":"RspInitialize","contents":{"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":false,"save":{"includeText":false}},"documentRangeFormattingProvider":true,"documentHighlightProvider":true,"executeCommandProvider":{"commands":["7796:applyrefact:applyOne","7796:applyrefact:applyAll","7796:applyrefact:lint","7796:base:version","7796:base:plugins","7796:base:commands","7796:base:commandDetail","7796:brittany:format","7796:build:prepare","7796:build:isConfigured","7796:build:configure","7796:build:listTargets","7796:build:listFlags","7796:build:buildDirectory","7796:build:buildTarget","7796:ghcmod:check","7796:ghcmod:lint","7796:ghcmod:info","7796:ghcmod:type","7796:ghcmod:casesplit","7796:hare:demote","7796:hare:dupdef","7796:hare:iftocase","7796:hare:liftonelevel","7796:hare:lifttotoplevel","7796:hare:rename","7796:hare:deletedef","7796:hare:genapplicative","7796:hoogle:info","7796:hoogle:lookup","7796:hsimport:import","7796:liquid:sayHello","7796:liquid:sayHelloTo ","7796:package:add"]},"renameProvider":true,"definitionProvider":true,"hoverProvider":true,"codeActionProvider":true,"completionProvider":{"triggerCharacters":["."],"resolveProvider":true},"documentSymbolProvider":true,"documentFormattingProvider":true,"referencesProvider":true}},"jsonrpc":"2.0","id":9}}]} {"tag":"FromClient","contents":["2018-06-03T04:08:39.325465Z",{"tag":"NotInitialized","contents":{"jsonrpc":"2.0","params":{},"method":"initialized"}}]} {"tag":"FromClient","contents":["2018-06-03T04:08:39.325807Z",{"tag":"NotDidChangeConfiguration","contents":{"jsonrpc":"2.0","params":{"settings":{}},"method":"workspace/didChangeConfiguration"}}]} {"tag":"FromClient","contents":["2018-06-03T04:08:39.326177Z",{"tag":"NotDidOpenTextDocument","contents":{"jsonrpc":"2.0","params":{"textDocument":{"languageId":"haskell","text":"module Main where\n\nmain :: IO ()\nmain = do\n let initialList = []\n interactWithUser initialList\n\ntype Item = String\ntype Items = [Item]\n\ndata Command = Quit\n | DisplayItems\n | AddItem String\n | RemoveItem Int\n | Help\n\ntype Error = String\n\nparseCommand :: String -> Either Error Command\nparseCommand line = case words line of\n [\"quit\"] -> Right Quit\n [\"items\"] -> Right DisplayItems\n \"add\" : item -> Right $ AddItem $ unwords item\n \"remove\" : i -> Right $ RemoveItem $ read $ unwords i\n [\"help\"] -> Right Help\n _ -> Left \"Unknown command\"\n\naddItem :: Item -> Items -> Items\naddItem = (:)\n\ndisplayItems :: Items -> String\ndisplayItems = unlines . map (\"- \" ++)\n\nremoveItem :: Int -> Items -> Either Error Items\nremoveItem i items\n | i < 0 || i >= length items = Left \"Out of range\"\n | otherwise = Right result\n where (front, back) = splitAt (i + 1) items\n result = init front ++ back\n\ninteractWithUser :: Items -> IO ()\ninteractWithUser items = do\n line <- getLine\n case parseCommand line of\n Right DisplayItems -> do\n putStrLn $ displayItems items\n interactWithUser items\n\n Right (AddItem item) -> do\n let newItems = addItem item items\n putStrLn \"Added\"\n interactWithUser newItems\n\n Right (RemoveItem i) ->\n case removeItem i items of\n Right newItems -> do\n putStrLn $ \"Removed \" ++ items !! i\n interactWithUser newItems\n Left err -> do\n putStrLn err\n interactWithUser items\n\n\n Right Quit -> return ()\n\n Right Help -> do\n putStrLn \"Commands:\"\n putStrLn \"help\"\n putStrLn \"items\"\n putStrLn \"add\"\n putStrLn \"quit\"\n interactWithUser items\n\n Left err -> do\n putStrLn $ \"Error: \" ++ err\n interactWithUser items\n","uri":"file:///Users/luke/Desktop/simple.hs","version":0}},"method":"textDocument/didOpen"}}]}