Skip to content

Commit

Permalink
This is a Pickling workaround so we can generate Scala docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Feb 23, 2016
1 parent d281c35 commit 91af1c6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ivy/src/main/scala/sbt/Artifact.scala
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ object Artifact {
private val stringStringMapPickler = implicitly[Pickler[Map[String, String]]]
private val stringStringMapUnpickler = implicitly[Unpickler[Map[String, String]]]

implicit def fasttypetag[A]: FastTypeTag[A] = ???

implicit val pickler: Pickler[Artifact] = new Pickler[Artifact] {
val tag = implicitly[FastTypeTag[Artifact]]
val stringTag = implicitly[FastTypeTag[String]]
Expand Down
2 changes: 2 additions & 0 deletions ivy/src/main/scala/sbt/CrossVersion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ final case class ScalaVersion(full: String, binary: String)
sealed trait CrossVersion

object CrossVersion {
implicit def fasttypetag[A]: FastTypeTag[A] = ???

/** The first `major.minor` Scala version that the Scala binary version should be used for cross-versioning instead of the full version. */
val TransitionScalaVersion = CrossVersionUtil.TransitionScalaVersion

Expand Down
4 changes: 4 additions & 0 deletions ivy/src/main/scala/sbt/JsonUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,14 @@ private[sbt] object JsonUtil {

private[sbt] case class UpdateReportLite(configurations: Seq[ConfigurationReportLite])
private[sbt] object UpdateReportLite {
implicit def fasttypetag[A]: FastTypeTag[A] = ???

implicit val pickler: Pickler[UpdateReportLite] with Unpickler[UpdateReportLite] = PicklerUnpickler.generate[UpdateReportLite]
}

private[sbt] case class ConfigurationReportLite(configuration: String, details: Seq[OrganizationArtifactReport])
private[sbt] object ConfigurationReportLite {
implicit def fasttypetag[A]: FastTypeTag[A] = ???

implicit val pickler: Pickler[ConfigurationReportLite] with Unpickler[ConfigurationReportLite] = PicklerUnpickler.generate[ConfigurationReportLite]
}
2 changes: 2 additions & 0 deletions ivy/src/main/scala/sbt/ModuleID.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ final case class ModuleID(organization: String, name: String, revision: String,
def jar() = artifacts(Artifact(name))
}
object ModuleID {
implicit def fasttypetag[A]: FastTypeTag[A] = ???

implicit val pickler: Pickler[ModuleID] with Unpickler[ModuleID] = PicklerUnpickler.generate[ModuleID]

/** Prefixes all keys with `e:` if they are not already so prefixed. */
Expand Down
6 changes: 6 additions & 0 deletions ivy/src/main/scala/sbt/UpdateReport.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ final class ConfigurationReport(
new ConfigurationReport(configuration, modules map { _.retrieve((mid, art, file) => f(configuration, mid, art, file)) }, details, evicted)
}
object ConfigurationReport {
implicit def fasttypetag[A]: FastTypeTag[A] = ???
implicit val pickler: Pickler[ConfigurationReport] with Unpickler[ConfigurationReport] = PicklerUnpickler.generate[ConfigurationReport]
}

Expand All @@ -68,6 +69,7 @@ final class OrganizationArtifactReport private[sbt] (
}
}
object OrganizationArtifactReport {
implicit def fasttypetag[A]: FastTypeTag[A] = ???
implicit val pickler: Pickler[OrganizationArtifactReport] with Unpickler[OrganizationArtifactReport] = PicklerUnpickler.generate[OrganizationArtifactReport]

def apply(organization: String, name: String, modules: Seq[ModuleReport]): OrganizationArtifactReport =
Expand Down Expand Up @@ -162,6 +164,8 @@ final class ModuleReport(
}

object ModuleReport {
implicit def fasttypetag[A]: FastTypeTag[A] = ???

def apply(module: ModuleID, artifacts: Seq[(Artifact, File)], missingArtifacts: Seq[Artifact]): ModuleReport =
new ModuleReport(module, artifacts, missingArtifacts, None, None, None, None,
false, None, None, None, None, Map(), None, None, Nil, Nil, Nil)
Expand Down Expand Up @@ -233,6 +237,8 @@ final class UpdateReport(val cachedDescriptor: File, val configurations: Seq[Con
}

object UpdateReport {
implicit def fasttypetag[A]: FastTypeTag[A] = ???

implicit def richUpdateReport(report: UpdateReport): RichUpdateReport = new RichUpdateReport(report)

/** Provides extra methods for filtering the contents of an `UpdateReport` and for obtaining references to a selected subset of the underlying files. */
Expand Down

0 comments on commit 91af1c6

Please sign in to comment.