Skip to content

Commit 7c4c2de

Browse files
authored
Merge branch 'clojure-emacs:master' into fix-remote-enrich-classpath-init
2 parents efe3b84 + 5f8b17c commit 7c4c2de

File tree

95 files changed

+317
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+317
-463
lines changed

.github/stale.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Close inactive issues and pull requests
2+
on:
3+
schedule:
4+
- cron: "30 1 * * *"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
steps:
13+
- uses: actions/stale@v9
14+
with:
15+
days-before-issue-stale: 30
16+
days-before-issue-close: 30
17+
stale-issue-label: "stale"
18+
exempt-issue-labels: "high priority, good first issue, pinned"
19+
stale-issue-message: >-
20+
This issue has been automatically marked as stale because it has not
21+
had any recent activity. It will be closed soon if no further
22+
activity occurs. Thank you for your contribution and understanding!
23+
close-issue-message: >-
24+
This issue been automatically closed due to lack of activity. Feel free to re-open it
25+
if you ever come back to it.
26+
days-before-pr-stale: 30
27+
days-before-pr-close: 30
28+
exempt-pr-labels: "high priority, good first issue, pinned"
29+
stale-pr-message: >-
30+
This pull request has been automatically marked as stale because it has not
31+
had any recent activity. It will be closed soon if no further
32+
activity occurs. Thank you for your contribution and understanding!
33+
close-pr-message: >-
34+
This issue been automatically closed due to lack of activity. Feel free to re-open it
35+
if you ever come back to it.
36+
repo-token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
## master (unreleased)
44

