-
-
Notifications
You must be signed in to change notification settings - Fork 501
/
Copy pathdeps.edn
783 lines (660 loc) · 31.3 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
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
;; --------------------------------------------------
;; Practicalli Clojure CLI Configuration
;;
;; Aliases that extend the features of the Clojure CLI
;; using Community projects as tools and libraries
;; to enhanced the development workflow
;; --------------------------------------------------
;; --------------------------------------------------
;; Top-level keys for Clojure CLI deps.edn
;; Practicalli Clojure CLI Config only defines aliases
;; `:aliases` - tools to enhance a development workflow
;; Other top-level keys that could be used in a user or project `deps.edn` configuration:
;; `:mvn/repos` - Maven & Clojars repositories, examples of other repositories
;; `:mvn/local-repo` - set local repository path - defaults to $HOME/.m2/repository
;; `:paths` - directory paths to add to the class path
;; `:deps` - library dependencies to add to the class path
;; Keys used within :aliases
;; resolve-deps aliases affect dependency resolution:
;; `:extra-deps` - libraries merged into the top-level :deps dependencies
;; `:replace-deps` - libraries replacing all those in the top-level :deps dependencies
;; `:override-deps` - library version overriding a matching library in the top-level :deps
;; `:default-deps` - library version if no version is otherwide defined, used across a set of shared projects acting as a dependency management system
;; make-classpath aliases affect the classpath generation:
;; `:extra-paths` - additional paths to those defined in the top-level :path key
;; `:replace-paths` - paths replacing all those defined in the top-level :path key
;; `:override-paths` - alternate location to resolve a dependancy (overrides resolve-deps location)
;; Configuration to run Clojure
;; `:main-opts` - clojure.main configuration options (vector of strings), e.g. `["--main" "fully.qualified.namespace"]` to set main namespace
;; `:exec-fn` - clojure.exec fully qualified function name to call (symbol)
;; `:exec-args` - clojure.exec arguments (hash-map) passed to `:exec-fn`
;; ---------------------------------------------------
{;; ---------------------------------------------------
;; Alias definitions
:aliases
{;; ---------------------------------------------------
;; Development environment
;; Aliases work with Clojure CLI -M -X or -T execution options
;; Custom REPL startup
;; A `user` namespace is loaded during REPL startup if found on the class path
;; `dev/user.clj` defines a custom `user` namespace, requring libraries and
;; including code to start tools as the REPL starts
;; Development environment aliases include the `dev` directory on the class path
;; https://practical.li/clojure/clojure-cli/repl-startup/
:dev/env
{:extra-paths ["dev"]}
;; Practicalli REPL Reloaded workflow
;; https://practical.li/clojure/clojure-cli/repl-reloaded/
;; Use with editor command to start a REPL (Jack-in) to include REPL Reloaded tools
:dev/reloaded
{:extra-paths ["dev" "test"]
:extra-deps {djblue/portal {:mvn/version "0.58.4"} ; portal data inspector
clj-commons/clj-yaml {:mvn/version "1.0.29"} ; portal yaml support (optional)
org.clojure/tools.namespace {:mvn/version "1.5.0"}
org.clojure/tools.trace {:mvn/version "0.8.0"}
org.slf4j/slf4j-nop {:mvn/version "2.0.16"}
com.brunobonacci/mulog {:mvn/version "0.9.0"}
lambdaisland/kaocha {:mvn/version "1.91.1392"}
org.clojure/test.check {:mvn/version "1.1.1"}
criterium/criterium {:mvn/version "0.4.6"}}}
;; ClojureScript tools during REPl startup
:dev/reloaded-cljs
{:extra-paths ["dev" "test"]
:extra-deps {djblue/portal {:mvn/version "0.58.4"} ; portal data inspector
org.clojure/clojurescript {:mvn/version "1.10.844"}
lambdaisland/kaocha-cljs {:mvn/version "1.5.154"}
org.clojure/test.check {:mvn/version "1.1.1"}}}
;; DEPRECATED
;; - only useful for Clojure 1.11.x, not required for Clojure 1.12 onward
;; - alpha state software
;; Latest commit on add-lib3 branch, don't update with :search/outdated
:lib/hotload
{:extra-deps {org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:git/sha "e4fb92eef724fa39e29b39cc2b1a850567d490dd"}}}
;; Highlight important aspects of error stack trace using ANSI formatting
;; https://github.com/AvisoNovate/pretty
:lib/pretty-errors
{:extra-deps {io.aviso/pretty {:mvn/version "1.4.4"}}}
;; Component REPL libraries
:lib/integrant-repl
{:extra-deps {integrant/repl {:mvn/version "0.4.0"}}}
:lib/component-repl
{:extra-deps {com.stuartsierra/component.repl {:mvn/version "1.0.0"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Running a REPL
;; Basic REPL UI with nREPL server for Clojure Editor support
:repl/basic
{:extra-deps {nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.3"}}
:main-opts ["--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"
"--interactive"]}
;; Headless REPL with nREPL server for Clojure Editor support
:repl/headless
{:extra-deps {nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.3"}}
:main-opts ["--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"]}
;; Basic REPL UI, nREPL server and Portal data inspector
:repl/inspect
{:extra-deps
{nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.3"}
djblue/portal {:mvn/version "0.58.4"}}
:main-opts ["--main" "nrepl.cmdline"
"--middleware"
"[cider.nrepl/cider-middleware,portal.nrepl/wrap-portal]"]}
;; Start REPL with Clerk notebook receiving evaluation results as a tap> source
;; Recommend using custom `user` namespace to start Clerk as tap> source
;; Alpha stage alias design - may change
;; clojure -M:repl/clerk
:repl/clerk
{:extra-deps {io.github.nextjournal/clerk {:mvn/version "0.17.1102"}
nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.3"}
refactor-nrepl/refactor-nrepl {:mvn/version "3.10.0"}}
:main-opts ["--eval" "(require '[nextjournal.clerk])(nextjournal.clerk/show! 'nextjournal.clerk.tap)(nextjournal.clerk/serve! {:browse? true})"
"-m" "nrepl.cmdline"
"--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"
"--interactive"]}
;; Rebel Readline enhanced REPL UI
;; https://github.com/bhauman/rebel-readline
;; REPL UI with syntax highlighting, built in docs and a quit command `:repl/quit`
;; Clojure REPL with rebel readline with nrepl for editor connection
;; Conjure: opening a Clojure file will automatically connect to the REPL process
;; CIDER: run `cider-connect-clj` and select REPL host and port
;; Calva: connect to REPL command and select build tool, REPL host and port
;; clojure -M:repl/rebel
:repl/rebel
{:extra-deps {nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.3"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
:main-opts ["--eval" "(apply require clojure.main/repl-requires)"
"--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"
"--interactive"
"-f" "rebel-readline.main/-main"]}
;; ------------
;; Practicalli REPL Reloaded workflow
;; Rich Terminal REPL Prompt with nREPL and Portal connections
;; https://practical.li/clojure/clojure-cli/repl-reloaded/
;; clojure -M:repl/reloaded
:repl/reloaded
{:extra-paths ["dev" "test"]
:extra-deps {nrepl/nrepl {:mvn/version "1.3.0"}
cider/cider-nrepl {:mvn/version "0.50.3"}
com.bhauman/rebel-readline {:mvn/version "0.1.4"}
djblue/portal {:mvn/version "0.58.4"} ; portal data inspector
clj-commons/clj-yaml {:mvn/version "1.0.29"} ; portal yaml support (optional)
org.clojure/tools.namespace {:mvn/version "1.5.0"}
org.clojure/tools.trace {:mvn/version "0.8.0"}
org.slf4j/slf4j-nop {:mvn/version "2.0.16"}
com.brunobonacci/mulog {:mvn/version "0.9.0"}
lambdaisland/kaocha {:mvn/version "1.91.1392"}
org.clojure/test.check {:mvn/version "1.1.1"}
ring/ring-mock {:mvn/version "0.4.0"}
criterium/criterium {:mvn/version "0.4.6"}}
:main-opts ["--eval" "(apply require clojure.main/repl-requires)"
"--main" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware,portal.nrepl/wrap-portal]"
"--interactive"
"-f" "rebel-readline.main/-main"]}
;; Include Rebel Readline library
:lib/rebel
{:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Remote REPL connection
;; Connect to the nREPL server of a remote REPL
;; clojure -M:repl/remote --host hostname --port 12345
;; replace --host and --port values with that of remote nREPL server
:repl/remote
{:extra-deps {nrepl/nrepl {:mvn/version "1.3.0"}}
:main-opts ["--main" "nrepl.cmdline" "--connect"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Creating projects from templates
;; clj-new can use a wide range of Leiningen style templates
;; deps-new creates Clojure CLI projects
;; - deps-new is used by Practicalli Project Templates
;; https://practical.li/clojure/clojure-cli/projects/templates/practicalli/
;; Consider deprecation
:project/new
{:replace-deps {com.github.seancorfield/clj-new {:mvn/version "1.3.415"}}
:exec-fn clj-new/create
:exec-args {:template app :name practicalli/playground}
:main-opts ["--main" "clj-new.create"]}
;; deps-new and Practicalli Project Teamplates
;; clojure -T:project/create :template template/name :name project/name
:project/create
{:replace-deps {io.github.seancorfield/deps-new
{:git/tag "v0.8.0" :git/sha "2f96530"}
io.github.practicalli/project-templates
{:git/tag "2024-09-09" :git/sha "0d11ca4"}}
:exec-fn org.corfield.new/create
:exec-args {:template practicalli/minimal
:name practicalli/playground}}
;; Local testing of Practicalli Project Templates
:project/create-local
{:replace-deps {io.github.seancorfield/deps-new
{:git/tag "v0.8.0" :git/sha "2f96530"}
practicalli/project-templates
{:local/root "/home/practicalli/projects/practicalli/project-templates/"}}
:exec-fn org.corfield.new/create
:exec-args {:template practicalli/minimal
:name practicalli/playground}}
:project/templates
{:extra-deps {io.github.practicalli/project-templates
{:git/tag "2024-09-09" :git/sha "0d11ca4"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Searching
;; clj-check - search each namespace and report compilation warnings and errors
;; https://github.com/athos/clj-check
;; clojure -M:search/errors
:search/errors
{:extra-deps {athos/clj-check
{:git/url "https://github.com/athos/clj-check.git"
:sha "d997df866b2a04b7ce7b17533093ee0a2e2cb729"}}
:main-opts ["--main" "clj-check.check"]}
;; find-deps - fuzzy search Maven & Clojars and add deps to deps.edn
;; https://github.com/hagmonk/find-deps
;; clojure -M:search/libraries http-kit # fuzzy search for dependency
;; clojure -M:search/libraries http-kit ring compojure # multiple deps
;; clojure -M:search/libraries --format:save http-kit # save into deps.edn file
;; :search/libraries
;; {:extra-deps
;; {find-deps/find-deps
;; {:git/url "https://github.com/hagmonk/find-deps"
;; :sha "9bf23a52cb0a8190c9c2c7ad1d796da802f8ce7a"}}
;; :main-opts ["--main" "find-deps.core"]}
:search/libraries
{:extra-deps
{practicalli/clj-find-libraries
{:git/url "https://github.com/practicalli-johnny/clj-find-library"
:sha "a814519ed9921fcad4515e0e4446dc34af783d28"}}
:main-opts ["--main" "find-deps.core"]}
:search/libraries-local
{:extra-deps
{practicalli/clj-find-libraries
{:local/root "/home/practicalli/projects/practicalli/clj-find-library/"}}
:main-opts ["--main" "find-deps.core"]}
;; Dependency version management
;; https://github.com/liquidz/antq
;; Manage versions for maven and git dependencies
;; - report project dependencies that have newer versions available:
;; cd project-directory && clojure -T:search/outdated
;; - update library versions in this deps.edn file:
;; cd $XDG_CONFIG_HOME/clojure && clojure -T:search/outdated
:search/outdated
{:replace-paths ["."]
:replace-deps {com.github.liquidz/antq {:mvn/version "2.11.1250"}
org.slf4j/slf4j-nop {:mvn/version "2.0.16"}}
:exec-fn antq.tool/outdated
:exec-args {:directory ["."] ; default
:exclude ["org.clojure/tools.deps.alpha"
"org.clojure/clojurescript"]
;; :focus ["com.github.liquidz/antq"]
:skip ["boot" "leiningen"]
:reporter "table" ; json edn format
:verbose false
:upgrade false
:force false}}
;; Carve - search through code for unused vars and remove them
;; clojure -M:search/unused-vars --opts '{:paths ["src" "test"]}'
:search/unused-vars
{:extra-deps {borkdude/carve
{:git/url "https://github.com/borkdude/carve"
:sha "e02b65f9de679450176a3fa26c89ffd5600d7eb8"}}
:main-opts ["--main" "carve.main"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Project Packaging
;; - use Clojure CLI tools.build approach
;; https://practical.li/clojure/clojure-cli/projects/tools-build/
;; https://clojure.org/guides/tools_build
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Security
;; clj-holmes/clj-watson/
;; Request an API key from: https://nvd.nist.gov/developers/request-an-api-key
;; `CLJ_WATSON_NVD_API_KEY` set to API key value
:security/nvd-scan
{:replace-deps
{io.github.clj-holmes/clj-watson {:git/tag "v6.0.0" :git/sha "cb02879"}}
:main-opts ["-m" "clj-watson.cli" "scan" "-p" "./deps.edn"]}
:security/nvd-fix
{:replace-deps
{io.github.clj-holmes/clj-watson {:git/tag "v6.0.0" :git/sha "cb02879"}}
:main-opts ["-m" "clj-watson.cli" "scan" "-s" "-p" "deps.edn"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Project Deployment
;; Clojure CLI built-in alias to deploy locally (e.g. `~/.m2/`)
;; clojure -X:deps mvn-install
;; https://github.com/slipset/deps-deploy - Deploy libraries to Clojars
;; Set Clojars username/token in `CLOJARS_USERNAME` and `CLOJARS_PASSWORD` environment variables.
;; Requires: fully qualified artifact-name and version in project `pom.xml` file
;; Deploy to Clojars
;; `clojure -T:deploy/clojars :artifact '"project.jar"'`
:deploy/clojars
{:replace-deps {slipset/deps-deploy {:mvn/version "0.2.2"}}
:exec-fn deps-deploy.deps-deploy/deploy
:exec-args {:installer :remote
:sign-releases? true
:artifact "deps-deploy.jar"}}
;; AWS S3 Example deploy
;; :deploy/aws-s3
;; {:replace-deps {slipset/deps-deploy {:mvn/version "0.2.2"}}
;; :exec-fn deps-deploy.deps-deploy/deploy
;; :exec-args {:installer :remote
;; :artifact "deps-deploy.jar"
;; :repository {"releases" {:url "s3p://my/bucket/"}}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Java Sources
;; Look up Java Class and method definitions, eg. `cider-find-var` in Emacs
;; Requires: Java sources installed locally e.g. sudo apt install openjdk-17-source
;; Examples are from Ubuntu package install locations
;; clojure -M:lib/java17-source
:src/java17
{:extra-deps
{openjdk/java-sources {:local/root "/usr/lib/jvm/openjdk-17/lib/src.zip"}}}
;; Clojure core Java source code in src/jvm/clojure/lang/
:src/clojure
{:extra-paths ["src/jvm"]
:extra-deps
{org.clojure/clojure-source {:local/root "/home/practicalli/projects/community/clojure.org/clojure"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Formatting tools
;; pretty printing with sorted keys and set values
;; include as a library when starting a project
:lib/pprint-sorted
{:extra-deps {mvxcvi/puget {:mvn/version "1.3.4"}}}
;; ----------
;; zprint: advanced format tool for Clojure code and EDN
;; Report indentation format issues
;; clojure -M:format/zprint filename-or-pattern
:format/zprint
{:extra-deps {zprint/zprint {:mvn/version "1.2.9"}}
:main-opts ["--main" "zprint.main"
"{:style :indent-only}"
"--list-formatted-summary-check"]}
;; Fix indentation format issues
;; clojure -M:format/zprint!
:format/zprint!
{:extra-deps {zprint/zprint {:mvn/version "1.2.9"}}
:main-opts ["--main" "zprint.main"
"{:style :indent-only}"
"--list-formatted-summary-write"]}
;; Report issues using community style guide
;; clojure -M:format/community filename-or-pattern
:format/community
{:extra-deps {zprint/zprint {:mvn/version "1.2.9"}}
:main-opts ["--main" "zprint.main"
"{:style :community}"
"--list-formatted-summary-check"]}
;; Fix issues using community style guide
;; clojure -M:format/community filename-or-pattern
:format/community!
{:extra-deps {zprint/zprint {:mvn/version "1.2.9"}}
:main-opts ["--main" "zprint.main"
"{:style :community}"
"--list-formatted-summary-write"]}
;; ----------
;; Cljstyle is a rewrite of cljfmt, designed to be easier to configure
;; Report format issues for current project code
;; clojure -M:format/cljstyle
:format/cljstyle
{:extra-deps
{mvxcvi/cljstyle {:git/url "https://github.com/greglook/cljstyle.git"
:git/sha "d40540a7a8e3efdd18f10cb288864e0ca15c7f8f"}}
:main-opts ["--main" "cljstyle.main"
"check"]}
;; Fix format issues for current project code
;; clojure -M:format/cljstyle
:format/cljstyle!
{:extra-deps
{mvxcvi/cljstyle {:git/url "https://github.com/greglook/cljstyle.git"
:git/sha "d40540a7a8e3efdd18f10cb288864e0ca15c7f8f"}}
:main-opts ["--main" "cljstyle.main"
"fix"]}
;; ----------
;; cljfmt
;; clojure -M:format/cljfmt check | fix
:format/cljfmt
{:extra-deps {cljfmt/cljfmt {:mvn/version "0.9.2"}}
:main-opts ["--main" "cljfmt.main" "check"]}
:format/cljfmt!
{:extra-deps {cljfmt/cljfmt {:mvn/version "0.9.2"}}
:main-opts ["--main" "cljfmt.main" "fix"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Databases and drivers uses only during development
:lib/next.jdbc
{:extra-deps {com.github.seancorfield/next.jdbc {:mvn/version "1.3.981"}}}
;; H2 embedded database
:database/h2
{:extra-deps
{com.h2database/h2 {:mvn/version "2.3.232"}
com.github.seancorfield/next.jdbc {:mvn/version "1.3.981"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Data Science
;; Notebooks for Clojure
;; https://github.com/nextjournal/clerk
;; Alias can be used as an optional library for projects or REPL workflow
:lib/clerk
{:extra-deps {io.github.nextjournal/clerk {:mvn/version "0.17.1102"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Data inspectors / visualizers
;; Portal
;; Navigate data - edn, json, transit
;; https://github.com/djblue/portal
:inspect/portal-cli
{:extra-deps {djblue/portal {:mvn/version "0.58.4"}}}
:inspect/portal-web
{:extra-deps {djblue/portal {:mvn/version "0.58.4"}
org.clojure/clojurescript {:mvn/version "1.11.60"}}
:main-opts ["--main" "cljs.main"]}
:inspect/portal-node
{:extra-deps {djblue/portal {:mvn/version "0.58.4"}
org.clojure/clojurescript {:mvn/version "1.11.60"}}
:main-opts ["--main" "cljs.main" "-re" "node"]}
;; Morse - https://github.com/nubank/morse
:inspect/morse
{:extra-deps {io.github.nubank/morse
{:git/tag "v2023.10.06.02" :git/sha "88b5ff7"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Debug Tools
;; Flowstorm, a tracing debugger
;; https://github.com/jpmonettas/flow-storm-debugger
:lib/flowstorm
{:extra-deps {com.github.flow-storm/flow-storm-dbg {:mvn/version "4.0.2"}}}
;; Suggested FlowStorm approach.
;; Use patched Clojure compiler which instruments all evaluations
;; https://flow-storm.github.io/flow-storm-debugger/user_guide.html#_clojurestorm
:lib/clojurestorm
{:classpath-overrides {org.clojure/clojure nil}
:extra-deps {com.github.flow-storm/clojure {:mvn/version "1.12.0-2"}
com.github.flow-storm/flow-storm-dbg {:mvn/version "4.0.2"}}
;; Optionally add jvm-opt to manage instrumentation:
;; -Dclojure.storm.instrumentOnlyPrefixes=YOUR_INSTRUMENTATION_STRING"
:jvm-opts ["-Dclojure.storm.instrumentEnable=true"]}
;; End of Debug Tools
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Clojure Specifications
;; Clojure spec test.check (clojure spec included in Clojure 1.9 onwards)
:lib/spec-test
{:extra-deps
{org.clojure/test.check {:mvn/version "1.1.1"}}}
;; Clojure spec 2 - under active development
;; https://github.com/clojure/spec-alpha2
;; latest commit SHA is returned by the command
;; git ls-remote https://github.com/clojure/spec-alpha2.git refs/heads/master
:lib/spec2
{:extra-deps {org.clojure/spec-alpha2
{:git/url "https://github.com/clojure/spec-alpha2"
:sha "4cbfa677c4cd66339f18e1c122222c05c69e0d8e"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Testing Environment / Libraries
;; Include the test directory on the class path
:test/env
{:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}}}
:lib/ring-mock
{:extra-deps {ring/ring-mock {:mvn/version "0.4.0"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Test runners
;; Cognitect test-runner
;; https://github.com/cognitect-labs/test-runner
;; clojure -X:test/cognitect
:test/cognitect
{:extra-paths ["test"]
:extra-deps {io.github.cognitect-labs/test-runner
{:git/tag "v0.5.1" :git/sha "dfb30dd"}}
:main-opts ["--main" "cognitect.test-runner"]
:exec-fn cognitect.test-runner.api/test}
;; kaocha - comprehensive test runner for Clojure/Script
;; tests.edn should be created for each project
;; https://github.com/lambdaisland/kaocha
;; Default test runner using kaocha (change to your own preference)
;; clojure -X:test/run
;; - `:fail-fast? false` argument to run all tests
:test/run
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}
:main-opts ["--main" "kaocha.runner"]
:exec-fn kaocha.runner/exec-fn
:exec-args {:randomize? false
:fail-fast? true}}
:test/run-all
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}
:main-opts ["--main" "kaocha.runner"]
:exec-fn kaocha.runner/exec-fn
:exec-args {:randomize? false
:fail-fast? false}}
;; Kaocha test runner in watch mode
;; clojure -X:test/watch
;; - `:fail-fast? false` argument to run all tests
:test/watch
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}
:main-opts ["--main" "kaocha.runner" "--watch" "--fail-fast" "--skip-meta" ":slow"]
:exec-fn kaocha.runner/exec-fn
:exec-args {:watch? true
:randomize? false
:fail-fast? true}}
:test/cljs
{:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}
lambdaisland/kaocha-cljs {:mvn/version "1.5.154"}}
:main-opts ["--main" "kaocha.runner" "unit-cljs"]}
;; https://github.com/lambdaisland/kaocha-cucumbe
;; - used for kaocha-runner.el to run Kaocha test runner in Emacs Cider
:lib/kaocha
{:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Test Coverage tools
;; Cloverage - Simple clojure coverage tool
;; https://github.com/cloverage/cloverage
;; In the root of your Clojure project, run the command:
;; clojure -M:test/coverage
;; clojure -X:test/coverage
:test/coverage
{:extra-paths ["test"]
:extra-deps {cloverage/cloverage {:mvn/version "1.2.4"}}
:main-opts ["--main" "cloverage.coverage"
"--src-ns-path" "src"
"--test-ns-path" "test"]
:exec-fn cloverage.coverage/run-project
:exec-args {:src-ns-path ["src"]
:test-ns-path ["test"]}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; 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 -M:graph/vars -d graphs -f png src test
:graph/vars
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "9d6f2c1ede8be7ab4508065fe6b7e40e0c099ab6"}}
:main-opts ["--main" "thomasa.morpheus.main"]}
;; Generate PNG image of dependency graph in directory called `graphs`
;; clojure -M:graph/vars-png
:graph/vars-png
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "9d6f2c1ede8be7ab4508065fe6b7e40e0c099ab6"}}
:main-opts ["--main" "thomasa.morpheus.main"
"-d" "graphs" "-f" "png" "src" "test"]}
;; Generate SVG image of dependency graph in directory called `graphs`
;; clojure -M:graph/vars-svg
:graph/vars-svg
{:extra-deps {thomasa/morpheus
{:git/url "https://github.com/benedekfazekas/morpheus.git"
:sha "9d6f2c1ede8be7ab4508065fe6b7e40e0c099ab6"}}
:main-opts ["--main" "thomasa.morpheus.main"
"-d" "graphs" "-f" "svg" "src" "test"]}
;; Visualize connections between library dependencies and project namespaces
;; https://github.com/SevereOverfl0w/vizns
;; clojure -M:graph/ns-deps
:graph/ns-deps
{:extra-deps {io.dominic/vizns {:git/url "https://github.com/SevereOverfl0w/vizns.git"
:sha "36fed24e3673f0562fbc53d4c5d932c51fb0ac53"}}
:main-opts ["--main" "io.dominic.vizns.core"]}
;; Generate single PNG image of library dependencies
:graph/ns-deps-png
{:extra-deps {io.dominic/vizns {:git/url "https://github.com/SevereOverfl0w/vizns.git"
:sha "36fed24e3673f0562fbc53d4c5d932c51fb0ac53"}}
:main-opts ["--main" "io.dominic.vizns.core" "single" "-o" "deps-graph.png" "-f" "png"]}
;; GraphViz of project dependencies
;; https://github.com/clojure/tools.deps.graph
;; clojure -T:graph/deps
:graph/deps
{:replace-paths []
:replace-deps {org.clojure/tools.deps.graph {:mvn/version "1.1.90"}}
:ns-default clojure.tools.deps.graph
:exec-fn graph
:exec-args {:output "project-dependencies-graph.png"
:size true}}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; 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))
:performance/benchmark
{:extra-deps {criterium/criterium {:mvn/version "0.4.6"}}}
;; clj-memory-meter
;; - see https://github.com/clojure-goes-fast/clj-memory-meter
;; - (require '[clj-memory-meter.core :as memory-meter])
;; - (memory-meter/measure (your-expression))
:performance/memory-meter
{:extra-deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version "0.3.0"}}
:jvm-opts ["-Djdk.attach.allowAttachSelf"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Zulip Event announcement
:community/zulip-event
{:replace-paths []
:replace-deps {clojurians-zulip/feeds
{:git/url "https://gitlab.com/clojurians-zulip/feeds.git"
:sha "d7e9deaec0b492998e20dee7735e0ad31d83e246"}}
:main-opts ["--main" "inclined.main"
"--ns" "clojurians-zulip.events" "--"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Services
;; https://github.com/kachayev/nasus
;; simple zero-configuration command-line HTTP files server
:service/webserver
{:replace-deps {nasus/nasus {:mvn/version "0.1.7"}}
:main-opts ["--main" "http.server"]}
;; alternative name for webserver alias
:service/http
{:replace-deps {nasus/nasus {:mvn/version "0.1.7"}}
:main-opts ["--main" "http.server"]}
;; ---------------------------------------------------
;; ---------------------------------------------------
;; Socket REPL
;; Clojure Socket REPL on port 55555:
;; clojure -X:repl/socket
:repl/socket
{:exec-fn clojure.core.server/start-server
:exec-args {:name "socket-repl-server"
:port 55555
:accept clojure.core.server/repl
:server-daemon false}}
;; tubular - socket repl client
;; https://github.com/mfikes/tubular
;; Connect to a socket repl, e.g. :repl/socket
;; clojure -M:repl/socket-client
:repl/socket-client
{:extra-deps {tubular/tubular {:mvn/version "1.4.0"}}
:main-opts ["--main" "tubular.core"
"-p" "55555"]}
;; ---------------------------------------------------
;; Format tool friendly way to highlight end of configuration sections
:end/aliases {}}
:end/config {}}