-
Notifications
You must be signed in to change notification settings - Fork 59
/
community.conf
422 lines (398 loc) · 13 KB
/
community.conf
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
//// from environment
vars: {
scala-version: ""
scala-version: ${?version}
scalac-opts: ""
scalac-opts: ${?scalac_opts}
node: "node" // node-js
node: ${?NODE}
}
//// vars.base
// Each project is prefixed by ${vars.base} { ...
// so that common options or settings can be set by the
// configuration that includes this common file.
// Note however that += won't work inside vars.base.
// It's https://github.com/lightbend/config/issues/160.
// That's why if you override extra.commands you must
// explicitly include default-commands.
vars: {
base: {}
}
include file("resolvers.conf")
//// shared settings
vars {
default-commands: []
sbt-version: "1.10.5"
sbt-java-options: ["-Xms1536m", "-Xmx1536m", "-Xss2m"]
}
//// compiler options manipulation
// appendScalacOptions, removeScalacOptions, removeDependency
// let us work around https://github.com/lightbend-labs/dbuild/issues/144
vars.default-commands += """
set commands ++= {
def alterSetting[T](s: State, setting: SettingKey[T])(fn: T => T) = alterKey(s, setting)(fn)
def alterTask[T](s: State, task: TaskKey[T])(fn: T => T) = alterKey(s, task)(fn)
def alterKey[T](s: State, st: ScopedTaskable[T])(fn: T => T) = {
val extracted = sbt.Project extract s
import extracted._
val r = sbt.Project.relation(extracted.structure, true)
val allDefs = r._1s.toSeq
val scopes = allDefs.filter(_.key == st.key).map(_.scope).distinct
val redefined = st match {
case setting: SettingKey[T] => scopes.map(scope => scope / setting ~= fn)
case task: TaskKey[T] => scopes.map(scope => scope / task ~= fn)
}
val session = extracted.session.appendRaw(redefined)
BuiltinCommands.reapply(session, structure, s)
}
def appendScalacOptions(s: State, args: Seq[String]): State = {
def appendDistinct[A](x: Seq[A], y: Seq[A]) =
x.filterNot(y.contains) ++ y
alterTask(s, scalacOptions)(appendDistinct(_, args))
}
def removeScalacOptions(s: State, args: Seq[String]): State =
alterTask(s, scalacOptions)(_.filterNot(args.contains))
def removeJavacOptions(s: State, args: Seq[String]): State =
alterTask(s, javacOptions)(_.filterNot(args.contains))
def removeJavaOptions(s: State, args: Seq[String]): State =
alterTask(s, javaOptions)(_.filterNot(args.contains))
def removeDependency(s: State, args: Seq[String]): State = {
require(args.size == 2)
alterSetting(s, libraryDependencies)(
_.filterNot(mod => mod.organization == args(0) && mod.name == args(1)))
}
Seq(
Command.args("appendScalacOptions", "<option>")(appendScalacOptions),
Command.args("removeScalacOptions", "<option>")(removeScalacOptions),
Command.args("removeJavacOptions", "<option>")(removeJavacOptions),
Command.args("removeJavaOptions", "<option>")(removeJavaOptions),
Command.args("removeDependency", "<org> <artifact>")(removeDependency))
}
"""
vars.default-commands += "appendScalacOptions "${vars.scalac-opts}
vars.default-commands += "removeScalacOptions -Werror -Xfatal-warnings -Yno-adapted-args -Ywarn-inaccessible -Ywarn-nullary-override -Ywarn-nullary-unit -Ywarn-infer-any -Ywarn-unused-import -Ypartial-unification -Ywarn-adapted-args -Xmax-classfile-name -Ymacro-no-expand"
vars.base.extra.commands = ${vars.default-commands}
//// default settings
vars.base.extra.settings = [
"""ThisBuild / libraryDependencies += compilerPlugin("com.lightbend" %% "cloc-plugin" % "0")"""
]
vars.base.deps.inject: ["com.lightbend#cloc-plugin"]
//// cache
// new behemoths have much more disk space, so let's try keeping stuff
// substantially longer (2 weeks instead of 4-5 days) and see what
// the effect on disk space usage is, starting March 17 2018
options.cleanup: {
extraction: {
success: 336
failure: 336
}
build: {
success: 336
failure: 336
}
}
//// Scala itself
build += {
space: scala
sbt-version: ${vars.sbt-version}
sbt-java-options: ${vars.sbt-java-options}
extraction-version: ${vars.scala-version}
projects: [
{
name: "cloc-plugin"
uri: "https://github.com/lightbend-labs/cloc-plugin.git#fe3d5c824eb1c7be0dbc02ed774e090015ab35b3"
}
{
name: "scala"
system: assemble
cross-version: binary
extra.parts.projects: [
{
set-version: ${vars.scala-version}
name: scala-library
system: aether
uri: "aether:org.scala-lang#scala-library;"${vars.scala-version}
extra.sources: true // Scala.js wants this
}
{
set-version: ${vars.scala-version}
name: scala-reflect
system: aether
uri: "aether:org.scala-lang#scala-reflect;"${vars.scala-version}
}
{
set-version: ${vars.scala-version}
name: scala-compiler
system: aether
uri: "aether:org.scala-lang#scala-compiler;"${vars.scala-version}
}
{
set-version: ${vars.scala-version}
name: scala2-sbt-bridge
system: aether
uri: "aether:org.scala-lang#scala2-sbt-bridge;"${vars.scala-version}
}
]
}
]}
///// includes
// it's annoying, but if we want included files to be able to refer to
// variables, we can only include them at the top level. and we can't
// `include "proj/*.conf"`, that's https://github.com/lightbend/config/issues/639
include "core/acyclic.conf"
include "core/genjavadoc.conf"
include "core/kind-projector.conf"
include "core/scalafix.conf"
include "core/scalafmt.conf"
include "core/scalameta.conf"
include "core/silencer.conf"
include "core/wartremover.conf"
include "proj/advxml.conf"
include "proj/airframe.conf"
include "proj/akka-http-cors.conf"
include "proj/akka-http-json.conf"
include "proj/akka-http-session.conf"
include "proj/akka-http-webgoat.conf"
include "proj/akka-http.conf"
include "proj/akka-management.conf"
include "proj/akka-persistence-cassandra.conf"
include "proj/akka-persistence-jdbc.conf"
include "proj/akka-streams-tcp-chat.conf"
include "proj/akka.conf"
include "proj/algebird.conf"
include "proj/algebra.conf"
include "proj/alpakka-kafka.conf"
include "proj/americium.conf"
include "proj/atto.conf"
include "proj/avro4s.conf"
include "proj/base64.conf"
include "proj/better-files.conf"
include "proj/better-monadic-for.conf"
include "proj/better-tostring.conf"
include "proj/bijection.conf"
include "proj/blaze.conf"
include "proj/boopickle.conf"
include "proj/breeze.conf"
include "proj/cachecontrol.conf"
include "proj/case-app.conf"
include "proj/cask.conf"
include "proj/castor.conf"
include "proj/catbird.conf"
include "proj/cats-effect-cps.conf"
include "proj/cats-effect-testing.conf"
include "proj/cats-effect-tutorial.conf"
include "proj/cats-effect.conf"
include "proj/cats-mtl.conf"
include "proj/cats-parse.conf"
include "proj/cats-retry.conf"
include "proj/cats-testkit-scalatest.conf"
include "proj/cats-time.conf"
include "proj/cats.conf"
include "proj/chimney.conf"
include "proj/circe-config.conf"
include "proj/circe-generic-extras.conf"
include "proj/circe-jackson.conf"
include "proj/circe.conf"
include "proj/ciris.conf"
include "proj/claimant.conf"
include "proj/coulomb.conf"
include "proj/curryhoward.conf"
include "proj/data-class.conf"
include "proj/decline.conf"
include "proj/difflicious.conf"
include "proj/diffx.conf"
include "proj/dijon.conf"
include "proj/discipline-munit.conf"
include "proj/discipline-scalatest.conf"
include "proj/discipline-specs2.conf"
include "proj/discipline.conf"
include "proj/dispatch.conf"
include "proj/doobie.conf"
include "proj/doodle.conf"
include "proj/droste.conf"
include "proj/eff.conf"
include "proj/enumeratum.conf"
include "proj/euler.conf"
include "proj/expecty.conf"
include "proj/expression-evaluator.conf"
include "proj/fabric.conf"
include "proj/fansi.conf"
include "proj/fast-string-interpolator.conf"
include "proj/fastparse.conf"
include "proj/fastscala.conf"
include "proj/fetch.conf"
include "proj/finagle.conf"
include "proj/finch.conf"
include "proj/fpinscala.conf"
include "proj/fs2-chat.conf"
include "proj/fs2.conf"
include "proj/geny.conf"
include "proj/giter8.conf"
include "proj/github4s.conf"
include "proj/grizzled.conf"
include "proj/hasher.conf"
include "proj/http4s-jwt-auth.conf"
include "proj/http4s-parboiled2.conf"
include "proj/http4s.conf"
include "proj/implicitbox.conf"
include "proj/ip4s.conf"
include "proj/jackson-module-scala.conf"
include "proj/jardiff.conf"
include "proj/jawn-fs2.conf"
include "proj/jawn.conf"
include "proj/json4s.conf"
include "proj/jsoniter-scala.conf"
include "proj/jwt-scala.conf"
include "proj/kafka.conf"
include "proj/kamon.conf"
include "proj/kits.conf"
include "proj/kittens.conf"
include "proj/lagom.conf"
include "proj/libra.conf"
include "proj/lift-json.conf"
include "proj/lightbend-emoji.conf"
include "proj/lila-ws.conf"
include "proj/log4cats.conf"
include "proj/log4s.conf"
include "proj/machinist.conf"
include "proj/macrolizer.conf"
include "proj/macwire.conf"
include "proj/magnolia.conf"
include "proj/mainargs.conf"
include "proj/mdoc.conf"
include "proj/metaconfig.conf"
include "proj/metals.conf"
include "proj/metrics-scala.conf"
include "proj/mima.conf"
include "proj/minitest.conf"
include "proj/mockito-scala.conf"
include "proj/moduload.conf"
include "proj/monix-bio.conf"
include "proj/monix-nio.conf"
include "proj/monix.conf"
include "proj/monocle.conf"
include "proj/mouse.conf"
include "proj/multibot.conf"
include "proj/munit-cats-effect.conf"
include "proj/munit-snapshot.conf"
include "proj/munit.conf"
include "proj/natchez.conf"
include "proj/nscala-time.conf"
include "proj/os-lib.conf"
include "proj/paiges.conf"
include "proj/parboiled.conf"
include "proj/parboiled2.conf"
include "proj/parsley.conf"
include "proj/pascal.conf"
include "proj/pass4s.conf"
include "proj/perfolation.conf"
include "proj/pfps-shopping-cart.conf"
include "proj/play-file-watch.conf"
include "proj/play-json.conf"
include "proj/play-webgoat.conf"
include "proj/play-ws.conf"
include "proj/playframework.conf"
include "proj/portable-scala-reflect.conf"
include "proj/pprint.conf"
include "proj/prog-scala-examples.conf"
include "proj/pureconfig.conf"
include "proj/quicklens.conf"
include "proj/redis4cats.conf"
include "proj/refined.conf"
include "proj/requests-scala.conf"
include "proj/runtime-scaladoc-reader.conf"
include "proj/sbinary.conf"
include "proj/sbt-io.conf"
include "proj/scaffeine.conf"
include "proj/scala-async.conf"
include "proj/scala-collection-compat.conf"
include "proj/scala-collection-contrib.conf"
include "proj/scala-collection-laws.conf"
include "proj/scala-common.conf"
include "proj/scala-commons.conf"
include "proj/scala-hedgehog.conf"
include "proj/scala-java-time.conf"
include "proj/scala-java8-compat.conf"
include "proj/scala-js-stubs.conf"
include "proj/scala-library-next.conf"
include "proj/scala-logging.conf"
include "proj/scala-newtype.conf"
include "proj/scala-parallel-collections.conf"
include "proj/scala-parser-combinators.conf"
include "proj/scala-pet-store.conf"
include "proj/scala-records.conf"
include "proj/scala-sculpt.conf"
include "proj/scala-ssh.conf"
include "proj/scala-stm.conf"
include "proj/scala-supertagged.conf"
include "proj/scala-swing.conf"
include "proj/scala-typed-holes.conf"
include "proj/scala-xml.conf"
include "proj/scalac-options.conf"
include "proj/scalacheck-effect.conf"
include "proj/scalacheck-shapeless.conf"
include "proj/scalacheck.conf"
include "proj/scalachess.conf"
include "proj/scaladex.conf"
include "proj/scalafix-rules.conf"
include "proj/scalafx.conf"
include "proj/scalaj-http.conf"
include "proj/scalajson.conf"
include "proj/scalalib.conf"
include "proj/scalamock.conf"
include "proj/scalapb.conf"
include "proj/scalaprops.conf"
include "proj/scalariform.conf"
include "proj/scalasql.conf"
include "proj/scalastyle.conf"
include "proj/scalatags.conf"
include "proj/scalatest.conf"
include "proj/scalatestplus-testng.conf"
include "proj/scalikejdbc.conf"
include "proj/scallop.conf"
include "proj/scapegoat.conf"
include "proj/scastie.conf"
include "proj/scodec-bits.conf"
include "proj/scodec-cats.conf"
include "proj/scodec-stream.conf"
include "proj/scodec.conf"
include "proj/sconfig.conf"
include "proj/scopt.conf"
include "proj/scoverage.conf"
include "proj/scribe.conf"
include "proj/scrooge.conf"
include "proj/shapeless-java-records.conf"
include "proj/shapeless.conf"
include "proj/singleton-ops.conf"
include "proj/sjson-new.conf"
include "proj/skunk.conf"
include "proj/slick.conf"
include "proj/sourcecode.conf"
include "proj/specs2.conf"
include "proj/spire.conf"
include "proj/spliff.conf"
include "proj/spray-json.conf"
include "proj/squants.conf"
include "proj/ssl-config.conf"
include "proj/sttp-model.conf"
include "proj/sttp-shared.conf"
include "proj/sttp.conf"
include "proj/treehugger.conf"
include "proj/tsec.conf"
include "proj/tut.conf"
include "proj/twirl.conf"
include "proj/twitter-util.conf"
include "proj/twotails.conf"
include "proj/typename.conf"
include "proj/unfiltered.conf"
include "proj/unindent.conf"
include "proj/unique.conf"
include "proj/unused-code.conf"
include "proj/upickle.conf"
include "proj/utest.conf"
include "proj/vault.conf"
include "proj/verify.conf"
include "proj/weaver-test.conf"
include "proj/zinc.conf"
include "core.conf"
include "projs.conf"