[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/cider 5023a0b6be 3/4: Update docs and variables related to
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/cider 5023a0b6be 3/4: Update docs and variables related to enrich-classpath (#3152) |
Date: |
Sat, 5 Mar 2022 02:57:55 -0500 (EST) |
branch: elpa/cider
commit 5023a0b6be1d93a809f507626170720cd789f8b7
Author: vemv <vemv@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Update docs and variables related to enrich-classpath (#3152)
---
CHANGELOG.md | 3 ++
cider-stacktrace.el | 1 -
cider-util.el | 28 ----------
doc/modules/ROOT/pages/about/compatibility.adoc | 7 ++-
doc/modules/ROOT/pages/config/basic_config.adoc | 61 ----------------------
doc/modules/ROOT/pages/troubleshooting.adoc | 16 ++++--
.../pages/usage/working_with_documentation.adoc | 12 +----
7 files changed, 22 insertions(+), 106 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c199edb76f..ed0148c1c5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,9 @@
* `cider-jack-in-lein-plugins` no longer affects non-Leiningen projects.
* Third-party packages should rely on `cider-jack-in-dependencies` instead.
* Upgrade cider-nrepl to
[0.28.3](https://github.com/clojure-emacs/cider-nrepl/blob/v0.28.3/CHANGELOG.md#0283-2022-02-22).
+* Enable `cider-enrich-classpath` by default.
+* Remove `cider-jdk-src-paths` defcustom since enrich-classpath makes it
redundant.
+* Remove `cider-resolve-java-class` function since enrich-classpath makes it
redundant.
### Bugs fixed
diff --git a/cider-stacktrace.el b/cider-stacktrace.el
index 47f06bc139..519a2f5528 100644
--- a/cider-stacktrace.el
+++ b/cider-stacktrace.el
@@ -542,7 +542,6 @@ Achieved by destructively manipulating
`cider-stacktrace-suppressed-errors'."
(line-shift (- (or (button-get button 'line) 0)
(or (nrepl-dict-get info "line") 1)))
(file (or
- (and (null var) (cider-resolve-java-class class))
(nrepl-dict-get info "file")
(button-get button 'file)))
;; give priority to `info` files as `info` returns full paths.
diff --git a/cider-util.el b/cider-util.el
index 158fcb69dd..c35f925975 100644
--- a/cider-util.el
+++ b/cider-util.el
@@ -797,34 +797,6 @@ KIND can be the symbols `ns', `var', `emph', `fn', or a
face name."
(t x)))
menu-list))
-(defcustom cider-jdk-src-paths '("/usr/lib/jvm/openjdk-8/src.zip")
- "Used by `cider-stacktrace-navigate'.
-Zip/jar files work, but it's better to extract them and put the directory
-paths here. Clojure sources here:
-https://repo1.maven.org/maven2/org/clojure/clojure/1.8.0/."
- :group 'cider
- :package-version '(cider . "0.17.0")
- :type '(list string))
-
-(defun cider-resolve-java-class (class)
- "Return a path to a Java source file that corresponds to CLASS.
-
-This will be a zip/jar path for archived sources and a normal
-file path otherwise."
- (when class
- (let ((file-name (concat (replace-regexp-in-string "\\." "/" class)
".java")))
- (cl-find-if
- 'file-exists-p
- (mapcar
- (lambda (d)
- (cond ((file-directory-p d)
- (expand-file-name file-name d))
- ((and (file-exists-p d)
- (member (file-name-extension d) '("jar" "zip")))
- (format "zip:file:%s!/%s" d file-name))
- (t (error "Unexpected archive: %s" d))))
- cider-jdk-src-paths)))))
-
(provide 'cider-util)
;;; cider-util.el ends here
diff --git a/doc/modules/ROOT/pages/about/compatibility.adoc
b/doc/modules/ROOT/pages/about/compatibility.adoc
index 038519b9ba..6569ec4fff 100644
--- a/doc/modules/ROOT/pages/about/compatibility.adoc
+++ b/doc/modules/ROOT/pages/about/compatibility.adoc
@@ -17,13 +17,16 @@ and Boot releases.
== Java
-CIDER officially targets Java 8, Java 11 and the most recent rapid
-release version (e.g. Java 15). Generally speaking, we aim
+CIDER officially targets Java 8, Java 11, Java 17, and the most recent rapid
+release version (e.g. Java 18). Generally speaking, we aim
to support all Java releases that are currently officially supported
by Oracle.
NOTE: The requirements for Java are pretty much ``cider-nrepl``'s requirements.
+On Linux you are also strongly advised to make sure that JDK sources and
javadocs are installed.
+You can find example commands in
xref:troubleshooting.adoc#navigation-to-jdk-sources-doesnt-work[Troubleshooting].
+
== Clojure
CIDER targets Clojure 1.8+. As Clojure doesn't have the concept of supported
releases
diff --git a/doc/modules/ROOT/pages/config/basic_config.adoc
b/doc/modules/ROOT/pages/config/basic_config.adoc
index cbbfba1be8..ed3bda77b9 100644
--- a/doc/modules/ROOT/pages/config/basic_config.adoc
+++ b/doc/modules/ROOT/pages/config/basic_config.adoc
@@ -211,67 +211,6 @@ different configurations.
In this example, the path `/src` will be translated to the correct path of your
Clojure project on the host machine. And `/root/.m2` to the host's `~/.m2`
folder.
-== Use a Local Copy of the JDK API Documentation
-
-If you are targeting the JVM and prefer a local copy of the JDK API
-documentation over Oracle's official copy (e.g., for
-http://docs.oracle.com/javase/8/docs/api/[JavaSE 8]), per nREPL's
-http://docs.oracle.com/javase/8/docs/api/[`javadoc-info` logic (accurate as of
29 Dec 2014)],
-you can arrange your project to include the *root* path of the local API doc
-(i.e., where the `index.html` is located) to be included on your classpath
-(i.e., where the doc HTML files can be located by
-`clojure.java.io/resource`). For example, for Leiningen, with the local API
-path being `/usr/share/doc/java/api/`, put the following line in
-`project.clj`:
-
-[source,clojure]
-----
-:dev {:resource-paths ["/usr/share/doc/java/api/"]}
-----
-
-*or* the following line in `$HOME/.lein/profiles.clj`:
-
-[source,clojure]
-----
-:user {:resource-paths ["/usr/share/doc/java/api/"]}
-----
-
-More details can be found
https://github.com/clojure-emacs/cider/issues/930[here].
-
-== Use a Local Copy of the Java Source Code
-
-When an exception is thrown, e.g. when eval-ing `(. clojure.lang.RT foo)`, a
-stack trace pops up. Some places of the stack trace link to Clojure files,
-others to Java files. By default, you can click the Clojure file links to
-navigate there. If you configure `cider-jdk-src-paths`, you can also click the
-Java file links to navigate there.
-
-On Windows and macOS the JDK source code is bundled with the JDK. On Windows
its
-typical location is `+C:\Program Files\Java\{jdk-version}\src.zip+`
-and on macOS it's
`+/Library/Java/JavaVirtualMachines/{jdk-version}/Contents/Home/src.zip+`.
-
-On Linux distributions usually the source code is distributed as a separate
package.
-Here's how do get the JDK 8 source on Debian/Ubuntu:
-
- $ sudo apt install openjdk-8-source
-
-The zip is installed to `/usr/lib/jvm/openjdk-8/src.zip`.
-
-Here's how to get the JDK 11 source on Red Hat/Fedora:
-
- $ sudo dnf install java-11-openjdk-src
-
-You can download Clojure Java source code from
-https://repo1.maven.org/maven2/org/clojure/clojure/1.8.0/clojure-1.8.0-sources.jar[here].
-
-Extract both and configure e.g. like so:
-
- (setq cider-jdk-src-paths '("~/java/clojure-1.8.0-sources"
- "~/java/openjvm-8-src"))
-
-It's possible to point `cider-jdk-src-paths` to `jar` or `zip` files, but
extracting
-them is better since you can use features like `ag` or `dired-jump`.
-
== Filter out namespaces in certain namespace-related commands
You can hide all nREPL middleware details from `cider-browse-ns*` and
`cider-apropos*`
diff --git a/doc/modules/ROOT/pages/troubleshooting.adoc
b/doc/modules/ROOT/pages/troubleshooting.adoc
index bc926cfccc..34419edf24 100644
--- a/doc/modules/ROOT/pages/troubleshooting.adoc
+++ b/doc/modules/ROOT/pages/troubleshooting.adoc
@@ -310,20 +310,30 @@ the `enrich-classpath` integration like this:
=== Navigation to JDK sources doesn't work
-If you can't navigate to the source of built-in methods like `.toUpperCase` you
+Firstly, make sure that you are using enrich-classpath.
`cider-enrich-classpath` should be truthy.
+If you are launching your own repl process, it should have the
enrich-classpath Leiningen plugin or `clojure` wrapper.
+
+If you are on Linux and still can't navigate to the source of built-in methods
like `.toUpperCase` you
probably haven't installed the JDK sources. While you're at it - it's good to
install the JDK's Javadocs as well. On Debian/Ubuntu:
[source,shell]
----
-$ sudo apt install openjdk-11-source openjdk-11-doc
+$ sudo apt install openjdk-17-source openjdk-17-doc
----
On Red Hat/Fedora/CentOS:
[source,shell]
----
-$ sudo dnf install java-11-openjdk-src java-11-openjdk-javadoc
+$ sudo dnf install java-17-openjdk-src java-17-openjdk-javadoc
+----
+
+On Guix:
+
+[source,shell]
+----
+$ guix package -i openjdk:jdk
----
NOTE: On Windows and macOS the JDK source code is bundled with the JDK.
diff --git a/doc/modules/ROOT/pages/usage/working_with_documentation.adoc
b/doc/modules/ROOT/pages/usage/working_with_documentation.adoc
index f3764489e4..9676d0772e 100644
--- a/doc/modules/ROOT/pages/usage/working_with_documentation.adoc
+++ b/doc/modules/ROOT/pages/usage/working_with_documentation.adoc
@@ -16,17 +16,7 @@ by the symbol (special form, var, Java method, etc).
CIDER provides a quick access to the online Javadoc documentation
via the command `cider-javadoc`.
-By default this will work only for Java code that's part of Clojure
-or the JDK. You can add additional remote JavaDoc URLs manually like this:
-
-[source,clojure]
-----
-(javadoc/add-remote-javadoc "com.amazonaws."
"http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/")
-(javadoc/add-remote-javadoc "org.apache.kafka."
"https://kafka.apache.org/090/javadoc/")
-----
-
-Down the road we might simplify the process by adding the ability to
-specify such mappings via CIDER's configuration.
+This requires `enrich-classpath` to be enabled.
== ClojureDocs