@@ -173,7 +173,6 @@ then concatenated into the \"-M[your-aliases]:cider/nrepl\" form."
173
173
:safe #'stringp
174
174
:package-version '(cider . " 1.1" ))
175
175
176
-
177
176
(defcustom cider-clojure-cli-global-aliases
178
177
nil
179
178
" Global aliases to include when jacking in with the clojure CLI.
@@ -186,7 +185,6 @@ then concatenated into the \"-M[your-aliases]:cider/nrepl\" form."
186
185
:safe #'stringp
187
186
:package-version '(cider . " 1.14" ))
188
187
189
-
190
188
(defcustom cider-shadow-cljs-command
191
189
" npx shadow-cljs"
192
190
" The command used to execute shadow-cljs.
@@ -376,6 +374,13 @@ The repl dependendcies are most likely to be nREPL middlewares."
376
374
:safe #'booleanp
377
375
:version '(cider . " 0.11.0" ))
378
376
377
+ (defcustom cider-enable-nrepl-jvmti-agent nil
378
+ " When t, add `-Djdk.attach.allowAttachSelf' to the command line arguments,
379
+ so that nREPL JVMTI agent can be loaded."
380
+ :type 'boolean
381
+ :safe #'booleanp
382
+ :version '(cider . " 1.15.0" ))
383
+
379
384
(defcustom cider-offer-to-open-cljs-app-in-browser t
380
385
" When nil, do not offer to open ClojureScript apps in a browser on connect."
381
386
:type 'boolean
@@ -536,7 +541,7 @@ Throws an error if PROJECT-TYPE is unknown."
536
541
" List of dependencies where elements are lists of artifact name and version." )
537
542
(put 'cider-jack-in-dependencies 'risky-local-variable t )
538
543
539
- (defcustom cider-injected-nrepl-version " 1.1.2 "
544
+ (defcustom cider-injected-nrepl-version " 1.2.0-beta2 "
540
545
" The version of nREPL injected on jack-in.
541
546
We inject the newest known version of nREPL just in case
542
547
your version of Boot or Leiningen is bundling an older one."
@@ -813,7 +818,9 @@ removed, LEIN-PLUGINS, LEIN-MIDDLEWARES and finally PARAMS."
813
818
(seq-map (lambda (middleware )
814
819
(concat " update-in :middleware conj "
815
820
middleware))
816
- lein-middlewares))
821
+ lein-middlewares)
822
+ (when cider-enable-nrepl-jvmti-agent
823
+ `(,(concat " update-in :jvm-opts conj " (shell-quote-argument " -Djdk.attach.allowAttachSelf" )))))
817
824
" -- " )
818
825
" -- "
819
826
(if (not cider-enrich-classpath)
@@ -903,9 +910,10 @@ your aliases contain any mains, the cider/nrepl one will be the one used."
903
910
(deps (format " {:deps {%s } :aliases {:cider/nrepl {:main-opts [%s ]}}} "
904
911
(string-join all-deps " " ) main-opts))
905
912
(deps-quoted (cider--shell-quote-argument deps command)))
906
- (format " %s -Sdeps %s -M%s :cider/nrepl%s "
913
+ (format " %s%s -Sdeps %s -M%s :cider/nrepl%s "
907
914
; ; TODO: global-options are deprecated and should be removed in CIDER 2.0
908
915
(if global-options (format " %s " global-options) " " )
916
+ (if cider-enable-nrepl-jvmti-agent " -J-Djdk.attach.allowAttachSelf " " " )
909
917
deps-quoted
910
918
(cider--combined-aliases)
911
919
(if params (format " %s " params) " " ))))
0 commit comments