Motivation to make this commit: the discussion with Tagir Valeev in
#ij-dev in Slack.
https://jetbrains.slack.com/archives/CMDBCUBGE/p1690023301163689
Tagir Valeev:
`check(lib.mkdirs()) { "Can't create $lib directory" }`
Probably removing this directory completely will help. It looks like,
the directory was not deleted (probably some files are locked for
writing). This check is somewhat erroneous, as it fails if directory was
already existing before (cc @bobko). If directory can't be removed
(probably opened by some process), but it's perfectly writable, one
should not stop the build process only due to this
Nikita Bobko:
> This check is somewhat erroneous, as it fails if directory was
> already existing before
If this check is failed then it means that
`unpackedDistDestination.deleteRecursively()` also failed. If
`unpackedDistDestination.deleteRecursively()` failed then invalid
variants of Kotlin compiler jars will be left in `kotlinc/lib`
directory. It will form the wrong Kotlin compiler classpath
So this check is actually a fail-fast strategy
What can be improved here is that
`unpackedDistDestination.deleteRecursively()` should also be asserted
to return `true`
GitOrigin-RevId: 0b4181a7813eead7ef047241c376ccb44ed4d7db
This functionality was partially disabled by KTIJ-15746 but should be re-enabled to allow generation projects with Beta/RC Kotlin versions
^KTIJ-25904 fixed
Merge-request: IJ-MR-108524
Merged-by: Frederik Haselmeier <Frederik.Haselmeier@jetbrains.com>
GitOrigin-RevId: 4f45399c51b78f109471a7abf2011c5d1836969c
The rename of the packages is needed to follow the naming convention. See the attached ticket for the details.
GitOrigin-RevId: 24b2328e572efa23d67133fc495855cf662ea795
New logic considers 'kotlin-serialization-compiler-plugin' publication', creates 'kotlinx-serialization-compiler-plugin.jar' from maven serialization plugin jar and ignores all other maven plugins.
^KT-58530 In Progress
GitOrigin-RevId: 318491418626ace0dca4f9b68193e0d3d2506ea7
Review: https://jetbrains.team/p/ij/reviews/107079
This commit fixes flaky:
java.util.concurrent.ExecutionException: java.nio.file.NoSuchFileException: /mnt/agent/temp/buildTmp/startupPerformanceTests14887929589063980070/perf-startup/cache/projects/unpacked/spring-petclinic-kotlin-master/.idea/kotlinc.xml
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$createBackgroundTask$10(BackgroundTaskUtil.java:293)
at com.intellij.openapi.util.ObjectTree.runWithTrace(ObjectTree.java:127)
at com.intellij.openapi.util.ObjectTree.executeAll(ObjectTree.java:159)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:264)
at com.intellij.openapi.util.Disposer.dispose(Disposer.java:252)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$createBackgroundTask$11(BackgroundTaskUtil.java:315)
at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:863)
at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:841)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1810)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:248)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:28)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:221)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:227)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:210)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.nio.file.NoSuchFileException: /mnt/agent/temp/buildTmp/startupPerformanceTests14887929589063980070/perf-startup/cache/projects/unpacked/spring-petclinic-kotlin-master/.idea/kotlinc.xml
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
at java.base/java.nio.file.Files.newByteChannel(Files.java:380)
at java.base/java.nio.file.Files.newByteChannel(Files.java:432)
at java.base/java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:422)
at java.base/java.nio.file.Files.newInputStream(Files.java:160)
at org.jetbrains.kotlin.idea.compiler.configuration.KotlinJpsPluginSettingsKt.fileIsNotEmpty(KotlinJpsPluginSettings.kt:271)
at org.jetbrains.kotlin.idea.compiler.configuration.KotlinJpsPluginSettings$Companion.readFromKotlincXmlOrIpr(KotlinJpsPluginSettings.kt:129)
at org.jetbrains.kotlin.idea.macros.KotlinBundledPathMacroContributor.getProjectPathMacros(KotlinBundledPathMacroContributor.kt:26)
at com.intellij.openapi.components.impl.ProjectWidePathMacroContributor.getAllMacros(ProjectWidePathMacroContributor.java:38)
at com.intellij.openapi.components.impl.ProjectPathMacroManager.getExpandMacroMap(ProjectPathMacroManager.java:49)
at com.intellij.openapi.components.PathMacroManager.expandPath(PathMacroManager.java:120)
at com.intellij.openapi.externalSystem.service.project.autoimport.ProjectAware.getSettingsFiles(ProjectAware.kt:40)
at com.intellij.openapi.externalSystem.autoimport.ProjectSettingsTracker$SettingsFilesAsyncSupplier$cachingAsyncSupplier$1.get(ProjectSettingsTracker.kt:345)
at kotlin.jvm.internal.PropertyReference0.invoke(PropertyReference0.java:35)
at com.intellij.openapi.externalSystem.autoimport.settings.AsyncSupplier$Companion$blocking$1.supply(AsyncSupplier.kt:19)
at com.intellij.openapi.externalSystem.autoimport.settings.BackgroundAsyncSupplier.supply$lambda$0(BackgroundAsyncSupplier.kt:18)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$submitTask$8(BackgroundTaskUtil.java:271)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
... 12 more
This flaky failure is reported to be observable from time to time in
ijplatform_IjPlatform231_IntegrationPerformanceTestsKotlinEAPLinux
GitOrigin-RevId: c9f96f1fd279c93cdfaba2c4121acefefc4af464
Since Kotlin 1.9.0 we started to publish unbundled compiler plugins which should end up in the 'kotlin-dist-for-ide' cache. Now logic was updated to use newly published plugins.
^KTIJ-25384
GitOrigin-RevId: a242c71a2d83fcfad8a7881fa626d792f4d2f89e
Since Kotlin 1.9.0 we started to publish unbundled compiler plugins which should end up in the 'kotlin-dist-for-ide' cache. Now logic was updated to use newly published plugins.
^KTIJ-25384
GitOrigin-RevId: 0b5fd82a4a688b7cd42f0cb048dd0cb4baa69311