-
-
Notifications
You must be signed in to change notification settings - Fork 649
cider-ns
- refinements
#3632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
cider-ns
- refinements
#3632
Changes from 3 commits
c940eca
6437d42
a76bec6
376e7b4
63d5d34
f85f741
9e7417e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,8 +137,9 @@ presenting the error message as an overlay." | |
;; jars are unlikely sources of user errors, so we favor the next `cause-dict': | ||
(not (string-prefix-p "jar:" file-url)) | ||
line) | ||
(setq buf (cider--find-buffer-for-file file-url)) | ||
(list buf (cons line column))))) | ||
(when-let ((found (cider--find-buffer-for-file file-url))) | ||
(setq buf found) | ||
(list buf (cons line column)))))) | ||
error))) | ||
(when jump-args | ||
(apply #'cider-jump-to jump-args) | ||
|
@@ -153,7 +154,7 @@ presenting the error message as an overlay." | |
(cider--display-interactive-eval-result trimmed-err | ||
'error | ||
(save-excursion | ||
(end-of-defun) | ||
(end-of-sexp) | ||
(point)) | ||
'cider-error-overlay-face))))) | ||
(cider--render-stacktrace-causes error) | ||
|
@@ -286,24 +287,27 @@ Uses the configured 'refresh dirs' \(defaults to the classpath dirs). | |
With a single prefix argument, or if MODE is `refresh-all', reload all | ||
namespaces on the classpath dirs unconditionally. | ||
|
||
With a double prefix argument, or if MODE is `clear', clear the state of | ||
the namespace tracker before reloading. This is useful for recovering from | ||
With a double prefix argument, or if MODE is `clear' (or `clear-and-inhibit'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably we'll need to document this somewhere in the manual as well, otherwise few people are going to find it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. While we're here, should the new mode be invokable through some prefix incantation? tbh I don't use prefixes at all so I wouldn't know how to add a new variation here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be nice indeed. I think multiple prefixes had to be checked as some number value in the code to differentiate them. There must be some examples in the code. I do think, however, we should start moving towards There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I expanded the user manual
In face of this maybe we can refrain from doubling down on prefixes (at least here). Transient rocks and would love to see a few features / examples of how it would look for CIDER |
||
clear the state of the namespace tracker before reloading. | ||
|
||
This is useful for recovering from | ||
some classes of error (for example, those caused by circular dependencies) | ||
that a normal reload would not otherwise recover from. The trade-off of | ||
clearing is that stale code from any deleted files may not be completely | ||
unloaded. | ||
|
||
With a negative prefix argument, or if MODE is `inhibit-fns', prevent any | ||
refresh functions (defined in `cider-ns-refresh-before-fn' and | ||
With a negative prefix argument, | ||
or if MODE is `inhibit-fns' (or `clear-and-inhibit'), | ||
prevent any refresh functions (defined in `cider-ns-refresh-before-fn' and | ||
`cider-ns-refresh-after-fn') from being invoked." | ||
(interactive "p") | ||
(cider-ensure-connected) | ||
(cider-ensure-op-supported "refresh") | ||
(cider-ensure-op-supported "cider.clj-reload/reload") | ||
(cider-ns-refresh--save-modified-buffers) | ||
(let ((clear? (member mode '(clear 16))) | ||
(let ((clear? (member mode '(clear clear-and-inhibit 16))) | ||
(all? (member mode '(refresh-all 4))) | ||
(inhibit-refresh-fns (member mode '(inhibit-fns -1)))) | ||
(inhibit-refresh-fns (member mode '(inhibit-fns clear-and-inhibit -1)))) | ||
(cider-map-repls :clj | ||
(lambda (conn) | ||
;; Inside the lambda, so the buffer is not created if we error out. | ||
|
Uh oh!
There was an error while loading. Please reload this page.