Skip to content

Commit

Permalink
Fix build failures caused by -Werror
Browse files Browse the repository at this point in the history
  • Loading branch information
qurbonzoda authored and woainikk committed Sep 4, 2024
1 parent 257a0b2 commit 9eff807
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion examples/kotlin-multiplatform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ kotlin {

targets.configureEach {
compilations.configureEach {
kotlinOptions.allWarningsAsErrors = true
// TODO: Uncomment before merging to master. Currently, K1 produced warning for progressiveMode:
// w: '-progressive' is meaningful only for the latest language version (2.0), while this build uses 1.9
// Compiler behavior in such mode is undefined; please, consider moving to the latest stable version or turning off progressive mode.
// kotlinOptions.allWarningsAsErrors = true
}
}

Expand Down
5 changes: 4 additions & 1 deletion runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ kotlin {
targets.configureEach {
compilations.configureEach {
compilerOptions.options.with {
allWarningsAsErrors.set(true)
// TODO: Uncomment before merging to master. Currently, K2 produced warning for suppressing
// NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS and ACTUAL_WITHOUT_EXPECT, which are redundant in K2.
// However, the suppresses are still relevant in K1.
// allWarningsAsErrors.set(true)
freeCompilerArgs.add("-Xexpect-actual-classes")
optIn.addAll(
"kotlinx.benchmark.internal.KotlinxBenchmarkRuntimeInternalApi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ actual typealias TearDown = org.openjdk.jmh.annotations.TearDown

actual typealias Benchmark = org.openjdk.jmh.annotations.Benchmark

// TODO: This annotation is redundant in K2: KT-59561
// K2 currently produces warning for its use.
@Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS")
actual typealias BenchmarkMode = org.openjdk.jmh.annotations.BenchmarkMode

actual typealias Mode = org.openjdk.jmh.annotations.Mode

actual typealias OutputTimeUnit = org.openjdk.jmh.annotations.OutputTimeUnit

// TODO: This annotation is redundant in K2: KT-59561
// K2 currently produces warning for its use.
@Suppress("ACTUAL_WITHOUT_EXPECT")
actual typealias BenchmarkTimeUnit = java.util.concurrent.TimeUnit

Expand All @@ -25,5 +29,7 @@ actual typealias Warmup = org.openjdk.jmh.annotations.Warmup
@Suppress("ACTUAL_ANNOTATION_CONFLICTING_DEFAULT_ARGUMENT_VALUE")
actual typealias Measurement = org.openjdk.jmh.annotations.Measurement

// TODO: This annotation is redundant in K2: KT-59561
// K2 currently produces warning for its use.
@Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS")
actual typealias Param = org.openjdk.jmh.annotations.Param

0 comments on commit 9eff807

Please sign in to comment.