mdoc v1.1.0
New object encoding
It's now possible to declare sealed ADTs like below without getting a warning warning: The outer reference in this type test cannot be checked at run time.
.
sealed abstract class Maybe[+A] extends Product with Serializable
final case class Just[A](value: A) extends Maybe[A]
final case object Nothing extends Maybe[Nothing]
The error happened because we wrapped the code in class Session { class App { ... } }
. Now, we wrap the code in object Session { object App { ... } }
instead, which removes the warning.
Thanks @nrinaudo for reporting!
Multiple modifiers
It's now possible to combine modifiers like reset:silent
or reset:fail
.
```scala mdoc
val x = 1
```
```scala mdoc:reset:fail
println(x)
```
This example produces the following output.
val x = 1
// x: Int = 1
println(x)
// error: not found: value x
// println(x)
// ^
:crash
stacktraces
Relative filenames in Previously, stack traces from :crash
included absolute paths. Now they include only relative filenames.
// scala.MatchError: final val x = 2 (of class scala.meta.Defn$Val$DefnValImpl)
-// at repl.Session.$anonfun$app$47(/Users/ollie/dev/scalameta-tutorial/docs/trees/guide.md:252)
+// at repl.Session.$anonfun$app$47(guide.md:252)