Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork118
Tags: com-lihaoyi/scalatags
Tags
0.11.1
Refine text tags (#232)* Refine tags to a more specific typeThere is a regression introduced during the Scala 3 upgrade where the`scalatags.Text.all.doctype` case class no longer worked with thepre-existing tags since its second argument accepts a`scalatags.text.Frag` but the tags themselves refined to`<tag-name>.Self` (the <tag-name> is a placeholder for the tag's name).As it turns out, this self type was not being refined by the tagsthemselves because for some reason, the Scala 3 compiler resolves thistype to be `scalatags.generic.TypedTag` i.e. it resolves to the moregeneric type as opposed to the more specific type of`scalatags.Text.TypedTag`. Fortunately in Scala 2, this works out fineas the type does get refined and therefore the tags can be used insidea `scalatags.text.Frag`.This commit essentially adds type annotations to all the tags under thetext package so that the more specific `ConcreteHtmlTag[String]` is usedinstead of the more generic `TypedTag`.* Add doctype compilation test and fix extraneous warnings.
0.11.0
Support Scala 3 (#226)## 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 concatenationThere is a bug in the dotty compiler?scala/scala3#13518scalatags.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 versionsCo-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>
PreviousNext