Fork me on GitHub
#cursive
<
2020-01-05
>
thosmos01:01:00

I keep getting an error when Cursive attempts to build stubs. Wondering what I can do to troubleshoot this? I’m guessing it has something to do with datomic-pro …

5:12 PM	Error generating stubs for module riverdb-graphql
				Jan 04, 2020 5:12:18 PM org.hsqldb.persist.Logger logInfoEvent
				INFO: dataFileCache open start
				Disable stub generation for module riverdb-graphql

cfleming01:01:29

Do you have anything in your log file? Do the namespaces using datomic do anything side-effecting like accessing HSQLDB?

thosmos01:01:12

I don’t use HSQLDB at all anywhere. Which log file?

cfleming01:01:34

It’s weird that this shows up: org.hsqldb.persist.Logger

cfleming01:01:51

Help | Show Log in Finder/Explorer…

thosmos01:01:28

2020-01-04 17:26:38,811 [536402385]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2020-01-04 17:26:38,837 [536402411]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 2ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:26:39,167 [536402741]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 329ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:26:39,175 [536402749]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 3 files to update 
2020-01-04 17:26:39,231 [536402805]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 56ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:26:39,263 [536402837]  ERROR - pplication.impl.LaterInvocator - null cannot be cast to non-null type com.intellij.ui.treeStructure.SimpleNode 
kotlin.TypeCastException: null cannot be cast to non-null type com.intellij.ui.treeStructure.SimpleNode
	at cursive.deps.navigator.DepsProjectStructure.update(Navigator.kt:55)
	at cursive.build.navigator.BuildSystemToolWindowFactory$scheduleStructureUpdate$1.invoke(Navigator.kt:94)
	at cursive.build.navigator.BuildSystemToolWindowFactory$scheduleStructureUpdate$1.invoke(Navigator.kt:43)
	at cursive.build.BuildSystemUtil$invokeLater$1.run(BuildSystemUtil.kt:67)
	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:309)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:441)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
	at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:908)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
2020-01-04 17:26:39,263 [536402837]  ERROR - pplication.impl.LaterInvocator - IntelliJ IDEA 2019.3.1  Build #IC-193.5662.53 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - JDK: 11.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - OS: Mac OS X 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - Plugin to blame: Cursive version: 1.9.1-eap1-2019.3 
2020-01-04 17:26:39,264 [536402838]  ERROR - pplication.impl.LaterInvocator - Last Action: EditorBackSpace 
2020-01-04 17:27:26,648 [536450222]   INFO - il.indexing.FileBasedIndexImpl - Rebuild requested for index ClojureSymbolMeta 
java.lang.Throwable
	at com.intellij.util.indexing.FileBasedIndex.requestRebuild(FileBasedIndex.java:64)
	at cursive.stubs.ReplStubsNotifications$createNotification$1$whenDone$1.run(Stubs.kt:234)
	at cursive.stubs$generate_stubs$fn__15527$process__15528.invoke(stubs.clj:293)
	at cursive.stubs$generate_stubs$fn__15527.invoke(stubs.clj:362)
	at cursive.task$backgroundable$reify__15437.run(task.clj:12)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:888)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:163)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:150)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.lambda$run$0(CoreProgressManager.java:402)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:221)
	at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:402)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:238)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	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.lang.Thread.run(Thread.java:834)
2020-01-04 17:27:26,698 [536450272]   INFO - il.indexing.FileBasedIndexImpl - scheduleIndexRebuild, reason: checkRebuild 
2020-01-04 17:27:26,723 [536450297]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 1ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:27:27,607 [536451181]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 871ms; general responsiveness: ok; EDT responsiveness: ok 
2020-01-04 17:27:27,612 [536451186]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 1164 files to update 
2020-01-04 17:27:31,837 [536455411]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 4225ms; general responsiveness: ok; EDT responsiveness: ok

cfleming01:01:42

So I’m not 100% sure, but what I think might be happening is that something the namespace is requiring is causing that logging to appear on stderr, which is weird because it doesn’t look like an error. Cursive will interpret anything coming out on stderr as an error and show that message. Do the stubs seem to generate correctly, i.e. do the symbols resolve correctly once you’ve done this despite the error?

thosmos01:01:05

datomic.api/q is resolved in the REPL (I can cmd-hover and get arg names), but not in the file editor … it’s colored as an undefined variable and does nothing when I cmd-hover

thosmos01:01:54

oh and it’s not datomic, that depends on h2, rather it’s org.geotools/gt-epsg-hsql I’ll look into updating or removing those deps

thosmos01:01:18

I think I updated those recently

thosmos01:01:39

how do I trigger stub generation without the prompt to do so?

thosmos02:01:59

I need this dep and it looks like it creates an hsql db at some point. The docs mentions that it creates the DB where temp files get created: http://docs.geotools.org/latest/userguide/library/referencing/hsql.html

thosmos02:01:46

ok so I just deleted that temp folder and when I ran the REPL that same info message showed up when it creates the database …. so yeah it has something to do with stub generation getting confused by that dep

thosmos02:01:37

is there any flexibility around telling stub generator to exclude some deps?

thosmos02:01:42

now it seems to be working, maybe I just needed to close and open after the stubs generation …

thosmos02:01:53

I’m going to ignore that stubs error

vinai10:01:08

Is there a workaround for clojure.test.check.clojure-test/defspec causing the following errors when executing “Run Tests in current NS in REPL”?

Error handling response - class java.lang.IllegalArgumentException: Argument for @NotNull parameter 'path' of com/intellij/openapi/vfs/impl/local/LocalFileSystemBase.findFileByPath must not be null
Found two github issues, but no resolution.

cfleming23:01:53

I don’t think there’s a workaround, sorry - I’ll try to look at that soon.

vinai12:01:14

Thank you, much appreciated! My workaround so far is to use clojure.test.check/quick-check in a comment in the REPL session, and run the tests with leiningen (just FYI).

wilkerlucio23:01:17

@cfleming hello, hey, I noticed something did change with the deps auto-complete in this new version, currently if I don't type the namespace of the package it tries to search for namespaces, I remember I talked about this with you before, got fixed, and now seems it got a regression, should I open an issue for it?

cfleming23:01:10

Yes please!

wilkerlucio03:01:15

strange, I was writing the issue but now it seems to work normally, maybe was a flacky one :man-shrugging:

wilkerlucio13:01:56

@cfleming actually no, I'm experiencing the problems again, I add as part of this other issue someone already created: https://github.com/cursive-ide/cursive/issues/2295