This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-14
Channels
- # announcements (2)
- # babashka (7)
- # beginners (20)
- # calva (2)
- # clj-kondo (7)
- # clojure (31)
- # clojure-australia (3)
- # clojure-dev (10)
- # clojure-europe (7)
- # clojurescript (13)
- # conjure (1)
- # cursive (27)
- # datomic (168)
- # events (3)
- # fulcro (2)
- # garden (3)
- # honeysql (2)
- # jobs (1)
- # joker (1)
- # lsp (52)
- # releases (1)
- # shadow-cljs (11)
- # slack-help (4)
- # spacemacs (22)
- # sql (1)
what has to happen for automatic require/autocomplete to work? I don't understand why it's picking up some libraries I've been using but not others
Are the maven repos indexed?
when loading a file/namespace into the repl, is there any way to make cursive reload any namespaces that require that one too?
and also cursive has the possibility under "tools -> REPL" to add a REPL command, i.e. code that gets executed in the current REPL, which you can then bind to a keyboard shortcut or add to a macro
You can also use Tools | REPL | Sync files in REPL, as recently discussed: https://clojurians.slack.com/archives/C0744GXCJ/p1615790200178200?thread_ts=1615527556.163100&cid=C0744GXCJ
@U0567Q30W thanks - almost exactly what I wanted, but unfortunately the other way around - I want to reload namespaces that depend upon the one I’m working on - I’m working on some macro related stuff, and want the consumers of the macro to reload, so they get the new behaviour. it’s pretty dull having to go through each of the consumers and reload them..
The clojure.tools.namespace.repl/refresh
approach and the (require '[the-ns] :reload-all)
approaches both didn’t end up working out. I think the require...
approach is reloading dependencies of the namespace (..right?), so not quite right, and the namespace.repl/refresh
thing just didn’t seem to work - suspect it was a problem with retained vars in some places, but even restarting the system as part of it didn’t work.
Yeah, there are some other use cases like this too - things like updating protocols and multimethods.
As a suggestion, some kind of tree reload might be great, both backwards with dependencies, and forward with dependents.
Yeah, I can see that being useful. It would be pretty easy to accidentally reload your whole app, though, although I suppose that’s what you want if you’re changing some fundamental macro at the bottom of the pile.
Have unplugged now, but will try that later @U04V15CAJ thanks
Even a single level of dependents would be handy to reload, without traversing the whole tree..
“Reload direct dependents” would work great, the more I think about it. If I know I need to go further, navigate and execute that command iteratively is straightforward.
https://clojure.org/guides/repl/enhancing_your_repl_workflow#writing-repl-friendly-programs
There is also clojure.tools.namespace.repl/refresh-all
, which seems like what you're looking for