This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-07
Channels
- # announcements (20)
- # babashka (25)
- # beginners (48)
- # biff (26)
- # calva (5)
- # cider (3)
- # clara (7)
- # clerk (7)
- # clj-kondo (61)
- # cljdoc (3)
- # clojure (6)
- # clojure-austin (1)
- # clojure-conj (8)
- # clojure-europe (58)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-poland (1)
- # clojure-uk (9)
- # cursive (2)
- # emacs (11)
- # fulcro (8)
- # graphql (14)
- # gratitude (6)
- # humbleui (10)
- # hyperfiddle (17)
- # integrant (15)
- # introduce-yourself (1)
- # leiningen (5)
- # malli (13)
- # meander (21)
- # nbb (11)
- # off-topic (15)
- # pedestal (15)
- # polylith (15)
- # quil (28)
- # rdf (2)
- # reitit (3)
- # releases (6)
- # sci (21)
- # shadow-cljs (38)
- # spacemacs (3)
- # xtdb (6)
I'm trying to debug something with CIDER and I'm running into a weird issue. Did I find a bug or did I miss an important concept? I created a minimal example with steps to reproduce in 🧵.
alpha.clj
(ns oops.alpha)
(defn oops []
(if (= ::check :oops.alpha/check)
"Phew"
"BOOM"))
beta.clj
(ns oops.beta
(:require
[oops.alpha :refer [oops]]))
#dbg (defn do-oops []
(oops))
(comment
(do-oops)
:end)
Given the above project files, these are the steps to reproduce (with commands for Spacemacs).
• jack in; , '
• send oops.beta
buffer; , s b
• re-send do-oops
to instrument; , e e
on line 7 (Sending buffer seems to ignore the #dbg
.)
• eval (do-oops)
; , e e
on line 10
◦ debugger pops up, shows => "Phew"
on line 6
◦ weirdly didn't let me step in to oops
. Why?
• Hit i
to step in anyway.
◦ shows => "Phew"
on line 9.
• eval (do-oops)
; , e e
on line 10 (again)
◦ weirdly debugger didn't pop up in oops.beta
ns this time. Why?
◦ pops up in oops.alpha
instead.
◦ shows => false
for (= ::check :oops.alpha/check)
on line 4. ⁉️
▪︎ (optional) Hit e
to eval ::check
.
• shows => :oops.alpha/check
, as expected.
▪︎ (optional) Hit e
to eval (= ::check :oops.alpha/check)
.
• shows => true
. Contradiction!
• Hit c
to continue
◦ Now back in do-oops
◦ shows => "BOOM"
on line 6
• Hit c
to continue
◦ shows => "BOOM"
on line 9