Skip to content

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

Open
@dpassen

Description

@dpassen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions