Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrumenting a function fails when more than eight keys are destructured #3752

Open
dpassen opened this issue Oct 29, 2024 · 0 comments
Open
Labels

Comments

@dpassen
Copy link
Contributor

dpassen commented Oct 29, 2024

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

@bbatsov bbatsov added the bug label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants