Skip to content
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

Migrate to IntelliJ Platform Gradle Plugin 2 #2194

Merged
merged 19 commits into from
Sep 13, 2024

Conversation

mkondratek
Copy link
Contributor

@mkondratek mkondratek commented Sep 2, 2024

@mkondratek mkondratek self-assigned this Sep 2, 2024
@mkondratek mkondratek marked this pull request as draft September 2, 2024 17:22
@mkondratek mkondratek force-pushed the mkondratek/chore/platform-plugin-2 branch 2 times, most recently from efb7de2 to e167a9e Compare September 12, 2024 08:10
build.gradle.kts Outdated Show resolved Hide resolved
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8.10.1 is available but it causes some troubles. Let's stick with 8.10 for now (and wait for 8.10.2).

gradle/gradle#30497

sinceBuild = properties("pluginSinceBuild")
untilBuild = properties("pluginUntilBuild")
}
val customRunIde by
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need separate task?
If we can set version on runIde then we can do the same, just with fallback to platformVersion if platformRuntimeVersion is not available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sadly, it does not work yet

@mkondratek mkondratek force-pushed the mkondratek/chore/platform-plugin-2 branch from 4362fdc to a048408 Compare September 12, 2024 12:56
@mkondratek
Copy link
Contributor Author

Configuration file for j.u.l.LogManager does not exist: /Users/mkondratek/.gradle/caches/8.10/transforms/89d82208413f6e532a272dd6f85dc19a/transformed/ideaIC-2023.2-aarch64/test-log.properties
[    259]   WARN - o.j.n.NativeTrustedCertificates - Unable to get custom trusted certificates list from the operating system: 

There is an incompatible JNA native library installed on this system
Expected: 7.0.0
Found:    6.1.4
(at /Users/mkondratek/.gradle/caches/8.10/transforms/89d82208413f6e532a272dd6f85dc19a/transformed/ideaIC-2023.2-aarch64/lib/jna/aarch64/libjnidispatch.jnilib).
To resolve this issue you may do one of the following:
 - remove or uninstall the offending library
 - set the system property jna.nosys=true
 - set jna.boot.library.path to include the path to the version of the 
   jnidispatch library included with the JNA jar file you are using

java.lang.Error: 

There is an incompatible JNA native library installed on this system
Expected: 7.0.0
Found:    6.1.4
(at /Users/mkondratek/.gradle/caches/8.10/transforms/89d82208413f6e532a272dd6f85dc19a/transformed/ideaIC-2023.2-aarch64/lib/jna/aarch64/libjnidispatch.jnilib).
To resolve this issue you may do one of the following:
 - remove or uninstall the offending library
 - set the system property jna.nosys=true
 - set jna.boot.library.path to include the path to the version of the 
   jnidispatch library included with the JNA jar file you are using

	at com.sun.jna.Native.<clinit>(Native.java:230)
	at com.sun.jna.NativeLong.<clinit>(NativeLong.java:35)
	at org.jetbrains.nativecerts.NativeTrustedCertificates.getCustomOsSpecificTrustedCertificates(NativeTrustedCertificates.java:33)
	at com.intellij.util.net.ssl.OsCertificatesServiceImpl.getCustomOsSpecificTrustedCertificates(OsCertificatesServiceImpl.java:20)
	at com.intellij.util.net.ssl.ConfirmingTrustManager.getOperatingSystemTrustManager(ConfirmingTrustManager.java:93)
	at com.intellij.util.net.ssl.ConfirmingTrustManager.getSystemTrustManagers(ConfirmingTrustManager.java:60)
	at com.intellij.util.net.ssl.ConfirmingTrustManager.createForStorage(ConfirmingTrustManager.java:54)
	at com.intellij.util.net.ssl.CertificateManager$trustManager$2.invoke(CertificateManager.kt:64)
	at com.intellij.util.net.ssl.CertificateManager$trustManager$2.invoke(CertificateManager.kt:63)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.intellij.util.net.ssl.CertificateManager.getTrustManager(CertificateManager.kt:63)
	at com.intellij.util.net.ssl.CertificateManager.calcSslContext(CertificateManager.kt:285)
	at com.intellij.util.net.ssl.CertificateManager.access$calcSslContext(CertificateManager.kt:59)
	at com.intellij.util.net.ssl.CertificateManager$sslContext$2.invoke(CertificateManager.kt:83)
	at com.intellij.util.net.ssl.CertificateManager$sslContext$2.invoke(CertificateManager.kt:83)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.intellij.util.net.ssl.CertificateManager.getSslContext(CertificateManager.kt:83)
	at com.intellij.util.net.ssl.CertificateManager$1.invokeSuspend(CertificateManager.kt:92)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

[    261]   WARN - #c.i.u.n.s.ConfirmingTrustManager - Received an empty list of custom trusted root certificates from the system. Check log above for possible errors, enable debug logging in category 'org.jetbrains.nativecerts' for more information
[    692]   WARN - #c.i.j.JnaLoader - Unable to load JNA library (os=Mac OS X 14.5, jna.boot.library.path=/Users/mkondratek/.gradle/caches/8.10/transforms/89d82208413f6e532a272dd6f85dc19a/transformed/ideaIC-2023.2-aarch64/lib/jna/aarch64)
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
	at com.intellij.jna.JnaLoader.load(JnaLoader.java:19)
	at com.intellij.jna.JnaLoader.isLoaded(JnaLoader.java:35)
	at com.intellij.openapi.util.io.FileSystemUtil.readCaseSensitivityByNativeAPI(FileSystemUtil.java:390)
	at com.intellij.openapi.util.io.FileSystemUtil.readParentCaseSensitivity(FileSystemUtil.java:308)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.generateCaseSensitivityChangedEventForUnknownCase(VirtualDirectoryImpl.java:893)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.updateCaseSensitivityIfUnknown(VirtualDirectoryImpl.java:313)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:82)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.refreshAndFindChild(VirtualDirectoryImpl.java:349)
	at com.intellij.openapi.vfs.newvfs.VfsImplUtil.refreshAndFindFileByPath(VfsImplUtil.java:117)
	at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.refreshAndFindFileByPath(LocalFileSystemBase.java:132)
	at com.intellij.testFramework.HeavyPlatformTestCase.synchronizeTempDirVfs(HeavyPlatformTestCase.java:165)
	at com.intellij.testFramework.LightPlatformTestCase.initProject(LightPlatformTestCase.java:180)
	at com.intellij.testFramework.LightPlatformTestCase.lambda$doSetup$3(LightPlatformTestCase.java:261)
	at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:458)
	at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:490)
	at com.intellij.testFramework.LightPlatformTestCase.doSetup(LightPlatformTestCase.java:252)
	at com.intellij.testFramework.fixtures.impl.LightIdeaTestFixtureImpl.setUp(LightIdeaTestFixtureImpl.java:41)
	at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.lambda$setUp$38(CodeInsightTestFixtureImpl.java:1336)
	at com.intellij.testFramework.EdtTestUtil.runInEdtAndWait(EdtTestUtil.java:33)
	at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1335)
	at com.intellij.testFramework.fixtures.BasePlatformTestCase.setUp(BasePlatformTestCase.java:48)
	at com.sourcegraph.cody.agent.protocol.PositionTest.setUp(PositionTest.kt:22)
	at com.intellij.testFramework.UsefulTestCase.invokeSetUp(UsefulTestCase.java:426)
	at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:418)
	at com.intellij.testFramework.UsefulTestCase.lambda$runBare$12(UsefulTestCase.java:487)
	at com.intellij.testFramework.EdtTestUtil.lambda$runInEdtAndWait$1(EdtTestUtil.java:40)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:789)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:759)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:322)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.Error: 

