Skip to content

Commit

Permalink
Remove doc generation from compilation task
Browse files Browse the repository at this point in the history
  • Loading branch information
geirolz committed Aug 10, 2022
1 parent cc6a341 commit 9b794e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
include:
- scala: 2.13.8
name: Scala2
test-tasks: coverage test coverageReport
test-tasks: coverage test coverageReport generate-docs
- scala: 3.1.3
name: Scala3
test-tasks: test # scoverage doesn’t support Scala 3
Expand Down
10 changes: 2 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,7 @@ lazy val `cats-xml`: Project = project
crossScalaVersions := Nil
)
.settings(
copyReadMe := IO.copyFile(file("docs/compiled/README.md"), file("README.md")),
(Compile / compile) := (CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) =>
(Compile / compile)
.dependsOn(copyReadMe.toTask.dependsOn((docs / mdoc).toTask("")))
.value
case _ => (Compile / compile).value
})
copyReadMe := IO.copyFile(file("docs/compiled/README.md"), file("README.md"))
)
.aggregate(docs, core, metrics, utils, effect, scalaxml)

Expand Down Expand Up @@ -239,3 +232,4 @@ def scalacSettings(scalaVersion: String): Seq[String] =

//=============================== ALIASES ===============================
addCommandAlias("check", "scalafmtAll;clean;coverage;test;coverageAggregate")
addCommandAlias("generate-docs", "mdoc;copyReadMe;")
16 changes: 8 additions & 8 deletions docs/compiled/generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ implicit val typeInterpreterFoo: XmlTypeInterpreter[Foo] =
.overrideType(
_.param(_.valueClass) -> XmlElemType.Attribute
)
// typeInterpreterFoo: XmlTypeInterpreter[Foo] = cats.xml.generic.XmlTypeInterpreter$$anon$1@6085f0fd
// typeInterpreterFoo: XmlTypeInterpreter[Foo] = cats.xml.generic.XmlTypeInterpreter$$anon$1@72ff4d03

implicit val decoderValueClass: Decoder[ValueClass] = deriveDecoder[ValueClass]
// decoderValueClass: Decoder[ValueClass] = cats.xml.codec.Decoder$$anonfun$of$2@4976ee4d
// decoderValueClass: Decoder[ValueClass] = cats.xml.codec.Decoder$$anonfun$of$2@17331878
implicit val decoderBar: Decoder[Bar] = deriveDecoder[Bar]
// decoderBar: Decoder[Bar] = cats.xml.codec.Decoder$$anonfun$of$2@3234a760
// decoderBar: Decoder[Bar] = cats.xml.codec.Decoder$$anonfun$of$2@28deb4fb
implicit val decoderFoo: Decoder[Foo] = deriveDecoder[Foo]
// decoderFoo: Decoder[Foo] = cats.xml.codec.Decoder$$anonfun$of$2@1d5b9ce6
// decoderFoo: Decoder[Foo] = cats.xml.codec.Decoder$$anonfun$of$2@265451b

XmlNode("foo")
.withAttributes(
Expand Down Expand Up @@ -87,14 +87,14 @@ implicit val typeInterpreterFoo: XmlTypeInterpreter[Foo] =
.overrideType(
_.param(_.valueClass) -> XmlElemType.Attribute
)
// typeInterpreterFoo: XmlTypeInterpreter[Foo] = cats.xml.generic.XmlTypeInterpreter$$anon$1@2c6c1d31
// typeInterpreterFoo: XmlTypeInterpreter[Foo] = cats.xml.generic.XmlTypeInterpreter$$anon$1@505beee

implicit val encoderValueClass: Encoder[ValueClass] = deriveEncoder[ValueClass]
// encoderValueClass: Encoder[ValueClass] = cats.xml.codec.DataEncoder$$anonfun$of$4@3b74b07b
// encoderValueClass: Encoder[ValueClass] = cats.xml.codec.DataEncoder$$anonfun$of$4@5821bbd9
implicit val encoderBar: Encoder[Bar] = deriveEncoder[Bar]
// encoderBar: Encoder[Bar] = cats.xml.codec.Encoder$$anonfun$of$2@7a09a75f
// encoderBar: Encoder[Bar] = cats.xml.codec.Encoder$$anonfun$of$2@70c4705b
implicit val encoderFoo: Encoder[Foo] = deriveEncoder[Foo]
// encoderFoo: Encoder[Foo] = cats.xml.codec.Encoder$$anonfun$of$2@1cd4c673
// encoderFoo: Encoder[Foo] = cats.xml.codec.Encoder$$anonfun$of$2@2ed823dd

Foo(
primitiveField = 1d,
Expand Down

0 comments on commit 9b794e4

Please sign in to comment.