-
Notifications
You must be signed in to change notification settings - Fork 58
/
monocle.cabal
343 lines (318 loc) · 14.3 KB
/
monocle.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
cabal-version: 3.0
name: monocle
version: 1.11.1
homepage: https://github.com/change-metrics/monocle#readme
bug-reports: https://github.com/change-metrics/monocle/issues
license: AGPL-3.0-only
license-file: LICENSE
author: Monocle authors
maintainer: Monocle authors <[email protected]>
copyright: 2021,2022,2023 Monocle authors
category: Development
build-type: Simple
tested-with: GHC == 9.2.5
extra-source-files: schemas/monocle/config/**/*.dhall,
schemas/github/schema.docs.graphql,
schemas/gitlab/schema.graphql,
test/data/*.yaml,
test/data/*.json
source-repository head
type: git
location: https://github.com/change-metrics/monocle.git
flag ci
description: Make warnings error
default: False
manual: True
flag codegen
description: Build codegen utility
default: False
manual: True
common common-options
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wno-missing-pattern-synonym-signatures
--write-ghc-environment-files=always
-- Enable stan integration
-fwrite-ide-info
-hiedir=.hie
-- -fplugin=Effectful.Plugin
if impl(ghc >= 8.0)
ghc-options: -Wredundant-constraints
if impl(ghc >= 8.2)
ghc-options: -fhide-source-paths
if impl(ghc >= 8.4)
ghc-options: -Wpartial-fields
if impl(ghc >= 8.10)
ghc-options: -Wunused-packages
if flag(ci)
ghc-options: -Werror
default-language: Haskell2010
default-extensions: BangPatterns,
-- ConstraintKinds enables defining aliases for constraints, e.g. `type MyE m = (MonadLog m, MonadTime m)`
ConstraintKinds,
DeriveGeneric,
DerivingStrategies,
-- FlexibleInstances enables defining instances for types such as Pico (which is defined as `Fixed Data.Fixed.E12` in Data.Fixed. It is safe to use.
FlexibleInstances,
FlexibleContexts,
GeneralizedNewtypeDeriving,
-- Import qualified post improve import list by aligning the modules name
ImportQualifiedPost,
-- KindSignatures, DataKinds and PolyKinds enables using `:::` to annotate a type a type with a name.
KindSignatures,
DataKinds,
PolyKinds,
LambdaCase,
MultiWayIf,
NamedFieldPuns,
NamedWildCards,
NoImplicitPrelude,
NumDecimals,
NumericUnderscores,
-- MultiParamTypeClasses enables declaring instances with multiple type params, e.g. this is required to define custom MonadReader or From instance.
MultiParamTypeClasses,
OverloadedStrings,
QuasiQuotes,
PatternSynonyms,
RecordWildCards,
ScopedTypeVariables,
StrictData,
TypeApplications,
TypeOperators,
ViewPatterns,
-- BlockArguments enables omiting `$` before do block
BlockArguments,
-- TypeFamilies enables effect dispatch definition
TypeFamilies,
PartialTypeSignatures,
-- DuplicateRecordFields enables attribute like `id` or `name` without causing a name conflict.
DuplicateRecordFields,
-- OverloadedRecordDot enables accessing attribute with `obj.name` (see Note [Record Dot Syntax])
OverloadedRecordDot
common codegen
default-language: Haskell2010
hs-source-dirs: codegen
build-depends: base < 5
, aeson
, bytestring
, containers >= 0.6
, deepseq >= 1.4
, proto3-suite >= 0.5.0
, proto3-wire >= 1.4.0
, text
, vector >= 0.12
library
import: common-options, codegen
build-depends: base < 5
, HsOpenSSL >= 0.11
, MonadRandom
, aeson >= 2
, aeson-casing
, aeson-pretty
, attoparsec >= 0.13
, base64 >= 0.4
, cgroup-rts-threads
, blaze-markup >= 0.8.2.8
, blaze-html >= 0.9.1.2
, binary >= 0.8
, bloodhound ^>= 0.19
, bugzilla-redhat ^>= 1.0
, byteslice >= 0.2
, bytestring >= 0.10
, containers >= 0.6
, cookie
, cryptohash-sha256 >= 0.11.102.1
, dhall >= 1.40
, dhall-yaml >= 1.2
, directory
, either >= 5
, effectful < 2.3.0.0
, effectful-core
-- , effectful-plugin
, envparse >= 0.4
, exceptions >= 0.10
, fakedata >= 1.0
, fast-logger
, foldl
, gerrit >= 0.1.6
, gitrev >= 1.3.1
, hashable
, hashtables >= 1.2
, http-client >= 0.6
, http-client-openssl >= 0.3
, http-mock >= 0.1
, http-types >= 0.12
, json-syntax >= 0.2
, jose >= 0.9
, list-t
, lens
, lens-aeson
, lucid >= 2.11.1
, megaparsec >= 9
, morpheus-graphql-client >= 0.27
, mmorph
, mtl
, network >= 3
, network-uri >= 2.5
, oidc-client >= 0.6.0
, optparse-applicative
, parser-combinators >= 1.2
, prometheus-client >= 1.0
, prometheus-metrics-ghc >= 1.0
, proto3-suite >= 0.6.0
, qq-literals
, relude >= 1.0
, retry-effectful
, safe-exceptions >= 0.1
, servant >= 0.18.2
, servant-server >= 0.18.2
, servant-auth-server >= 0.4.1.0
, servant-blaze >= 0.9.1
, servant-lucid >= 0.9.0.5
-- , servant-effectful (enabled after https://github.com/Kleidukos/servant-effectful/issues/5)
, streaming >= 0.2
, string-interpolate >= 0.3.1.2
, tagged
, tasty >= 1.4
, tasty-hunit >= 0.10
, template-haskell
, text-short >= 0.1
, text-time >= 0.3
, th-env >= 0.1
, time
, transformers
, unliftio
, unix
, vector >= 0.12
, wai >= 3.2.3
, wai-cors >= 0.2
, wai-logger >= 2.3
, wai-middleware-prometheus >= 1.0
, warp >= 3.3.15
, witch >= 0.3
hs-source-dirs: src
exposed-modules: Monocle.Prelude
, Monocle.Env
, Monocle.Class
, Monocle.Logging
, Monocle.Version
, Monocle.Config
, Monocle.Config.Generated
, Monocle.Effects
, Monocle.Effects.Compat
, CLI
, Tests
-- monocle api
, Monocle.Entity
, Monocle.Main
, Monocle.Api.Server
, Monocle.Api.ServerHTMX
, Monocle.Api.Test
, Monocle.Api.Jwt
-- api client for lentille
, Monocle.Client
, Monocle.Client.Api
-- servant
, Monocle.Servant.HTTP
, Monocle.Servant.HTTPMain
, Monocle.Servant.PBJSON
, Monocle.Servant.HTMX
-- bloodhound
, Monocle.Backend.Documents
, Monocle.Backend.Index
, Monocle.Backend.Queries
, Monocle.Backend.Test
, Monocle.Backend.Provisioner
, Monocle.Backend.Janitor
-- megaparsec search language
, Monocle.Search.Lexer
, Monocle.Search.Parser
, Monocle.Search.Query
, Monocle.Search.Syntax
-- Lentille
, Lentille
, Lentille.GraphQL
, Lentille.Bugzilla
, Lentille.Jira
, Lentille.JiraSpec
, Lentille.GitHub.Types
, Lentille.GitHub.Issues
, Lentille.GitHub.RateLimit
, Lentille.GitHub.Organization
, Lentille.GitHub.GraphQLFragments
, Lentille.GitHub.PullRequests
, Lentille.GitHub.UserPullRequests
, Lentille.GitHub.User
, Lentille.GitHub.Utils
, Lentille.GitHub.Watching
, Lentille.GitLab.MergeRequests
, Lentille.GitLab.Group
, Lentille.GitLab.Adapter
, Lentille.Gerrit
, Macroscope.Main
, Macroscope.Worker
, Macroscope.Test
-- Fast json helpers
, Json.Extras
-- Codegen
, Monocle.Protob.Change
, Monocle.Protob.Issue
, Monocle.Protob.Config
, Monocle.Protob.Search
, Monocle.Protob.Crawler
, Monocle.Protob.Metric
, Monocle.Protob.Login
, Monocle.Protob.Auth
other-modules: Database.Bloodhound.Raw
, Lentille.Bugzilla.Mock
, Lentille.Bugzilla.Spec
, Paths_monocle
-- Remove after https://github.com/Kleidukos/servant-effectful/issues/5
, Effectful.Servant
-- TODO: extract effects to standalone packages
, Effectful.Prometheus
, Effectful.Env
autogen-modules: Paths_monocle
executable monocle
import: common-options
hs-source-dirs: app
build-depends: base, monocle
ghc-options: -threaded -rtsopts -with-rtsopts=-T
main-is: Monocle.hs
benchmark json-decode
import: common-options
type: exitcode-stdio-1.0
hs-source-dirs: test
build-depends: aeson, bloodhound, byteslice, bytestring, criterion, json-syntax, monocle, text-short, text-time, fakedata, random
main-is: JsonDecode.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
test-suite monocle-test
import: common-options
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: monocle
ghc-options: -threaded -rtsopts -with-rtsopts=-N
executable monocle-codegen
main-is: MonocleCodegen.hs
hs-source-dirs: codegen
if !flag(codegen)
buildable: False
ghc-options: -Wall
-Wcompat
-Widentities
-Wincomplete-uni-patterns
-Wincomplete-record-updates
-Wredundant-constraints
-fhide-source-paths
-Wmissing-export-lists
-Wpartial-fields
-Wunused-packages
build-depends: base < 5
, casing ^>= 0.1
, relude >= 1.0
, language-protobuf ^>= 1.0
default-language: Haskell2010