-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
65 lines (62 loc) · 2.33 KB
/
Copy pathbuild.sbt
File metadata and controls
65 lines (62 loc) · 2.33 KB
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
val catsEffectVersion = "3.5.1"
val fs2Version = "3.7.0"
// compiler options explicitly disabled from https://github.com/DavidGregory084/sbt-tpolecat
val disabledScalacOptionsCompile = Set(
"-Xfatal-warnings",
"-Wunused:privates",
)
lazy val commonSettings = Def.settings(
name := "fs2-tests",
version := "0.1.0-SNAPSHOT",
fork := true,
scalaVersion := "2.13.11",
scalacOptions ++= Seq("-release", "17"),
javacOptions ++= Seq("-source", "17", "-target", "17"),
Compile / scalacOptions ~= ((options: Seq[String]) => options.filterNot(disabledScalacOptionsCompile)),
Compile / scalacOptions ++= Seq(
"-Wconf:any:warning-verbose", // print warnings with their category, site, and (for deprecations) origin and since-version
"-Xsource:3", // disabled until IJ Scala plugin has stable support
"-Vimplicits", // makes the compiler print implicit resolution chains when no implicit value can be found
"-Vtype-diffs", // turns type error messages into colored diffs between the two types
"-Wconf:cat=other-match-analysis:error", // report incomplete case match as error
"-Wconf:cat=other-pure-statement:silent", // silence "unused value of type [???] (add `: Unit` to discard silently)"
"-Wnonunit-statement",
),
javaOptions := Seq(
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens", "java.base/java.util.zip=ALL-UNNAMED",
"-Djava.lang.Integer.IntegerCache.high=65536",
"-Djava.net.preferIPv4Stack=true",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+TrustFinalNonStaticFields",
"-Xms32g",
"-Xmx32g",
"-XX:+AlwaysPreTouch",
"-XX:+UseZGC",
),
)
lazy val fs2_tests = (project in file("."))
.enablePlugins(JavaAppPackaging)
.settings(commonSettings)
.settings(
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-effect" % catsEffectVersion,
"co.fs2" %% "fs2-core" % fs2Version,
)
)
.settings(
Universal / javaOptions := Seq(
"-J--add-opens",
"-Jjava.base/sun.nio.ch=ALL-UNNAMED",
"-J--add-opens",
"-Jjava.base/java.util.zip=ALL-UNNAMED",
"-J-Djava.lang.Integer.IntegerCache.high=65536",
"-J-Djava.net.preferIPv4Stack=true",
"-J-XX:+UnlockExperimentalVMOptions",
"-J-XX:+TrustFinalNonStaticFields",
"-J-Xms32g",
"-J-Xmx32g",
"-J-XX:+AlwaysPreTouch",
"-J-XX:+UseZGC",
)
)