Skip to content

0.11.0

@lolgab lolgab tagged this 02 Dec 14:37
## Changes

* Add Mima to check how much we break binary compatibility.
* Update Mill to version `0.9.10` and fix build deprecations
* Add `scalaMajorVersion` in buildInfoMembers since Scala 3 represents types wrapped inside `()` in error messages.
* Explicitly apply implicit function `ev: A => Frag` in various implicit classes (like `SeqFrag`) since Scala 3 doesn't apply implicitly.
* Remove `protected[this] val RawFrag: Companion[RawFrag]` and `protected[this] val StringFrag: Companion[StringFrag]` since they break variance and Scala 3 is much less permissive with variance. Overriding them with strictier types in subclasses result in compiler errors. Since this was the only use case of `Companion` I removed it as well. Also I failed to  represent `Companion` in Scala 3 since it uses [different signatures for `unapply`](https://dotty.epfl.ch/docs/reference/changed-features/pattern-matching.html)
* Add explicit types to all `implicit` fields as required by Scala 3.
* Replace `def +(other: Any): String` in class `String` with String interpolator since it is not supported in Scala 3
* Make all abstract members in `Tags.scala`, `Tags2.scala` and `SvgTags.scala` `def`s instead of `val`s since Scala 3 doesn't support overriding an abstract `val` member with a `lazy val` as Scalatags does.
* Move the `SourceClasses` class and its companion object to the version specific code. Since it is the only code using macros.
* Updated tests to not use the `* -` utest syntax. Also not supported in Scala 3.
* Move objects used in tests to be stable and not defined in the utest macro. Without this change the Scala 3 version doesn't compile.

## Commits

* Update build system for Scala 3

* Initial Scala 3 (dotty) port

* Only use str-to-str concatenation

There is a bug in the dotty compiler? lampepfl/dotty#13518

scalatags.js[3.0.1,1.7.0].compile java.lang.AssertionError: assertion failed
    scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
    dotty.tools.backend.sjs.JSCodeGen.genStringConcat(JSCodeGen.scala:2487)
    dotty.tools.backend.sjs.JSCodeGen.genPrimitiveOp(JSCodeGen.scala:2098)

* Bump to Scala 3.0.0

* wip

* Use string interpolation instead of `+`

* Gitignore /.bsp from Mill BSP

* Remove space in quoted start

* Reduce duplicated code and fix some compilation error

* Remove some lazy vals and revert renames

* Most code compiles

* All code compiling now

* Fix macro to use declaredFields

* Remove pprint

* Remove empty companion objects

* Remove old comment

* Avoid to define lazy val Frags

* Revert some changes not necessary for Scala 3

* Revert formatting change

* Remove unused import

* Revert spurious change

* Remove spurious import

* Refactor filter for ScalaJS versions

Co-authored-by: Sakib Hadžiavdić <sake92@users.noreply.github.com>

Co-authored-by: Edward Wang <edward.c.wang@compdigitec.com>
Co-authored-by: Sakib Hadžiavdić <sake92@users.noreply.github.com>
Assets 2
Loading