1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
Commit Graph

548 Commits

Author SHA1 Message Date
Patrick Thomson
77672564eb unused imports 2019-03-01 12:58:51 -05:00
Patrick Thomson
eb36aead94 Bump fused-effects. 2019-02-01 12:42:50 -05:00
Patrick Thomson
9197fb6ee1 Handle ^C more appropriately.
This isn't perfect. If we're inside a Kafka timeout when we hit a
SIGKILL, GHC prints out an error message about a finalizer from C
calling back into Haskell. This is noisy but seems innocuous.
2019-01-28 16:25:24 -05:00
Patrick Thomson
f33a955d3a add proper exception handling 2019-01-27 19:24:04 -05:00
Patrick Thomson
47ec11cbc4 okay it's back to where it was 2019-01-23 16:50:33 -05:00
Timothy Clem
06a0d29990 ++tree-sitter-typescript for flow type in import_statement 2019-01-10 14:37:27 -08:00
Patrick Thomson
9852155a77 Upgrade to LTS 13.0 and GHC 8.6.3.
Bumps most of our dependencies.

Code changes:
* algebraic-graphs-0.3 no longer provides a Foldable or Traversable
  implementation for `Graph`, so now neither does our `Graph` type.
* CMark parsing now uses safe rendering of raw HTML/URLs by default,
  so there is no reason to pass an `optSafe` anymore.
* algebraic-graphs now no longer requires an Eq constraint on the
  output type it generates, so we can ditch our Serializing.DOT
  module. (Andrey fixed this for us specifically!)
2018-12-29 14:02:24 -05:00
joshvera
b6dd4fe090 ++haskell-tree-sitter 2018-12-12 16:18:25 -05:00
joshvera
de1719c128 Merge remote-tracking branch 'origin/master' into new-expressions 2018-12-12 15:59:41 -05:00
Patrick Thomson
2ccbac1da6 Bump haskell-tree-sitter submodules.
Should hopefully prevent submodule bloat.
2018-12-10 15:38:04 -05:00
joshvera
0ecd0a7e0b ++haskell-tree-sitter 2018-12-07 17:12:03 -05:00
joshvera
f8bc55f9f2 ++haskell-tree-sitter 2018-12-07 17:02:58 -05:00
Rob Rix
13eb824552 Bump fused-effects. 2018-10-29 13:31:24 -04:00
Rob Rix
4abfd4197b Bump fused-effects for https://github.com/robrix/fused-effects/pull/52. 2018-10-29 11:57:26 -04:00
Rob Rix
636eec364e Update to fused-effects, replace \/ with handleSum and bundle Interpose. 2018-10-29 09:52:48 -04:00
Rob Rix
637b9ee41e 🔥 effects. 2018-10-25 11:05:27 -04:00
Rob Rix
775bc6ef80 Bump higher-order-effects for interposition. 2018-10-25 09:27:40 -04:00
Rob Rix
131cae4d7b Merge branch 'master' into higher-order-effects 2018-10-24 14:04:13 -04:00
Rob Rix
c03b7ecabd Bump higher-order-effects for Eavesdrop.
Co-Authored-By: Patrick Thomson <patrick.william.thomson@gmail.com>
2018-10-24 12:39:24 -04:00
Rob Rix
314aff5d56 Bump higher-order-effects for Resource & some handler helpers. 2018-10-22 20:18:36 -04:00
Patrick Thomson
54fb762cf1 Bump tree-sitter-ruby.
The bumped version of tree-sitter-ruby did not make it into #2223 due
to an error on my part. This halves the time it takes to parse the
pathological lexer.rb file.
2018-10-22 13:55:52 -04:00
Rob Rix
034e2469ff Bump higher-order-effects. 2018-10-22 10:26:15 -04:00
Rob Rix
3ef2efa73a Merge branch 'master' into higher-order-effects 2018-10-22 09:45:57 -04:00
Patrick Thomson
71e8991b6e pull in new tree-sitter 2018-10-21 17:25:09 -04:00
Patrick Thomson
d0c8fdf935 Fix massive slowdown when copying large AST nodes.
As per https://github.com/tree-sitter/haskell-tree-sitter/pull/67, we
weren't using the right tree-sitter APIs to copy node children into a
Haskell-compatible data structure. This bumps tree-sitter-haskell and
adjusts the change in signature of ts_node_copy_child_nodes.
2018-10-21 15:19:38 -04:00
Patrick Thomson
ac543651ee Add NFData instances to enable more accurate benchmarking.
Because we're getting serious about benchmarking in the run-up to
Windrose, it's time to bring in the `deepseq` package to ensure that
benchmarks can fully evaluate the result of a test case.

The `deepseq` package provides an `NFData` typeclass:

```
class NFData a where
  rnf :: a -> ()
```

Instances use the `seq` combinator to ensure that the argument to
`rnf` is fully evaluated, returning (). If there is a `Generic`
instance for `a`, the implementation can be omitted. This patch adds
NFData for every syntax node, graph vertex, environment data
structures, and exceptions. It is long, but the work is very
straightforward, so don't panick.

