Skip to content

Commit

Permalink
upgrade dependencies and scala version
Browse files Browse the repository at this point in the history
  • Loading branch information
fm3 committed Oct 5, 2023
1 parent 3e5cecc commit af7d31d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
17 changes: 11 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,24 @@ def getVersionFromGit: String = {
}
}

ThisBuild / scalacOptions ++= Seq(
"-feature",
"-deprecation"
)

version := getVersionFromGit

scalaVersion := "2.12.15"
scalaVersion := "2.13.12"

libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.typesafe.scala-logging" %% "scala-logging" % "3.7.2",
"org.scalatest" % "scalatest_2.12" % "3.0.4" % "test",
"ch.qos.logback" % "logback-classic" % "1.4.7",
"com.typesafe.scala-logging" %% "scala-logging" % "3.9.5",
"org.scalatest" % "scalatest_2.13" % "3.2.15" % "test",
"io.grpc" % "grpc-netty" % scalapb.compiler.Version.grpcJavaVersion,
"io.grpc" % "grpc-services" % scalapb.compiler.Version.grpcJavaVersion,
"com.thesamet.scalapb" %% "scalapb-runtime-grpc" % scalapb.compiler.Version.scalapbVersion,
"org.rocksdb" % "rocksdbjni" % "5.11.3",
"com.github.scopt" %% "scopt" % "3.7.0"
"org.rocksdb" % "rocksdbjni" % "7.10.2",
"com.github.scopt" %% "scopt" % "4.1.0"
)

Compile / managedSourceDirectories += target.value / "protobuf-generated"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.6.2
sbt.version = 1.9.6
4 changes: 2 additions & 2 deletions project/scalapb.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.18")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.2")

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.7.4"
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.13"
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class RocksDBManager(dataDir: Path, columnFamilies: List[String], optionsFilePat
Files.createDirectories(backupDir)

RocksDB.loadLibrary()
val backupEngine = BackupEngine.open(Env.getDefault, new BackupableDBOptions(backupDir.toString))
val backupEngine = BackupEngine.open(Env.getDefault, new BackupEngineOptions(backupDir.toString))
backupEngine.createNewBackup(db)
backupEngine.purgeOldBackups(1)
backupEngine.getBackupInfo.asScala.headOption.map(info => BackupInfo(info.backupId, info.timestamp, info.size))
Expand All @@ -66,7 +66,7 @@ class RocksDBManager(dataDir: Path, columnFamilies: List[String], optionsFilePat
logger.info("Restoring from backup. RocksDB temporarily unavailable")
close()
RocksDB.loadLibrary()
val backupEngine = BackupEngine.open(Env.getDefault, new BackupableDBOptions(backupDir.toString))
val backupEngine = BackupEngine.open(Env.getDefault, new BackupEngineOptions(backupDir.toString))
backupEngine.restoreDbFromLatestBackup(dataDir.toString, dataDir.toString, new RestoreOptions(true))
logger.info("Restoring from backup complete. Reopening RocksDB")
}
Expand Down Expand Up @@ -101,7 +101,7 @@ class RocksDBKeyIterator(it: RocksIterator, prefix: Option[String]) extends Iter

override def hasNext: Boolean = it.isValid && prefix.forall(it.key().startsWith(_))

override def next: String = {
override def next(): String = {
val key = new String(it.key().map(_.toChar))
it.next()
key
Expand All @@ -117,7 +117,7 @@ class RocksDBIterator(it: RocksIterator, prefix: Option[String]) extends Iterato

override def hasNext: Boolean = it.isValid && prefix.forall(it.key().startsWith(_))

override def next: KeyValuePair[Array[Byte]] = {
override def next(): KeyValuePair[Array[Byte]] = {
val value = KeyValuePair(new String(it.key().map(_.toChar)), it.value())
it.next()
value
Expand Down

0 comments on commit af7d31d

Please sign in to comment.