Tung97 Hl
07/19/2023, 3:09 AMFAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':kotlin-stdlib:compileKotlin'.
> Requesting vendor list failed: {"message":"Internal Server Error","_links":{"self":{"href":"/disco/v3.0/packages?jdk_version=6&distro=mandrel&operating_system=macos&latest=available&directly_downloadable=true","templated":false}},"_embedded":{"errors":[{"message":"Internal Server Error: Please provide a valid jdkVersion"}]}}
Ahmed Elshaer
07/19/2023, 11:27 PMscaventz
08/24/2023, 8:33 AMIaroslav Postovalov
08/25/2023, 1:41 PMCatherine
08/25/2023, 1:43 PMDrIgor
08/29/2023, 9:06 PMprepare/ide-plugin-dependencies/
folder but I don't know how to use them in the plugin. I tried publish
and publishToMavenLocal
tasks, but it seems that they don't publish kotlin-*-for-ide
jars to the repo.
I also found plugins/kotlin/util/project-model-updater
script which updates the plugin dependencies but it still need them to published.
Thank youViorel Ștefan Alexandrescu
09/26/2023, 1:57 PMNiklas Konstenius
10/30/2023, 4:06 PMPair
and Triple
for transforming the individual components using a mapping function. This will make the two types more ergonomic to use in a functional programming context. I opened an issue on this here but it seems that there already existed a similar issue.
I'm thinking something like this:
val x = Pair(1,"Hello")
val y = x.mapSecond { it.length }
println(y) // prints (1, 5)
The new extension function is mapSecond
. And there will be a `mapFirst`for Pair also. For Triple I'll add mapFirst
, mapSecond
and mapThird
.
Does this seem like a good idea? What are the chances that a PR will be merged?Nathan Fallet
11/18/2023, 12:06 PMCLOVIS
12/06/2023, 6:34 PMFAILURE: Build failed with an exception.
* What went wrong:
When using exclusive repository content in 'settings.pluginManagement.repositories', you cannot add repositories to 'buildscript.repositories'.
For more information, please refer to <https://docs.gradle.org/8.2.1/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository> in the Gradle documentation.
Is this known? I don't see anything related in the contribution guidePim
12/21/2023, 8:18 PMopenjdk 17.0.9
and set kotlin.build.isObsoleteJdkOverrideEnabled=true
in my local.properties
.
I tried running one of the important gradle tasks as follow: ./gradlew -Porg.gradle.java.installations.auto-detect=false compilerTest
this fails with reason:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':kotlin-stdlib-jdk8:compileModuleTestKotlin'.
> Inconsistent JVM-target compatibility detected for tasks 'compileModuleTestJava' (9) and 'compileModuleTestKotlin' (11).
I am not sure what's going wrong as I have not made any changes to the repo, and I followed the steps from the README. Could someone perhaps help me out?
Thanks!Girish Garg
01/21/2024, 12:14 PMDaniel Karnaukh
01/22/2024, 10:10 PM(mutable)setOf
using reified genericsto account for enum sets, which are faster than your average HashSet
for enums. However, (mutable)setOf
stipulates that the returned set maintains insertion order, so I quickly wrote up a LinkedEnumSet
and benchmarked it:
BenchEnum.addEnum avgt 25 1.643 ± 0.135 ns/op
BenchEnum.addEnumSet avgt 25 1.475 ± 0.050 ns/op
BenchEnum.addMutableSet avgt 25 10.844 ± 0.687 ns/op
BenchEnum.containsEnum avgt 25 1.354 ± 0.015 ns/op
BenchEnum.containsEnumSet avgt 25 1.260 ± 0.044 ns/op
BenchEnum.containsMutableSet avgt 25 2.800 ± 0.348 ns/op
BenchEnum.iterateEnum avgt 25 27.879 ± 0.350 ns/op
BenchEnum.iterateEnumSet avgt 25 10.458 ± 0.105 ns/op
BenchEnum.iterateMutableSet avgt 25 9.721 ± 0.097 ns/op
BenchEnum.removeEnum avgt 25 1.573 ± 0.140 ns/op
BenchEnum.removeEnumSet avgt 25 1.442 ± 0.091 ns/op
BenchEnum.removeMutableSet avgt 25 3.367 ± 0.803 ns/op
In here, *Enum
is the LinkedEnumSet
, *EnumSet
is the java.util.EnumSet
, and *MutableSet
is the set returned by toMutableSet
. As you can see, LinkedEnumSet
is significantly faster than MutableSet
except in the case of iteration, which I have no idea why. Does my idea to specialize (mutable)setOf
(and the (mutable)mapOf
possibly too) have any merit? Benchmark source can be found here.Anton Saatze
02/01/2024, 9:58 AMlinux_riscv
as native target
✅ Added cross-compile-toolchain (but not generated with the kotlin-native/tools/toolchain_builder/ utils. Its pretty outdated and I could not make it work within a few days, which I set as time constraint to test that)
✅ Compiled the Runtime for RiscV target + compiled stdlib for RiscV target
✅ Compiled a Hello World application as executable and executed it on Qemu
☑️ But, I had to increase the Linker version, since all dependencies were build with the ‘relaxation’ feature, which is not supported by the current Linker (ld.lld 11.1.0)
➡️ Therefore I built a newer version of the LLVM Backend and used its Linker which resulted in a working Hello World Executable for RiscV
👨💻 Currently I am working on writing the thesis
• basics
• important concepts
• rough explanation how Kotlin/Native compiler works
• what changes I had to apply
• which challenges occurred
• …
and I am still
• experimenting with compile flags
• trying to use no relaxation for the entire build to avoid updating the Linker
• trying to upgrade the llvm backend so that the linker does not have to be increased individually
• testing if all expected stdlib functions are working
• …
For my final Contribution PR I will have to get in contact with the Jetbrains Kotlin Team how a newer Linker can be provided (independent of entire LLVM-Dependency) and how the Cross-compile-toolchain can be provided.baxter
04/17/2024, 4:33 AMkotlin-kapt
plugin is in maintenance mode, but there is a pretty severe file leak within the Kapt.kt
file here. I found this occurring within the Gradle daemon each time that an app build occurred in an Android project. To emphasize the severity, assembling the APK in an Android Gradle build with a single project easily leads to 800+ open file descriptors in the Gradle daemon, with more files being opened in subsequent runs of assemble
. In a real world case with a Gradle build that contains >5k projects, this leaves at least 3.5k open file descriptors (there are more, but that was the largest grouping of open files with a similar stack trace).
I've reported the issue here: https://youtrack.jetbrains.com/issue/KT-67495/File-leak-in-when-building-with-kapt
And a PR for the fix here: https://github.com/JetBrains/kotlin/pull/5290Felice Simone
04/18/2024, 4:35 PMDaniel Santos
06/06/2024, 4:17 PMeladkay
06/17/2024, 9:09 AMscaventz
06/18/2024, 8:04 AMkotlin-native
, and I just opened KlibToolLogger.kt
resides in kotlin-native/klib/src/org/jetbrains/kotlin/cli/klib/
and I noticed that there is no code inspection support or syntax error reporting in IDE. Is this intentional or have I not configured it correctly?Joost Klitsie
06/28/2024, 10:28 AMfun fetchDataForLoggedInUser(): Result<String> = fetchLoggedInUserUseCase.run()
.flatMap { user -> fetchDataForUserUseCase.run(user) }
I of course made my own extension function (in the comment), but would you people agree that it would be a nice thing to add to the standard library as well?Ivet
08/07/2024, 9:39 AMAnton Saatze
09/16/2024, 12:14 PMkaeawc
09/18/2024, 11:04 AMIf nothing is specified, the Kotlin daemon inherits arguments from the Gradle daemon. For example, in thefile:gradle.properties
2. Kotlin daemon's behavior with JVM argumentsCopy codeorg.gradle.jvmargs=-Xmx1500m -Xms500m
If the🧵 for more detailsargument is not specified, the Kotlin daemon will inherit it from the Gradle daemon.Xmx
beatbrot
10/30/2024, 12:53 PMbaxter
10/31/2024, 10:32 PMkralli
02/12/2025, 7:08 PMefemoney
04/14/2025, 4:51 PMAbstractLongTimeSource
(https://github.com/JetBrains/kotlin/blob/c56893d9c2c9be51df78acf98e6b6984b10407c5/libraries/stdlib/src/kotlin/time/TimeSources.kt#L28) & AbstractDoubleTimeSource
be able to provide TimeMark
s for _reading_s done outside of the time source.
This is useful if you already have some readings you want to convert into time marks to be able to easily do duration calculations or interface with some other system that did those readings already.
For example
object UptimeMillisSource : AbstractLongTimeSource {
override fun read() = SystemClock.uptimeMillis()
}
If I already have readings of SystemClock.uptimeMillis()
from another system, I should be able to call:
UptimeMillisSource.[ timeMarkOf | readingOf | readingToTimeMark | convert ](some: Long): TimeMark
Any thoughts or I go ahead & submit a PR?ankur samarya
04/18/2025, 7:15 PMRuslan Sakevych
05/01/2025, 10:53 PM.zip
function that errors if collection sizes differ (we call it .zipSameSize
in our codebase @ Google) for some time now. It seems to be useful from the readability point of view. Most of the time ppl seem to zip equally sized collections and it would be erroneous situation if it was not the case, hence throw an exception. How do I go about trying to contribute this to the standard library?