This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-07
Channels
- # announcements (35)
- # beginners (80)
- # boot (1)
- # calva (4)
- # cider (33)
- # cljdoc (40)
- # clojars (3)
- # clojure (95)
- # clojure-berlin (2)
- # clojure-europe (4)
- # clojure-italy (28)
- # clojure-nl (2)
- # clojure-seattle (1)
- # clojure-serbia (1)
- # clojure-spec (74)
- # clojure-uk (71)
- # clojurescript (29)
- # core-async (1)
- # cursive (80)
- # data-science (4)
- # datomic (17)
- # duct (75)
- # emacs (4)
- # figwheel-main (5)
- # fulcro (3)
- # jackdaw (1)
- # java (1)
- # jobs-discuss (20)
- # off-topic (32)
- # parinfer (2)
- # pathom (23)
- # re-frame (26)
- # reagent (25)
- # rum (6)
- # shadow-cljs (122)
- # speculative (4)
- # sql (17)
- # testing (7)
- # yada (8)
@caleb.macdonaldblack I assume you mean send them to the REPL, right? Which files would you want to do that for? All open editors, all in the project, or something else?
@pedrorgirardi I’m not familiar with Kick - how does it set that property?
@lennart.buit I haven’t used VisualVM in a while, but nothing I know of should cause that.
all in project. Cascading down based on dependency
a -> b -> c : reloading c reloads a & b also
It's not a big deal if this isn't supported. My issue is with using 'def' anyway so it's probably poor design around that
In that diagram, a depends on b which depends on c, right? So you’re talking about reloading namespaces that depend on the one you’re loading?
Cursive currently doesn’t do that, no, but it would be very useful in some circumstances (things like multimethods, protocol implementations etc).
I'm actually using protocols here which is contributing to this issues
and pedestal routes need to be reloaded each time
So if i change my protocol, i need to reload the protocol ns, any ns that used that protocol, the routes ns, and finally reload start and stop component to get new instances. That final one is necessary for how protocols work, but it's quite a few steps to go through
Ok, so if reloading a ns also reloaded its dependent ones, then you could create a REPL command for the start/stop component, with sync files as the prior step, and I think you should be able to do the whole thing with a single key.
Oh wow, I didn't know that existed
The only thing with that is that it doesn’t currently do the dependent namespace part - that would have to be a more general enhancement to the sync files functionality.
Wow that repl command functionality is incredibly useful
No worries, I hope it helps! If you could file an issue for the dependent namespace loading, I’ll try to take a look at that soon.
Alright sounds good
Hi @cfleming. I think it’s the clj tool that sets that property. I found this http://insideclojure.org/2018/05/04/add-lib/ >System property clojure.libfile - referring to an edn file holding the lib map. clj will set this automatically for you and point to the cached lib map it’s using.
If I run from the terminal:
(System/getProperty "clojure.libfile")
=> ".cpcache/3399073160.libs"
@pedrorgirardi How is your REPL configured - are you using the “Run with Deps” option?
Yes, using Run with Deps option.
Sure. Thank you!
@pedrorgirardi Right, so the problem is that Cursive doesn’t use the clojure
command to create the classpath when running tasks, and it’s the script itself which sets that system property. However it looks like I can support that by doing the same thing that the script does, more or less.
Ah, got you.
Yep, will do. Thank you very much @cfleming.
I set a breakpoint in one of my dependencies and I am getting a message that says "No executable code found. " I'm running v1.8.1-eap2-2018.3. The project is a Clojure Deps project and the dep is a git dep.
Hi, is it possible to use the REBL interface from a cursive REPL? I can't seem to get it to work with a clojure.main repl
oh, ok, it's explained here https://github.com/cognitect-labs/REBL-distro/wiki/REBL-in-IntelliJ-Cursive
@kenny Hmm, that can be flakey sometimes. Can you paste a screenshot of the line the breakpoint is on with the code from that line?
Hi, Has anyone had luck launching repls (using leiningen) with lein-shell prep-tasks, and getting the working directory set properly? E.g. This project.clj
(defproject ...
:plugins [[lein-shell "0.5.0"]]
:prep-tasks ^:replace [["shell" "./script/run_some_checks.sh"]
"javac"
"compile"]
ends up trying and failing to launch the shell script from intelliJ's working directory /Applications/IntelliJ IDEA
, rather than the project home directory. The rest of the REPL is using the the project home directory correctly. (I'm using OSX)I confirmed that (System/getProperty "user.dir")
is passed through as /Applications/IntelliJ IDEA
to lein-shell. While in a repl launched without that prep-task, (System/getProperty "user.dir")
is the project home directory.
What is the Local REPL + Run with Deps option suppose to do? If I add an alias in that text box, it doesn't seem to get used in the REPL's CP.
The aliases in that textbox should definitely affect the classpath, if not that’s a bug for sure.
Even after downloading the dep via the CLI, it still doesn't appear in the CP. This is the alias {:oz {:extra-deps {metasoarous/oz {:mvn/version "1.5.6"}}}}
. I have REPL type nREPL and Run with Deps selected. I pass oz
to the Aliases text box. After clicking the Play button, the REPL opens and metasoarous/oz is not on the classpath.
Oh, shoot - I had the wrong module selected. Is there a way Cursive could have told me the alias I tried using didn't exist?
clj -A:idontexist
Error building classpath. Specified aliases are undeclared: [:idontexist]
Still, that should be enough to make it work. Do any of the previous or subsequent lines work?
Another item that has been a bit annoying with the Deps integration is is I have a git dep with a valid sha and then change it to an invalid sha, the auto import won't pop up and tell me that the sha is invalid.