The benchmark suite (`stack bench`) now produces more accurate
results. The benchmarks previously mimicked `rnf` by calling `show` on
the result of an evaluation or graph construction; now that we have
actual `NFData` instances we can use the `nfIO` combinator from
criterion. This has sped up the evaluation benchmarks and reduced
their memory consumption, while it has slowed down the call graph
benchmarks, as those benchmarks weren't evaluating the whole of the
graph.

Unfortunately, this patch increases compile times, as we have to
derive a few more Generic instances. I wish this weren't the case, but
there's little we can do about it now. In the future I have some plans
for how to reduce compile time, and I bet that those gains will at
least nullify the speed hit from this patch.

Now that we have NFData instances for every data type, we can start
benchmarking assignments, in preparation for fixing #2205.

This patch also pulls in updates to `effects` and `fastsum` that add
appropriate NFData instances for the data they vend.
2018-10-17 14:08:47 -04:00
Patrick Thomson
d56badfb29 Use upstream Resource effect. 2018-10-16 20:11:38 -04:00
Patrick Thomson
75bf696e47 Fix crash/race associated with bracket (#2207)
The bracket that I wrote inside effects does not properly handle
asynchronous exceptions, as it has no way to call the mask function.
As such, because the asynchronous exception is rethrown by both
`bracket` and `wait`, the exception handler will trigger twice. This
is what is causing the crash: `bracket` is passing the TSParser we
create in parseToAST to ts_parser_delete twice.

The best thing to do here is to create the new `Resource` effect,
which is interpreted down to `Control.Exception.bracket`, which has
the correct asynchronous-masking behavior, unlike the `bracket` in
`Control.Monad.Effect.Exception`, which I propose to remove in a patch
to `effects`.

This also bumps haskell-tree-sitter so that the
`ts_node_copy_child_nodes` function is considered `interruptible`.

To test:

1. Download [this file](https://gist.ghe.io/tclem/c2ffe3d20b248fdac59588aa98f168ae)
2. Run `TREE_SITTER_PARSE_TIMEOUT=1000 stack exec semantic -- --log-level=debug parse lexer.rb`

Before applying this patch, you will see a crash associated with a
double-free; afterwards, it should time out normally.
2018-10-16 17:05:29 -04:00
Rob Rix
800c459bb0 Bump higher-order-effects for catchIO/bracket. 2018-10-14 22:16:07 -04:00
Rob Rix
56dabab68f Bump higher-order-effects for hmap. 2018-10-12 14:46:00 -04:00
Rob Rix
0db8091c5e Bump higher-order-effects. 2018-10-12 14:22:50 -04:00
Rob Rix
6fb6fd3d4e Add higher-order-effects. 2018-10-12 12:37:08 -04:00
Timothy Clem
953b095161 ++tree-sitter 2018-09-19 12:03:39 -07:00
Patrick Thomson
22cf72c20f Merge branch 'master' into term-rewriting-mk2 2018-09-19 11:51:28 -04:00
Timothy Clem
253975164a Test out JavaScript parse-examples 2018-09-18 15:32:56 -07:00
Patrick Thomson
6e65f9060d Merge remote-tracking branch 'origin/master' into term-rewriting-mk2 2018-09-18 13:31:58 -04:00
Timothy Clem
30b57cfd67 ++tree-sitter 2018-09-18 09:57:34 -07:00
Timothy Clem
12e1fe3a88 ++tree-sitter 2018-09-18 09:07:26 -07:00
Timothy Clem
b6e257c088 Pick up tree-sitter-go-bump 2018-09-17 11:22:12 -07:00
Timothy Clem
d38b0998a0 ++tree-sitter with a few language grammar updates too 2018-09-17 09:29:27 -07:00
Patrick Thomson
b8b8fe01c9 port over Control.Rewriting 2018-09-14 12:47:21 -04:00
Rob Rix
99a19e6e17 Bump effects for more accurate error context.
This brings in https://github.com/joshvera/effects/pull/65, avoiding a bug where local changes would be applied outside the local scope.
2018-08-23 13:37:56 -04:00
Rick Winfrey
0d19b46880 Bump haskell-tree-sitter 2018-08-09 15:45:45 -07:00
Josh Vera
7b025c6e49 Merge branch 'master' into bump-tree-sitter 2018-07-23 19:55:21 -04:00
Timothy Clem
2a5847edee ++haskell-tree-sitter, tree-sitter, languages 2018-07-23 14:25:45 -07:00
Josh Vera
92f635ba0a Merge branch 'master' into bump-effects-for-pure-effect 2018-07-23 17:02:24 -04:00
Ayman Nadeem
52d89b7a05 fix merge conflicts 2018-07-23 11:23:57 -04:00
Rob Rix
182c539718 Bump effects for a generalization to bracket. 2018-07-23 11:02:19 -04:00
Rob Rix
d1a9775874 Bump effects. 2018-07-23 10:55:07 -04:00
joshvera
c9c7e43078 ++haskell-tree-sitter 2018-07-20 14:52:27 -04:00