summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-01-20 10:53:54 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-01-20 10:53:54 -0700
commitb9df1151f60f07d3c8632fdbe6318b5d70337718 (patch)
tree33b8ad2a47f78257853d1cab9c5fd41119f8748d /doc
parent3233785f6658e505a3ec54b192a3ba606d64f980 (diff)
parent50c7a0e84832acffce917461a457879a4f64459a (diff)
Merge tag 'v0.16.0+dfsg'
DFSG-clean upstream version 0.16.0
Diffstat (limited to 'doc')
-rw-r--r--doc/about/contributing.md5
-rw-r--r--doc/caveats.md2
-rw-r--r--doc/hacking_on_cider.md71
-rw-r--r--doc/indent_spec.md2
-rw-r--r--doc/installation.md8
-rw-r--r--doc/interactive_programming.md4
-rw-r--r--doc/running_tests.md24
-rw-r--r--doc/troubleshooting.md6
8 files changed, 105 insertions, 17 deletions
diff --git a/doc/about/contributing.md b/doc/about/contributing.md
index 107af8d2..de79d5e5 100644
--- a/doc/about/contributing.md
+++ b/doc/about/contributing.md
@@ -68,9 +68,8 @@ to become a CIDER sponsor.
You can support the development of CIDER, [clojure-mode][] and [inf-clojure][] via
[Open Collective](https://opencollective.com/cider),
[Salt](https://salt.bountysource.com/teams/cider),
-[Gratipay](https://www.gratipay.com/cider) and PayPal.
-
-[Support via Gratipay](https://gratipay.com/cider)
+[Patreon](https://www.patreon.com/bbatsov),
+[Liberapay](https://liberapay.com/bbatsov/donate) and PayPal.
[Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GRQKNBM6P8VRQ)
diff --git a/doc/caveats.md b/doc/caveats.md
index 8db678fa..64a87cfe 100644
--- a/doc/caveats.md
+++ b/doc/caveats.md
@@ -82,4 +82,4 @@ Leingingen also pulls in starting up the REPL will fail if `:pedantic? :abort`
is set. Either remove the `:pedantic? :abort` setting or switch off injecting
the dependencies with setting `cider-inject-dependencies-at-jack-in` to `nil` and
provide the dependencies by editing your `~/.lein/profiles.clj` as described in
-the [standalone REPL](#setting-up-a-standalone-repl) section.
+the [standalone REPL](installation.md#setting-up-a-standalone-repl) section.
diff --git a/doc/hacking_on_cider.md b/doc/hacking_on_cider.md
index 11c4e80f..908e49ff 100644
--- a/doc/hacking_on_cider.md
+++ b/doc/hacking_on_cider.md
@@ -77,6 +77,77 @@ You can also check for the presence of byte-compilation warnings in batch mode:
$ make test-bytecomp
```
+#### Running the tests in Travis CI
+
+If you prefer to see the full Travis CI test suite run successfully, the easiest
+way to achieve that is to create your own personal account on
+https://travis-ci.org. View your profile details on the Travis CI site, and
+toggle the switch to enable builds on your fork of the cider project.
+
+Subsequent pushes to your fork will generate a Travis CI build you can monitor
+for success or failure.
+
+#### Simulating the Travis CI tests locally in Docker
+
+If you prefer not to wait for Travis CI all the time, or if you need to debug
+something that fails in Travis CI but does not fail for you on your own machine,
+then you can also run the Travis CI tests manually in Docker.
+
+You will need to run some scripts to build and launch the Docker image.
+
+To build:
+
+```
+$ docker/build.sh
+```
+
+The build script uses a base image provided by the engineers at Travis CI.
+
+*Note: The Travis docker image is currently more than 8GB, so be prepared with a
+good internet connection and time to spare.*
+
+The resulting docker image is tagged simply `cider-travis`. You can run this
+image by hand, but there is a convenience script available:
+
+```
+$ docker/run.sh
+```
+
+This script launches a docker container and bind-mounts your cider project
+directory as `/home/travis/cider` such that you can instantly see any code
+changes reflected inside the docker environment.
+
+For instance, first you can run tests on Emacs 25.3:
+
+```
+(emacs-25.3-travis) ~/cider$ make test
+```
+
+And then switch to Emacs 26.1 and test again:
+
+```
+(emacs-25.3-travis) ~/cider$ evm use Emacs-26-pretest-travis
+(emacs-26-pretest-travis) ~/cider$ cask install
+(emacs-26-pretest-travis) ~/cider$ make test
+```
+
+You can test byte compilation too
+
+```
+(emacs-26-pretest-travis) ~/cider$ make test-bytecomp
+```
+
+When you are done working in docker, just `exit` the bash prompt, and the docker
+container will also exit. Note that `docker/run.sh` runs the container with
+`--rm`, meaning any changes to the docker container are discarded when the
+container exits.
+
+So for example, by default, the docker image pre-installs only the most recent
+releases of Emacs 25, Emacs 26, and a recent snapshot of the Emacs git
+repository. The `evm` tool is available should you need to install some other
+specific build. However additional versions of Emacs will be discarded when
+you exit the docker container.
+
## Hacking on cider-nrepl
### Obtaining the code
diff --git a/doc/indent_spec.md b/doc/indent_spec.md
index 2166a63f..cf101284 100644
--- a/doc/indent_spec.md
+++ b/doc/indent_spec.md
@@ -53,7 +53,7 @@ or `0` for short.
(want))
```
-Sticking to simplicity, the `when-let` macro has one special argument (the
+Sticking to simplicity, the `when-let*` macro has one special argument (the
binding vector) and there's no out-of-the-ordinary internal structure
involved. So the indent spec is just `1` (which is shorthand for `[1]`).
diff --git a/doc/installation.md b/doc/installation.md
index 98fef5b5..3cf6def7 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -34,7 +34,7 @@ Use the convenient plugin for defaults, either in your project's
A minimal `profiles.clj` for CIDER would be:
```clojure
-{:repl {:plugins [[cider/cider-nrepl "0.15.1"]]}}
+{:repl {:plugins [[cider/cider-nrepl "0.16.0"]]}}
```
**Be careful not to place this in the `:user` profile, as this way CIDER's
@@ -50,7 +50,7 @@ all of their projects using a `~/.boot/profile.boot` file like so:
(require 'boot.repl)
(swap! boot.repl/*default-dependencies*
- concat '[[cider/cider-nrepl "0.15.1"]])
+ concat '[[cider/cider-nrepl "0.16.0"]])
(swap! boot.repl/*default-middleware*
conj 'cider.nrepl/cider-middleware)
@@ -77,6 +77,6 @@ It goes without saying that your project should depend on `cider-nrepl`.
***
-`x.y.z` should match the version of CIDER you're currently using (say `0.15.1`).
+`x.y.z` should match the version of CIDER you're currently using (say `0.16.0`).
For snapshot releases of CIDER you should use the snapshot of the plugin as well
-(say `0.15.1-SNAPSHOT`).
+(say `0.16.0-SNAPSHOT`).
diff --git a/doc/interactive_programming.md b/doc/interactive_programming.md
index d9716e32..815a6fd6 100644
--- a/doc/interactive_programming.md
+++ b/doc/interactive_programming.md
@@ -22,8 +22,8 @@ Here's a list of `cider-mode`'s keybindings:
`cider-eval-last-sexp-and-replace` |<kbd>C-c C-v w</kbd> | Evaluate the form preceding point and replace it with its result.
`cider-eval-last-sexp-to-repl` |<kbd>C-c M-e</kbd> | Evaluate the form preceding point and output it result to the REPL buffer. If invoked with a prefix argument, takes you to the REPL buffer after being invoked.
`cider-insert-last-sexp-in-repl` |<kbd>C-c M-p</kbd> | Load the form preceding point in the REPL buffer.
-`cider-pprint-eval-last-sexp` |<kbd>C-c C-p</kbd> | Evaluate the form preceding point and pretty-print the result in a popup buffer.
-`cider-pprint-eval-defun-at-point` |<kbd>C-c C-f</kbd> | Evaluate the top level form under point and pretty-print the result in a popup buffer.
+`cider-pprint-eval-last-sexp` |<kbd>C-c C-p</kbd> | Evaluate the form preceding point and pretty-print the result in a popup buffer. If invoked with a prefix argument, insert the result into the current buffer as a comment.
+`cider-pprint-eval-defun-at-point` |<kbd>C-c C-f</kbd> | Evaluate the top level form under point and pretty-print the result in a popup buffer. If invoked with a prefix argument, insert the result into the current buffer as a comment.
`cider-eval-defun-at-point` |<kbd>C-M-x</kbd> <br/> <kbd>C-c C-c</kbd> | Evaluate the top level form under point and display the result in the echo area.
`cider-eval-sexp-at-point` |<kbd>C-c C-v v</kbd> | Evaluate the form around point.
`cider-eval-defun-at-point` |<kbd>C-u C-M-x</kbd> <br/> <kbd>C-u C-c C-c</kbd> | Debug the top level form under point and walk through its evaluation
diff --git a/doc/running_tests.md b/doc/running_tests.md
index fce7ba6a..29cbcfba 100644
--- a/doc/running_tests.md
+++ b/doc/running_tests.md
@@ -3,11 +3,22 @@
You can run `clojure.test` tests pretty quickly in CIDER. Pressing <kbd>C-c C-t
n</kbd> or <kbd>C-c C-t C-n</kbd> in a source buffer or a REPL buffer will run
the tests for the namespace you're currently in. CIDER is smart enough to figure
-out the namespace containing the tests. You can also run all loaded tests with
-<kbd>C-c C-t l</kbd> or <kbd>C-c C-t C-l</kbd> and all tests within a project
-with <kbd>C-c C-t p</kbd> or <kbd>C-c C-t C-p</kbd> (note that this will load
-**all** namespaces in your project). Using <kbd>C-c C-t t</kbd> or <kbd>C-c C-t
-C-t</kbd>, you can execute only the test a point.
+out the namespace containing the tests. The inference logic works in a pretty
+simple manner - if you're in an implementation namespace (e.g. `some.ns`) CIDER
+will try to find a matching test namespace (by default `some.ns-test`) and run
+the tests there. On the other hand - if you're in something that looks like a
+test namespace (e.g. `some.ns-test`), then the command will simply run the tests
+in that namespace. From time to time, however, you might want to suppress the
+test namespace inference logic (e.g. you have some tests in the implementation
+namespace that were defined with `clojure.test/with-test`)
+- in such cases you should use <kbd>C-u C-c C-t C-n</kbd>, which will simply run
+whatever tests are present in the currently visited/active namespace.
+
+You can also run all loaded tests with <kbd>C-c C-t l</kbd> or <kbd>C-c C-t
+C-l</kbd> and all tests within a project with <kbd>C-c C-t p</kbd> or <kbd>C-c
+C-t C-p</kbd> (note that this will load **all** namespaces in your
+project). Using <kbd>C-c C-t t</kbd> or <kbd>C-c C-t C-t</kbd>, you can execute
+only the test a point.
All test commands are available in REPL buffers as well. There you can also use
<kbd>,</kbd> to invoke some of the testing commands.
@@ -77,3 +88,6 @@ As a test framework author, supporting the built-in `clojure.test` machinery
The `test.check` library is a good example here. It was also designed completely
independently of `clojure.test`. It just adds compatibility in this
[namespace](https://github.com/clojure/test.check/blob/24f74b83f1c7a032f98efdcc1db9d74b3a6a794d/src/main/clojure/clojure/test/check/clojure_test.cljc).
+
+[clojure-expectations](https://github.com/clojure-expectations/expectations) added
+support for `clojure.test` in version 2.2 and should also work with CIDER.
diff --git a/doc/troubleshooting.md b/doc/troubleshooting.md
index 5d4a119b..982d8ddc 100644
--- a/doc/troubleshooting.md
+++ b/doc/troubleshooting.md
@@ -2,9 +2,13 @@ In case you run into issues here are a few tips that can help you diagnose the
problem.
Generally, it's not a bad idea to configure Emacs to spit the backtrace on error
-(instead of just logging the error in the `*Messages*` buffer. You can toggle
+(instead of just logging the error in the `*Messages*` buffer). You can toggle
this behavior by using <kbd>M-x</kbd> `toggle-debug-on-error`.
+Another good idea is to check the exchange of requests and responses between
+CIDER and the nREPL server. You can find them in the `*nrepl-messages*` buffer,
+provided you've enabled nREPL message logging.
+
## Debugging CIDER commands
Emacs features a super powerful built-in