Skip to content

chore(deps): bump com.fasterxml.jackson.module:jackson-module-kotlin from 2.15.2 to 2.16.0 #705

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

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ allprojects {
afterEvaluate {
dependencies {
dependencies {
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.2")
implementation(libs.jackson.module.kotlin)
implementation(libs.kotlin.idea) {
isTransitive = false
}
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ skiko-js-wasm-runtime = { group = "org.jetbrains.skiko", name = "skiko-js-wasm-r
jackson-databind = { group = "com.fasterxml.jackson.core", name = "jackson-databind", version.ref = "jackson" }
jackson-core = { group = "com.fasterxml.jackson.core", name = "jackson-core", version.ref = "jackson" }
jackson-annotations = { group = "com.fasterxml.jackson.core", name = "jackson-annotations", version.ref = "jackson" }
jackson-module-kotlin = { group = "com.fasterxml.jackson.module", name = "jackson-module-kotlin", version.ref = "jackson" }
hamcrest = { group = "org.hamcrest", name = "hamcrest", version.ref = "hamcrest" }
compose-runtime = { group = "org.jetbrains.compose.runtime", name = "runtime", version.ref = "compose" }
compose-ui = { group = "org.jetbrains.compose.ui", name = "ui", version.ref = "compose" }
Expand Down
32 changes: 24 additions & 8 deletions src/test/kotlin/com/compiler/server/ResourceE2ECompileTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import com.compiler.server.model.JvmExecutionResult
import com.compiler.server.model.ProjectType
import com.compiler.server.model.TranslationJSResult
import com.compiler.server.model.TranslationWasmResult
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.beans.factory.annotation.Value
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.http.HttpEntity
Expand All @@ -26,6 +28,10 @@ import kotlin.io.path.writeText

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class ResourceE2ECompileTest : BaseResourceCompileTest {

@Autowired
private lateinit var objectMapper: ObjectMapper

@Value("\${local.server.port}")
private var port = 0
private val host: String = InetAddress.getLocalHost().hostAddress
Expand Down Expand Up @@ -64,21 +70,16 @@ class ResourceE2ECompileTest : BaseResourceCompileTest {
testDirJS
)
) { result, file ->
val (actualResult, extension) = when (result) {
// For the JS it has no sense to compare compiled code,
// because it differs with each new compiler version,
// but it makes sense to compare the results of the execution such code.
is TranslationJSResult -> Pair(executeCompiledJsCode(result), ".txt")
else -> Pair(jacksonObjectMapper().writeValueAsString(result), ".json")
}
val (actualResult, extension, compareExpectedAndActualResultFunction) =
prepareStrategyBasedOnTestResult(result)
val out =
file.path.replace("test-compile-data", "test-compile-output").replace("\\.kt$".toRegex(), extension)

val outFile = File(out)

if (outFile.exists()) {
val text = outFile.readText()
if (text != actualResult) {
if (!compareExpectedAndActualResultFunction(text, actualResult)) {
if (!file.isInconsistentOutput()) {
return@checkResourceExamples """
Expected: $text
Expand All @@ -99,6 +100,21 @@ class ResourceE2ECompileTest : BaseResourceCompileTest {
null
}
}

private fun prepareStrategyBasedOnTestResult(result: ExecutionResult): Triple<String, String, (String, String) -> Boolean> = when (result) {
// For the JS it has no sense to compare compiled code,
// because it differs with each new compiler version,
// but it makes sense to compare the results of the execution such code.
is TranslationJSResult -> Triple(
executeCompiledJsCode(result),
".txt",
{ expected: String, actual: String -> expected == actual })

else -> Triple(
objectMapper.writeValueAsString(result),
".json",
{ expected: String, actual: String -> objectMapper.readTree(expected) == objectMapper.readTree(actual) })
}
}

private fun File.isInconsistentOutput(): Boolean {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>User(name=Alex, id=1)\nuser == secondUser: true\nuser == thirdUser: false\n63347075\n63347075\n2390846\nUser(name=Alex, id=1)\nfalse\nUser(name=Max, id=1)\nUser(name=Alex, id=3)\nname = Alex\nid = 1\n</outStream>"}
{"exception":null,"text":"<outStream>User(name=Alex, id=1)\nuser == secondUser: true\nuser == thirdUser: false\n63347075\n63347075\n2390846\nUser(name=Alex, id=1)\nfalse\nUser(name=Max, id=1)\nUser(name=Alex, id=3)\nname = Alex\nid = 1\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Hello, World!\n</outStream>"}
{"exception":null,"text":"<outStream>Hello, World!\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>sumResult 9, mulResult 20\n</outStream>"}
{"exception":null,"text":"<outStream>sumResult 9, mulResult 20\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>4\n</outStream>"}
{"exception":null,"text":"<outStream>4\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Tot sudoers: 4\nSome useful info on user 1\nSome useful info on user 2\nSome useful info on user 3\nSome useful info on user 4\n</outStream>"}
{"exception":null,"text":"<outStream>Tot sudoers: 4\nSome useful info on user 1\nSome useful info on user 2\nSome useful info on user 3\nSome useful info on user 4\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Greeting\nOne\nLong\nNot a string\nUnknown\n</outStream>"}
{"exception":null,"text":"<outStream>Greeting\nOne\nLong\nNot a string\nUnknown\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>1\n42\none\n42\n</outStream>"}
{"exception":null,"text":"<outStream>1\n42\none\n42\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>THRASH METAL !!!\nI'm The King of Rock 'N' Roll: Dancin' to the Jailhouse Rock.\n</outStream>"}
{"exception":null,"text":"<outStream>THRASH METAL !!!\nI'm The King of Rock 'N' Roll: Dancin' to the Jailhouse Rock.\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>TEST is empty: false\nPrinting \"null\":\nPrinting \"my string\":\n\tMY STRING\nFIRST : SECOND\n</outStream>"}
{"exception":null,"text":"<outStream>TEST is empty: false\nPrinting \"null\":\nPrinting \"my string\":\n\tMY STRING\nFIRST : SECOND\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>mario@example.com\ndomain.com@username\nfoo@bar.com\npepe@frog.com\n</outStream>"}
{"exception":null,"text":"<outStream>mario@example.com\ndomain.com@username\nfoo@bar.com\npepe@frog.com\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Example Class, thank you for delegating 'p' to me!\nNEW has been assigned to p in Example Class\n</outStream>"}
{"exception":null,"text":"<outStream>Example Class, thank you for delegating 'p' to me!\nNEW has been assigned to p in Example Class\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>created!\ncomputed!\nlazyStr = my lazy\n = my lazy\n</outStream>"}
{"exception":null,"text":"<outStream>created!\ncomputed!\nlazyStr = my lazy\n = my lazy\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>name = John Doe, age = 25\n</outStream>"}
{"exception":null,"text":"<outStream>name = John Doe, age = 25\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>It's running\n</outStream>"}
{"exception":null,"text":"<outStream>It's running\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>RED\ntrue\nfalse\ntrue\n</outStream>"}
{"exception":null,"text":"<outStream>RED\ntrue\nfalse\ntrue\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[{"interval":{"start":{"line":0,"ch":35},"end":{"line":0,"ch":39}},"message":"Redundant return 'Unit' type.","severity":"WARNING","className":"WARNING"}]},"exception":null,"jvmByteCode":null,"text":"<outStream>Hello\n[Log] Hello\n[Info] Hello\n[Log] Hello\n3\n8\n</outStream>"}
{"exception":null,"text":"<outStream>Hello\n[Log] Hello\n[Info] Hello\n[Log] Hello\n3\n8\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[{"interval":{"start":{"line":0,"ch":35},"end":{"line":0,"ch":39}},"message":"Redundant return 'Unit' type.","severity":"WARNING","className":"WARNING"}]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Bye Bye \n(Ferrari, Katrina)\n(McLaren, Lucas)\n</outStream>"}
{"exception":null,"text":"<outStream>Bye Bye \n(Ferrari, Katrina)\n(McLaren, Lucas)\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Bye Bye \nAlways forgive \n</outStream>"}
{"exception":null,"text":"<outStream>Bye Bye \nAlways forgive \n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Hello\nHallo\nSalut\nHola\n你好\nGreeting: Hello\nGreeting: Hallo\nGreeting: Salut\nGreeting: Hola\nGreeting: 你好\nHello\nHallo\nSalut\nHola\n你好\n</outStream>"}
{"exception":null,"text":"<outStream>Hello\nHallo\nSalut\nHola\n你好\nGreeting: Hello\nGreeting: Hallo\nGreeting: Salut\nGreeting: Hola\nGreeting: 你好\nHello\nHallo\nSalut\nHola\n你好\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>HELLO\nHELLO\nHELLO\nHELLO\nHELLO\n</outStream>"}
{"exception":null,"text":"<outStream>HELLO\nHELLO\nHELLO\nHELLO\nHELLO\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Yummy, it's a carrot cake!\nYummy, it's a cheese cake!\nYummy, it's a chocolate cake!\n</outStream>"}
{"exception":null,"text":"<outStream>Yummy, it's a carrot cake!\nYummy, it's a cheese cake!\nYummy, it's a chocolate cake!\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Eat a Cake\nEat a Cake\nEat a Cake\nEat a Cake\nEat a Cake\nBake a Cake\nBake a Cake\nBake a Cake\nBake a Cake\nBake a Cake\n</outStream>"}
{"exception":null,"text":"<outStream>Eat a Cake\nEat a Cake\nEat a Cake\nEat a Cake\nEat a Cake\nBake a Cake\nBake a Cake\nBake a Cake\nBake a Cake\nBake a Cake\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Watch out, it's a zebra\nWatch out, it's a lion\n</outStream>"}
{"exception":null,"text":"<outStream>Watch out, it's a zebra\nWatch out, it's a lion\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Issue uniqueDescr4 registered correctly.\nIssue uniqueDescr2 marked as duplicate and rejected.\n</outStream>"}
{"exception":null,"text":"<outStream>Issue uniqueDescr4 registered correctly.\nIssue uniqueDescr2 marked as duplicate and rejected.\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>Hello Kotliner\nHello KOTLINER\n</outStream>"}
{"exception":null,"text":"<outStream>Hello Kotliner\nHello KOTLINER\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>for \"null\":\nfor \"\":\n\tis empty? true\n\tlength = 0\nfor \"some string with Kotlin\":\n\tis empty? false\n\tlength = 23\n</outStream>"}
{"exception":null,"text":"<outStream>for \"null\":\nfor \"\":\n\tis empty? true\n\tlength = 0\nfor \"some string with Kotlin\":\n\tis empty? false\n\tlength = 23\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[{"interval":{"start":{"line":7,"ch":9},"end":{"line":7,"ch":10}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":7,"ch":12},"end":{"line":7,"ch":13}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":7,"ch":15},"end":{"line":7,"ch":16}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":14,"ch":9},"end":{"line":14,"ch":12}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":14,"ch":14},"end":{"line":14,"ch":17}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"}]},"exception":null,"jvmByteCode":null,"text":"<outStream>Alice is 21 years old\nBob is 25 years old\n</outStream>"}
{"exception":null,"text":"<outStream>Alice is 21 years old\nBob is 25 years old\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[{"interval":{"start":{"line":7,"ch":9},"end":{"line":7,"ch":10}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":7,"ch":12},"end":{"line":7,"ch":13}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":7,"ch":15},"end":{"line":7,"ch":16}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":14,"ch":9},"end":{"line":14,"ch":12}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":14,"ch":14},"end":{"line":14,"ch":17}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"}]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[{"interval":{"start":{"line":6,"ch":19},"end":{"line":6,"ch":24}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":9,"ch":12},"end":{"line":9,"ch":24}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"}]},"exception":null,"jvmByteCode":null,"text":"<outStream>true\n</outStream>"}
{"exception":null,"text":"<outStream>true\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[{"interval":{"start":{"line":6,"ch":19},"end":{"line":6,"ch":24}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"},{"interval":{"start":{"line":9,"ch":12},"end":{"line":9,"ch":24}},"message":"Variable is unused.","severity":"WARNING","className":"WARNING"}]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>num = 1, name = one\n</outStream>"}
{"exception":null,"text":"<outStream>num = 1, name = one\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>EZ-Pass report:\nID 1: credit 100\nID 2: credit 100\nID 3: credit 100\nUpdating 1...\nUpdating 1...\nError: Trying to update a non-existing account (id: 5)\nEZ-Pass report:\nID 1: credit 130\nID 2: credit 100\nID 3: credit 100\n</outStream>"}
{"exception":null,"text":"<outStream>EZ-Pass report:\nID 1: credit 100\nID 2: credit 100\nID 3: credit 100\nUpdating 1...\nUpdating 1...\nError: Trying to update a non-existing account (id: 5)\nEZ-Pass report:\nID 1: credit 130\nID 2: credit 100\nID 3: credit 100\n</outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>0123 012 2468 3210 </outStream>"}
{"exception":null,"text":"<outStream>0123 012 2468 3210 </outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"errors":{"File.kt":[]},"exception":null,"jvmByteCode":null,"text":"<outStream>abcd zxvt </outStream>"}
{"exception":null,"text":"<outStream>abcd zxvt </outStream>","jvmByteCode":null,"errors":{"File.kt":[]}}
Loading