This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-06
Channels
- # announcements (1)
- # beginners (147)
- # boot (9)
- # calva (28)
- # cider (3)
- # circleci (18)
- # cljdoc (54)
- # cljs-dev (55)
- # cljsrn (22)
- # clojure (179)
- # clojure-canada (9)
- # clojure-dev (74)
- # clojure-europe (1)
- # clojure-italy (15)
- # clojure-nl (7)
- # clojure-spec (30)
- # clojure-uk (55)
- # clojurescript (65)
- # core-async (15)
- # cursive (12)
- # datomic (16)
- # events (4)
- # fulcro (25)
- # graalvm (3)
- # joker (2)
- # kaocha (15)
- # keechma (94)
- # off-topic (12)
- # qlkit (2)
- # re-frame (15)
- # reagent (11)
- # reitit (29)
- # remote-jobs (15)
- # rewrite-clj (16)
- # shadow-cljs (73)
- # spacemacs (151)
- # sql (3)
- # tools-deps (11)
- # unrepl (19)
- # vim (35)
How do I start a repl in a given namespace? I have not seen anything in the documentation about it.
I figured I could use something like this:
:aliases
{:cursive {:main-opts ["-e" "(load \"de/sveri/getless/user\")"
"-e" "(de.sveri.getless.user/reset)"]}}
It works, but is it the right way to use tools-deps?You would need to do something like this
You could simplify to one expr by using requiring-resolve (added in 1.10)
((requiring-resolve ‘de.sveri.getless.user/reset))
@alexmiller Thanks, that works and looks better
although double parens always looks weird
Is :local/root
supposed to work for pointing to a local lein project (with a pom.xml)? Or only deps projects? Thanks! (It doesn't for me)
it should work for deps.edn and pom.xml
in what way does it not work?
E.g. REPL does not see the code from that project:
$ clj -A:test
Clojure 1.10.1-beta2
user=> (require '[clj-concordion.core :as cc])
Execution error (FileNotFoundException) at user/eval1 (REPL:1).
Could not locate clj_concordion/core__init.class, clj_concordion/core.clj or clj_concordion/core.cljc on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
with deps.edn
including {:aliases
{:test
{:extra-deps {clj-concordion {:local/root "/Users/me/Projects/clj-concordion"}
;clj-concordion {:local/root "/Users/me/Projects/clj-concordion/target/clj-concordion-0.0.5.jar"}
(the .jar
works) and $ head ~/Projects/clj-concordion/pom.xml
<?xml ...><project ...>
<modelVersion>4.0.0</modelVersion>
<groupId>clj-concordion</groupId>
<artifactId>clj-concordion</artifactId>
...
<build>
<sourceDirectory>src</sourceDirectory>
...
and $ head -n1 ~/Projects/clj-concordion/src/clj_concordion/core.clj
(ns clj-concordion.core
(Could there be a problem with using src/
instead of src/main/clojure/
?)