forked from qazwsxpawel/clojure-deps-edn-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeps.edn
458 lines (329 loc) · 15.7 KB
/
deps.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
;; The deps.edn file describes the information needed to build a classpath.
;;
;; deps.edn configuration is a combination of
;; - install-level (latest Clojure version at install time)
;; - user level - $HOME/.clojure/deps.edn
;; - project level - deps.edn in root of project
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.
{;; Paths
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Directories in the current project to include in the classpath
;; - typically defined in the project deps.edn file
;; :paths ["src" "resource"]
;; External dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:deps
{org.clojure/clojure {:mvn/version "1.10.1"}}
:aliases
{
;; resolve-deps aliases (-R) affect dependency resolution, options:
;; :extra-deps - specifies extra deps to add to :deps
;; :override-deps - specifies a coordinate to use instead of that in :deps
;; :default-deps - specifies a coordinate to use for a lib if one isn't found
;; make-classpath aliases (-C) affect the classpath generation, options:
;; :extra-paths - vector of additional paths to add to the classpath
;; :classpath-overrides - map of lib to path that overrides the result of resolving deps
;; Creating projects from templates
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; https://github.com/seancorfield/clj-new
;;
;; clj -A:new template-name domain/namespace
;; clj -m myname.myapp
;; clj -A:test:runner
:new
{:extra-deps {seancorfield/clj-new {:mvn/version "1.0.199"}}
:main-opts ["-m" "clj-new.create"]}
;; REPL experience
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Clojure REPL with syntax highlighting, built in docs and a quit command `:repl/quit`
:rebel
{:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["-m" "rebel-readline.main"]}
;; ClojureScript REPL rebel readline service
;; https://github.com/bhauman/rebel-readline/tree/master/rebel-readline-cljs
;; Starts the default CLJS repl, eg. nashorn
:rebel-cljs
{:extra-deps {com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}}
:main-opts ["-m" "rebel-readline-cljs.main"]}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; REBL Data browser
;; https://github.com/cognitect-labs/REBL-distro
;; Download the REBL JAR and update the local/root below
;; Requires Clojure 1.10 and either:
;; - Oracle JDK 8 -- use :cognitect-rebl-java8
;; - OpenJDK 8 or 11 -- use :cognitect-rebl-java11
:cognitect-rebl-java8
{:extra-deps {org.clojure/core.async {:mvn/version "0.4.490"}
;; deps for file datafication (0.9.149 or later)
org.clojure/data.csv {:mvn/version "0.1.4"}
org.clojure/data.json {:mvn/version "0.2.3"}
org.yaml/snakeyaml {:mvn/version "1.23"}
;; adjust to match your install location com.cognitect/rebl
com.cognitect/rebl {:local/root "/home/practicalli/.local/apps/rebel/REBL-0.9.220/REBL-0.9.220.jar"}}
:main-opts ["-m" "cognitect.rebl"]}
:cognitect-rebl-java11
{:extra-deps {org.clojure/clojure {:mvn/version "1.10.0"}
org.clojure/core.async {:mvn/version "0.4.490"}
com.cognitect/rebl {:local/root "/home/practicalli/.local/apps/rebel/REBL-0.9.220/REBL-0.9.220.jar"}
org.openjfx/javafx-fxml {:mvn/version "11.0.1"}
org.openjfx/javafx-controls {:mvn/version "11.0.1"}
org.openjfx/javafx-swing {:mvn/version "11.0.1"}
org.openjfx/javafx-base {:mvn/version "11.0.1"}
org.openjfx/javafx-web {:mvn/version "11.0.1"}}
:main-opts ["-m" "cognitect.rebl"]}
;; nrebl.middleware
;; spies on nREPL connection and captures result of evlatuations in REBL
;; https://github.com/RickMoynihan/nrebl.middleware
;; Command Line (java11):
;; clj -R:nrepl:cider-nrepl:cognitect-rebl-java11 -A:nrebl
;; Emacs cider (java11): add following to `dir-locals.el` to root directory of project and run `cider-connect`
;; ((clojure-mode . ((cider-clojure-cli-global-options . "-R:nrepl:cider-nrepl:rebl-java11 -A:nrebl.middleware"))))
:nrebl.middleware
{:extra-deps {nrepl {:mvn/version "0.7.0"}
cider/cider-nrepl {:mvn/version "0.25.0"}
refactor-nrepl {:mvn/version "2.5.0"}
rickmoynihan/nrebl.middleware {:mvn/version "0.3.1"}}
:main-opts ["-e" "((requiring-resolve,'cognitect.rebl/ui))"
"-m" "nrepl.cmdline"
"-i"
"--middleware" "[nrebl.middleware/wrap-nrebl,cider.nrepl/cider-middleware]"]}
;; Supporting aliases for nrebl.middleware
:nrepl
{:extra-deps {nrepl/nrepl {:mvn/version "0.7.0"}}}
:cider-nrepl
{:extra-deps {cider/cider-nrepl {:mvn/version "0.25.0"
refactor-nrepl {:mvn/version "2.5.0"}}}}
;; End of REBL data browser
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Java Sources
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Look up Java Class and method definitions, eg. `cider-find-var` in Emacs
;; Requires: Java sources installed locally
;; Examples are from Ubuntu package install locations
:java-8-source
{:extra-deps
{java-sources {:local/root "/usr/lib/jvm/openjdk-8/lib/src.zip"}}}
:java-11-source
{:extra-deps
{java-sources {:local/root "/usr/lib/jvm/openjdk-11/lib/src.zip"}}}
;; Testing frameworks
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Include the test directory as a path used by Clojure CLI tools
:test-path
{:extra-paths ["test"]}
;; Clojure.test
;; Nothing required as it is part of the Clojure library.
;; Clojure spec
:spec
{:extra-deps {org.clojure/spec.alpha {:mvn/version "0.2.176"}}}
;; Clojure spec 2 - under active development
:spec2
{:extra-deps {org.clojure/spec-alpha2
{:git/url "https://github.com/clojure/spec-alpha2"
:sha "495e5ac3238be002b4de72d1c48479f6bec06bb3"}}}
;; Expectations test framework
;; https://github.com/clojure-expectations/clojure-test
;; Example usage:
;; clojure -A:expectations:test-runner-cognitect
:expectations
{:extra-deps {expectations/clojure-test {:mvn/version "1.2.1"}}}
;; Classic version not compatible with clojure.test and tools
;; https://github.com/clojure-expectations/expectations
:expectations-classic
{:extra-deps {expectations/expectations {:mvn/version "2.1.10"}}}
;; Test runners
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Cognitect test-runner
;; https://github.com/cognitect-labs/test-runner
:test-runner-cognitect
{:extra-paths ["test"]
:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner.git"
:sha "f7ef16dc3b8332b0d77bc0274578ad5270fbfedd"}}
:main-opts ["-m" "cognitect.test-runner"]}
;; ClojureScript test runner
;; https://github.com/Olical/cljs-test-runner
:test-runner-cljs
{:extra-paths ["test"]
:extra-deps {olical/cljs-test-runner {:mvn/version "3.7.0"}}
:main-opts ["-m" "cljs-test-runner.main"]}
;; kaocha - comprehensive test runner for Clojure/Script
;; tests.edn should be created for each project
;; https://github.com/lambdaisland/kaocha
:test-runner-kaocha
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0-612"}}
:main-opts ["-m" "kaocha.runner"]}
;; midje-runner
;; https://github.com/miorimmax/midje-runner
:test-runner-midje
{:extra-paths ["test"]
:extra-deps {midje-runner
{:git/url "https://github.com/miorimmax/midje-runner.git"
:sha "ee9c2813e150ae6b3ea41b446b09ba40fc89bdc1"}}
:main-opts ["-m" "midje-runner.runner"]}
;; eftest - fast and pretty test runner
;; There may be a nicer way to do the main-opts - see the Eastwood and kibit issue discussion
;; https://github.com/jonase/eastwood/commit/4d1d05cc6de6ce565207d9a3c86864364f53f006
:test-runner-eftest
{:extra-paths ["test"]
:extra-deps {eftest {:mvn/version "0.5.9"}}
:main-opts ["-e" "(require,'[eftest.runner,:refer,[find-tests,run-tests]]),(run-tests,(find-tests,\"test\"))"]}
;; Test Coverage tools
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Cloverage - Simple clojure coverage tool
;; https://github.com/cloverage/cloverage
;; In the root of your Clojure project, run the command:
;; clojure -A:test-coverage
:test-coverage
{:extra-paths ["test"]
:extra-deps {cloverage {:mvn/version "RELEASE"}}
:main-opts ["-m" "cloverage.coverage"]}
;; Linting/ static analysis
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; clj-kondo - comprehensive and fast linter
;; https://github.com/borkdude/clj-kondo/
:lint
{:extra-deps {clj-kondo {:mvn/version "RELEASE"}}
:main-opts ["-m" "clj-kondo.main"]}
;; Eastwood - classic lint tool
;; https://github.com/jonase/eastwood#running-eastwood-in-a-repl
:lint-eastwood
{:main-opts ["-m" "eastwood.lint" {:source-paths ["src"]}]
:extra-deps {jonase/eastwood {:mvn/version "RELEASE"}}}
;; kibit - suggest idiomatic use of Clojure
;; https://github.com/jonase/kibit/issues/221
:idiom-check
{:extra-deps {tvaughan/kibit-runner {:mvn/version "0.2.3"}}
:main-opts ["-m" "kibit-runner.cmdline"]}
;; Dependency version management
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Manage versions for maven and git dependencies
;; https://github.com/Olical/depot
;; Report dependencies that have newer versions available
;; Update library versions in this deps.edn file:
;; cd ~/.clojure && clojure -A:outdated
:outdated
{:extra-deps {olical/depot {:mvn/version "1.8.4"}}
:main-opts ["-m" "depot.outdated.main"]}
;; clj -A:outdated-update
:outdated-update
{:extra-deps {olical/depot {:mvn/version "1.8.4"}}
:main-opts ["-m" "depot.outdated.main"
"--update"]}
;; The classic project for checking maven based dependencies
:outdated-ancient
{:main-opts ["-m" "deps-ancient.deps-ancient"]
:extra-deps {deps-ancient {:mvn/version "RELEASE"}}}
;; Hot loading dependencies - EXPERIMENTAL / APLPHA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Hot loading is not officially part of tools.deps and
;; this alias could change significantly in future
;; Add new deps to a running REPL:
;; (require '[clojure.tools.deps.alpha.repl :refer [add-lib]])
;; (add-lib 'domain/library {:mvn/version "RELEASE"})
;; Git deps
;; (require '[clojure.tools.gitlibs :as gitlibs])
;; (defn load-master [lib]
;; (let [git (str "https://github.com/" lib ".git")]
;; (add-lib lib {:git/url git :sha (gitlibs/resolve git "master")})))
;; - e.g., using the GitHub path (not the usual Maven group/artifact):
;; (load-master 'clojure/tools.trace)
:hot-load-deps
{:extra-deps {org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:sha "19d197ab221d37db750423eb970880cb87a91100"}}
;; DynamicClassLoader required for add-lib to work
;; if starting other processes via aliases such as a socket REPL or Cognitect's REBL
:main-opts ["-e" "(->>(Thread/currentThread)(.getContextClassLoader)(clojure.lang.DynamicClassLoader.)(.setContextClassLoader,(Thread/currentThread)))"]}
;; Visualizing dependencies
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Morpheus - visualize project var relationships
;; https://github.com/benedekfazekas/morpheus
;; Options:
;; -d to specify output directory (this must exist)
;; -f to specify image format, dot (default), png or svg
;; Options are followed by list of paths to analyze.
;; clojure -A:graph-vars -d graphs -f png src test
:graph-vars
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "d3decebc1cb9ef697cd34781f9cf83d44a071e85"}}
:main-opts ["-m" "thomasa.morpheus.main"]}
;; Generate PNG image of dependency graph in directory called `graphs`
;; clojure -A:graph-vars-png
:graph-vars-png
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "d3decebc1cb9ef697cd34781f9cf83d44a071e85"}}
:main-opts ["-m" "thomasa.morpheus.main"
"-d" "graphs" "-f" "png" "src" "test"]}
;; Generate SVG image of dependency graph in directory called `graphs`
;; clojure -A:graph-vars-svg
:graph-vars-svg
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "d3decebc1cb9ef697cd34781f9cf83d44a071e85"}}
:main-opts ["-m" "thomasa.morpheus.main"
"-d" "graphs" "-f" "svg" "src" "test"]}
;; Visualize connections between library dependencies and project namespaces
;; https://github.com/SevereOverfl0w/vizns
;; clj -A:graph-deps navigate # navigable folder of SVGs
;; clj -A:graph-deps # deps-graph.dot file
;; clj -A:graph-deps single -o deps-graph.png -f png # png file
;; clj -A:graph-deps single -o deps-graph.svg -f svg # svg file
;; clj -A:graph-deps single --show # View graph without saving
:graph-deps
{:deps {io.dominic/vizns {:git/url "https://github.com/SevereOverfl0w/vizns.git"
:sha "fb2391a4af24246ac4e46f3a573970ba5b7c92de"}}
:main-opts ["-m" "io.dominic.vizns.core"]}
;; Generate single PNG image of library dependencies
:graph-deps-png
{:deps {io.dominic/vizns {:git/url "https://github.com/SevereOverfl0w/vizns.git"
:sha "fb2391a4af24246ac4e46f3a573970ba5b7c92de"}}
:main-opts ["-m" "io.dominic.vizns.core" "single" "-o" "deps-graph.png" "-f" "png"]}
;; Deployment
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; depstar - build jars, uberjars
;; https://github.com/seancorfield/depstar
;; clojure -A:depstar -m hf.depstar.jar MyLib.jar
;; clojure -A:depstar -m hf.depstar.uberjar MyProject.jar
:build-depstar
{:extra-deps
{seancorfield/depstar {:mvn/version "1.0.94"}}}
;; uberdeps - uberjar builder
;; https://github.com/tonsky/uberdeps
;; "--target" "target/cdeps-0.1.0.jar" in `:main-opts` to specify output file
:build-uberdeps
{:extra-deps {uberdeps {:mvn/version "0.1.10"}}
:main-opts ["-m" "uberdeps.uberjar"]}
;; Performance testing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Benchmarking library for Clojure
;; https://github.com/hugoduncan/criterium/
;; (require '[criterium.core :refer [bench quick-bench]]) ; require criterium
;; (bench (adhoc-expression)) ; timing of a self contained expression
;;
;; (require '[practicalli/namespace-name]) ; require project source code
;; (in-ns 'practicalli/namespace-name)
;; (quick-bench (project-function args))
:benchmark
{:extra-deps {criterium {:mvn/version "0.4.5"}}}
;; - see https://github.com/clojure-goes-fast/clj-memory-meter
;; - (require '[clj-memory-meter.core :as memory-meter])
;; - (memory-meter/measure (your-expression))
:measure
{:extra-deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version "0.1.2"}}}
} ;; End of alias definitions
;; Provider attributes
;; Maven Central and Clojars are the canonical repositories for library dependencies
;; JCenter is large and fast mirror
:mvn/repos {"central" {:url "https://repo1.maven.org/maven2/"}
"clojars" {:url "https://repo.clojars.org/"}
;; clojars.org mirror - publicly accessible
"jcenter" {:url "https://jcenter.bintray.com"}
;; Example of local Artifactory repository configuration
;; {"business-area" {:url "https://artifacts.internal-server.com:443/artifactory/business-area-maven-local"}
}}