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

19184 Commits

Author SHA1 Message Date
Timothy Clem
d8ad7f2b25
Merge branch 'master' into proto-rework 2019-07-16 08:36:39 -07:00
Rob Rix
1dbb44170f
Fix some deprecations &c. 2019-07-15 16:50:06 -04:00
Rob Rix
c9aedbc707
Sort imports. 2019-07-15 15:23:34 -04:00
Rob Rix
b1fe3e6073
🔥 a bunch of redundant imports. 2019-07-15 15:23:29 -04:00
Rob Rix
0ac44393ff
Hide :+:. 2019-07-15 14:54:40 -04:00
Patrick Thomson
3cdfe55b80 Unnecessary use of &. 2019-07-06 13:32:00 -04:00
Patrick Thomson
eefb1d5d36 Stray whitespace change. 2019-07-06 13:28:20 -04:00
Patrick Thomson
5c033973ae Kill unused import. 2019-07-06 13:26:01 -04:00
Patrick Thomson
0749aa1c91 Remove the unused 'analyze'. 2019-07-06 13:24:16 -04:00
Patrick Thomson
7221e71279 Fix Interpose 2019-07-06 12:43:52 -04:00
Patrick Thomson
3438e476ea Fix effects in semantic-core. 2019-07-06 12:35:57 -04:00
Patrick Thomson
f3bc363cad unsuccessful take on Analyze 2019-07-06 12:27:44 -04:00
Patrick Thomson
3af388b633 more monad massages 2019-07-06 12:01:57 -04:00
Patrick Thomson
d01ad24d83 Ditto, but for bitwise functions. 2019-07-06 11:42:53 -04:00
Patrick Thomson
0329984dfa Handle needed changes associated with NumericFunction. 2019-07-06 11:35:19 -04:00
Patrick Thomson
94c8adba23 Fix most effects except Interpose 2019-07-06 11:27:12 -04:00
Patrick Thomson
f401f75303 WIP 2019-07-06 10:52:38 -04:00
Timothy Clem
a48aa65cfc Bring back ping request/response 2019-07-05 15:34:35 -07:00
Timothy Clem
7b44a6a24e Repeatable code gen from proto 2019-07-05 15:11:33 -07:00
Patrick Thomson
23733f9ac9
Merge branch 'master' into php-strict-equal-assignment 2019-07-03 12:07:55 -04:00
Patrick Thomson
cfcd27545d
Merge branch 'master' into php-concat 2019-07-03 11:06:42 -04:00
Patrick Thomson
daacddc5c4
Merge branch 'master' into php-strict-equal-assignment 2019-07-03 11:04:27 -04:00
Kevin Orr
5b5a9965dc [#186] Fix PHP string concatenation and augmented assignment 2019-07-03 09:54:13 -04:00
Kevin Orr
8a6737b079 [#188] Fix PHP strict inequality assignment 2019-07-02 16:38:17 -04:00
Patrick Thomson
785ba4dcea Include vertex IDs in JSON graph output and fix their format.
As reported in #189, the `edges` field of JSON graph output refers to
information not reflected in the rest of the output, specifically the
vertex IDs. This patch adds that information to the `ToJSON` instance
for `ControlFlowVertex`. It also includes a `toEncoding` instance for
a free speed boost.

During this patch, I realized that, because `hash` tends to return a
large number (since `Int` is 64-bit), we may run into errors when
decoding JSON. One example hash is `3500157981503982114`; passing that
to a JS engine's `Number.isSafeInteger` function returns false. The
correct thing to do here is return ids as strings, which I have done.
This is backwards-incompatible, but since this information was never
properly exposed, the impact is negligable.
2019-07-02 11:24:52 -04:00
Josh Vera
3dea3d7e34
Merge branch 'master' into add-php 2019-06-25 15:11:19 -04:00
Patrick Thomson
90fabfe6f5 Fix DiffTreeVertexDiffTerm definition to be a valid protobuf object.
We define the DiffTreeVertex protobuf message like so:

```protobuf
message DiffTreeVertex {
  int32 diff_vertex_id = 1;
  oneof diff_term {
    DeletedTerm deleted = 2;
    InsertedTerm inserted = 3;
    ReplacedTerm replaced = 4;
    MergedTerm merged = 5;
  }
}
```

This is turned into two Haskell types, a toplevel `DiffTreeVertex` type
and a `DiffTreeVertexDiffTerm` type that represents the anonymous
`oneof` type. Said types looked like so:

```haskell
data DiffTreeVertexDiffTerm
  = Deleted (Maybe DeletedTerm)
  | Inserted (Maybe InsertedTerm)
  | Replaced (Maybe ReplacedTerm)
  | Merged (Maybe MergedTerm)
  deriving stock (Eq, Ord, Show, Generic)
  deriving anyclass (Proto3.Message, Proto3.Named, NFData)
```

This is the wrong representation, as it neglects to account for the
fact that options could be added to the `diff_term` stanza. A sum type
does not provide enough constructors to handle the case of when none
of `deleted`, `inserted`, `replaced` etc. is `Just` anything. A more
correct definition follows:

```haskell
data DiffTreeVertexDiffTerm = DiffTreeVertexDiffTerm
  { deleted :: Maybe DeletedTerm
  , inserted :: Maybe InsertedTerm
  , replaced :: Maybe ReplacedTerm
  , merged :: Maybe MergedTerm
  }
```

This patch applies the above change, using `-XPatternSynonyms` to
provide backwards-compatible API shims. Though this changes JSON
output format (through the `ToJSON` instance), it should have no
bearing on backwards compatibility in protobuf objects, since there is
no way to consume diff trees as protobufs as of this writing.

Fixes #168.
2019-06-25 13:31:36 -04:00
Josh Vera
3daee383dc
Merge branch 'master' into add-php 2019-06-25 12:28:25 -04:00
joshvera
6863168acb Add phpt to extensionsForLanguage 2019-06-25 11:01:02 -04:00
joshvera
f911766986 Add phpASTParser 2019-06-25 10:35:56 -04:00
joshvera
cc4cc62411 Assign FormalParameters in parameters 2019-06-25 10:35:44 -04:00
joshvera
275de222de Add php to code nav languages 2019-06-24 17:33:03 -04:00
Gus Caplan
c5dfb7f374
Add .mjs as extension for JavaScript 2019-06-22 19:53:43 -05:00
Rob Rix
8cd44aa5fa
Merge branch 'master' into update-php-assignment 2019-06-21 09:59:15 -04:00
Rick Winfrey
4fdcef9822
Merge branch 'master' into update-php-assignment 2019-06-20 17:37:41 -07:00
Rick Winfrey
1d03fae11d Add PHP to supportedExts and codeNavLanguages 2019-06-20 17:30:10 -07:00
Rick Winfrey
f793346895 Match FormalParameter symbol 2019-06-20 11:42:37 -07:00
Patrick Thomson
dd8446c909 Drop the transformers dependency. 2019-06-20 14:13:54 -04:00
Patrick Thomson
b1a2b85d87 Merge remote-tracking branch 'origin/master' into machines-to-streaming 2019-06-20 14:09:39 -04:00
Patrick Thomson
9f20899d85 Can't eliminate MTL yet, but we can minimize it. 2019-06-20 14:02:12 -04:00
Patrick Thomson
0564b9d36c Eliminate mtl dependency. 2019-06-20 13:50:50 -04:00
Patrick Thomson
2cefe29fbc no partial type sigs necessary 2019-06-20 12:58:16 -04:00
Rob Rix
16d553167e
Revert "Add a little lambda calculus to toy with."
This reverts commit 50813fd5047ad648c9169d03f238687a56ffec3c.
2019-06-20 10:54:03 -04:00
Rob Rix
ccf8e1a7b9
Add a little lambda calculus to toy with. 2019-06-20 10:54:03 -04:00
Rob Rix
610acb7380
Indent/newline. 2019-06-20 10:54:03 -04:00
Rob Rix
1a1bfc3ca7
Generalize the Custom strategy over any Show-able type. 2019-06-20 10:54:03 -04:00
Rob Rix
bb54b3094d
Serialize field metadata. 2019-06-20 10:54:03 -04:00
Rob Rix
caeff71a33
Serialize fields. 2019-06-20 10:54:02 -04:00
Rob Rix
50b9298457
Serialize unit constructors. 2019-06-20 10:54:02 -04:00
Rob Rix
8e98f7eaed
Use advanced overlap to accommodate customizing for Text fields. 2019-06-20 10:54:02 -04:00