1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00
Commit Graph

114 Commits

Author SHA1 Message Date
Patrick Thomson
669ee584df Quiesce the last few warnings from the tests. 2019-06-20 01:50:32 -04:00
Patrick Thomson
086947ade5 Add golden tests for parse --proto-symbols output.
This should help us ensure that we don't break CLI output, since our
CLI is an API.

This was made super-easy thanks to `tasty-golden`. I literally added
those two lines of code and it automatically created the reference
`.protobuf.bin` files. Slick as hell.
2019-06-20 01:33:51 -04:00
Patrick Thomson
b17a2c0ee8 Better nomenclature. 2019-06-19 17:56:37 -04:00
Patrick Thomson
4de36c5f0e Rewrite the Stat tests so they're not racy. 2019-06-19 17:54:53 -04:00
Patrick Thomson
0a3c11d5db Better formatting by keeping description lines shorter 2019-06-19 17:42:53 -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
6d599a5c7b Forgot that Exception doesn't imply Eq. 2019-06-19 12:58:40 -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
Jan Hrček
ec4248cbb4 Fix warnings in tests
27 [-Wunused-matches]
 7 [-Wmissing-export-lists]
 6 [-Wunused-imports]
 5 [-Wmissing-signatures]
 2 [-Wincomplete-uni-patterns]
 1 [-Wunused-top-binds]
 1 [-Wtype-defaults]
2019-06-15 08:56:59 +02:00
Patrick Thomson
a4652120a7 Fix test cases for builders (which don't have jd). 2019-06-12 16:40:28 -04:00
Patrick Thomson
b8cb9d1bfa Remove unused imports. 2019-06-12 12:52:11 -04:00
Patrick Thomson
3363eccfdf Better comments and test labels. 2019-06-12 12:29:11 -04:00
Patrick Thomson
acbacbe779 Use golden tests for the CLI. 2019-06-12 12:26:37 -04:00
lalaition
e4319224e3 Cleaned up parser 2019-06-09 14:11:58 -06:00
lalaition
be96fcf52f Refactored code to be in line with suggestions 2019-06-06 21:24:22 -06:00
lalaition
2ba61a21a0 Use Attoparsec to parse git output instead of manually splitting Text 2019-06-05 20:07:48 -06: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
Patrick Thomson
8e0962712e legacyMakeBlob => makeBlob. Also unpack File. 2019-05-24 11:52:35 -04:00
Patrick Thomson
63a7f117eb If we're not gonna rename File, give Blob the logical field name. 2019-05-21 22:58:25 -04:00
Patrick Thomson
b8d3a06a67 Fix all the test cases. 2019-05-21 22:28:32 -04:00
Timothy Clem
7840aec67b Fix specs 2019-04-12 12:50:30 -07:00
Timothy Clem
8b9bc575b6 Fix up tests 2019-03-25 13:14:04 -07: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
Timothy Clem
cc78c0d8d5 Case Api as generated 2019-02-12 12:49:34 -08:00
Timothy Clem
ce04fa8f12 Refactor runTask 2019-02-01 15:04:23 -08:00
Timothy Clem
d3330aa9f3 Dedicated input types for Blob and BlobPair 2019-01-28 14:37:50 -08:00
Timothy Clem
6befe07ea3 Remove rest of old diff renderers and Diff.hs 2019-01-22 12:05:45 -07:00
Timothy Clem
5e6d0240b2 Use the new diff api from the CLI, fix up tests again 2019-01-22 11:42:06 -07:00
Timothy Clem
154e0388af Goodbye Semantic.Parse 2019-01-18 16:04:23 -08:00
Timothy Clem
dad86f11e7 No more TermRenderer and all tests passing 2019-01-18 15:54:55 -08:00
Timothy Clem
f23110a73a Transition sexpression term rendering 2019-01-18 09:29:51 -08:00
Timothy Clem
15643e1d4f Switch over ToCDiffRenderer (will fix the tests next) 2019-01-17 15:58:49 -08:00
Timothy Clem
d8ef1c1f40 Fix up tests 2019-01-17 15:36:56 -08:00
Timothy Clem
e3afd9d684 Symbol rendering is entirely on the new path 2019-01-17 15:13:39 -08:00
Patrick Thomson
f750f2952a Remove 'both' function. 2019-01-10 15:53:15 -05:00
Timothy Clem
2e1626d949 Make symbols output also return partial results 2018-11-13 11:02:23 -08: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
Timothy Clem
2d1a8cc7e7 Express this a bit more elegantly 2018-09-26 16:55:34 -05:00
Timothy Clem
505c61959e This goes back to throwing now 2018-09-25 14:04:58 -05:00
Timothy Clem
099faacbce Re-work these tests now that we return if parse fails 2018-08-30 12:51:29 -07:00
Patrick Thomson
695d280f50 bump up the cancelable parsing timeout 2018-07-13 15:15:10 -04:00
Timothy Clem
de48b8cfea Merge remote-tracking branch 'origin/master' into import-graph-mk2 2018-06-18 14:58:50 -07:00
Timothy Clem
039d43e523 🔥 the --tags output and associated code 2018-06-18 11:36:31 -07:00
Patrick Thomson
659500551c Merge remote-tracking branch 'origin/master' into import-graph-mk2 2018-06-15 19:30:50 -04:00