forked from github/semantic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsemantic.cabal
424 lines (412 loc) · 17.2 KB
/
semantic.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
cabal-version: 2.2
name: semantic
version: 0.6.0
synopsis: Framework and service for analyzing and diffing untrusted code.
description: Please see README.md
homepage: http://github.com/github/semantic#readme
author: The Semantic authors
maintainer: [email protected]
license: MIT
license-file: LICENSE
copyright: (c) 2016-2019 GitHub, Inc.
category: Web
build-type: Simple
stability: alpha
tested-with: GHC == 8.6.4
flag release
description: Build with optimizations on (for CI or deployment builds)
default: False
-- GHC extensions shared between targets
common haskell
default-language: Haskell2010
default-extensions: DataKinds
, DeriveFoldable
, DeriveFunctor
, DeriveGeneric
, DeriveTraversable
, FlexibleContexts
, FlexibleInstances
, MonadFailDesugaring
, MultiParamTypeClasses
, OverloadedStrings
, RecordWildCards
, StandaloneDeriving
, StrictData
, TypeApplications
-- Except in case of vendored dependencies, these deps should be expressed
-- as caret-operator bounds relative to a version in Stackage.
-- These are currently pinned to lts-13.13.
common dependencies
build-depends: base >= 4.8 && < 5
, aeson ^>= 1.4.2.0
, algebraic-graphs ^>= 0.3
, async ^>= 2.2.1
, bifunctors ^>= 5.5
, bytestring ^>= 0.10.8.2
, containers ^>= 0.6.0.1
, directory ^>= 1.3.3.0
, fastsum
, filepath ^>= 1.4.2.1
, free ^>= 5.1
, fused-effects ^>= 0.4.0.0
, fused-effects-exceptions ^>= 0.1.1.0
, hashable ^>= 1.2.7.0
, haskell-tree-sitter
, machines ^>= 0.6.4
, mtl ^>= 2.2.2
, network ^>= 2.8.0.0
, process
, recursion-schemes ^>= 5.1
, scientific ^>= 0.3.6.2
, safe-exceptions
, semilattices
, text ^>= 1.2.3.1
, these >= 0.7 && <1
, unix ^>= 2.7.2.2
, proto3-suite
, proto3-wire
common executable-flags
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m"
library
import: haskell, dependencies
hs-source-dirs: src
exposed-modules:
-- Analyses & term annotations
Analysis.Abstract.Caching.FlowInsensitive
, Analysis.Abstract.Caching.FlowSensitive
, Analysis.Abstract.Collecting
, Analysis.Abstract.Dead
, Analysis.Abstract.Graph
, Analysis.Abstract.Tracing
, Analysis.ConstructorName
, Analysis.CyclomaticComplexity
, Analysis.TOCSummary
, Analysis.Decorator
, Analysis.HasTextElement
, Analysis.PackageDef
-- Semantic assignment
, Assigning.Assignment
, Assigning.Assignment.Deterministic
, Assigning.Assignment.Table
-- Control structures & interfaces for abstract interpretation
, Control.Abstract
, Control.Abstract.Context
, Control.Abstract.Evaluator
, Control.Abstract.Heap
, Control.Abstract.Hole
, Control.Abstract.Modules
, Control.Abstract.Primitive
, Control.Abstract.PythonPackage
, Control.Abstract.Roots
, Control.Abstract.ScopeGraph
, Control.Abstract.Value
-- Effects
, Control.Effect.Interpose
, Control.Effect.REPL
, Control.Rewriting
-- Datatypes for abstract interpretation
, Data.Abstract.Address.Hole
, Data.Abstract.Address.Monovariant
, Data.Abstract.Address.Precise
, Data.Abstract.BaseError
, Data.Abstract.Declarations
, Data.Abstract.Evaluatable
, Data.Abstract.FreeVariables
, Data.Abstract.AccessControls.Class
, Data.Abstract.AccessControls.Instances
, Data.Abstract.HasSpan
, Data.Abstract.Heap
, Data.Abstract.Live
, Data.Abstract.Module
, Data.Abstract.ModuleTable
, Data.Abstract.Name
, Data.Abstract.Number
, Data.Abstract.Package
, Data.Abstract.Path
, Data.Abstract.ScopeGraph
, Data.Abstract.Value.Abstract
, Data.Abstract.Value.Concrete
, Data.Abstract.Value.Type
-- General datatype definitions & generic algorithms
, Data.Algebra
, Data.AST
, Data.Blob
, Data.Blob.IO
, Data.Diff
, Data.Duration
, Data.Error
, Data.Flag
, Data.Functor.Both
, Data.Functor.Classes.Generic
, Data.Graph
, Data.Graph.ControlFlowVertex
, Data.Handle
, Data.History
, Data.ImportPath
, Data.JSON.Fields
, Data.Language
, Data.Location
, Data.Map.Monoidal
, Data.Patch
, Data.Project
, Data.Quieterm
, Data.Range
, Data.Reprinting.Errors
, Data.Reprinting.Fragment
, Data.Reprinting.Operator
, Data.Reprinting.Scope
, Data.Reprinting.Splice
, Data.Reprinting.Token
, Data.Semigroup.App
, Data.Scientific.Exts
, Data.Source
, Data.Span
-- À la carte syntax types
, Data.Syntax
, Data.Syntax.Comment
, Data.Syntax.Declaration
, Data.Syntax.Directive
, Data.Syntax.Expression
, Data.Syntax.Literal
, Data.Syntax.Statement
, Data.Syntax.Type
, Data.Tag
, Data.Term
-- Diffing algorithms & interpretation thereof
, Diffing.Algorithm
, Diffing.Algorithm.RWS
, Diffing.Algorithm.RWS.FeatureVector
, Diffing.Algorithm.SES
, Diffing.Interpreter
-- Language-specific grammar/syntax types, & assignments
, Language.Markdown.Assignment
, Language.Markdown.Syntax
, Language.Go.Assignment
, Language.Go.Syntax
, Language.Go.Type
, Language.Haskell.Assignment
, Language.Haskell.Syntax
, Language.Haskell.Syntax.Constructor
, Language.Haskell.Syntax.Haskell
, Language.Haskell.Syntax.Identifier
, Language.Haskell.Syntax.Pattern
, Language.Haskell.Syntax.QuasiQuote
, Language.Haskell.Syntax.Type
, Language.JSON.Assignment
, Language.JSON.PrettyPrint
, Language.MiniRuby.Assignment
, Language.MiniPython.Assignment
, Language.Ruby.Assignment
, Language.Ruby.PrettyPrint
, Language.Ruby.Syntax
, Language.TypeScript.Assignment
, Language.TypeScript.Resolution
, Language.TypeScript.Syntax
, Language.TypeScript.Syntax.Import
, Language.TypeScript.Syntax.JavaScript
, Language.TypeScript.Syntax.JSX
, Language.TypeScript.Syntax.TypeScript
, Language.TypeScript.Syntax.Types
, Language.PHP.Assignment
, Language.PHP.Syntax
, Language.Python.Assignment
, Language.Python.PrettyPrint
, Language.Python.Syntax
, Language.Java.Assignment
, Language.Java.Syntax
, Numeric.Exts
-- Parser glue
, Parsing.CMark
, Parsing.Parser
, Parsing.TreeSitter
, Paths_semantic
-- Rendering formats
, Rendering.Graph
, Rendering.JSON
, Rendering.TOC
, Reprinting.Tokenize
, Reprinting.Translate
, Reprinting.Typeset
, Reprinting.Pipeline
-- High-level flow & operational functionality (logging, stats, etc.)
, Semantic.Analysis
-- API
, Semantic.Api
, Semantic.Api.Bridge
, Semantic.Api.Diffs
, Semantic.Api.LegacyTypes
, Semantic.Api.Symbols
, Semantic.Api.Terms
, Semantic.Api.TOCSummaries
, Semantic.Api.V1.CodeAnalysisPB
, Semantic.AST
, Semantic.CLI
, Semantic.Config
, Semantic.Distribute
, Semantic.Env
, Semantic.Git
, Semantic.Graph
, Semantic.IO
, Semantic.REPL
, Semantic.Resolution
, Semantic.Task
, Semantic.Task.Files
, Semantic.Telemetry
, Semantic.Telemetry.AsyncQueue
, Semantic.Telemetry.Error
, Semantic.Telemetry.Log
, Semantic.Telemetry.Stat
, Semantic.Timeout
, Semantic.Util
, Semantic.Util.Pretty
, Semantic.Version
-- Serialization
, Serializing.Format
, Serializing.SExpression
, Tags.Taggable
, Tags.Tagging
-- Custom Prelude
, Prologue
build-depends: base >= 4.8 && < 5
, ansi-terminal ^>= 0.8.2
, array ^>= 0.5.3.0
, attoparsec ^>= 0.13.2.2
, cmark-gfm == 0.1.8
, cryptohash ^>= 0.11.9
, deepseq ^>= 1.4.4.0
, directory-tree ^>= 0.12.1
, generic-monoid ^>= 0.1.0.0
, ghc-prim ^>= 0.5.3
, gitrev ^>= 1.3.1
, haskeline ^>= 0.7.5.0
, hostname ^>= 1.0
, hscolour ^>= 1.24.4
, http-client ^>= 0.6.2
, http-client-tls ^>= 0.3.5.3
, http-types ^>= 0.12.3
, http-media ^>= 0.7.1.3
, kdt ^>= 0.2.4
, lens ^>= 4.17
, mersenne-random-pure64 ^>= 0.2.2.0
, network-uri ^>= 2.6.1.0
, optparse-applicative ^>= 0.14.3.0
, parallel ^>= 3.2.2.0
, parsers ^>= 0.12.9
, prettyprinter ^>= 1.2.1
, pretty-show ^>= 1.9.5
, profunctors ^>= 5.3
, reducers ^>= 3.12.3
, semigroupoids ^>= 5.3.2
, servant ^>= 0.15
, shelly
, split ^>= 0.2.3.3
, stm-chans ^>= 3.0.0.4
, template-haskell ^>= 2.14
, time ^>= 1.8.0.2
, unliftio-core
, unordered-containers ^>= 0.2.9.0
, vector ^>= 0.12.0.2
, haskell-tree-sitter
, tree-sitter-go
, tree-sitter-haskell
, tree-sitter-json
, tree-sitter-php
, tree-sitter-python
, tree-sitter-ruby
, tree-sitter-typescript
, tree-sitter-java
ghc-options: -Wall -Wmissing-export-lists -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -fno-warn-name-shadowing -j
if flag(release)
ghc-options: -Werror -O1
cpp-options: -DCOMPUTE_GIT_SHA
else
ghc-options: -O0 +RTS -A128m -n2m -RTS
ghc-prof-options: -fprof-auto
executable semantic
import: haskell, dependencies, executable-flags
hs-source-dirs: app
main-is: Main.hs
if flag(release)
ghc-options: -O1
cpp-options: -DCOMPUTE_GIT_SHA
else
ghc-options: -O0
build-depends: base
, semantic
test-suite test
import: haskell, dependencies, executable-flags
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
other-modules: Analysis.Go.Spec
, Analysis.PHP.Spec
, Analysis.Python.Spec
, Analysis.Ruby.Spec
, Analysis.TypeScript.Spec
, Assigning.Assignment.Spec
, Control.Abstract.Evaluator.Spec
, Data.Abstract.Path.Spec
, Data.Abstract.Name.Spec
, Data.Diff.Spec
, Data.Functor.Classes.Generic.Spec
, Data.Functor.Listable
, Data.Graph.Spec
, Data.Mergeable
, Data.Range.Spec
, Data.Scientific.Spec
, Data.Semigroup.App.Spec
, Data.Source.Spec
, Data.Term.Spec
, Diffing.Algorithm.RWS.Spec
, Diffing.Algorithm.SES.Spec
, Diffing.Interpreter.Spec
, Graphing.Calls.Spec
, Integration.Spec
, Numeric.Spec
, Parsing.Spec
, Reprinting.Spec
, Rewriting.Go.Spec
, Rewriting.JSON.Spec
, Rewriting.Python.Spec
, Rendering.TOC.Spec
, Semantic.Spec
, Semantic.CLI.Spec
, Semantic.IO.Spec
, Semantic.Stat.Spec
, Tags.Spec
, SpecHelpers
, Test.Hspec.LeanCheck
build-depends: semantic
, tree-sitter-json
, Glob
, hspec >= 2.6 && <3
, hspec-core >= 2.6 && <3
, hspec-expectations-pretty-diff ^>= 0.7.2.5
, HUnit ^>= 1.6.0.0
, leancheck >= 0.8 && <1
, temporary
ghc-options: -O0
if flag(release)
ghc-options: -dynamic
test-suite parse-examples
import: haskell, dependencies, executable-flags
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Examples.hs
build-depends: semantic
, Glob
, hspec >= 2.4.1
, hspec-core
, hspec-expectations-pretty-diff
benchmark evaluation
import: haskell, executable-flags
hs-source-dirs: bench/evaluation
type: exitcode-stdio-1.0
main-is: Main.hs
ghc-options: -static -O1
build-depends: base
, criterion
, semantic
source-repository head
type: git
location: https://github.com/github/semantic