This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-31
Channels
- # aws-lambda (4)
- # beginners (152)
- # boot (19)
- # cider (45)
- # cljs-dev (14)
- # clojure (54)
- # clojure-dev (33)
- # clojure-greece (11)
- # clojure-italy (4)
- # clojure-nl (8)
- # clojure-norway (2)
- # clojure-russia (6)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-uk (40)
- # clojure-ukraine (5)
- # clojurescript (40)
- # community-development (13)
- # component (8)
- # core-async (3)
- # cursive (25)
- # data-science (11)
- # datomic (13)
- # duct (1)
- # emacs (2)
- # events (16)
- # figwheel (3)
- # fulcro (53)
- # graphql (2)
- # jobs (5)
- # jobs-rus (1)
- # juxt (10)
- # leiningen (4)
- # off-topic (82)
- # other-languages (5)
- # portkey (3)
- # protorepl (13)
- # re-frame (22)
- # reagent (15)
- # ring-swagger (4)
- # shadow-cljs (69)
- # spacemacs (7)
- # specter (16)
- # sql (13)
- # vim (5)
- # yada (2)
Hunh. I have two CLJC projects. In the old one after I start a REPL in IntelliJ I can evaluate (+ 2 2) in the input area and see 4 in the output. With what seems to be an identical run configuration, (after duly switching the to the NS of the same source file) (nrepl with leiningen) I get “unable to resolve symbol +”
That rings a bell from when I last worked on CLJ in anger, but I thought it arose from forgetting to switch the REPL to a clojure namespace. I do see a confirming message that the correct NS is operative:
`(in-ns 'tiltontec.cell.base)
=> #namespace[tiltontec.cell.base]
`when you switch via in-ns
, that doesn’t actually refer-clojure
(something ns
does for you)
you can correct at this point by doing (clojure.core/refer-clojure)
Ah, OK, that sounds familiar.
I think the question is what “duly switching” means :)
if you’re working at the repl, you can instead (require 'tiltontec.cell.base) (in-ns 'tiltontec.cell.base)
Thx! Come to think of it, when I did this before (a year ago) I was using Emacs and I think Cider takes care of that. Now I am curious how I got the other project working just now! (Meanwhile, refer-clojure worked great.) Hmmm, I guess I could also send the (ns…) form in the source to the REPL.
in cursive, I often use the “Load file in REPL” Cursive key binding to re-load the file I have open in the editor
Ha-ha, yes, I should have said “duly executing menu item “Switch REPL NS to current file”. There is no room for ambiguity in help requests!
yeah, that just does in-ns, which won’t cause a load
Hunh. Should I be getting a stack overflow error in the Cursive plugin when I open a project? (I just let IJ report it.)
OK, never mind, the two project files show copious differences, one of which I am sure explains the issue.
I just had to disable Cursive to delete a blank line. Anyone else had that? I saw this on two different MacBooks/installations.
@hiskennyness No, you shouldn’t get SOEs, but you might - just report them and I’ll take a look. CLJC files are prone to them unfortunately.
@hiskennyness No, you shouldn’t have to disable Cursive to do anything - what was the problem deleting the line?
@ckarlsen Should be in the next couple of days, sorry for the delay - a couple of changes have taken longer than expected.
@cfleming I wonder if the SOE was just because I was on my old anemic (4g ram) Mac? I do not get it on my new 16g toy. But the little guy was not showing RAM pressure in the Activity Monitor. Sadly the "k" key on my new toy has me headed back to the shop, but such is life.
@cfleming OK, on the undeletable line (including simple blank lines) I now have it highly reproducible. I had copied the code snippet below into my source as a reference while hacking away, and commented it out with the #_ block commenter. That is sufficient to make lines undeletable (including defeating deletes when on populated lines in front of any content):
`(#?(:clj dosync :cljs do)
(with-integrity (:change (c-slot c))
(c-value-assume c new-value nil)))
`Forget the surrounding backquotes above.
I mean, those are not in the source, just my faulty markup attempt.