Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable all warnings as errors again #5376

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build-logic/src/main/kotlin/CompilerOptions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ fun Project.configureJavaAndKotlinCompilers() {
// Ensure "org.gradle.jvm.version" is set to "8" in Gradle metadata of jvm-only modules.
options.release.set(8)
}

// https://youtrack.jetbrains.com/issue/KT-62653
// allWarningsAsErrors(true)

allWarningsAsErrors(true)
}

@Suppress("UnstableApiUsage")
Expand Down
4 changes: 3 additions & 1 deletion build-logic/src/main/kotlin/Mpp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ private fun KotlinMultiplatformExtension.configureSourceSetGraph() {
applyDefaultHierarchyTemplate {
group("common") {
group("concurrent") {
group("apple")
group("native") {
group("apple")
}
withJvm()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ internal class IrOperationsBuilder(
}.groupBy {
it.responseName
}.values.map { fieldsWithSameResponseName ->

/**
* Sanity checks, might be removed as this should be done during validation
*/
Expand Down
4 changes: 3 additions & 1 deletion libraries/apollo-gradle-plugin/rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
public static **[] values();
}

# Keep apollo-api for ApolloExperimental
# Keep apollo-annotations for ApolloExperimental
-keep class com.apollographql.apollo3.annotations.** { *; }
# Do we need to keep apollo-api
-keep class com.apollographql.apollo3.api.** { *; }
# Keep the plugin API as it's used from build scripts
-keep class com.apollographql.apollo3.gradle.api.** { *; }
Expand Down
5 changes: 4 additions & 1 deletion tests/compiler-hooks/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@file:OptIn(ApolloExperimental::class)

import com.apollographql.apollo3.annotations.ApolloExperimental
import com.apollographql.apollo3.annotations.ApolloInternal
import com.apollographql.apollo3.compiler.codegen.ResolverKey
import com.apollographql.apollo3.compiler.hooks.ApolloCompilerJavaHooks
Expand Down Expand Up @@ -327,7 +330,7 @@ class CapitalizeEnumValuesHooks : DefaultApolloCompilerKotlinHooks() {
member.toBuilder()
.apply {
val capitalizedEnumConstants = enumConstants.mapKeys { (key, _) ->
key.toUpperCase()
key.uppercase()
}
enumConstants.clear()
enumConstants.putAll(capitalizedEnumConstants)
Expand Down
2 changes: 2 additions & 0 deletions tests/deprecated-requires-opt-in/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ apollo {
}
service("none") {
srcDir("graphql")
@OptIn(com.apollographql.apollo3.annotations.ApolloExperimental::class)
requiresOptInAnnotation.set("none")
packageName.set("none")
languageVersion.set("1.5")
}
service("custom") {
srcDir("graphql")
@OptIn(com.apollographql.apollo3.annotations.ApolloExperimental::class)
requiresOptInAnnotation.set("com.example.MyRequiresOptIn")
packageName.set("custom")
languageVersion.set("1.5")
Expand Down