ribesg
04/28/2022, 2:57 PMribesg
05/03/2022, 10:49 AMPeter
05/04/2022, 6:09 PMAyfri
05/07/2022, 12:25 AMholgerbrandl
05/11/2022, 7:48 PMDan T
05/11/2022, 10:30 PMSet mode to SQL
If a val has the word "where" in it
And is in a kotlin class with "Repository" in its name
I see something that looks similar for javascript, which is this:
+ jsLiteral().withStringValueIgnoringInterpolations(stringMatchesBrics(" *(SELECT|DELETE) .*FROM .*"))
but I don't know how to translate that to looking at a variable in Kotlin.
The result is that I'd like to be able to get automated SQL language support for variables that look like SQL in a repository class. I know I can add
//language=sql
val someStatement="select * from foo where x=?"
...but with a dozen statements in a repository, all those language comments are pretty cumbersome. Thanks for any advice!Rob Elliot
05/13/2022, 1:06 PMCharsets.UTF_8
instead of UTF_8
again.Emil Kantis
05/14/2022, 11:05 AMJonathan Ellis
05/22/2022, 2:08 AMJonathan Ellis
05/22/2022, 2:08 AMJonathan Ellis
05/23/2022, 6:19 PMmbonnin
05/25/2022, 4:57 PMClaude Brisson
06/01/2022, 8:44 PM.idea
folder, the sync succeeds and everything goes back to normal, with source and test roots properly detected in commonMain, jvmMain, jsMain and the same for test.
Somehow, IntellijIdea mixes gradle build models between multiplatform and java plugins from different modules, and I don't have any clue why it happens.
Versions:
+ IntelliJ IDEA 2021.3.3 (Ultimate Edition) Build #IU-213.7172.25, built on March 15, 2022
+ Kotlin plugin 213-1.6.21-release-334-IJ6777.52
+ gradle 7.1 or 7.4.2andylamax
06/03/2022, 1:01 AMThis version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2021.2.1 or newer.
How do I solve this without switching to Android Studio?andylamax
06/07/2022, 8:47 AMplugins {
alias(libs.plugins.greet)
}
libs
would be highlighted with '<declaration> can't be called in this context by implicit receiver. Use the explicit one if necessary'. Is there a WA?Jonathan Ellis
06/07/2022, 10:22 PMAdam S
06/08/2022, 3:04 PMbuild.gradle.kts
files using multiline strings, and I'd like to use IntelliJ Language Injection so it looks pretty.
I've set @Language("kotlin")
, however, IntelliJ doesn't like it and shows an error. Is there a way of telling the language injection to highlight a string as if it were a .gradle.kts
file?
fun File.`build gradle kts`(@Language("kotlin") contents: String): File =
createFile("build.gradle.kts", contents)
smallufo
06/09/2022, 6:08 PM221-1.7.0-release-281-IJ5591.52
) has problem. I cannot build my project . errors :
Kotlin: [Internal Error] java.lang.NoClassDefFoundError: org/jetbrains/kotlin/ir/visitors/IrElementVisitorVoidKt
at org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationLoweringExtensionKt.runOnFileInOrder(SerializationLoweringExtension.kt:30)
at org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationLoweringExtension.generate(SerializationLoweringExtension.kt:77)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.convertToIr$lambda-1(JvmIrCodegenFactory.kt:162)
at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:99)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.convertToIr(JvmIrCodegenFactory.kt:194)
at org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory.convertToIr(JvmIrCodegenFactory.kt:53)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.convertToIr(KotlinToJVMBytecodeCompiler.kt:232)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:115)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:60)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:157)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:94)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1568)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoidKt
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:440)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 32 more
I didn’t enable anything K2-related feature. This is a maven project , not a gradle project.
If I invalidate cache and restart and recompile , it shows :
Kotlin: [Internal Error] java.lang.AssertionError: org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension caused LinkageError
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:57)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:187)
at org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension$Companion$getInstance$1.generateSyntheticSecondaryConstructors(SyntheticResolveExtension.kt:307)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.addSyntheticSecondaryConstructors(LazyClassMemberScope.kt:514)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.doGetConstructors(LazyClassMemberScope.kt:509)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.access$doGetConstructors(LazyClassMemberScope.kt:51)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$secondaryConstructors$1.invoke(LazyClassMemberScope.kt:504)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope$secondaryConstructors$1.invoke(LazyClassMemberScope.kt:504)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedLazyValue.invoke(LockBasedStorageManager.java:408)
at org.jetbrains.kotlin.storage.LockBasedStorageManager$LockBasedNotNullLazyValue.invoke(LockBasedStorageManager.java:527)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassMemberScope.getConstructors(LazyClassMemberScope.kt:518)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.getConstructors(LazyClassDescriptor.java:466)
at org.jetbrains.kotlin.resolve.lazy.descriptors.LazyClassDescriptor.resolveMemberHeaders(LazyClassDescriptor.java:725)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.resolveAllHeadersInClasses(LazyTopDownAnalyzer.kt:241)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:214)
at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations$default(LazyTopDownAnalyzer.kt:58)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:130)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:99)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:264)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:55)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:115)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:255)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:101)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:60)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:157)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:94)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1568)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.NoSuchMethodError: 'org.jetbrains.kotlin.types.SimpleType org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType$default(org.jetbrains.kotlin.descriptors.annotations.Annotations, org.jetbrains.kotlin.types.TypeConstructor, java.util.List, boolean, org.jetbrains.kotlin.types.checker.KotlinTypeRefiner, int, java.lang.Object)'
at org.jetbrains.kotlinx.serialization.compiler.resolve.SearchUtilsKt.toSimpleType(SearchUtils.kt:120)
at org.jetbrains.kotlinx.serialization.compiler.resolve.KSerializerDescriptorResolver.createLoadConstructorDescriptor(KSerializerDescriptorResolver.kt:342)
at org.jetbrains.kotlinx.serialization.compiler.extensions.SerializationResolveExtension.generateSyntheticSecondaryConstructors(SerializationResolveExtension.kt:96)
at org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension$Companion$getInstance$1.generateSyntheticSecondaryConstructors(SyntheticResolveExtension.kt:131)
... 44 more
Is there a way to downgrade my kotlin plugin to 1.6 ?napperley
06/10/2022, 2:14 AMFailed to load plugins from the default repository: Request failed with status code 403
wasyl
06/10/2022, 9:15 AMv79
06/11/2022, 1:15 PMNorbi
06/16/2022, 7:47 AMRichard Gomez
06/17/2022, 3:01 PMsmallufo
06/21/2022, 9:52 PMbeholder
06/22/2022, 9:44 AMDraget
06/22/2022, 11:35 AMFrancis Altomare
06/22/2022, 1:55 PMmbonnin
06/22/2022, 3:03 PMBig Chungus
06/22/2022, 7:17 PM./klip-sandbox
3. Open ./klip-sandbox/src/commonTest/kotlin/KlipTest.kt
4. Notice how all klip
functions are unresolved
5. (Optional) you can also comment-out included build and use version 0.4.1 from maven central.beholder
06/24/2022, 12:41 PM