Known limitations
This page is a shortlist of the known limitations of snapshot4s. If you encounter any issues not listed below, we encourage you to report them.
Scala Native is not supported
snapshot4s
doesn't yet support Scala Native.
Promoted code may fail to compile with not found
errors
snapshot4s
uses pprint
to efficiently generate the source code corresponding to an expected value. This doesn’t add import statements for enum
and classes within objects. You may need to add an import statement corresponding to the enum
or object in question.
Promoted code isn’t formatted
snapshot4s
doesn't depend on a formatter, so can’t format its generated code. If you'd like to run scalafmt
automatically after promoting your snapshots, you can redefine snapshot4sPromote
in your build.sbt
:
val root = (project in file("."))
.settings(
snapshot4sPromote := {
snapshot4sPromote.value
(Test / scalafmt).value
})
.enablePlugins(Snapshot4sPlugin)