Skip to content

Commit 07cf028

Browse files
Update middleware docs
1 parent a0be7ac commit 07cf028

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Changes
66

7+
* [#877](https://github.com/clojure-emacs/cider-nrepl/pull/877): `inspect-refresh` middleware is now capable of setting all config options that `orchard.inspect` supports.
8+
* [#877](https://github.com/clojure-emacs/cider-nrepl/pull/877): Deprecate all `inspect-set-*` middleware ops.
79
* Bump `orchard` to [0.26.0](https://github.com/clojure-emacs/orchard/blob/master/CHANGELOG.md#0260-2024-06-30).
810

911
## 0.48.0 (2024-05-13)

doc/modules/ROOT/pages/nrepl-api/ops.adoc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -675,14 +675,18 @@ Returns::
675675

676676
=== `inspect-refresh`
677677

678-
Re-renders the currently inspected value.
678+
Updates inspector with the provided config and re-renders the current value.
679679

680680
Required parameters::
681681
* `:session` The current session
682682

683683

684684
Optional parameters::
685-
{blank}
685+
* `:max-atom-length` New max length of single rendered value
686+
* `:max-coll-size` New max size of rendered collection
687+
* `:max-nested-depth` New max nested depth of rendered collection
688+
* `:page-size` New page size
689+
686690

687691
Returns::
688692
* `:doc-block-tags-fragments` May be absent. Represent the 'param', 'returns' and 'throws' sections a Java doc comment. It's a vector of fragments, where fragment is a map with ``:type`` ('text' or 'html') and ``:content`` plain text or html markup, respectively
@@ -696,7 +700,7 @@ Returns::
696700

697701
=== `inspect-set-max-atom-length`
698702

699-
Set the max length of nested atoms to specified value.
703+
[DEPRECATED - use ``inspect-refresh`` instead] Set the max length of nested atoms to specified value.
700704

701705
Required parameters::
702706
* `:max-atom-length` New max length.
@@ -718,7 +722,7 @@ Returns::
718722

719723
=== `inspect-set-max-coll-size`
720724

721-
Set the number of nested collection members to display before truncating.
725+
[DEPRECATED - use ``inspect-refresh`` instead] Set the number of nested collection members to display before truncating.
722726

723727
Required parameters::
724728
* `:max-coll-size` New collection size.
@@ -740,7 +744,7 @@ Returns::
740744

741745
=== `inspect-set-max-nested-depth`
742746

743-
Set the maximum nested levels to display before truncating.
747+
[DEPRECATED - use ``inspect-refresh`` instead] Set the maximum nested levels to display before truncating.
744748

745749
Required parameters::
746750
* `:max-nested-depth` New nested depth.
@@ -762,7 +766,7 @@ Returns::
762766

763767
=== `inspect-set-page-size`
764768

765-
Sets the page size in paginated view to specified value.
769+
[DEPRECATED - use ``inspect-refresh`` instead] Sets the page size in paginated view to specified value.
766770

767771
Required parameters::
768772
* `:page-size` New page size.
@@ -1147,7 +1151,7 @@ Returns::
11471151

11481152
=== `retest`
11491153

1150-
[DEPRECATED - ``use test-var-query`` instead] Run all tests in the project. If ``load?`` is truthy, all project namespaces are loaded; otherwise, only tests in presently loaded namespaces are run. Results are cached for exception retrieval and to enable re-running of failed/erring tests.
1154+
[DEPRECATED - use ``test-var-query`` instead] Run all tests in the project. If ``load?`` is truthy, all project namespaces are loaded; otherwise, only tests in presently loaded namespaces are run. Results are cached for exception retrieval and to enable re-running of failed/erring tests.
11511155

11521156
Required parameters::
11531157
{blank}
@@ -1281,7 +1285,7 @@ Returns::
12811285

12821286
=== `test`
12831287

1284-
[DEPRECATED - ``use test-var-query`` instead] Run tests in the specified namespace and return results. This accepts a set of ``tests`` to be run; if nil, runs all tests. Results are cached for exception retrieval and to enable re-running of failed/erring tests.
1288+
[DEPRECATED - use ``test-var-query`` instead] Run tests in the specified namespace and return results. This accepts a set of ``tests`` to be run; if nil, runs all tests. Results are cached for exception retrieval and to enable re-running of failed/erring tests.
12851289

12861290
Required parameters::
12871291
{blank}

src/cider/nrepl.clj

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,12 @@ if applicable, and re-render the updated value."
335335
:requires {"session" "The current session"}
336336
:returns inspector-returns}
337337
"inspect-refresh"
338-
{:doc "Re-renders the currently inspected value."
338+
{:doc "Updates inspector with the provided config and re-renders the current value."
339339
:requires {"session" "The current session"}
340+
:optional {"page-size" "New page size"
341+
"max-atom-length" "New max length of single rendered value"
342+
"max-coll-size" "New max size of rendered collection"
343+
"max-nested-depth" "New max nested depth of rendered collection"}
340344
:returns inspector-returns}
341345
"inspect-next-page"
342346
{:doc "Jumps to the next page in paginated collection view."
@@ -347,22 +351,22 @@ if applicable, and re-render the updated value."
347351
:requires {"session" "The current session"}
348352
:returns inspector-returns}
349353
"inspect-set-page-size"
350-
{:doc "Sets the page size in paginated view to specified value."
354+
{:doc "[DEPRECATED - use `inspect-refresh` instead] Sets the page size in paginated view to specified value."
351355
:requires {"page-size" "New page size."
352356
"session" "The current session"}
353357
:returns inspector-returns}
354358
"inspect-set-max-atom-length"
355-
{:doc "Set the max length of nested atoms to specified value."
359+
{:doc "[DEPRECATED - use `inspect-refresh` instead] Set the max length of nested atoms to specified value."
356360
:requires {"max-atom-length" "New max length."
357361
"session" "The current session"}
358362
:returns inspector-returns}
359363
"inspect-set-max-coll-size"
360-
{:doc "Set the number of nested collection members to display before truncating."
364+
{:doc "[DEPRECATED - use `inspect-refresh` instead] Set the number of nested collection members to display before truncating."
361365
:requires {"max-coll-size" "New collection size."
362366
"session" "The current session"}
363367
:returns inspector-returns}
364368
"inspect-set-max-nested-depth"
365-
{:doc "Set the maximum nested levels to display before truncating."
369+
{:doc "[DEPRECATED - use `inspect-refresh` instead] Set the maximum nested levels to display before truncating."
366370
:requires {"max-nested-depth" "New nested depth."
367371
"session" "The current session"}
368372
:returns inspector-returns}
@@ -757,7 +761,7 @@ stack frame of the most recent exception. This op is deprecated, please use the
757761
:optional (merge wrap-print-optional-arguments)
758762
:returns (merge fail-fast-doc timing-info-return-doc)}
759763
"test"
760-
{:doc "[DEPRECATED - `use test-var-query` instead] Run tests in the specified namespace and return results. This accepts a set of `tests` to be run; if nil, runs all tests. Results are cached for exception retrieval and to enable re-running of failed/erring tests."
764+
{:doc "[DEPRECATED - use `test-var-query` instead] Run tests in the specified namespace and return results. This accepts a set of `tests` to be run; if nil, runs all tests. Results are cached for exception retrieval and to enable re-running of failed/erring tests."
761765
:optional wrap-print-optional-arguments
762766
:returns (merge fail-fast-doc timing-info-return-doc)}
763767
"test-all"
@@ -768,7 +772,7 @@ stack frame of the most recent exception. This op is deprecated, please use the
768772
{:doc "Rerun all tests that did not pass when last run. Results are cached for exception retrieval and to enable re-running of failed/erring tests."
769773
:optional wrap-print-optional-arguments}
770774
"retest"
771-
{:doc "[DEPRECATED - `use test-var-query` instead] Run all tests in the project. If `load?` is truthy, all project namespaces are loaded; otherwise, only tests in presently loaded namespaces are run. Results are cached for exception retrieval and to enable re-running of failed/erring tests."
775+
{:doc "[DEPRECATED - use `test-var-query` instead] Run all tests in the project. If `load?` is truthy, all project namespaces are loaded; otherwise, only tests in presently loaded namespaces are run. Results are cached for exception retrieval and to enable re-running of failed/erring tests."
772776
:optional wrap-print-optional-arguments
773777
:returns (merge fail-fast-doc timing-info-return-doc)}}})
774778

0 commit comments

Comments
 (0)