1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00
Commit Graph

44 Commits

Author SHA1 Message Date
Patrick Thomson
b6079e0db9 Remove irrelevant specs. 2019-10-21 16:46:02 -04:00
Rob Rix
b00715e247
🔥 the pattern synonyms. 2019-10-18 11:57:26 -04:00
Patrick Thomson
2f91bad319 Fix tests. 2019-10-04 15:49:30 -04:00
Timothy Clem
1232cc372a Don't need to hide readFile 2019-10-02 13:53:16 -07:00
Patrick Thomson
9d889e9ca8 Add a test for catFile such that we ensure UTF-8 output isn't mangled. 2019-09-30 13:08:09 -04:00
Patrick Thomson
a686344145 Add failing unit tests. 2019-09-29 16:57:11 -04:00
Patrick Thomson
79dcbfd1ca Add test for Semantic.Git.lsTree.
I have a proposed speedup for lsTree, but since this resides on a
critical path for downstream systems, I want to make sure that I don't
break this while I'm at it.

I really should rewrite this test to use tasty-hspec, but it'd be a
long slog, and I have better things to do.
2019-09-29 13:44:14 -04:00
Patrick Thomson
090b014eed Remove filepath dependency from tests. 2019-09-20 12:26:49 -04:00
Timothy Clem
2b37bc9312 New options for readBlobsFromGitRepo
Allows specifying only the paths you want to parse in the repo
2019-07-30 17:34:35 -07:00
Patrick Thomson
669ee584df Quiesce the last few warnings from the tests. 2019-06-20 01:50:32 -04:00
Patrick Thomson
43e3fb4533 Remove unnecessary use of parallel. 2019-06-19 17:22:09 -04:00
Patrick Thomson
6306f07cc1 Better story for handling JSON exceptions. 2019-06-19 17:14:52 -04:00
Patrick Thomson
8ae90e53c5 Quiet debug spew in specs.
This console barf makes reading though backscrolls unpleasant. Using
Shelly rather than an abomination of a `system` call and adding a
helper function to parse files quietly improved the situation greatly.

This also contains changes to Util that make the file significantly
easier to navigate, thanks to the power of `PartialTyepSignatures`.

Fixes #140.
2019-06-19 12:09:37 -04:00
Patrick Thomson
a4652120a7 Fix test cases for builders (which don't have jd). 2019-06-12 16:40:28 -04:00
Patrick Thomson
0e13a4c091 These can be in parallel because we're not changing the cwd. 2019-05-28 15:49:43 -04:00
Patrick Thomson
e4143aaa34 slightly less heinous implementation 2019-05-28 15:43:14 -04:00
Patrick Thomson
e77d723859 try to fix the builders 2019-05-28 15:34:31 -04:00
Patrick Thomson
00e7ceb883 Fix dead imports. 2019-05-28 14:58:37 -04:00
Patrick Thomson
a410300492 Add tests for readBlobsFromGitRepo.
This is part of the critical path for repository tagging, so we should
test it to make sure it doesn't explode. This introduces a test that
creates a temporary git repo and queries it to make sure that adding
and then reading from a blob works properly.
2019-05-28 14:54:18 -04:00
Max Brunsfeld
3249307ccd Use Tree-sitter's built-in timeout API instead of a separate timeout thread 2019-03-18 16:30:15 -07:00
Patrick Thomson
060c8f50ff Refactor: use pattern synonyms to construct BlobPairs.
The `BlobPair` type is defined as an alias for `Join These Blob`. Though
this sacrifices a degree of type safety, it's extremely convenient, as
you can get to a Functor and Bifunctor instance very quickly.
Pattern-matching on `BlobPair` is less elegant though, as it requires
a nested Join then a match on `These`, which is not immediately
indicative of what a given pair might do.

This adds pattern synonyms for the `Inserting`, `Deleting`, and
`Diffing` cases, and removes the less-expressive functions returning such.
2019-03-01 11:19:24 -05:00
Patrick Thomson
ef696d3c41 Split up Semantic.IO.
This looks like a big patch, but it's very straightforward: no
behavior has changed.

After the umpteenth time spent hitting a compile error because I
passed a `FilePath` rather than a `File` to `readBlobFromPath`, I
decided to finally make the needed refactors to Semantic.IO, and to
split off the `File` type and `Files` effect. This patch:

* adds the `MonadIO` class to `Prologue`'s export list
* moves `File` into `Data.File`
* moves `Handle` into `Data.Handle`
* moves `Files` into `Semantic.Task.Files`
* moves functions for reading blobs into `Data.Blob`
* keeps general IO helpers in Semantic.IO
* renames `readFile` to `readBlobFromFile`
* renames `readBlobFromPath` to `readBlobFromFile'`

This should have a positive effect on compile times and ease of
navigation throughout the codebase.
2018-10-23 15:37:49 -04:00
Patrick Thomson
695d280f50 bump up the cancelable parsing timeout 2018-07-13 15:15:10 -04:00
Patrick Thomson
19e7ff7510 Reinstate import graph functionality. 2018-06-13 12:47:35 -04:00
Patrick Thomson
36d5b7562a Revert "gRPC import graph" 2018-06-13 12:34:35 -04:00
Patrick Thomson
c563747f87 tests compile now 2018-06-12 12:09:40 -04:00
Patrick Thomson
0fdef390b2 Relax the timeout in the cancelable parsing test.
If this keeps whining, I'll remove the test, but let's try tripling
the timeout interval first.
2018-06-05 13:13:08 -04:00
Patrick Thomson
10a863f57c Fix tests 2018-06-04 18:26:47 -04:00
Patrick Thomson
f563a2c808 forgot a do 2018-05-22 17:25:17 -04:00
Patrick Thomson
c8d5a8d231 add test for cancelling in-flight parsers 2018-05-22 17:01:17 -04:00
Patrick Thomson
949b9be418 add spec 2018-05-22 16:53:03 -04:00
Rob Rix
0d0aeafdc5 Add an openFileForReading helper for the tests. 2018-05-14 10:23:29 -04:00
Timothy Clem
f96db32268 Few more test fixes 2018-04-20 16:30:06 -07:00
Timothy Clem
7c2a8a464e Couple of test fixes 2018-04-20 16:27:53 -07:00
Timothy Clem
2617b3a4a6 Move cli fixtures around 2018-04-18 13:55:21 -07:00
Timothy Clem
bbff8d45ed More spec import cleanup 2018-03-13 11:10:50 -07:00
Patrick Thomson
da2a3fc7a8 Initial pass fixing errors raised by weeder.
This fixes a lot of unnecessary exports in the specs, removes a couple
otiose imports (comonads and semigroups are provided by base, I beleive),
and removes a duplicated function.
2018-03-09 12:07:34 -05:00
joshvera
e32961edde Rename semantic-diff to semantic 2018-02-26 13:16:56 -05:00
Timothy Clem
47ce5a63c1 Test null on both sides in JSON payload 2017-12-11 12:59:14 -08:00
Timothy Clem
8ce213fc44 No longer need to track blobKind in Maybe 2017-12-11 10:51:52 -08:00
Timothy Clem
844fc3f8b5 Use Join These Blob instead 2017-12-11 09:09:07 -08:00
Timothy Clem
24d98ad71c Fix up tests 2017-12-10 08:46:17 -08:00
Rob Rix
87d533cc2b Rename Language to Data.Language. 2017-11-27 14:17:48 -05:00
Rob Rix
b98375b58f Rename the IO spec. 2017-11-27 13:52:48 -05:00