lampepfl / xml-interpolator

XML String Interpolator for Dotty
Apache License 2.0
31 stars 6 forks source link

Update 0.19.0 rc1 #22

Closed anatoliykmetyuk closed 4 years ago

anatoliykmetyuk commented 4 years ago

@nicolasstucki I've addressed all the "mechanical" sytnax corrections, only three errors are now left:

Errors ```scala [info] Compiling 6 Scala sources to /Users/anatolii/Projects/dotty/tools/dotty-release/ecosystem_projects/xml-interpolator/target/scala-0.19/test-classes ... [error] -- Error: /Users/anatolii/Projects/dotty/tools/dotty-release/ecosystem_projects/xml-interpolator/src/test/scala/dotty/xml/interpolator/InterpolationTest.scala:43:26 [error] 43 | assert(xml""""}/>""" ≈ }/>) [error] | ^^^^^^^^^^^^^^^^^ [error] |type mismatch; [error] | found : scala.xml.NodeBuffer [error] | required: scala.Predef.String | scala.collection.immutable.Seq[scala.xml.Node] | scala.Option[scala.collection.immutable.Seq[scala.xml.Node]] [error] | [error] | This location is in code that was inlined at InterpolationTest.scala:43 [error] -- Error: /Users/anatolii/Projects/dotty/tools/dotty-release/ecosystem_projects/xml-interpolator/src/test/scala/dotty/xml/interpolator/ReporterTest.scala:124:17 [error] 124 | assertEquals(xml"", List((12, "attribute `bar` may only be defined once"))) [error] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [error] |Exception occurred while executing macro expansion. [error] |scala.tasty.reflect.ExprCastError: Expr: /* inlined from dotty.xml.interpolator.internal.Expand$ */ [error] | { [error] | new _root_.scala.xml.NodeBuffer() [error] | } [error] |did not conform to type: Option[Seq[xml.Node]] [error] | [error] | at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.QuotedExpr_cast(ReflectionCompilerInterface.scala:1740) [error] | at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.QuotedExpr_cast(ReflectionCompilerInterface.scala:1732) [error] | at scala.tasty.reflect.QuotedOps$QuotedExprAPI.cast(QuotedOps.scala:13) [error] | at dotty.xml.interpolator.internal.Expand$.expandAttributes$$anonfun$1(Expand.scala:83) [error] | at scala.collection.immutable.List.foldRight(List.scala:324) [error] | at dotty.xml.interpolator.internal.Expand$.expandAttributes(Expand.scala:87) [error] | at dotty.xml.interpolator.internal.Expand$.expandElem(Expand.scala:41) [error] | at dotty.xml.interpolator.internal.Expand$.expandNode(Expand.scala:19) [error] | at dotty.xml.interpolator.internal.Expand$.apply(Expand.scala:12) [error] | at dotty.xml.interpolator.internal.Macro$.$anonfun$5(Macro.scala:74) [error] | at scala.Function1.$anonfun$andThen$1(Function1.scala:85) [error] | at dotty.xml.interpolator.internal.Macro$.implCore(Macro.scala:77) [error] | at dotty.xml.interpolator.internal.Macro$.implErrors(Macro.scala:56) [error] | [error] | This location is in code that was inlined at ReporterTest.scala:124 [error] -- Error: /Users/anatolii/Projects/dotty/tools/dotty-release/ecosystem_projects/xml-interpolator/src/test/scala/dotty/xml/interpolator/SimpleNodeTest.scala:85:11 [error] 85 | assert(xml"""""" ≈ ) [error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [error] |Exception occurred while executing macro expansion. [error] |scala.tasty.reflect.ExprCastError: Expr: /* inlined from dotty.xml.interpolator.internal.Expand$ */ [error] | { [error] | /* inlined from outside */ [error] | { [error] | /* inlined from dotty.xml.interpolator.internal.Expand$ */ [error] | { [error] | /* inlined from outside */ [error] | { [error] | /* inlined from dotty.xml.interpolator.internal.Expand$ */ [error] | { [error] | /* inlined from outside */ [error] | { [error] | /* inlined from dotty.xml.interpolator.internal.Expand$ [error] | */ [error] | { [error] | new _root_.scala.xml.NodeBuffer() [error] | } [error] | } [error] | .&+( [error] | /* inlined from outside */ [error] | { [error] | /* inlined from [error] | dotty.xml.interpolator.internal.Expand$ [error] | */ [error] | { [error] | new _root_.scala.xml.Text( [error] | /* inlined from outside */ [error] | { [error] | "Hello " [error] | } [error] | ) [error] | } [error] | } [error] | ) [error] | } [error] | } [error] | .&+( [error] | /* inlined from outside */ [error] | { [error] | /* inlined from dotty.xml.interpolator.internal.Expand$ */ [error] | { [error] | new _root_.scala.xml.EntityRef( [error] | /* inlined from outside */ [error] | { [error] | "name" [error] | } [error] | ) [error] | } [error] | } [error] | ) [error] | } [error] | } [error] | .&+( [error] | /* inlined from outside */ [error] | { [error] | /* inlined from dotty.xml.interpolator.internal.Expand$ */ [error] | { [error] | new _root_.scala.xml.Text( [error] | /* inlined from outside */ [error] | { [error] | "!" [error] | } [error] | ) [error] | } [error] | } [error] | ) [error] | } [error] |did not conform to type: Option[Seq[xml.Node]] [error] | [error] | at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.QuotedExpr_cast(ReflectionCompilerInterface.scala:1740) [error] | at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.QuotedExpr_cast(ReflectionCompilerInterface.scala:1732) [error] | at scala.tasty.reflect.QuotedOps$QuotedExprAPI.cast(QuotedOps.scala:13) [error] | at dotty.xml.interpolator.internal.Expand$.expandAttributes$$anonfun$1(Expand.scala:83) [error] | at scala.collection.immutable.List.foldRight(List.scala:324) [error] | at dotty.xml.interpolator.internal.Expand$.expandAttributes(Expand.scala:87) [error] | at dotty.xml.interpolator.internal.Expand$.expandElem(Expand.scala:41) [error] | at dotty.xml.interpolator.internal.Expand$.expandNode(Expand.scala:19) [error] | at dotty.xml.interpolator.internal.Expand$.apply(Expand.scala:12) [error] | at dotty.xml.interpolator.internal.Macro$.$anonfun$5(Macro.scala:74) [error] | at scala.Function1.$anonfun$andThen$1(Function1.scala:85) [error] | at dotty.xml.interpolator.internal.Macro$.implCore(Macro.scala:77) [error] | at dotty.xml.interpolator.internal.Macro$.impl(Macro.scala:32) [error] | [error] | This location is in code that was inlined at SimpleNodeTest.scala:85 [error] three errors found ```

It looks like NodeBuffer does not qualify as an immutable sequence.

bishabosha commented 4 years ago

closing because the 0.20.0-RC1 release was merged