There is an incompatible JNA native library installed on this system
Expected: 7.0.0
Found:    6.1.4
(at /Users/mkondratek/.gradle/caches/8.10/transforms/89d82208413f6e532a272dd6f85dc19a/transformed/ideaIC-2023.2-aarch64/lib/jna/aarch64/libjnidispatch.jnilib).
To resolve this issue you may do one of the following:
 - remove or uninstall the offending library
 - set the system property jna.nosys=true
 - set jna.boot.library.path to include the path to the version of the 
   jnidispatch library included with the JNA jar file you are using
 [in thread "DefaultDispatcher-worker-9 @com.intellij.openapi.application.impl.ApplicationImpl#52"]
	at com.sun.jna.Native.<clinit>(Native.java:230)
	at com.sun.jna.NativeLong.<clinit>(NativeLong.java:35)
	at org.jetbrains.nativecerts.NativeTrustedCertificates.getCustomOsSpecificTrustedCertificates(NativeTrustedCertificates.java:33)
	at com.intellij.util.net.ssl.OsCertificatesServiceImpl.getCustomOsSpecificTrustedCertificates(OsCertificatesServiceImpl.java:20)
	at com.intellij.util.net.ssl.ConfirmingTrustManager.getOperatingSystemTrustManager(ConfirmingTrustManager.java:93)
	at com.intellij.util.net.ssl.ConfirmingTrustManager.getSystemTrustManagers(ConfirmingTrustManager.java:60)
	at com.intellij.util.net.ssl.ConfirmingTrustManager.createForStorage(ConfirmingTrustManager.java:54)
	at com.intellij.util.net.ssl.CertificateManager$trustManager$2.invoke(CertificateManager.kt:64)
	at com.intellij.util.net.ssl.CertificateManager$trustManager$2.invoke(CertificateManager.kt:63)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.intellij.util.net.ssl.CertificateManager.getTrustManager(CertificateManager.kt:63)
	at com.intellij.util.net.ssl.CertificateManager.calcSslContext(CertificateManager.kt:285)
	at com.intellij.util.net.ssl.CertificateManager.access$calcSslContext(CertificateManager.kt:59)
	at com.intellij.util.net.ssl.CertificateManager$sslContext$2.invoke(CertificateManager.kt:83)
	at com.intellij.util.net.ssl.CertificateManager$sslContext$2.invoke(CertificateManager.kt:83)
	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
	at com.intellij.util.net.ssl.CertificateManager.getSslContext(CertificateManager.kt:83)
	at com.intellij.util.net.ssl.CertificateManager$1.invokeSuspend(CertificateManager.kt:92)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

