File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## master (unreleased)
4
4
5
+ * [ #339 ] ( https://github.com/clojure-emacs/orchard/pull/339 ) : Inspector: support analytics for all maps and arrays.
6
+
5
7
## 0.34.1 (2025-04-23)
6
8
7
9
* [ #314 ] ( https://github.com/clojure-emacs/orchard/pull/314 ) : Print: add special printing rules for records and allow meta : type overrides.
Original file line number Diff line number Diff line change 688
688
(-> (render-class-name inspector obj)
689
689
(render-counted-length obj)
690
690
(render-labeled-value " Component Type" (.getComponentType (class obj)))
691
+ (render-analytics )
691
692
(render-section-header " Contents" )
692
693
(indent )
693
694
(render-collection-paged )
Original file line number Diff line number Diff line change 165
165
- lists of arbitrary collections
166
166
- arbitrary key-value maps"
167
167
[object]
168
- (or (tuples-stats object)
169
- (records-stats object)
170
- (keyvals-stats object)
171
- (basic-list-stats object true )))
168
+ (let [object (if (some-> (class object) (.isArray ))
169
+ ; ; Convert arrays into vectors to simplify analytics for them.
170
+ (vec object)
171
+ object)]
172
+ (or (tuples-stats object)
173
+ (records-stats object)
174
+ (keyvals-stats object)
175
+ (basic-list-stats object true ))))
172
176
173
177
(defn can-analyze?
174
178
" Simple heuristic: we currently only analyze collections (but most of them)."
175
179
[object]
176
180
(or (instance? List object)
177
- (instance? Map object)))
181
+ (instance? Map object)
182
+ (some-> (class object) (.isArray ))))
You can’t perform that action at this time.
0 commit comments