File tree 3 files changed +20
-4
lines changed
metaconfig-pprint/shared/src/main/scala-3/metaconfig/pprint
metaconfig-tests/shared/src/test/scala/metaconfig
3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,15 @@ lazy val sharedSettings = Def.settings(
83
83
else " -Ywarn-unused-import"
84
84
},
85
85
scalacOptions += " -deprecation" ,
86
+ scalacOptions += " -Xfatal-warnings" ,
87
+ scalacOptions ++= {
88
+ if (isScala213.value) " -Wconf:cat=deprecation:is" :: Nil
89
+ else if (isScala3.value) " -Wconf:cat=deprecation:silent" :: Nil
90
+ else Nil
91
+ },
92
+ scalacOptions ++= {
93
+ if (isScala3.value) Nil else " -Wconf:cat=feature:is" :: Nil
94
+ },
86
95
mimaBinaryIssueFilters += languageAgnosticCompatibilityPolicy,
87
96
crossScalaVersions := ScalaVersions ,
88
97
scalaVersion := scala213,
@@ -207,6 +216,9 @@ lazy val docs = project.in(file("metaconfig-docs")).settings(
207
216
" org.scalameta" %%% " munit-scalacheck" % V .munit % Test ,
208
217
),
209
218
publish / skip := true ,
219
+ dependencyOverrides +=
220
+ " org.scalameta" %% " metaconfig-typesafe-config" % (ThisBuild / version)
221
+ .value,
210
222
moduleName := " metaconfig-docs" ,
211
223
mdocVariables := Map (
212
224
" VERSION" -> version.value.replaceFirst(" \\ +.*" , " " ),
Original file line number Diff line number Diff line change @@ -124,10 +124,10 @@ object TPrintLowPri {
124
124
val pre = rec(tpe)
125
125
lazy val defs = fansi.Str .join(
126
126
refinements.collect {
127
- case (name, tpe : TypeRepr ) => fansi.Str (" type " + name + " = " ) ++
128
- rec(tpe)
129
127
case (name, TypeBounds (lo, hi)) => fansi.Str (" type " + name) ++
130
128
printBounds(lo, hi) ++ rec(tpe)
129
+ case (name, tpe : TypeRepr ) => fansi.Str (" type " + name + " = " ) ++
130
+ rec(tpe)
131
131
},
132
132
sep = " ; " ,
133
133
)
Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ class ConfDynamicSuite extends munit.FunSuite {
19
19
assert(conf.dynamic.x.c.d.e.asConf.isNotOk)
20
20
}
21
21
test(" did you mean?" ) {
22
- val Configured .NotOk (err) = conf.dynamic.banna.asConf
23
- assert(err.toString.contains(" Did you mean 'banana'" ))
22
+ conf.dynamic.banna.asConf match {
23
+ case Configured .NotOk (err) =>
24
+ assert(err.toString.contains(" Did you mean 'banana'" ))
25
+ case Configured .Ok (value) =>
26
+ fail(" Expected \" Did you mean 'banana'\" error" )
27
+ }
24
28
}
25
29
}
You can’t perform that action at this time.
0 commit comments