JNA library is not available
java.lang.AssertionError: JNA library is not available
	at com.intellij.ui.mac.foundation.Foundation.<clinit>(Foundation.java:30)
	at com.intellij.ui.mac.foundation.Foundation$NSAutoreleasePool.<init>(Foundation.java:480)
	at com.intellij.ui.components.MacScrollBarUI.callMac(MacScrollBarUI.java:181)
	at com.intellij.ui.components.MacScrollBarUI$Native.<init>(MacScrollBarUI.java:281)
	at com.intellij.ui.components.MacScrollBarUI$Style$1.<init>(MacScrollBarUI.java:232)
	at com.intellij.ui.components.MacScrollBarUI$Style.<clinit>(MacScrollBarUI.java:232)
	at com.intellij.ui.components.MacScrollBarUI.installUI(MacScrollBarUI.java:86)
	at java.desktop/javax.swing.JComponent.setUI(JComponent.java:733)
	at java.desktop/javax.swing.JScrollBar.setUI(JScrollBar.java:218)
	at com.intellij.openapi.editor.impl.EditorImpl$MyScrollBar.setUI(EditorImpl.java:3187)
	at com.intellij.ui.components.JBScrollBar.updateUI(JBScrollBar.java:87)
	at java.desktop/javax.swing.JScrollBar.<init>(JScrollBar.java:173)
	at com.intellij.ui.components.JBScrollBar.<init>(JBScrollBar.java:65)
	at com.intellij.ui.components.JBScrollBar.<init>(JBScrollBar.java:61)
	at com.intellij.openapi.editor.impl.EditorImpl$OpaqueAwareScrollBar.<init>(EditorImpl.java:3143)
	at com.intellij.openapi.editor.impl.EditorImpl$MyScrollBar.<init>(EditorImpl.java:3176)
	at com.intellij.openapi.editor.impl.EditorImpl$MyScrollPane.createVerticalScrollBar(EditorImpl.java:5266)
	at java.desktop/javax.swing.JScrollPane.<init>(JScrollPane.java:301)
	at java.desktop/javax.swing.JScrollPane.<init>(JScrollPane.java:353)
	at com.intellij.ui.components.JBScrollPane.<init>(JBScrollPane.java:83)
	at com.intellij.openapi.editor.impl.EditorImpl$MyScrollPane.<init>(EditorImpl.java:5203)
	at com.intellij.openapi.editor.impl.EditorImpl.<init>(EditorImpl.java:368)
	at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:210)
	at com.intellij.openapi.editor.impl.EditorFactoryImpl.createEditor(EditorFactoryImpl.java:165)
	at com.intellij.openapi.fileEditor.impl.TestEditorManagerImpl.doOpenTextEditor(TestEditorManagerImpl.kt:456)
	at com.intellij.openapi.fileEditor.impl.TestEditorManagerImpl.openFileImpl3(TestEditorManagerImpl.kt:147)
	at com.intellij.openapi.fileEditor.impl.TestEditorManagerImpl.openFileInCommand$lambda$6(TestEditorManagerImpl.kt:436)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
	at com.intellij.openapi.fileEditor.impl.TestEditorManagerImpl.openFileInCommand(TestEditorManagerImpl.kt:435)
	at com.intellij.openapi.fileEditor.impl.TestEditorManagerImpl.openTextEditor(TestEditorManagerImpl.kt:425)
	at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.createEditor(CodeInsightTestFixtureImpl.java:1649)
	at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.openFileInEditor(CodeInsightTestFixtureImpl.java:651)
	at com.sourcegraph.cody.agent.protocol.PositionTest.setUp(PositionTest.kt:23)
	at com.intellij.testFramework.UsefulTestCase.invokeSetUp(UsefulTestCase.java:426)
	at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:418)
	at com.intellij.testFramework.UsefulTestCase.lambda$runBare$12(UsefulTestCase.java:487)
	at com.intellij.testFramework.EdtTestUtil.lambda$runInEdtAndWait$1(EdtTestUtil.java:40)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:308)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:789)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:740)
	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:734)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:759)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:322)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Locally I see this error for some tests.

@mkondratek mkondratek marked this pull request as ready for review September 12, 2024 14:14
@mkondratek mkondratek marked this pull request as draft September 12, 2024 14:14
@mkondratek mkondratek force-pushed the mkondratek/chore/platform-plugin-2 branch from 26cfbd9 to 5d77cae Compare September 12, 2024 14:54
@mkondratek mkondratek force-pushed the mkondratek/chore/platform-plugin-2 branch from 5d77cae to ecc5ce6 Compare September 13, 2024 11:35
.filter(String::isNotEmpty))
instrumentationTools()
pluginVerifier()
testFramework(TestFrameworkType.Platform)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@pkukielka pkukielka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mkondratek mkondratek marked this pull request as ready for review September 13, 2024 12:54
@mkondratek mkondratek enabled auto-merge (squash) September 13, 2024 13:02
@mkondratek mkondratek merged commit cb7a8e3 into main Sep 13, 2024
6 checks passed
@mkondratek mkondratek deleted the mkondratek/chore/platform-plugin-2 branch September 13, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants