mirror of https://github.com/sbt/sbt.git
Use String instead of File as key of stamps
- regenerate contraband
This commit is contained in:
parent
e140c80667
commit
1b3d5324bb
|
|
@ -5,20 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait ChainedResolverFormats { self: sbt.librarymanagement.ResolverFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.MavenRepoFormats with
|
||||
sbt.librarymanagement.MavenCacheFormats with
|
||||
sbt.librarymanagement.PatternsFormats with
|
||||
sbt.librarymanagement.FileConfigurationFormats with
|
||||
sbt.librarymanagement.FileRepositoryFormats with
|
||||
sbt.librarymanagement.URLRepositoryFormats with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.SshRepositoryFormats with
|
||||
sbt.librarymanagement.SftpRepositoryFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait ChainedResolverFormats { self: sbt.librarymanagement.ResolverFormats with sjsonnew.BasicJsonProtocol =>
|
||||
implicit lazy val ChainedResolverFormat: JsonFormat[sbt.librarymanagement.ChainedResolver] = new JsonFormat[sbt.librarymanagement.ChainedResolver] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.ChainedResolver = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -5,23 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait ConfigurationReportFormats { self: sbt.librarymanagement.ConfigRefFormats with
|
||||
sbt.librarymanagement.ModuleReportFormats with
|
||||
sbt.librarymanagement.ModuleIDFormats with
|
||||
sbt.librarymanagement.ArtifactFormats with
|
||||
sbt.librarymanagement.ChecksumFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.InclExclRuleFormats with
|
||||
sbt.librarymanagement.CrossVersionFormats with
|
||||
sbt.librarymanagement.DisabledFormats with
|
||||
sbt.librarymanagement.BinaryFormats with
|
||||
sbt.librarymanagement.ConstantFormats with
|
||||
sbt.librarymanagement.PatchFormats with
|
||||
sbt.librarymanagement.FullFormats with
|
||||
sbt.librarymanagement.For3Use2_13Formats with
|
||||
sbt.librarymanagement.For2_13Use3Formats with
|
||||
sbt.librarymanagement.CallerFormats with
|
||||
sbt.librarymanagement.OrganizationArtifactReportFormats =>
|
||||
trait ConfigurationReportFormats { self: sbt.librarymanagement.ConfigRefFormats with sbt.librarymanagement.ModuleReportFormats with sbt.librarymanagement.ModuleIDFormats with sbt.librarymanagement.ArtifactFormats with sbt.librarymanagement.ChecksumFormats with sjsonnew.BasicJsonProtocol with sbt.librarymanagement.InclExclRuleFormats with sbt.librarymanagement.CrossVersionFormats with sbt.librarymanagement.DisabledFormats with sbt.librarymanagement.BinaryFormats with sbt.librarymanagement.ConstantFormats with sbt.librarymanagement.PatchFormats with sbt.librarymanagement.FullFormats with sbt.librarymanagement.For3Use2_13Formats with sbt.librarymanagement.For2_13Use3Formats with sbt.librarymanagement.CallerFormats with sbt.librarymanagement.OrganizationArtifactReportFormats =>
|
||||
implicit lazy val ConfigurationReportFormat: JsonFormat[sbt.librarymanagement.ConfigurationReport] = new JsonFormat[sbt.librarymanagement.ConfigurationReport] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.ConfigurationReport = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -5,21 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait ModuleConfigurationFormats { self: sbt.librarymanagement.ResolverFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.ChainedResolverFormats with
|
||||
sbt.librarymanagement.MavenRepoFormats with
|
||||
sbt.librarymanagement.MavenCacheFormats with
|
||||
sbt.librarymanagement.PatternsFormats with
|
||||
sbt.librarymanagement.FileConfigurationFormats with
|
||||
sbt.librarymanagement.FileRepositoryFormats with
|
||||
sbt.librarymanagement.URLRepositoryFormats with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.SshRepositoryFormats with
|
||||
sbt.librarymanagement.SftpRepositoryFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait ModuleConfigurationFormats { self: sbt.librarymanagement.ResolverFormats with sjsonnew.BasicJsonProtocol =>
|
||||
implicit lazy val ModuleConfigurationFormat: JsonFormat[sbt.librarymanagement.ModuleConfiguration] = new JsonFormat[sbt.librarymanagement.ModuleConfiguration] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.ModuleConfiguration = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -6,16 +6,6 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
import _root_.sjsonnew.JsonFormat
|
||||
trait PatternsBasedRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.FileConfigurationFormats with
|
||||
sbt.librarymanagement.FileRepositoryFormats with
|
||||
sbt.librarymanagement.URLRepositoryFormats with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.SshRepositoryFormats with
|
||||
sbt.librarymanagement.SftpRepositoryFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait PatternsBasedRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with sjsonnew.BasicJsonProtocol with sbt.librarymanagement.FileConfigurationFormats with sbt.librarymanagement.FileRepositoryFormats with sbt.librarymanagement.URLRepositoryFormats with sbt.librarymanagement.SshConnectionFormats with sbt.librarymanagement.SshAuthenticationFormats with sbt.librarymanagement.SshRepositoryFormats with sbt.librarymanagement.SftpRepositoryFormats =>
|
||||
implicit lazy val PatternsBasedRepositoryFormat: JsonFormat[sbt.librarymanagement.PatternsBasedRepository] = flatUnionFormat4[sbt.librarymanagement.PatternsBasedRepository, sbt.librarymanagement.FileRepository, sbt.librarymanagement.URLRepository, sbt.librarymanagement.SshRepository, sbt.librarymanagement.SftpRepository]("type")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait PublishConfigurationFormats { self: sbt.librarymanagement.ConfigRefFormats with
|
||||
sbt.librarymanagement.ArtifactFormats with
|
||||
sbt.librarymanagement.UpdateLoggingFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats with
|
||||
sbt.librarymanagement.ChecksumFormats =>
|
||||
trait PublishConfigurationFormats { self: sbt.librarymanagement.ConfigRefFormats with sbt.librarymanagement.ArtifactFormats with sbt.librarymanagement.UpdateLoggingFormats with sjsonnew.BasicJsonProtocol =>
|
||||
implicit lazy val PublishConfigurationFormat: JsonFormat[sbt.librarymanagement.PublishConfiguration] = new JsonFormat[sbt.librarymanagement.PublishConfiguration] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.PublishConfiguration = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -6,19 +6,6 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
import _root_.sjsonnew.JsonFormat
|
||||
trait ResolverFormats { self: sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.ChainedResolverFormats with
|
||||
sbt.librarymanagement.MavenRepoFormats with
|
||||
sbt.librarymanagement.MavenCacheFormats with
|
||||
sbt.librarymanagement.PatternsFormats with
|
||||
sbt.librarymanagement.FileConfigurationFormats with
|
||||
sbt.librarymanagement.FileRepositoryFormats with
|
||||
sbt.librarymanagement.URLRepositoryFormats with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.SshRepositoryFormats with
|
||||
sbt.librarymanagement.SftpRepositoryFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait ResolverFormats { self: sjsonnew.BasicJsonProtocol with sbt.librarymanagement.ChainedResolverFormats with sbt.librarymanagement.MavenRepoFormats with sbt.librarymanagement.MavenCacheFormats with sbt.librarymanagement.PatternsFormats with sbt.librarymanagement.FileConfigurationFormats with sbt.librarymanagement.FileRepositoryFormats with sbt.librarymanagement.URLRepositoryFormats with sbt.librarymanagement.SshConnectionFormats with sbt.librarymanagement.SshAuthenticationFormats with sbt.librarymanagement.SshRepositoryFormats with sbt.librarymanagement.SftpRepositoryFormats =>
|
||||
implicit lazy val ResolverFormat: JsonFormat[sbt.librarymanagement.Resolver] = flatUnionFormat7[sbt.librarymanagement.Resolver, sbt.librarymanagement.ChainedResolver, sbt.librarymanagement.MavenRepo, sbt.librarymanagement.MavenCache, sbt.librarymanagement.FileRepository, sbt.librarymanagement.URLRepository, sbt.librarymanagement.SshRepository, sbt.librarymanagement.SftpRepository]("type")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait SftpRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait SftpRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with sjsonnew.BasicJsonProtocol with sbt.librarymanagement.SshConnectionFormats with sbt.librarymanagement.SshAuthenticationFormats =>
|
||||
implicit lazy val SftpRepositoryFormat: JsonFormat[sbt.librarymanagement.SftpRepository] = new JsonFormat[sbt.librarymanagement.SftpRepository] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.SftpRepository = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -6,13 +6,6 @@
|
|||
package sbt.librarymanagement
|
||||
|
||||
import _root_.sjsonnew.JsonFormat
|
||||
trait SshBasedRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.SshRepositoryFormats with
|
||||
sbt.librarymanagement.SftpRepositoryFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait SshBasedRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with sjsonnew.BasicJsonProtocol with sbt.librarymanagement.SshConnectionFormats with sbt.librarymanagement.SshAuthenticationFormats with sbt.librarymanagement.SshRepositoryFormats with sbt.librarymanagement.SftpRepositoryFormats =>
|
||||
implicit lazy val SshBasedRepositoryFormat: JsonFormat[sbt.librarymanagement.SshBasedRepository] = flatUnionFormat2[sbt.librarymanagement.SshBasedRepository, sbt.librarymanagement.SshRepository, sbt.librarymanagement.SftpRepository]("type")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait SshConnectionFormats { self: sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait SshConnectionFormats { self: sbt.librarymanagement.SshAuthenticationFormats with sjsonnew.BasicJsonProtocol =>
|
||||
implicit lazy val SshConnectionFormat: JsonFormat[sbt.librarymanagement.SshConnection] = new JsonFormat[sbt.librarymanagement.SshConnection] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.SshConnection = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@
|
|||
// DO NOT EDIT MANUALLY
|
||||
package sbt.librarymanagement
|
||||
import _root_.sjsonnew.{ Unbuilder, Builder, JsonFormat, deserializationError }
|
||||
trait SshRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with
|
||||
sjsonnew.BasicJsonProtocol with
|
||||
sbt.librarymanagement.SshConnectionFormats with
|
||||
sbt.librarymanagement.SshAuthenticationFormats with
|
||||
sbt.librarymanagement.PasswordAuthenticationFormats with
|
||||
sbt.librarymanagement.KeyFileAuthenticationFormats =>
|
||||
trait SshRepositoryFormats { self: sbt.librarymanagement.PatternsFormats with sjsonnew.BasicJsonProtocol with sbt.librarymanagement.SshConnectionFormats with sbt.librarymanagement.SshAuthenticationFormats =>
|
||||
implicit lazy val SshRepositoryFormat: JsonFormat[sbt.librarymanagement.SshRepository] = new JsonFormat[sbt.librarymanagement.SshRepository] {
|
||||
override def read[J](__jsOpt: Option[J], unbuilder: Unbuilder[J]): sbt.librarymanagement.SshRepository = {
|
||||
__jsOpt match {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ final class UpdateReport private (
|
|||
val cachedDescriptor: java.io.File,
|
||||
val configurations: Vector[sbt.librarymanagement.ConfigurationReport],
|
||||
val stats: sbt.librarymanagement.UpdateStats,
|
||||
val stamps: Map[java.io.File, Long]) extends sbt.librarymanagement.UpdateReportExtra with Serializable {
|
||||
val stamps: Map[String, Long]) extends sbt.librarymanagement.UpdateReportExtra with Serializable {
|
||||
|
||||
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ final class UpdateReport private (
|
|||
override def toString: String = {
|
||||
"Update report:\n\t" + stats + "\n" + configurations.mkString
|
||||
}
|
||||
private[this] def copy(cachedDescriptor: java.io.File = cachedDescriptor, configurations: Vector[sbt.librarymanagement.ConfigurationReport] = configurations, stats: sbt.librarymanagement.UpdateStats = stats, stamps: Map[java.io.File, Long] = stamps): UpdateReport = {
|
||||
private[this] def copy(cachedDescriptor: java.io.File = cachedDescriptor, configurations: Vector[sbt.librarymanagement.ConfigurationReport] = configurations, stats: sbt.librarymanagement.UpdateStats = stats, stamps: Map[String, Long] = stamps): UpdateReport = {
|
||||
new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
}
|
||||
def withCachedDescriptor(cachedDescriptor: java.io.File): UpdateReport = {
|
||||
|
|
@ -42,11 +42,11 @@ final class UpdateReport private (
|
|||
def withStats(stats: sbt.librarymanagement.UpdateStats): UpdateReport = {
|
||||
copy(stats = stats)
|
||||
}
|
||||
def withStamps(stamps: Map[java.io.File, Long]): UpdateReport = {
|
||||
def withStamps(stamps: Map[String, Long]): UpdateReport = {
|
||||
copy(stamps = stamps)
|
||||
}
|
||||
}
|
||||
object UpdateReport {
|
||||
|
||||
def apply(cachedDescriptor: java.io.File, configurations: Vector[sbt.librarymanagement.ConfigurationReport], stats: sbt.librarymanagement.UpdateStats, stamps: Map[java.io.File, Long]): UpdateReport = new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
def apply(cachedDescriptor: java.io.File, configurations: Vector[sbt.librarymanagement.ConfigurationReport], stats: sbt.librarymanagement.UpdateStats, stamps: Map[String, Long]): UpdateReport = new UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ implicit lazy val UpdateReportFormat: JsonFormat[sbt.librarymanagement.UpdateRep
|
|||
val cachedDescriptor = unbuilder.readField[java.io.File]("cachedDescriptor")
|
||||
val configurations = unbuilder.readField[Vector[sbt.librarymanagement.ConfigurationReport]]("configurations")
|
||||
val stats = unbuilder.readField[sbt.librarymanagement.UpdateStats]("stats")
|
||||
val stamps = unbuilder.readField[Map[java.io.File, Long]]("stamps")
|
||||
val stamps = unbuilder.readField[Map[String, Long]]("stamps")
|
||||
unbuilder.endObject()
|
||||
sbt.librarymanagement.UpdateReport(cachedDescriptor, configurations, stats, stamps)
|
||||
case None =>
|
||||
|
|
|
|||
|
|
@ -814,7 +814,7 @@
|
|||
"type": "sbt.librarymanagement.UpdateStats",
|
||||
"doc": [ "stats information about the update that produced this report" ]
|
||||
},
|
||||
{ "name": "stamps", "type": "Map[java.io.File, Long]" }
|
||||
{ "name": "stamps", "type": "Map[String, Long]" }
|
||||
],
|
||||
"toString": "\"Update report:\\n\\t\" + stats + \"\\n\" + configurations.mkString"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ final class RichUpdateReport(report: UpdateReport) {
|
|||
val stamps = files
|
||||
.map(f =>
|
||||
(
|
||||
f,
|
||||
f.toString,
|
||||
// TODO: The list of files may also contain some odd files that do not actually exist like:
|
||||
// "./target/ivyhome/resolution-cache/com.example/foo/0.4.0/resolved.xml.xml".
|
||||
// IO.getModifiedTimeOrZero() will just return zero, but the list of files should not contain such
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ private[librarymanagement] abstract class UpdateReportExtra {
|
|||
def cachedDescriptor: File
|
||||
def configurations: Vector[ConfigurationReport]
|
||||
def stats: UpdateStats
|
||||
private[sbt] def stamps: Map[File, Long]
|
||||
private[sbt] def stamps: Map[String, Long]
|
||||
|
||||
private[sbt] def moduleKey(m: ModuleID) = (m.organization, m.name, m.revision)
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ object DMSerializationSpec extends BasicTestSuite {
|
|||
new File("./foo"),
|
||||
Vector(configurationReportExample),
|
||||
UpdateStats(0, 0, 0, false),
|
||||
Map(new File("./foo") -> 0)
|
||||
Map("./foo" -> 0)
|
||||
)
|
||||
lazy val configurationReportExample =
|
||||
ConfigurationReport(
|
||||
|
|
|
|||
Loading…
Reference in New Issue