1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 16:33:03 +03:00
Commit Graph

563 Commits

Author SHA1 Message Date
Rob Rix
f79ba2ae36
Merge branch 'master' into move-grammar-datatypes-to-the-parser-packages 2019-06-03 15:22:56 -04:00
Rob Rix
2646f89948
Move the grammar datatypes for all the other languages into their respective packages. 2019-06-03 14:14:04 -04:00
Rob Rix
0fa39f6131
🔥 Language.JSON.Grammar. 2019-06-03 13:23:16 -04:00
Rob Rix
d6bbcbb704
🔥 the freer-cofreer submodule. 2019-06-03 12:19:23 -04:00
Patrick Thomson
b2bbda5fca Specify version bounds in .cabal file (#1)
Establish library bounds based on Stackage LTS 13.13.

We use the new cabal `^>=` operator to establish PVP-compatible versioning.
2019-05-31 08:58:17 -04:00
Patrick Thomson
3d5eb45651 🔥 vendor/fastsum 2019-05-13 14:31:32 -04:00
Patrick Thomson
4c2397a71e 🔥 vendor/fused-effects 2019-05-13 14:26:10 -04:00
Patrick Thomson
c02d6cbe64 Remove semilattices module.
We've never needed to update this, and it lives on Hackage.
2019-05-13 14:24:07 -04:00
Patrick Thomson
61dc6da991 Upgrade fused-effects to 0.3.1.0.
This will give us a small speed boost.
2019-04-24 12:14:18 -04:00
Max Brunsfeld
c88e76f005 Bump haskell-tree-sitter for timeout fixes
Refs https://github.com/tree-sitter/tree-sitter/pull/308
2019-03-22 13:11:17 -07:00
Max Brunsfeld
74d40d6ddc Bump haskell-tree-sitter 2019-03-19 10:24:02 -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
joshvera
29b774c22d WIP async effect 2019-03-12 18:41:20 -04:00
Patrick Thomson
f28f23c97d infinite blessings upon @rob_rix 2019-03-06 17:39:24 -05:00
Patrick Thomson
ae8b87a19c Bump fused-effects version. 2019-03-04 10:47:31 -05:00
Patrick Thomson
a2772e4338 Bump python-tree-sitter so to avoid dirty worktrees.
Because of Python grammar changes, this removes the `Identifier'` token.
2019-03-01 12:53:19 -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