This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-03
Channels
- # beginners (50)
- # cider (6)
- # cljdoc (2)
- # cljs-dev (19)
- # clojars (2)
- # clojure (20)
- # clojure-dev (35)
- # clojure-italy (2)
- # clojure-norway (12)
- # clojure-uk (17)
- # clojurescript (7)
- # data-science (3)
- # datomic (10)
- # emacs (2)
- # events (1)
- # figwheel-main (2)
- # fulcro (8)
- # graphql (1)
- # juxt (3)
- # nrepl (4)
- # off-topic (23)
- # parinfer (1)
- # pathom (63)
- # re-frame (7)
- # reagent (1)
- # reitit (5)
- # ring-swagger (1)
- # shadow-cljs (23)
- # tools-deps (16)
i want to report a big-ol THANK YOU to the hard work behind tools-deps. i just started a greenfield clojure project and was able to create an nrepl “reloaded” workflow using only 1. deps.edn file 2. makefile for convenience 3. cat
. no more boot, no more lein (for now, still have to look at generating jars).
Living the dream
I'll second that THANK YOU since we have essentially eliminated Boot from our primary Clojure workflow across all tiers (dev through QA through production) and we like the simplicity of it all.
@lwhorton mind sharing your deps.edn? I’m interested in enabling nREPL for a project so I don’t have to use lein
sure:
:aliases {:dev {:extra-paths ["dev"]
:extra-deps {org.clojure/tools.namespace {:mvn/version "0.2.11"}
org.clojure/tools.deps.alpha {:mvn/version "0.5.460"}
nrepl/nrepl {:mvn/version "0.4.5"}
reply {:mvn/version "0.4.2"}}
:main-opts ["-m" "nrepl.cmdline"]}}}
makefile:
NREPL_PORT=$(shell cat .nrepl-port)
dev:
clj -A:dev
.PHONY: dev
clj-repl:
clj -R:dev -m reply.main --attach $(NREPL_PORT)
and my user.clj file (pulled in from the extra-paths in deps.edn):
(ns user
(:require
[ :as io]
[clojure.tools.namespace.repl :refer [refresh refresh-all]]
[clojure.pprint :refer [pprint]]
[clojure.inspector :as i]
[gerbil.core :as c]
)
)
(def ^:dynamic system nil)
(defn init []
(alter-var-root #'system (constantly (c/system))))
(defn start []
(alter-var-root #'system c/start))
(defn stop []
(alter-var-root #'system
(fn [s] (when s (c/stop s)))))
(defn go []
(init)
(start))
(defn reset []
(stop)
(refresh :after 'user/go))
:cider-nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.4.5"}
cider/cider-nrepl {:mvn/version "0.18.0"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}
:nrepl {:extra-deps {nrepl/nrepl {:mvn/version "0.4.5"}
org.clojure/tools.nrepl {:mvn/version "0.2.13"}}
:main-opts ["-m" "nrepl.cmdline"]}
Here’s what I use to launch nREPL — the first variant is what I actually use to connect CIDER.
Asking this here too since it’s not really Datomic-specific: I have a datomic-pro download in a dir (so it has the datomic-pro-version.jar at the root, a lib
subdir with deps jars, etc. I am trying to setup a tools-deps project to run some clojure code using datomic and all of its deps w/o triggering a download of them. Is there a more efficient way to do it than having to specify each individual jar in the :paths
vector in deps.edn
?
Answering my own question:
:paths ["src" "/path/to/datomic/datomic-pro-version.jar" "/path/to/datomic/lib/*"]
was the answer. (Not "/path/to/datomic/lib/"
nor "/path/to/datomic/lib/*.jar"
)