Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -haddock for cabal and stack #214

Merged
merged 5 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ packages:
ghcide

tests: true
documentation: true

package *
ghc-options: -haddock
jneira marked this conversation as resolved.
Show resolved Hide resolved

package haskell-language-server
test-show-details: direct
Expand Down
3 changes: 3 additions & 0 deletions stack-8.10.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- Cabal-3.0.2.0
- hie-bios-0.6.1
Expand Down
3 changes: 3 additions & 0 deletions stack-8.6.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- aeson-1.4.3.0
- brittany-0.12.1.1
Expand Down
3 changes: 3 additions & 0 deletions stack-8.6.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- ansi-terminal-0.10.2
- base-compat-0.11.0
Expand Down
3 changes: 3 additions & 0 deletions stack-8.8.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- apply-refact-0.7.0.0
- brittany-0.12.1.1
Expand Down
3 changes: 3 additions & 0 deletions stack-8.8.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- apply-refact-0.7.0.0
- bytestring-trie-0.2.5.0
Expand Down
3 changes: 3 additions & 0 deletions stack-8.8.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- apply-refact-0.7.0.0
- bytestring-trie-0.2.5.0
Expand Down
3 changes: 3 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ packages:
- .
- ./ghcide/

ghc-options:
"$everything": -haddock

extra-deps:
- ansi-terminal-0.10.2
- base-compat-0.11.0
Expand Down
3 changes: 1 addition & 2 deletions test/functional/Deferred.hs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ multiMainTests :: TestTree
multiMainTests = testGroup "multiple main modules" [
ignoreTestBecause "Broken: Unexpected ConduitParser.empty" $
testCase "Can load one file at a time, when more than one Main module exists"
-- $ runSession hieCommand fullCaps "test/testdata" $ do
$ runSession hieCommand fullCaps "test/testdata" $ do
_doc <- openDoc "ApplyRefact2.hs" "haskell"
_diagsRspHlint <- skipManyTill anyNotification message :: Session PublishDiagnosticsNotification
Expand All @@ -175,4 +174,4 @@ multiMainTests = testGroup "multiple main modules" [
let (List diags2) = diagsRsp2 ^. params . diagnostics

liftIO $ show diags2 `shouldBe` "[]"
]
]
33 changes: 17 additions & 16 deletions test/functional/TypeDefinition.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,21 +75,22 @@ tests = testGroup "type definitions" [
(Range (toPos (18, 1)) (toPos (18, 26)))
]

-- TODO Implement
-- , ignoreTestBecause "Broken" $ testCase "find type-definition of type def in component"
-- $ pendingWith "Finding symbols cross module is currently not supported"
-- $ runSession hieCommand fullCaps "test/testdata/gototest"
-- $ do
-- doc <- openDoc "src/Lib2.hs" "haskell"
-- otherDoc <- openDoc "src/Lib.hs" "haskell"
-- closeDoc otherDoc
-- defs <- getTypeDefinitions doc (toPos (13, 20))
-- liftIO $ do
-- fp <- canonicalizePath "test/testdata/gototest/src/Lib.hs"
-- defs
-- `shouldBe` [ Location (filePathToUri fp)
-- (Range (toPos (8, 1)) (toPos (8, 29)))
-- ]
{-- TODO Implement
, ignoreTestBecause "Broken" $ testCase "find type-definition of type def in component"
$ pendingWith "Finding symbols cross module is currently not supported"
$ runSession hieCommand fullCaps "test/testdata/gototest"
$ do
doc <- openDoc "src/Lib2.hs" "haskell"
otherDoc <- openDoc "src/Lib.hs" "haskell"
closeDoc otherDoc
defs <- getTypeDefinitions doc (toPos (13, 20))
liftIO $ do
fp <- canonicalizePath "test/testdata/gototest/src/Lib.hs"
defs
`shouldBe` [ Location (filePathToUri fp)
(Range (toPos (8, 1)) (toPos (8, 29)))
]
--}
, ignoreTestBecause "Broken" $ testCase "find definition of parameterized data type"
$ runSession hieCommand fullCaps "test/testdata/gototest"
$ do
Expand All @@ -105,4 +106,4 @@ tests = testGroup "type definitions" [

--NOTE: copied from Haskell.Ide.Engine.ArtifactMap
toPos :: (Int,Int) -> Position
toPos (l,c) = Position (l-1) (c-1)
toPos (l,c) = Position (l-1) (c-1)