From 38e04716f022e695bc65792a149e23963e65babc Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 17 Sep 2019 12:45:05 -0400 Subject: [PATCH 1/5] There is no languages dir. --- test/Examples.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Examples.hs b/test/Examples.hs index d31136f55..cd277a97d 100644 --- a/test/Examples.hs +++ b/test/Examples.hs @@ -105,4 +105,4 @@ parseFilePath :: (Member (Error SomeException) sig, Member Distribute sig, Membe parseFilePath path = readBlob (fileForPath path) >>= parseTermBuilder @[] TermShow . pure >>= const (pure True) languagesDir :: FilePath -languagesDir = "tmp/haskell-tree-sitter/languages" +languagesDir = "tmp/haskell-tree-sitter" From 53c8e66b52f50db49f6c573331b64e4c0e9cf599 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 17 Sep 2019 12:45:23 -0400 Subject: [PATCH 2/5] Correct the path to the vendored language dirs. --- test/Examples.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Examples.hs b/test/Examples.hs index cd277a97d..a98655a32 100644 --- a/test/Examples.hs +++ b/test/Examples.hs @@ -38,7 +38,8 @@ main = withOptions opts $ \ config logger statter -> hspec . parallel $ do runIO setupExampleRepos for_ languages $ \ lang@LanguageExample{..} -> do - let tsDir = languagesDir languageName ("vendor/tree-sitter-" <> languageName) + let tsLang = "tree-sitter-" <> languageName + tsDir = languagesDir tsLang "vendor" tsLang parallel . describe languageName $ parseExamples args lang tsDir where From 67b4782659701d131435c88581899dfd3bf34f22 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 17 Sep 2019 13:31:20 -0400 Subject: [PATCH 3/5] Correct the cloning script. --- script/clone-example-repos | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/script/clone-example-repos b/script/clone-example-repos index 85589ad65..b0d46e293 100755 --- a/script/clone-example-repos +++ b/script/clone-example-repos @@ -16,7 +16,7 @@ cd $(dirname "$0")/.. mkdir -p test/examplerepos || true git clone --single-branch --recurse-submodules https://github.com/tree-sitter/haskell-tree-sitter.git tmp/haskell-tree-sitter || true -dir="tmp/haskell-tree-sitter/languages" +dir="tmp/haskell-tree-sitter" # clone_repo LOCAL_PATH URL SHA function clone_repo { @@ -36,7 +36,7 @@ function clone_repo { popd > /dev/null } -python_examples="$dir/python/vendor/tree-sitter-python/examples" +python_examples="$dir/tree-sitter-python/vendor/tree-sitter-python/examples" clone_repo "$python_examples/numpy" numpy/numpy 058851c5cfc98f50f11237b1c13d77cfd1f40475 clone_repo "$python_examples/thealgorithms" thealgorithms/python c6be53e1c43f870f5364eef1499ee1b411c966fb clone_repo "$python_examples/flask" pallets/flask 0b5b4a66ef99c8b91569dd9b9b34911834689d3f @@ -48,27 +48,27 @@ clone_repo "$python_examples/scrapy" scrapy/scrapy 65d631329a1434ec013f24341e4b8 clone_repo "$python_examples/pytorch" pytorch/pytorch c865d46736db4afff51690a712e35ed8e3899490 clone_repo "$python_examples/certbot" certbot/certbot bb8222200a8cbd39a3ce9584ce6dfed6c5d05228 -ts_examples="$dir/typescript/vendor/tree-sitter-typescript/examples" +ts_examples="$dir/tree-sitter-typescript/vendor/tree-sitter-typescript/examples" clone_repo "$ts_examples/desktop" desktop/desktop d1324f56d02dd9afca5d2e9da545905a7d41d671 # Java examples are disabled because the assignment code is not yet # robust and for reasons of CI celerity. -java_examples="$dir/java/vendor/tree-sitter-java/examples" +java_examples="$dir/tree-sitter-java/vendor/tree-sitter-java/examples" # clone_repo "$java_examples/elasticsearch" elastic/elasticsearch 4d62640bf116af7e825d89c7319a39c3f2f325b4 # clone_repo "$java_examples/guava" google/guava e24fddc5fff7fd36d33ea38737b6606a7e476845 # clone_repo "$java_examples/RxJava" ReactiveX/RxJava 8a6bf14fc9a61f7c1c0016ca217be02ca86211d2 clone_repo "$ts_examples/npm" npm/npm ee147fbbca6f2707d3b16f4fa78f4c4606b2d9b1 -haskell_examples="$dir/haskell/vendor/tree-sitter-haskell/examples" +haskell_examples="$dir/tree-sitter-haskell/vendor/tree-sitter-haskell/examples" clone_repo "$haskell_examples/effects" joshvera/effects 08f5f36f2600362685af593f4b327e933b60bf97 clone_repo "$haskell_examples/postgrest" PostgRest/postgrest f80cfbf165f951a062b3cbedac4556019905ca49 clone_repo "$haskell_examples/ivory" GaloisInc/ivory 3d00324ad1c113c7e70957ff6a6d636d271d0fc4 -go_examples="$dir/go/vendor/tree-sitter-go/examples" +go_examples="$dir/tree-sitter-go/vendor/tree-sitter-go/examples" clone_repo "$go_examples/go" "golang/go" "870e12d7bfaea70fb0d743842f5864eb059cb939" clone_repo "$go_examples/moby" "moby/moby" "f57f260b49b6142366e6bc1274204ee0a1205945" -ruby_examples="$dir/ruby/vendor/tree-sitter-ruby/examples" +ruby_examples="$dir/tree-sitter-ruby/vendor/tree-sitter-ruby/examples" clone_repo "$ruby_examples/ruby_spec" "ruby/spec" "c3e6b9017926f44a76e2b966c4dd35fa84c4cd3b" From b118a898fe58a90a0e0409ce0ad3532d0c66b3d5 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 17 Sep 2019 13:32:37 -0400 Subject: [PATCH 4/5] =?UTF-8?q?Don=E2=80=99t=20clone=20examples=20we=20are?= =?UTF-8?q?n=E2=80=99t=20going=20to=20run=20against.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/clone-example-repos | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/clone-example-repos b/script/clone-example-repos index b0d46e293..c67a0063d 100755 --- a/script/clone-example-repos +++ b/script/clone-example-repos @@ -62,9 +62,9 @@ java_examples="$dir/tree-sitter-java/vendor/tree-sitter-java/examples" clone_repo "$ts_examples/npm" npm/npm ee147fbbca6f2707d3b16f4fa78f4c4606b2d9b1 haskell_examples="$dir/tree-sitter-haskell/vendor/tree-sitter-haskell/examples" -clone_repo "$haskell_examples/effects" joshvera/effects 08f5f36f2600362685af593f4b327e933b60bf97 -clone_repo "$haskell_examples/postgrest" PostgRest/postgrest f80cfbf165f951a062b3cbedac4556019905ca49 -clone_repo "$haskell_examples/ivory" GaloisInc/ivory 3d00324ad1c113c7e70957ff6a6d636d271d0fc4 +# clone_repo "$haskell_examples/effects" joshvera/effects 08f5f36f2600362685af593f4b327e933b60bf97 +# clone_repo "$haskell_examples/postgrest" PostgRest/postgrest f80cfbf165f951a062b3cbedac4556019905ca49 +# clone_repo "$haskell_examples/ivory" GaloisInc/ivory 3d00324ad1c113c7e70957ff6a6d636d271d0fc4 go_examples="$dir/tree-sitter-go/vendor/tree-sitter-go/examples" clone_repo "$go_examples/go" "golang/go" "870e12d7bfaea70fb0d743842f5864eb059cb939" From 014d04d8776069ef2b8f96155ff10d87b86f6109 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Tue, 17 Sep 2019 13:33:16 -0400 Subject: [PATCH 5/5] Move npm up. --- script/clone-example-repos | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/clone-example-repos b/script/clone-example-repos index c67a0063d..6029779d3 100755 --- a/script/clone-example-repos +++ b/script/clone-example-repos @@ -50,6 +50,7 @@ clone_repo "$python_examples/certbot" certbot/certbot bb8222200a8cbd39a3ce9584ce ts_examples="$dir/tree-sitter-typescript/vendor/tree-sitter-typescript/examples" clone_repo "$ts_examples/desktop" desktop/desktop d1324f56d02dd9afca5d2e9da545905a7d41d671 +clone_repo "$ts_examples/npm" npm/npm ee147fbbca6f2707d3b16f4fa78f4c4606b2d9b1 # Java examples are disabled because the assignment code is not yet # robust and for reasons of CI celerity. @@ -59,8 +60,6 @@ java_examples="$dir/tree-sitter-java/vendor/tree-sitter-java/examples" # clone_repo "$java_examples/guava" google/guava e24fddc5fff7fd36d33ea38737b6606a7e476845 # clone_repo "$java_examples/RxJava" ReactiveX/RxJava 8a6bf14fc9a61f7c1c0016ca217be02ca86211d2 -clone_repo "$ts_examples/npm" npm/npm ee147fbbca6f2707d3b16f4fa78f4c4606b2d9b1 - haskell_examples="$dir/tree-sitter-haskell/vendor/tree-sitter-haskell/examples" # clone_repo "$haskell_examples/effects" joshvera/effects 08f5f36f2600362685af593f4b327e933b60bf97 # clone_repo "$haskell_examples/postgrest" PostgRest/postgrest f80cfbf165f951a062b3cbedac4556019905ca49