55
### New features
6+
7+
- Automatic downloading of third-party Java sources for better Java documentation and jump-to-definition functionality. See [Obtaining source JARs](https://docs.cider.mx/cider/usage/working_with_documentation.html#obtaining-source-jars).
68
- CIDER [History](https://docs.cider.mx/cider/repl/history.html): Add a command to delete history item at point.
79

810
### Changes
911

1012
- Bump the injected nREPL version to [1.3.1](https://github.com/nrepl/nrepl/blob/master/CHANGELOG.md#131-2025-01-01).
11-
- Bump the injected `cider-nrepl` to [0.51.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0510-2025-01-01).
13+
- Bump the injected `cider-nrepl` to [0.52.0](https://github.com/clojure-emacs/cider-nrepl/blob/master/CHANGELOG.md#0520-2025-01-10).
1214
- [#3574](https://github.com/clojure-emacs/cider/issues/3574): New value `per-project` for `cider-repl-history-file` to save the history on a per-project basis.
1315

1416
### Bugs fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ site. [[Become a sponsor](https://opencollective.com/cider#sponsor)]
263263

264264
CIDER is distributed under the GNU General Public License, version 3.
265265

266-
Copyright © 2012-2024 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and
266+
Copyright © 2012-2025 Bozhidar Batsov, Artur Malabarba, Tim King, Phil Hagelberg and
267267
[contributors](https://github.com/clojure-emacs/cider/contributors).
268268

269269
[badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg

cider-apropos.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; cider-apropos.el --- Apropos functionality for Clojure -*- lexical-binding: t -*-
22

3-
;; Copyright © 2014-2024 Jeff Valk, Bozhidar Batsov and CIDER contributors
3+
;; Copyright © 2014-2025 Jeff Valk, Bozhidar Batsov and CIDER contributors
44
;;
55
;; Author: Jeff Valk <[email protected]>
66

cider-browse-ns.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; cider-browse-ns.el --- CIDER namespace browser -*- lexical-binding: t; -*-
22

3-
;; Copyright © 2014-2024 John Andrews, Bozhidar Batsov and CIDER contributors
3+
;; Copyright © 2014-2025 John Andrews, Bozhidar Batsov and CIDER contributors
44

55
;; Author: John Andrews <[email protected]>
66

cider-browse-spec.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; cider-browse-spec.el --- CIDER spec browser -*- lexical-binding: t; -*-
22

3-
;; Copyright © 2017-2024 Juan Monetta, Bozhidar Batsov and CIDER contributors
3+
;; Copyright © 2017-2025 Juan Monetta, Bozhidar Batsov and CIDER contributors
44

55
;; Author: Juan Monetta <[email protected]>
66

cider-cheatsheet.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; cider-cheatsheet.el --- Quick reference for Clojure -*- lexical-binding: t -*-
22

3-
;; Copyright © 2019-2024 Kris Jenkins, Bozhidar Batsov and CIDER contributors
3+
;; Copyright © 2019-2025 Kris Jenkins, Bozhidar Batsov and CIDER contributors
44
;;
55
;; Author: Kris Jenkins <[email protected]>
66
;; Kato Muso <[email protected]>

cider-classpath.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; cider-classpath.el --- Basic Java classpath browser -*- lexical-binding: t; -*-
22

3-
;; Copyright © 2014-2024 Bozhidar Batsov and CIDER contributors
3+
;; Copyright © 2014-2025 Bozhidar Batsov and CIDER contributors
44

55
;; This program is free software: you can redistribute it and/or modify
66
;; it under the terms of the GNU General Public License as published by

cider-client.el

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
;;; cider-client.el --- A layer of abstraction above low-level nREPL client code. -*- lexical-binding: t -*-
22

3-
;; Copyright © 2013-2024 Bozhidar Batsov
3+
;; Copyright © 2013-2025 Bozhidar Batsov
44
;;
55
;; Author: Bozhidar Batsov <[email protected]>
66

@@ -189,16 +189,20 @@ the current connection. Return the id of the sent message.
189189
If TOOLING is truthy then the tooling session is used."
190190
(nrepl-send-request request callback (or connection (cider-current-repl 'any 'ensure)) tooling))
191191

192-
(defun cider-nrepl-send-sync-request (request &optional connection abort-on-input)
192+
(defun cider-nrepl-send-sync-request (request &optional connection
193+
abort-on-input callback)
193194
"Send REQUEST to the nREPL server synchronously using CONNECTION.
194195
Hold till final \"done\" message has arrived and join all response messages
195196
of the same \"op\" that came along and return the accumulated response.
196197
If ABORT-ON-INPUT is non-nil, the function will return nil
197198
at the first sign of user input, so as not to hang the
198-
interface."
199+
interface.
200+
if CALLBACK is non-nil, it will additionally be called on all received messages."
199201
(nrepl-send-sync-request request
200202
(or connection (cider-current-repl 'any 'ensure))
201-
abort-on-input))
203+
abort-on-input
204+
nil
205+
callback))
202206

203207
(defun cider-nrepl-send-unhandled-request (request &optional connection)
204208
"Send REQUEST to the nREPL CONNECTION and ignore any responses.
@@ -342,6 +346,17 @@ The default value in nREPL is 1024."
342346
:group 'cider
343347
:package-version '(cider . "0.25.0"))
344348

349+
(defcustom cider-download-java-sources nil
350+
"Whether to automatically download source artifacts for 3rd-party Java classes.
351+
352+
When enabled, CIDER will attempt to download source JARs from Maven for
353+
Java classes if the source file is not found locally. This downloading only
354+
happens once per artifact, and only when the user jumps to definition or
355+
requests `cider-doc' on a Java class or a member of the class."
356+
:type 'boolean
357+
:group 'cider
358+
:package-version '(cider . "1.17.0"))
359+
345360
(defun cider--print-fn ()
346361
"Return the value to send in the nrepl.middleware.print/print slot."
347362
(pcase cider-print-fn
@@ -681,13 +696,25 @@ CONTEXT represents a completion context for compliment."
681696

682697
(defun cider-sync-request:info (symbol &optional class member context)
683698
"Send \"info\" op with parameters SYMBOL or CLASS and MEMBER, honor CONTEXT."
684-
(let ((var-info (thread-first `("op" "info"
685-
"ns" ,(cider-current-ns)
686-
,@(when symbol `("sym" ,symbol))
687-
,@(when class `("class" ,class))
688-
,@(when member `("member" ,member))
689-
,@(when context `("context" ,context)))
690-
(cider-nrepl-send-sync-request (cider-current-repl)))))
699+
(let* ((req
700+
`("op" "info"
701+
"ns" ,(cider-current-ns)
702+
,@(when symbol `("sym" ,symbol))
703+
,@(when class `("class" ,class))
704+
,@(when member `("member" ,member))
705+
,@(when context `("context" ,context))
706+
,@(when cider-download-java-sources `("download-sources-jar" "1"))))
707+
(callback
708+
(lambda (resp)
709+
(let ((status (nrepl-dict-get resp "status"))
710+
(coords (nrepl-dict-get resp "coords")))
711+
(when (member "download-sources-jar" status)
712+
(message "Local source not found, downloading Java sources for artifact %s/%s %s..."
713+
(nrepl-dict-get coords "group")
714+
(nrepl-dict-get coords "artifact")
715+
(nrepl-dict-get coords "version"))))))
716+
(var-info
717+
(cider-nrepl-send-sync-request req (cider-current-repl) nil callback)))
691718
(if (member "no-info" (nrepl-dict-get var-info "status"))
692719
nil
693720
var-info)))

0 commit comments

Comments
 (0)