mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Get the tests and benchmarks building again
This commit is contained in:
parent
5a358d6894
commit
a697d2109c
@ -63,13 +63,12 @@ test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: Test.hs
|
||||
build-depends: base
|
||||
, tree-sitter
|
||||
, tree-sitter-go
|
||||
, semantic-ast
|
||||
, bytestring ^>= 0.10.8.2
|
||||
, hedgehog >= 0.6 && <2
|
||||
, pathtype ^>= 0.8.1
|
||||
, text
|
||||
, semantic-ast
|
||||
, semantic-go
|
||||
, tasty
|
||||
, tasty-hedgehog
|
||||
, tasty-hunit
|
||||
, text
|
||||
|
@ -1,12 +1,12 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import Language.Go.Grammar
|
||||
import qualified Language.Go.AST as Go
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.Go.AST as Go
|
||||
import Language.Go.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
|
@ -63,11 +63,10 @@ test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: Test.hs
|
||||
build-depends: base
|
||||
, tree-sitter
|
||||
, tree-sitter-java
|
||||
, semantic-ast
|
||||
, bytestring ^>= 0.10.8.2
|
||||
, pathtype ^>= 0.8.1
|
||||
, text
|
||||
, semantic-ast
|
||||
, semantic-java
|
||||
, tasty
|
||||
, tasty-hunit
|
||||
, text
|
||||
|
@ -1,12 +1,12 @@
|
||||
{-# LANGUAGE OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import TreeSitter.Java
|
||||
import qualified TreeSitter.Java.AST as Java
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.Java.AST as Java
|
||||
import Language.Java.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
|
@ -63,13 +63,12 @@ test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: Test.hs
|
||||
build-depends: base
|
||||
, tree-sitter
|
||||
, tree-sitter-json
|
||||
, semantic-ast
|
||||
, bytestring ^>= 0.10.8.2
|
||||
, hedgehog >= 0.6 && <2
|
||||
, pathtype ^>= 0.8.1
|
||||
, text
|
||||
, semantic-ast
|
||||
, semantic-json
|
||||
, tasty
|
||||
, tasty-hedgehog
|
||||
, tasty-hunit
|
||||
, text
|
||||
|
@ -1,12 +1,12 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import TreeSitter.JSON
|
||||
import qualified TreeSitter.JSON.AST as JSON
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.JSON.AST as JSON
|
||||
import Language.JSON.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
|
@ -14,7 +14,7 @@ import Options.Applicative hiding (style)
|
||||
import Text.Pretty.Simple (pPrint, pPrintNoColor)
|
||||
import Data.Foldable (traverse_)
|
||||
import Control.Monad ((>=>))
|
||||
import Marshal.JSON (marshal)
|
||||
import AST.Marshal.JSON (marshal)
|
||||
import Data.ByteString.Lazy.Char8 (putStrLn)
|
||||
import Data.Aeson.Encode.Pretty (encodePretty)
|
||||
|
||||
|
@ -8,8 +8,8 @@ import qualified Data.ByteString as B
|
||||
import Gauge
|
||||
import System.Exit (die)
|
||||
import System.Environment (getArgs)
|
||||
import Language.Python.Grammar
|
||||
import qualified Language.Python.AST as Py
|
||||
import Language.Python.Grammar
|
||||
import AST.Unmarshal
|
||||
|
||||
main :: IO ()
|
||||
|
@ -138,5 +138,4 @@ executable benchmark
|
||||
base
|
||||
, gauge ^>= 0.2.5
|
||||
, bytestring
|
||||
, tree-sitter
|
||||
, tree-sitter-python
|
||||
, semantic-python
|
||||
|
@ -63,16 +63,15 @@ test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: Test.hs
|
||||
build-depends: base
|
||||
, tree-sitter
|
||||
, tree-sitter-ruby
|
||||
, semantic-ast
|
||||
, bytestring ^>= 0.10.8.2
|
||||
, hedgehog >= 0.6 && <2
|
||||
, pathtype ^>= 0.8.1
|
||||
, text
|
||||
, semantic-ast
|
||||
, semantic-ruby
|
||||
, tasty
|
||||
, tasty-hedgehog
|
||||
, tasty-hunit
|
||||
, text
|
||||
|
||||
executable benchmarks
|
||||
import: haskell
|
||||
@ -87,8 +86,7 @@ executable benchmarks
|
||||
, Glob
|
||||
, lens >= 4.17 && < 4.19
|
||||
, pathtype ^>= 0.8.1
|
||||
, tree-sitter
|
||||
, tree-sitter-ruby
|
||||
, semantic-ruby
|
||||
|
||||
executable tree-sitter-ruby
|
||||
import: haskell
|
||||
@ -97,5 +95,4 @@ executable tree-sitter-ruby
|
||||
main-is: Main.hs
|
||||
build-depends: base
|
||||
, bytestring
|
||||
, tree-sitter
|
||||
, tree-sitter-ruby
|
||||
, semantic-ruby
|
||||
|
@ -1,12 +1,12 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import TreeSitter.Ruby
|
||||
import qualified TreeSitter.Ruby.AST as Rb
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.Ruby.AST as Rb
|
||||
import Language.Ruby.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
|
@ -63,13 +63,12 @@ test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: Test.hs
|
||||
build-depends: base
|
||||
, tree-sitter
|
||||
, tree-sitter-tsx
|
||||
, semantic-ast
|
||||
, bytestring ^>= 0.10.8.2
|
||||
, hedgehog >= 0.6 && <2
|
||||
, pathtype ^>= 0.8.1
|
||||
, text
|
||||
, semantic-ast
|
||||
, semantic-tsx
|
||||
, tasty
|
||||
, tasty-hedgehog
|
||||
, tasty-hunit
|
||||
, text
|
||||
|
@ -1,19 +1,19 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import TreeSitter.TSX
|
||||
import qualified TreeSitter.TSX.AST as Ts
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.TSX.AST as Tsx
|
||||
import Language.TSX.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
= readCorpusFiles (Path.relDir "tree-sitter-tsx/vendor/tree-sitter-typescript/tsx/corpus")
|
||||
>>= traverse (testCorpus parse)
|
||||
>>= defaultMain . tests
|
||||
where parse = parseByteString @Ts.Program @() tree_sitter_tsx
|
||||
where parse = parseByteString @Tsx.Program @() tree_sitter_tsx
|
||||
|
||||
tests :: [TestTree] -> TestTree
|
||||
tests = testGroup "tree-sitter-tsx corpus tests"
|
||||
|
@ -63,13 +63,12 @@ test-suite test
|
||||
hs-source-dirs: test
|
||||
main-is: Test.hs
|
||||
build-depends: base
|
||||
, tree-sitter
|
||||
, tree-sitter-typescript
|
||||
, semantic-ast
|
||||
, bytestring ^>= 0.10.8.2
|
||||
, hedgehog >= 0.6 && <2
|
||||
, pathtype ^>= 0.8.1
|
||||
, text
|
||||
, semantic-ast
|
||||
, semantic-typescript
|
||||
, tasty
|
||||
, tasty-hedgehog
|
||||
, tasty-hunit
|
||||
, text
|
||||
|
@ -1,12 +1,12 @@
|
||||
{-# LANGUAGE DisambiguateRecordFields, OverloadedStrings, TypeApplications #-}
|
||||
module Main (main) where
|
||||
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
import TreeSitter.TypeScript
|
||||
import qualified TreeSitter.TypeScript.AST as Ts
|
||||
import AST.Test
|
||||
import AST.Unmarshal
|
||||
import qualified Language.TypeScript.AST as Ts
|
||||
import Language.TypeScript.Grammar
|
||||
import qualified System.Path as Path
|
||||
import Test.Tasty
|
||||
|
||||
main :: IO ()
|
||||
main
|
||||
|
Loading…
Reference in New Issue
Block a user