Skip to content

Commit 5234a84

Browse files
authored
Merge pull request #148 from clj-commons/hls/20250702-hide-apply
Hide clojure.core/apply (and related)
2 parents 4a6f752 + 57cea55 commit 5234a84

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

CHANGES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
- Can override the style's :marker in a specific annotation
1010
- Markers must be strings or function (previously chars were allowed)
1111
- Support for three-character markers added (the middle character is repeated to pad)
12-
- Can omit line numbers with `annotate-lines`
12+
- Can omit line numbers with `annotate-lines`
13+
- `clj-commons.format.exceceptions/default-frame-rules`:
14+
- `clojure.core/with-bindings*` and `clojure.core/apply` are now hidden, not omitted
15+
- terminate at any `clojure.main` function
16+
17+
[Closed Issues](https://github.com/clj-commons/pretty/milestone/59?closed=1)
1318

1419
## 3.4.1 -- 23 Jun 2025
1520

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Pretty can output pretty tabular data:
131131
{:method :get
132132
:path "/status"
133133
:route-name :status}])
134+
134135
(print-table
135136
[:method
136137
:path

src/clj_commons/format/exceptions.clj

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,18 @@
119119
* omit `clojure.core/with-bindings*` and `clojure.core/apply`
120120
* hide everything in `sun.reflect`
121121
* omit a number of functions in `clojure.test`
122-
* terminate at `speclj.*`, `clojure.main/main*`, `clojure.main/repl/read-eval-print`, or `nrepl.middleware.interruptible-eval`
122+
* terminate at `speclj.*`, `clojure.main/.*`, or `nrepl.middleware.interruptible-eval`
123123
"
124-
[[:package "clojure.lang" :omit]
125-
[:name "clojure.core/with-bindings*" :omit]
124+
[[:name "clojure.core/apply" :hide]
125+
[:id #"\Qclojure.lang.AFn.applyTo\E(Helper)?.*" :hide]
126+
[:package "clojure.lang" :omit]
127+
[:name "clojure.core/with-bindings*" :hide]
126128
[:package #"sun\.reflect.*" :hide]
127129
[:package "java.lang.reflect" :omit]
128130
[:name #"speclj\..*" :terminate]
129-
[:name "clojure.core/apply" :omit]
130-
[:name #"nrepl\.middleware\.interruptible-eval/.*" :terminate]
131-
[:name #"clojure\.main/repl/read-eval-print.*" :terminate]
132-
[:name #"clojure\.main/main.*" :terminate]
131+
[:name #"\Qnrepl.middleware.interruptible-eval/\E.*" :terminate]
132+
[:name #"\Qclojure.main/\E.*" :terminate]
133+
[:name "clojure.test/run-tests" :terminate]
133134
[:name #"\Qclojure.test/\E(test-ns|test-all-vars|default-fixture).*" :omit]])
134135

135136
(def ^{:added "0.1.18"

test/demo.clj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@
105105
(prn `-main :args args)
106106
(println "Clojure version: " *clojure-version*)
107107
(println "Installing pretty exceptions ...")
108-
(repl/install-pretty-exceptions)
109108
(pout [:bold.green "ok"])
110-
(pst (make-exception))
109+
110+
(do
111+
(repl/install-pretty-exceptions)
112+
(pst (make-exception)))
113+
111114
(println "\nTesting reporting of repeats:")
112115
(try (countdown 20)
113116
(catch Throwable t (e/print-exception t)))

0 commit comments

Comments
 (0)