Skip to content

Commit

Permalink
Revert "enable lazy conversion"
Browse files Browse the repository at this point in the history
This reverts commit 0cd3157.
  • Loading branch information
andrewparmet committed May 12, 2024
1 parent 0cd3157 commit c5f0069
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 96 deletions.
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/JavaBasedProjectConventions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun Project.javaBasedProjectConventions() {
repositories {
mavenCentral()
mavenLocal()
}

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protobuf-java = "3.21.7"
protobuf-js = "7.2.6"
protobufGradlePlugin = "0.9.4"
protovalidate = "0.6.4"
protovalidateJava = "0.0.0-SNAPSHOT"
protovalidateJava = "0.2.1"
slf4j = "2.0.6"

# build
Expand Down
1 change: 0 additions & 1 deletion protokt-protovalidate/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ plugins {
}

enablePublishing()
trackKotlinApiCompatibility()

dependencies {
implementation(project(":protokt-reflect"))
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ import kotlin.reflect.full.findAnnotation

@Beta
class ProtoktValidator(
config: Config = Config.newBuilder().build(),
private val lazyConvert: Boolean = true
config: Config = Config.newBuilder().build()
) {
private val evaluatorBuilder =
EvaluatorBuilder(
Expand Down Expand Up @@ -88,11 +87,7 @@ class ProtoktValidator(
evaluatorsByFullTypeName.getValue(
message::class.findAnnotation<GeneratedMessage>()!!.fullTypeName,
).evaluate(
if (lazyConvert) {
ProtoktMessageValue(message, RuntimeContext(descriptors))
} else {
MessageValue(message.toDynamicMessage(RuntimeContext(descriptors)))
},
MessageValue(message.toDynamicMessage(RuntimeContext(descriptors))),
failFast
)
}

0 comments on commit c5f0069

Please sign in to comment.