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

5715 Commits

Author SHA1 Message Date
Patrick Thomson
3cd4ffc9c3 RequestContext, RequestMethod, and RepositoryPush 2019-01-24 12:57:50 -05:00
Patrick Thomson
469151d180 Move Data/GitHub/Repository 2019-01-24 12:48:15 -05:00
Patrick Thomson
c6f4f0fea0 Move Data.GitHub.Git to Data.Git 2019-01-24 12:40:22 -05:00
Patrick Thomson
e69e2b114d Move the query functions into their own file 2019-01-24 12:04:40 -05:00
joshvera
ca4db58d83 Declare parameters of a function with their own spans 2019-01-18 17:52:44 -05:00
joshvera
d60807f0f1 Add ModuleInfo to ScopeGraph 2019-01-18 16:41:41 -05:00
joshvera
36cadf6fd1 Add owner to RepositoryPush 2019-01-16 12:16:57 -05:00
Josh Vera
25f0adc9cd Merge branch 'master' into indexer-prototype 2019-01-14 13:24:15 -05:00
Patrick Thomson
2afd729464 lint 2019-01-14 12:13:02 -05:00
Patrick Thomson
806a850814 Remove test data. 2019-01-14 12:09:16 -05:00
Patrick Thomson
0eb3ea5bb6 Sanity, lint, and documentation pass. 2019-01-14 11:06:17 -05:00
Patrick Thomson
716da369fe Add fromRight/fromLeft to Prologue and according hlint rules.
These are new in base-4.10; I had no idea they existed until Rob
pointed them out. This adds them to the Prologue and institutes hlint
rules to suggest when we can use them.
2019-01-11 12:49:56 -05:00
Patrick Thomson
1f4a24b569 Merge remote-tracking branch 'origin/master' into indexer-prototype 2019-01-11 12:28:29 -05:00
Patrick Thomson
b29633e0d6 Move the user type into User. 2019-01-11 11:58:13 -05:00
Patrick Thomson
5b73e89932 Introduce Present and Absent pattern synonyms for Nested. 2019-01-11 11:45:23 -05:00
Patrick Thomson
a4bd06f6be Fix nomenclature and modules. 2019-01-11 11:20:58 -05:00
Patrick Thomson
60b024dd13 Fix the members that I omitted. 2019-01-10 19:01:19 -05:00
Patrick Thomson
d7ad7e9fce Add Repository entity and make sure they get pushed in repo pushes 2019-01-10 16:22:34 -05:00
Patrick Thomson
589524b21e add fixtures for testing 2019-01-10 16:05:11 -05:00
Patrick Thomson
f750f2952a Remove 'both' function. 2019-01-10 15:53:15 -05:00
Josh Vera
d4e9ab09a9 Merge pull request #2326 from github/add-hydro-data-types
Add data types for Kafka event messages.
2019-01-10 13:16:52 -05:00
joshvera
d96e4d398f lints 2019-01-08 18:38:30 -05:00
joshvera
707723981a Add QualifedExport 2019-01-08 18:19:04 -05:00
Patrick Thomson
2e66bc3443 Simplify Data.Functor.Both.
Though the previous definition (a type synonym that wrapped `Join (,)`)
was clever, it required a number of orphan instances, as well as an extra
`both` function to simulate a `Both` constructor. Using an ordinary data
structure removes the need for orphan instances.
2019-01-08 17:34:47 -05:00
Patrick Thomson
288153acaa Remove unnecessary Finite instances. 2019-01-08 16:06:17 -05:00
joshvera
b23352e163 Merge remote-tracking branch 'origin/master' into indexer-prototype 2019-01-08 15:54:43 -05:00
Patrick Thomson
2894edd428 Include Push events in the cabal file. 2019-01-08 15:30:12 -05:00
Patrick Thomson
bb204429a7 Make sure RequestContext has the instances it needs. 2019-01-08 15:21:39 -05:00
Patrick Thomson
8823d4857e Use enumerateUpper for Type's instance of Finite. 2019-01-08 13:58:08 -05:00
Patrick Thomson
39bdfdf01f Add Hydro data types corresponding to proposed push schema.
Provides a `Push` type. To build that, we needed `RequestContext`,
`UserType`, `RequestMethod`, `Spamurai`, `Timestamp`, and `IPVersion`.

