Conversation
Codecov Report
@@ Coverage Diff @@
## main #664 +/- ##
==========================================
+ Coverage 85.02% 85.03% +0.01%
==========================================
Files 124 125 +1
Lines 1629 1631 +2
Branches 38 38
==========================================
+ Hits 1385 1387 +2
Misses 244 244
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
build.sbt
Outdated
| ) | ||
| ) | ||
|
|
||
| lazy val `scala-xml` = crossProject(JVMPlatform, JSPlatform) |
There was a problem hiding this comment.
Probably easiest to make it JVM only for now.
There was a problem hiding this comment.
That requires rearranging the tests too, since they're cross-built for js and jvm. I've tried moving the test into jvm-only sources, let's see what happens.
There was a problem hiding this comment.
Right, nothing wrong with that. Still, better not to publish for JS unless you have a cross-platform parser. scala-xml.js is kind of a lie at the moment.
There was a problem hiding this comment.
I guess we'd then need to also exclude the js version from mima? Might be better to reorganize the modules instead to do this properly
There was a problem hiding this comment.
I mean, it's pretty simple. Instead of using crossProject, just make an ordinary project :)
The tricky part is for the tests, you need to do a .jvmConfigure(_.dependsOn(`scala-xml`))
|
Needs mima-wrangling to exclude the new module. |
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "skunk version this will be added").toMap |
|
Note on testing - I've copied the pattern of the Circe tests but they aren't really adequate (they'll still pass if you change the Postgres types of the codecs.) I've done some manual end-to-end testing but we don't have any automated tests that these codecs actually work correctly with Postgres. |
| val xml: Codec[Elem] = Codec.simple(_.toString, s => Either.catchNonFatal(XML.loadString(s)).leftMap(_.getMessage), Type.xml) | ||
| val _xml: Codec[Arr[Elem]] = Codec.array(_.toString, s => Either.catchNonFatal(XML.loadString(s)).leftMap(_.getMessage), Type._xml) |
There was a problem hiding this comment.
If we use fs2-data-xml for parsing then it can cross-compile for JS/Native.
No description provided.