This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-06
Channels
- # aleph (43)
- # announcements (11)
- # babashka (35)
- # beginners (70)
- # calva (4)
- # cider (8)
- # clerk (15)
- # clojure (192)
- # clojure-dev (7)
- # clojure-europe (44)
- # clojure-nl (2)
- # clojure-norway (65)
- # clojure-uk (4)
- # code-reviews (4)
- # conjure (1)
- # cursive (41)
- # data-science (1)
- # datomic (8)
- # emacs (7)
- # fulcro (13)
- # humbleui (17)
- # hyperfiddle (53)
- # kaocha (4)
- # malli (7)
- # missionary (17)
- # music (1)
- # obb (1)
- # off-topic (8)
- # polylith (1)
- # portal (3)
- # releases (11)
- # shadow-cljs (36)
- # squint (4)
- # tools-deps (4)
Q: REPL commands w/ keybindings are great but some of my project specific commands are intermittently available. what is the criteria for when they are available?
at least a thing that can contribute to command availability:
> Commands using substitutions will only be available when the substitutions they require are valid, for example a REPL command with ~selection
in its text will not be available if there is no current selection.
interesting. mine are forms that invoke thunks user.clj which are always available because I invoke them manually when the commands are flakey/missing
hmm. not available less than 30 mins later. @U0567Q30W any guesses why this feature would suffer from cache problems or anything else?
No, I’m not sure. Can you send a screenshot of one of the problematic ones? By DM if you prefer.
the global cmd is always available but project specific cmds are present only after cache invalidate for a little while
Hmm, I can’t see anything, sorry. I’ll have to add some debug log to see what’s going on there.
I’ll make some time tomorrow to get some logging in there and send you a dev build
@U0567Q30W can we resume looking into this? Having commands available would save me some finger pain these days
more context: I have 2 fns in a “repl” ns that I want to invoke as project specific commands. they are configured identically but only one of them appears in the commands popup
One problem I often run into is that Cursive gets a bit overeager which files it wants to sync when doing "sync files in REPL". Is there any way to reset what it is trying to sync? Reconnecting the REPL doesn't help.
The problem being that for example I made a quick change to a file meant for a browser build, but then go back to working in my node repl. If I now hit sync it tries to load the browser file, which fails because it accesses browser things. Problem is that even if I hit sync again it tries to load that file again.
Or working on a CLJ file which then still ends up as
Loading src/main/shadow/grove/components.clj...
------ REPL Error while processing ---------------------------------------------
(cljs.core/load-file "C:/Users/thheller/code/shadow-grove/src/main/shadow/grove/components.clj")
can only load .cljs and .cljc files
Reconnecting the REPL doesn't help, as soon as I press sync it just tries to sync all previous files again
restarting idea works, but thats kind of annoying. maybe there is a keybind or something I can use to just reset what it is trying to load? or maybe send something like :cursive/reset-sync-files
or so to the REPL?
also getting this popup often when syncing files. sync itself even goes through, so no clue what this is about
Hmm, I see, yes syncing when you’re switching REPLs probably won’t work well. I’m going to have to re-think how that works. Resetting the sync is a good idea, but I think it should be automatically reset on new REPL starts anyway, that causes unnecessary ns loads even when just using a single CLJ REPL.
If you use Load File in REPL rather than sync, that should only load the file you’re dealing with and its dependents if modified.
Sync is always going to be tricky with multiple REPLs. I can (and will) fairly easily stop it trying to load CLJS files in a CLJ REPL. But I’m not sure how to choose which REPL a file should go (or not go) to when you have multiple CLJS ones (e.g. browser and node).
ah yes, that was some output dir of a :local/root
dep that wasn't excluded. it wasn't on the classpath though, so not sure why cursive even looked at that.
I'd be fine with manually resetting the sync files, or them being reset when connecting. just something better than having to restart intellij
hello, one feedback about an update that happened when creating new namespaces, in the past, when I started from a package, I could just type the namespace and it would create at that level, but there was a change that now the full namespace shows up in the input, and it comes fully selected when the dialog opens:
its a bit a nitpick, but since I have created the wrong namespace so many times, because before I could just type it, now I have to first press the right arrow to remove the selection, otherwise my namespace goes to root
would be possible to keep the cursor at the end instead of selecting the whole text when this dialog for new namespace opens?
Yeah, I am constantly deleting the ns that I just created because it put it in the wrong place compared to what I am used to.
cross-ref previous feedback about same issue: https://clojurians.slack.com/archives/C0744GXCJ/p1702395882706489
Yes, this is annoying. Unfortunately there’s no way to fix it without duplicating a bunch of platform code, but I think I’m going to have to do that.
I’ve accidentally deleted the selected text so many times!