cursive

onetom 2025-12-23T05:03:55.237929Z

i keep having resolution misses more and more often. like in this case invoking the Go to Declaration or Usages action on the mk fn, i get that error in the pop-over ballon, BUT if i do the same on the fake-fs namespace part of the same symbol, then it does find the correct ns and i don't autocompletion candidates either, after typing fake-fs/. because of that, i had to manually add the (:require [ginoco.jimfs :as fake-fs]) to the ns form. im trying this from a file which is ignored by .gitignore, but other functions from the same file are navigable...

onetom 2025-12-23T05:04:18.292229Z

the fake fs ns is just this:

(ns ginoco.jimfs
  (:require
    [gini.common :refer :all])
  (:import
    (com.google.common.jimfs Configuration Jimfs)
    (java.nio.file FileSystem)))

(defn unix-config []
  (-> (Configuration/unix)
      ; Prevent creating a "/work" directory
      .toBuilder (.setWorkingDirectory "/") .build))

(defn mk
  "Create a new in-memory file system"
  (^FileSystem [] (mk (unix-config)))
  (^FileSystem [^Configuration fs-config]
   (Jimfs/newFileSystem fs-config)))
and it loads just fine.

onetom 2025-12-23T05:06:01.822919Z

from the definition of fake-fs/mk i can navigate to other usages too, except to the one in this file in question.

onetom 2025-12-23T05:11:27.574609Z

the problematic file is and the jimfs one are in these folders: • api2/dev/repl/tamas.cljapi2/test/ginoco/jimfs.clj and the deps.edn aliases corresponding to the dev/ & test/ folders are enabled in the Clojure Deps tool window, of course, otherwise other functions in repl.tamas wouldn't be navigable either.

cfleming 2025-12-23T20:31:24.962369Z

Hmm, that's very strange, I'm not sure what might cause that. I'll see if I can reproduce that.

onetom 2025-12-23T12:29:04.730279Z

if i try to load a namespace, while cursive's REPL hasn't fully started yet, im getting an error about completions

onetom 2025-12-23T12:29:24.342509Z

this is the output as text

Loading test/ginoco/journey_test.clj... nREPL server started on port 60903 on host localhost - 
done
Executing 'ginoco Kaocha - run tests'
Error updating completions:
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:445).
cursive.repl.runtime
...
<tests run successfully>
...
PENDING ginoco.journey_test$sign_up_test.invoke (/Users/onetom/VM/ginoco/api2/test/ginoco/journey_test.clj:283)
"Elapsed time: 19341.17675 msecs"
=> #:kaocha.result {:count 541, :pass 2118, :error 0, :fail 0, :pending 9}
Error updating completions:
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:445).
cursive.repl.runtime
Clojure 1.11.4

onetom 2025-12-23T12:30:52.983569Z

so it seems that NS loading operations are queued even before a local repl api has started, but they are fired off a bit too early, interfering with nREPL completion messages?

onetom 2025-12-23T12:40:00.765399Z

i do have the following in my nrepl.edn:

{:middleware
 [cider.nrepl/cider-middleware]}
but im not sure, whether it's taken into account, when cursive starts a local repl run config.

cfleming 2025-12-23T20:32:12.264009Z

Yes, this has come up a few times, I'll add a buffer to ensure that the REPL init is finished before starting any other ops.

👍 1