适配macbook m1的idea incoming不显示待更新历史代码
作者:互联网
适配macbook m1的idea incoming不显示待更新历史代码
idea的版本信息
IntelliJ IDEA 2020.3.1 (Ultimate Edition)
Build #IU-203.6682.168, built on December 29, 2020
Runtime version: 11.0.9.1+11-b1145.63 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 11.1
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Non-Bundled Plugins: com.jetbrains.ChooseRuntime, com.vermouthx.idea, org.example.BetterIntelliJ, EclipseCodeFormatter
导致这个问题的主要原因是 idea内置的subversion插件所使用的架包是 sqlite-jdbc,而这个架包跟arm版的jdk 兼容有点问题
基于arm架构打造的idea,所使用的jdk 也已经基于arm重新编译,所以idea的反应速度才会如此的高;
发现这个问题是通过idea的调试日志
在打开的log 日志中,可以发现
2020-12-31 19:44:47,622 [ 36516] INFO - org.jetbrains.idea.svn.SvnUtil - Error opening connection
java.sql.SQLException: Error opening connection
at org.sqlite.core.CoreConnection.open(CoreConnection.java:215)
at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:25)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
at org.sqlite.JDBC.createConnection(JDBC.java:114)
at org.sqlite.JDBC.connect(JDBC.java:88)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:251)
at org.jetbrains.idea.svn.SvnUtil$SqLiteJdbcWorkingCopyFormatOperation.execute(SvnUtil.java:787)
at org.jetbrains.idea.svn.SvnUtil$SqLiteJdbcWorkingCopyFormatOperation.execute(SvnUtil.java:763)
at com.intellij.openapi.util.io.FileUtilRt.doIOOperation(FileUtilRt.java:991)
at org.jetbrains.idea.svn.SvnUtil.getFormat(SvnUtil.java:333)
at org.jetbrains.idea.svn.SvnUtil.getWorkingCopyRoot(SvnUtil.java:552)
at org.jetbrains.idea.svn.SvnFormatSelector.findRootAndGetFormat(SvnFormatSelector.java:26)
at org.jetbrains.idea.svn.SvnVcs.getWorkingCopyFormat(SvnVcs.java:524)
at org.jetbrains.idea.svn.SvnVcs.getWorkingCopyFormat(SvnVcs.java:512)
at org.jetbrains.idea.svn.SvnChangeProviderContext.processStatus(SvnChangeProviderContext.java:187)
at org.jetbrains.idea.svn.SvnChangeProviderContext.processStatusFirstPass(SvnChangeProviderContext.java:181)
at org.jetbrains.idea.svn.SvnChangeProviderContext.process(SvnChangeProviderContext.java:65)
at jdk.internal.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:123)
at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:86)
at com.sun.proxy.$Proxy132.process(Unknown Source)
at org.jetbrains.idea.svn.SvnRecursiveStatusWalker$MyHandler.consume(SvnRecursiveStatusWalker.java:274)
at org.jetbrains.idea.svn.SvnRecursiveStatusWalker$MyHandler.consume(SvnRecursiveStatusWalker.java:199)
at org.jetbrains.idea.svn.status.CmdStatusClientKt$parseResult$1.invoke(CmdStatusClient.kt:72)
at org.jetbrains.idea.svn.status.CmdStatusClientKt.parseResult(CmdStatusClient.kt:86)
at org.jetbrains.idea.svn.status.CmdStatusClientKt.access$parseResult(CmdStatusClient.kt:1)
at org.jetbrains.idea.svn.status.CmdStatusClient.parseResult(CmdStatusClient.kt:126)
at org.jetbrains.idea.svn.status.CmdStatusClient.doStatus(CmdStatusClient.kt:110)
at org.jetbrains.idea.svn.SvnRecursiveStatusWalker.processDirectory(SvnRecursiveStatusWalker.java:83)
at org.jetbrains.idea.svn.SvnRecursiveStatusWalker.go(SvnRecursiveStatusWalker.java:67)
at org.jetbrains.idea.svn.SvnChangeProvider.getChanges(SvnChangeProvider.java:71)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.actualUpdate(ChangeListManagerImpl.java:685)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.iterateScopes(ChangeListManagerImpl.java:603)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$11(ChangeListManagerImpl.java:508)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.lambda$updateImmediately$14(ChangeListManagerImpl.java:507)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.lambda$runUnderDisposeAwareIndicator$11(BackgroundTaskUtil.java:231)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:254)
at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:230)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.updateImmediately(ChangeListManagerImpl.java:462)
at com.intellij.openapi.vcs.changes.UpdateRequestsQueue$MyRunnable.run(UpdateRequestsQueue.java:219)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl$MyLoggingRunnable.run(ChangeListManagerImpl.java:1675)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:208)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.Exception: No native library is found for os.name=Mac and os.arch=aarch64. path=/org/sqlite/native/Mac/aarch64
at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:333)
at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:64)
at org.sqlite.core.NativeDB.load(NativeDB.java:56)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:211)
... 68 more
SQLiteJDBCLoader 在做初始化的时候有问题
然后我本人在本地使用3.20的架包做初始化:
jdk依旧使用的X64架构的 Oracle jdk
并没有发现任何问题,但是我突然想到现在有基于arm新编译的jdk ,于是我去找了zulu jdk 再次做了测试,然后跟idea调试日志一样的报错就出现了(因为本人的bug已经解决,没再出现这个问题,有点奇怪。。。)
然后我就感觉是 jdk 跟 sqlite 之间的问题,jdk 没办法改,sqlite可以啊,我直接去找了GitHub上面的,发现开发者已经针对MacBook arm架构发布了新的版本 3.32.3.3
https://repo1.maven.org/maven2/org/xerial/sqlite-jdbc/3.32.3.3/
于是我去下载了这个版本,把它放在
目录下,并删除旧的3.21版本的sqlite-jdbc 架包,然后还去
里面做了替换,做完这一切,
incoming is OK!!
最后,我去官网的bug反馈里发现了。。。
https://youtrack.jetbrains.com/issue/IDEA-257549
这篇文章,一种植物。。。那没事了
遇到这个bug的可以直接按照上面文章的方法去解决,应该也是可以的,我的方法只是我研究出来的,比官方的麻烦了点
最后:这个bug从这个版本的idea一经发布就一直在困扰着我,尝试了各种手段都没能解决,算是记录一下自己解决问题的经过吧,如果一开始坚持去解决,不使用eclipse作为替换,或许能早点解决掉,说明 程序员,永远不能像bug低头!
最最后: 能不用eclipse就别用,是真的慢,arm版的idea,如丝般顺滑,吊锤我的eclipse(ps. eclipse 我用的版本没有适配arm,我也没去官网看有没有适配,如果适配了,请无视我的经验之谈)。
最最最后:第一次写博客,排版问题见谅
解决了bug,舒服了
标签:incoming,intellij,java,适配,idea,org,com,jetbrains 来源: https://blog.csdn.net/YouAreTwoGoods/article/details/112257277