This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-22
Channels
- # announcements (3)
- # beginners (22)
- # braveandtrue (6)
- # calva (2)
- # cider (85)
- # cljdoc (1)
- # cljs-dev (21)
- # cljsrn (2)
- # clojure (70)
- # clojure-italy (9)
- # clojure-spec (1)
- # clojure-uk (144)
- # clojure-ukraine (6)
- # clojurescript (109)
- # cursive (59)
- # data-science (15)
- # datomic (40)
- # emacs (8)
- # fulcro (64)
- # funcool (8)
- # graphql (8)
- # hispano (3)
- # hoplon (7)
- # jobs-discuss (29)
- # leiningen (3)
- # luminus (2)
- # off-topic (13)
- # onyx (9)
- # parinfer (49)
- # pedestal (2)
- # portkey (8)
- # re-frame (10)
- # reagent (33)
- # reitit (13)
- # ring (2)
- # ring-swagger (16)
- # shadow-cljs (193)
- # spacemacs (1)
- # sql (19)
- # tools-deps (19)
@cfleming how does one add a module to the scope of the current REPL? I could have sworn I figured out how to do this, but no longer …
@hagmonk The scope of the current REPL is basically a module. So as long as the REPL’s module depends on the new one, it should be automatically in scope. You’ll have to restart the REPL after adding it, though.
Hmm, that’s definitely the case already. I can eval expressions just fine, but Load file in REPL
keeps complaining that the file isn’t in the right scope …
So this works weirdly in deps because of how the propagation works - it doesn’t actually use a module dependency but creates a library with the source roots from the other module and depends on that instead. I wonder if that is breaking things.
So you have modules A and B, A depends on B using :local/root
and you can’t load files from B into a REPL run using A?
Yeah confirmed, I required a B namespace in A’s core.clj. Loaded A’s core.clj just fine. I jumped to definition of B’s ns from A’s core.clj, taking me to B’s core.clj. Tried to load file into REPL and it claimed B’s core.clj wasn’t in scope
@cfleming aww that’s a pain. My first thought though was: can it not just pick the last active REPL and send the file there? But then I wondered about the semantics of multiple REPLs, and worse, multiple REPLs who share a common dependency … I think the hallucinations are starting again …
Yeah, it’s a bit tricky - this feature was basically to prevent confusion when users have multiple REPLs open.
But it’s not impossible to solve, I just have to figure out how to bend IntelliJ to my will.
Hmm random question - is there an equivalent of CIDER’s command to evaluate the expression in the REPL and put the results in the current buffer? I find myself using that quite a bit when writing tests, missing it now that I’m back in Cursive full time
@hagmonk So not at the moment. The problem is that you get a combinatorial explosion of “Evaluate top form/form before point/selected form and then output it/add it as a comment/replace the original with it” etc. I have a plan to extend REPL commands to allow these sorts of combinations to be created.
Another workaround solution (also useful for other things) would be a “Copy last command output” action which you could then paste.
hello all, is there any way to step/debug withing records? for some reason my breakpoint is marked as invalid when putting it in a record code
I'm running Cursive on Windows, but most of my CLI environment runs in WSL. Any thoughts on making this work short of a Windows version of clj
?
I have this setup; I share my project directories between Windows and WSL without any trouble. I think I end up with two maven repos, but ¯\(ツ)/¯
just remember to set git's core.autocrlf
to input
- you never really want CRLF anywhere
Oh I also have to set my env vars twice, but I actually never run REPLs from the WSL environment because the cursive one is so much better
Thanks, I forgot to mention I was referring to the deps.edn support. Does that work for you? I have the setup you describe, and it does work great except for deps.edn.
^^^Should have mentioned I was referring to deps.edn support.
so I am configuring a shadow-cljs
with shadow
and I go to Run conf
is this running a shadow-cljs
watch build or just a normal nrepl
build?
(I guess the latter)
and is there a way to launch a deps.edn
repl with the new Cursive?
I see a Clojure Deps
configuration
and I still see I need project.clj
with lein-tools-deps
in there or the deps are not actually resolved
@joelmarty2 Unfortunately that doesn’t work because of the way Clojure generates its classnames. I have a plan to fix it but haven’t managed to yet.
@dave.dixon I’m hoping you should be able to make this work. Here’s the plan:
1. Settings->Build, E, D->Build Tools->Clojure Deps->Global settings->Use tools.deps directly and pick a version.
2. In that same config, point Cursive to your user deps.edn. Cursive should only need to read it so I think you could put it under WSL, otherwise put it in Windows somewhere and point your WSL version to it using CLJ_CONFIG
.
Cursive should now work with tools.deps, and hopefully they can interoperate ok. You may end up with two maven caches, or it may be possible to tell the WSL CLI to use your Windows one.
@richiardiandrea There isn’t yet, no, but it mostly works. The case that doesn’t work yet is if you want to use different aliases to run your REPL than you want to use to sync the project to Cursive.
But you don’t need a project.clj
now, as long as you’re running the EAP - some very brief instructions are here: https://groups.google.com/d/msg/cursive/NQIJzhGjfEY/hdNXUco8CgAJ
If you want to use an alias with :main-opts
, you can work around that by manually entering “JVM Args” in the REPL run config.
oh ok cool then, I will be trying this
thank you for now, will ask if something does not work 😄
@cfleming ups, I receive: Could not initialize class com.intellij.externalSystem.JavaProjectData
oh looks like it is not finding the executable
uhm no, still not really working...
Can't find bundle for base name messages.JavaCoreBundle, locale en_CA
will open an issue
@cfleming Works! Thank you!