-
-
Notifications
You must be signed in to change notification settings - Fork 3
Introduce ShadowJar to avoid dependency conflicts #375
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,8 +10,8 @@ | |||||
"metadata": { | ||||||
"collapsed": true, | ||||||
"ExecuteTime": { | ||||||
"end_time": "2025-09-19T19:49:09.868118Z", | ||||||
"start_time": "2025-09-19T19:49:05.225077Z" | ||||||
"end_time": "2025-09-21T08:33:23.068468Z", | ||||||
"start_time": "2025-09-21T08:33:22.912180Z" | ||||||
} | ||||||
}, | ||||||
"source": [ | ||||||
|
@@ -23,21 +23,21 @@ | |||||
" mavenCentral()\n", | ||||||
" }\n", | ||||||
" dependencies(\n", | ||||||
" \"me.kpavlov.aimocks:ai-mocks-openai-jvm:0.5.0-SNAPSHOT\",\n", | ||||||
" \"me.kpavlov.aimocks:ai-mocks-openai-standalone:0.5.0-SNAPSHOT\",\n", | ||||||
" \"io.kotest:kotest-assertions-core:5.9.1\",\n", | ||||||
" \"io.kotest:kotest-assertions-json:5.9.1\",\n", | ||||||
" \"dev.langchain4j:langchain4j-open-ai:1.5.0\",\n", | ||||||
" \"dev.langchain4j:langchain4j-kotlin:1.5.0-beta11\",\n", | ||||||
" )\n", | ||||||
"}" | ||||||
], | ||||||
"outputs": [], | ||||||
"execution_count": 10 | ||||||
"execution_count": 3 | ||||||
}, | ||||||
{ | ||||||
"metadata": { | ||||||
"ExecuteTime": { | ||||||
"end_time": "2025-09-19T19:49:09.960056Z", | ||||||
"start_time": "2025-09-19T19:49:09.877363Z" | ||||||
"end_time": "2025-09-21T08:33:27.746433Z", | ||||||
"start_time": "2025-09-21T08:33:27.667009Z" | ||||||
} | ||||||
}, | ||||||
"cell_type": "code", | ||||||
|
@@ -51,7 +51,7 @@ | |||||
"import io.kotest.matchers.shouldBe\n", | ||||||
"import io.kotest.matchers.shouldNotBe\n", | ||||||
"\n", | ||||||
"val openai = MockOpenai(verbose = true)\n", | ||||||
"val openai = MockOpenai(verbose = true, port = 0)\n", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix MockOpenai ctor call (named-arg mismatch in REPL). Use positional args to match (port: Int, verbose: Boolean). -val openai = MockOpenai(verbose = true, port = 0)
+val openai = MockOpenai(0, true) 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||
"\n", | ||||||
"val model: OpenAiChatModel =\n", | ||||||
" OpenAiChatModel\n", | ||||||
|
@@ -61,8 +61,8 @@ | |||||
" .build()\n", | ||||||
"\n", | ||||||
"openai.completion {\n", | ||||||
" temperature = 0.42\n", | ||||||
" seed = 100500\n", | ||||||
"// temperature(0.42) = 0.42\n", | ||||||
"// seed = 100500\n", | ||||||
" model = \"4o\"\n", | ||||||
" maxTokens = 120\n", | ||||||
"} responds {\n", | ||||||
|
@@ -96,31 +96,34 @@ | |||||
], | ||||||
"outputs": [ | ||||||
{ | ||||||
"ename": "java.lang.NoClassDefFoundError", | ||||||
"evalue": "io/ktor/server/plugins/contentnegotiation/ContentNegotiationConfig", | ||||||
"ename": "org.jetbrains.kotlinx.jupyter.exceptions.ReplCompilerException", | ||||||
"evalue": "at Cell In[4], line 3, column 35: Unresolved reference: chat\nat Cell In[4], line 10, column 14: None of the following functions can be called with the arguments supplied: \npublic constructor MockOpenai() defined in me.kpavlov.aimocks.openai.MockOpenai\npublic constructor MockOpenai(port: Int, verbose: Boolean) defined in me.kpavlov.aimocks.openai.MockOpenai\nat Cell In[4], line 20, column 3: Unresolved reference: temperature\nat Cell In[4], line 21, column 3: Unresolved reference: seed\nat Cell In[4], line 22, column 3: Val cannot be reassigned\nat Cell In[4], line 22, column 11: Type mismatch: inferred type is String but OpenAiChatModel was expected\nat Cell In[4], line 23, column 3: Unresolved reference: maxTokens\nat Cell In[4], line 25, column 3: Unresolved reference: assistantContent\nat Cell In[4], line 26, column 3: Unresolved reference: finishReason\nat Cell In[4], line 32, column 11: None of the following functions can be called with the arguments supplied: \npublic open fun chat(p0: ChatRequest!): ChatResponse! defined in dev.langchain4j.model.openai.OpenAiChatModel\npublic open fun chat(vararg p0: ChatMessage!): ChatResponse! defined in dev.langchain4j.model.openai.OpenAiChatModel\npublic open fun chat(p0: String!): String! defined in dev.langchain4j.model.openai.OpenAiChatModel\npublic open fun chat(p0: (Mutable)List<ChatMessage!>!): ChatResponse! defined in dev.langchain4j.model.openai.OpenAiChatModel\nat Cell In[4], line 33, column 7: Unresolved reference: parameters\nat Cell In[4], line 41, column 7: Unresolved reference: messages\nat Cell In[4], line 41, column 16: Unresolved reference: +=\nat Cell In[4], line 45, column 5: Unresolved reference: finishReason\nat Cell In[4], line 46, column 5: Unresolved reference: tokenUsage\nat Cell In[4], line 47, column 5: Unresolved reference: aiMessage", | ||||||
"output_type": "error", | ||||||
"traceback": [ | ||||||
"java.lang.NoClassDefFoundError: io/ktor/server/plugins/contentnegotiation/ContentNegotiationConfig", | ||||||
"\tat me.kpavlov.aimocks.openai.MockOpenai.<init>(MockOpenai.kt:33)", | ||||||
"\tat me.kpavlov.aimocks.openai.MockOpenai.<init>(MockOpenai.kt:27)", | ||||||
"\tat Line_24_jupyter.<init>(Line_24.jupyter.kts:10) at Cell In[11], line 10", | ||||||
"\tat java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)", | ||||||
"\tat java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)", | ||||||
"\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:483)", | ||||||
"\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.evalWithConfigAndOtherScriptsResults(BasicJvmScriptEvaluator.kt:122)", | ||||||
"\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke$suspendImpl(BasicJvmScriptEvaluator.kt:48)", | ||||||
"\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke(BasicJvmScriptEvaluator.kt)", | ||||||
"\tat kotlin.script.experimental.jvm.BasicJvmReplEvaluator.eval(BasicJvmReplEvaluator.kt:49)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl$eval$resultWithDiagnostics$1.invokeSuspend(InternalEvaluatorImpl.kt:137)", | ||||||
"\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)", | ||||||
"\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)", | ||||||
"\tat kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:263)", | ||||||
"\tat kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:95)", | ||||||
"\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:69)", | ||||||
"\tat kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)", | ||||||
"\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:47)", | ||||||
"\tat kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl.eval(InternalEvaluatorImpl.kt:137)", | ||||||
"org.jetbrains.kotlinx.jupyter.exceptions.ReplCompilerException: at Cell In[4], line 3, column 35: Unresolved reference: chat", | ||||||
"at Cell In[4], line 10, column 14: None of the following functions can be called with the arguments supplied: ", | ||||||
"public constructor MockOpenai() defined in me.kpavlov.aimocks.openai.MockOpenai", | ||||||
"public constructor MockOpenai(port: Int, verbose: Boolean) defined in me.kpavlov.aimocks.openai.MockOpenai", | ||||||
"at Cell In[4], line 20, column 3: Unresolved reference: temperature", | ||||||
"at Cell In[4], line 21, column 3: Unresolved reference: seed", | ||||||
"at Cell In[4], line 22, column 3: Val cannot be reassigned", | ||||||
"at Cell In[4], line 22, column 11: Type mismatch: inferred type is String but OpenAiChatModel was expected", | ||||||
"at Cell In[4], line 23, column 3: Unresolved reference: maxTokens", | ||||||
"at Cell In[4], line 25, column 3: Unresolved reference: assistantContent", | ||||||
"at Cell In[4], line 26, column 3: Unresolved reference: finishReason", | ||||||
"at Cell In[4], line 32, column 11: None of the following functions can be called with the arguments supplied: ", | ||||||
"public open fun chat(p0: ChatRequest!): ChatResponse! defined in dev.langchain4j.model.openai.OpenAiChatModel", | ||||||
"public open fun chat(vararg p0: ChatMessage!): ChatResponse! defined in dev.langchain4j.model.openai.OpenAiChatModel", | ||||||
"public open fun chat(p0: String!): String! defined in dev.langchain4j.model.openai.OpenAiChatModel", | ||||||
"public open fun chat(p0: (Mutable)List<ChatMessage!>!): ChatResponse! defined in dev.langchain4j.model.openai.OpenAiChatModel", | ||||||
"at Cell In[4], line 33, column 7: Unresolved reference: parameters", | ||||||
"at Cell In[4], line 41, column 7: Unresolved reference: messages", | ||||||
"at Cell In[4], line 41, column 16: Unresolved reference: +=", | ||||||
"at Cell In[4], line 45, column 5: Unresolved reference: finishReason", | ||||||
"at Cell In[4], line 46, column 5: Unresolved reference: tokenUsage", | ||||||
"at Cell In[4], line 47, column 5: Unresolved reference: aiMessage", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.JupyterCompilerImpl.compileSync(JupyterCompilerImpl.kt:151)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl.eval(InternalEvaluatorImpl.kt:126)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute_L4Nmkdk$lambda$0$0(CellExecutorImpl.kt:80)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.ReplForJupyterImpl.withHost(ReplForJupyterImpl.kt:791)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute-L4Nmkdk(CellExecutorImpl.kt:78)", | ||||||
|
@@ -147,13 +150,11 @@ | |||||
"\tat org.jetbrains.kotlinx.jupyter.execution.JupyterExecutorImpl$Task.execute(JupyterExecutorImpl.kt:41)", | ||||||
"\tat org.jetbrains.kotlinx.jupyter.execution.JupyterExecutorImpl.executorThread$lambda$0(JupyterExecutorImpl.kt:81)", | ||||||
"\tat kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)", | ||||||
"", | ||||||
"java.lang.NoClassDefFoundError: io/ktor/server/plugins/contentnegotiation/ContentNegotiationConfig", | ||||||
"at Cell In[11], line 10" | ||||||
"" | ||||||
] | ||||||
} | ||||||
], | ||||||
"execution_count": 11 | ||||||
"execution_count": 4 | ||||||
} | ||||||
], | ||||||
"metadata": { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align Maven test JDK with POM (Java 17).
The Maven step currently runs on JDK 24. Set up Java 17 before mvn test to match <maven.compiler.release>.
📝 Committable suggestion
🤖 Prompt for AI Agents