cider icon indicating copy to clipboard operation
cider copied to clipboard

Instrumenting a function fails when more than eight keys are destructured

Open dpassen opened this issue 1 year ago • 2 comments

Expected behavior

Functions are capable of being instrumented for debugging, regardless of how many keys are destructured.

Actual behavior

An error is thrown when instrumenting a function when more than eight key-value pairs are associatively destructured.

class clojure.lang.Symbol cannot be cast to class clojure.lang.Keyword (clojure.lang.Symbol and clojure.lang.Keyword are in unnamed module of loader 'app')

Steps to reproduce the problem

Use cider-debug-defun-at-point on the following function definition:

(defn can-not-instrument
  [{one   :one
    two   :two
    three :three
    four  :four
    five  :five
    six   :six
    seven :seven
    eight :eight
    nine  :nine}]
  (format "%s-%s-%s-%s-%s-%s-%s-%s-%s" one two three four five six seven eight nine))

A reproduction repository is located here:

https://github.com/dpassen/cider-instrument-repro

Environment & Version information

CIDER version information

;; CIDER 1.16.0 (Kherson), nREPL 1.3.0
;; Clojure 1.12.0, Java 11.0.20.1

Lein / Clojure CLI version

Clojure CLI version 1.12.0.1479

Emacs version

29.4

Operating system

macOS Sonoma 14.5

JDK distribution

temurin-11.0.20+101

dpassen avatar Oct 29 '24 14:10 dpassen

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding!

github-actions[bot] avatar Jan 19 '25 02:01 github-actions[bot]

That's a pretty weird issue! @alexander-yakushev would be able to take a look?

bbatsov avatar Jan 23 '25 06:01 bbatsov