This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-29
Channels
- # aws (1)
- # aws-lambda (1)
- # beginners (34)
- # boot (61)
- # cljs-dev (126)
- # cljsjs (10)
- # cljsrn (4)
- # clojure (27)
- # clojure-russia (7)
- # clojure-spec (1)
- # clojure-uk (26)
- # clojurescript (42)
- # cursive (31)
- # datascript (4)
- # datomic (16)
- # hoplon (51)
- # klipse (1)
- # lein-figwheel (1)
- # lumo (79)
- # off-topic (16)
- # om (7)
- # parinfer (5)
- # planck (2)
- # re-frame (6)
- # reagent (3)
- # ring-swagger (5)
- # untangled (11)
Hi Guys
I wonder if there is a way to make auto require with cursive?
similar to clj-refactor
hey guys, i just started playing around with cursive, and on a simple program: https://www.refheap.com/124794, i’m getting “defroutes cannot be resolved”, “GET cannot be resolved”, and “route/not-found cannot be resolved"
@andrzejsliwa what is auto require?
Is there a way to see multimethod implementations and move to them from defmulti or from defmethod?
Would anyone perhaps know what would cause my code to not be loaded in REPL when I start it? Aka when I hit that Run 'REPL'
button, it starts, but nothing in my namespace is loaded. I have to select everything and run it. But this only happens in one project, not the other. Maybe a config I have different? Not sure what, though.
(Obviously I'm in IntelliJ and use Cursive)
@eslachance You probably need something like this in your project.clj file (the :repl-options part):
:profiles
{:uberjar
{:aot :all}
:dev
{:source-paths ["dev"]
:repl-options {:init-ns your.dev.ns}}}
Hmm. my :profiles
is identical in both project.clj however.
ahhhh maybe it's this: :main ^:skip-aot dtbot.core
that's the one that works.
Let's try it anyway.
Oh yeah! Look at that. That was it.
Apparently so. This is a library so it doesn't "do" anything on its own. It just defines a lot of stuff 🙂
Just to put things into perspective, I'm pretty new to clojure and I'm attempting to write a complete library for Discord Bots so... I have challenges ahead of me.
I wouldn't have thought a lib needs :main, but I'll keep that in mind next time something doesn't work.
Well, this is more a question of being able to use the lib from its own repl. Until now I'd been loading a "client" that used the library but doing lein install
from the lib and reloading my client every time defeats the awesomeness of having a REPL in my IDE in the first place >.<
I daresay I probably just need to figure out a better workflow for development.
But this is quite off topic of this channel.
@eslachance This is not cursive related at all, but I should have realized it much earlier. When init-ns is not defined, REPL uses :main: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L359
:thinking_face:
I still have a lot to learn for sure.