The schemas have all been taken from https://github.com/github/hydro-schemas/.
2019-01-08 13:55:09 -05:00
Patrick Thomson
00abc88daa Remove unneeded extensions and document Generically. 2019-01-07 16:30:07 -05:00
Patrick Thomson
6983f55e1c DerivingVia for Syntax.Directive. 2019-01-07 16:20:54 -05:00
Patrick Thomson
e0bb9e4a08 DerivingVia over Syntax and Syntax.Type. 2019-01-07 15:45:00 -05:00
Patrick Thomson
c778de4585 DerivingVia over Comment. 2019-01-07 15:39:44 -05:00
Patrick Thomson
b32a728b84 DerivingVia over Syntax.Declaration. 2019-01-07 15:37:24 -05:00
Patrick Thomson
e0d5e7f54b DerivingVia over Syntax.Statement. 2019-01-07 15:33:50 -05:00
Patrick Thomson
d4c9702d7e Introduce Generically functor and convert Expression/Literal to use it. 2019-01-07 15:33:43 -05:00
Patrick Thomson
1302fe4ac8 Use -XDerivingVia to clean up our Semigroup/Monoid instances.
Now that we're on GHC 8.6, we can use `-XDerivingVia` in many cases
where we previously had to write instances by hand. If you're not
familiar with `-XDerivingVia`, the [GHC proposal][ghc] is a good place
to start.

[ghc]: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0023-deriving-via.rst

Thanks to the `generic-monoid` package, we can derive a `Semigroup`
instance for any product type whose members are `Semigroups`, and the
same goes for `Monoid`. This entails an extra dependency, but it is
better than the `generic-deriving` package, which is way too much overhead.
I've also switched some trivial definitions to newtype-deriving.

Please be aware that this bumps `hlint` and `haskell-src-exts` so that
`hlint` doesn't choke on the `DerivingVia` extension. You'll need to
`stack install hlint` to get it on your `PATH`. Apologies!
2019-01-07 11:23:11 -05:00
joshvera
b5af73c088 Merge remote-tracking branch 'origin/master' into add-references-to-indexer-prototype 2019-01-04 15:00:43 -05:00
Patrick Thomson
955f30617c Depend on hostname instead of Network.BSD. 2018-12-29 15:02:42 -05: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
64d847833c Move reference into case maybeConstructor 2018-12-20 20:01:41 -05:00
joshvera
d830cd1f2a remove extra parens 2018-12-20 19:38:59 -05:00
joshvera
87e478a816 Allow construction of typescript objects without constructors 2018-12-20 19:36:49 -05:00
joshvera
250eedc742 Call ref on the rhs in order to bind the lhs to the rhs in MemberAccess
Temporarily call `eval rhs >> ref rhs` because we don't set up `Reader Span` correctly when calling `ref`.
2018-12-20 19:36:31 -05:00
joshvera
6ebbc848e9 Temporarily move reference call to eval in Evaluatable Identifier
Because we don't set up the Reader Span property when calling `ref`.
2018-12-20 19:35:19 -05:00
joshvera
39a4ec0479 Store a term in ReferenceError 2018-12-20 19:34:12 -05:00
joshvera
587d090008 Store MemberAccess rhs as a term
So we can grab its span in Eval
2018-12-20 19:34:01 -05:00
joshvera
610f5789e7 WIP 2018-12-19 18:34:01 -05:00
joshvera
81bc67943e Add a ReferenceInfo to the references map
In order to keep track of each reference's span and kind
2018-12-19 17:58:43 -05:00