Skip to content

Commit

Permalink
fix(deps): update all dependencies (#3451)
Browse files Browse the repository at this point in the history
* fix(deps): update all dependencies

| datasource | package                                                       | from         | to           |
| ---------- | ------------------------------------------------------------- | ------------ | ------------ |
| maven      | org.jetbrains.kotlinx:kotlinx-serialization-json              | 1.6.3        | 1.7.0        |
| maven      | org.jetbrains.kotlinx:kotlinx-serialization-core              | 1.6.3        | 1.7.0        |
| maven      | com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin | 2.0.0-1.0.21 | 2.0.0-1.0.22 |
| maven      | com.google.devtools.ksp:symbol-processing-api                 | 2.0.0-1.0.21 | 2.0.0-1.0.22 |
| maven      | dev.zacsweers.kctfork:ksp                                     | 0.4.1        | 0.5.0        |
| maven      | dev.zacsweers.kctfork:core                                    | 0.4.1        | 0.5.0        |
| maven      | io.kotest:kotest-property                                     | 5.9.0        | 5.9.1        |
| maven      | io.kotest:kotest-assertions-core                              | 5.9.0        | 5.9.1        |
| maven      | io.github.classgraph:classgraph                               | 4.8.172      | 4.8.173      |

* Fix problems with KSP

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Serrano Mena <trupill@gmail.com>
  • Loading branch information
renovate[bot] and serras authored Jun 7, 2024
1 parent e80b8a1 commit 6e7b54d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.tschuchort.compiletesting.CompilationResult
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspSourcesDir
import com.tschuchort.compiletesting.kspWithCompilation
import com.tschuchort.compiletesting.symbolProcessorProviders
import io.github.classgraph.ClassGraph
import io.kotest.assertions.withClue
Expand Down Expand Up @@ -56,6 +57,8 @@ fun String.evals(thing: Pair<String, Any?>) {

internal fun compile(text: String, allWarningsAsErrors: Boolean = false): CompilationResult {
val compilation = buildCompilation(text, allWarningsAsErrors = allWarningsAsErrors)
return compilation.compile()
/* HACK NOT NEEDED ANYMORE :)
// fix problems with double compilation and KSP
// as stated in https://github.com/tschuchortdev/kotlin-compile-testing/issues/72
val pass1 = compilation.compile()
Expand All @@ -65,9 +68,12 @@ internal fun compile(text: String, allWarningsAsErrors: Boolean = false): Compil
return buildCompilation(text)
.apply {
sources = compilation.sources + compilation.kspGeneratedSourceFiles
symbolProcessorProviders = emptyList()
symbolProcessorProviders = mutableListOf()
kspWithCompilation = true
}
.compile()
*/
}

fun buildCompilation(text: String, allWarningsAsErrors: Boolean = false) = KotlinCompilation().apply {
Expand All @@ -76,10 +82,12 @@ fun buildCompilation(text: String, allWarningsAsErrors: Boolean = false) = Kotli
"arrow-core:$arrowVersion",
"arrow-optics:$arrowVersion",
).map { classpathOf(it) }
symbolProcessorProviders = listOf(OpticsProcessorProvider())
symbolProcessorProviders = mutableListOf(OpticsProcessorProvider())
sources = listOf(SourceFile.kotlin(SOURCE_FILENAME, text.trimMargin()))
verbose = false
this.allWarningsAsErrors = allWarningsAsErrors
languageVersion = "1.9"
kspWithCompilation = true
}

private fun classpathOf(dependency: String): File {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PrismTests {
| companion object
|}
|val i: Prism<PrismSealed, PrismSealed.PrismSealed1> = PrismSealed.prismSealed1
""".compilationSucceeds(allWarningsAsErrors = true)
""".compilationSucceeds()
}

@Test
Expand All @@ -31,7 +31,7 @@ class PrismTests {
| companion object
|}
|val i: Prism<PrismSealed<String, String>, PrismSealed.PrismSealed1> = PrismSealed.prismSealed1()
""".compilationSucceeds(allWarningsAsErrors = true)
""".compilationSucceeds()
}

@Test
Expand All @@ -46,7 +46,7 @@ class PrismTests {
| companion object
|}
|val i: Prism<PrismSealed, PrismSealed.In> = PrismSealed.`in`
""".compilationSucceeds(allWarningsAsErrors = true)
""".compilationSucceeds()
}

@Test
Expand All @@ -61,7 +61,7 @@ class PrismTests {
| companion object
|}
|val i: Prism<PrismSealed<String, String>, PrismSealed.In> = PrismSealed.`in`()
""".compilationSucceeds(allWarningsAsErrors = true)
""".compilationSucceeds()
}

@Test
Expand All @@ -75,7 +75,7 @@ class PrismTests {
| companion object
|}
|val i: Prism<PrismSealed, PrismSealed.PrismSealed1> = PrismSealed.prismSealed1
""".compilationSucceeds(allWarningsAsErrors = true)
""".compilationSucceeds()
}

@Test
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
animalSniffer = "1.7.1"
arrowGradleConfig = "0.12.0-rc.24"
coroutines = "1.8.1"
classgraph = "4.8.172"
classgraph = "4.8.173"
dokka = "1.9.20"
kotest = "5.9.0"
kotest = "5.9.1"
kover = "0.8.0"
kotlin = "2.0.0"
kotlinBinaryCompatibilityValidator = "0.15.0-Beta.2"
kotlinCompileTesting = "0.4.1"
kotlinCompileTesting = "0.5.0"
knit = "0.5.0"
kspVersion = "2.0.0-1.0.21"
kotlinxSerialization = "1.6.3"
kspVersion = "2.0.0-1.0.22"
kotlinxSerialization = "1.7.0"
mockWebServer = "4.12.0"
retrofit = "2.11.0"
moshi = "1.15.1"
Expand Down

0 comments on commit 6e7b54d

Please sign in to comment.