Open
Description
This reproduces the same problem of Clerk evaluating notebooks with inter-dependent LaTTe definitions.
(ns scratch
(:require [scratch.macros :refer [dep-def]]))
(dep-def X)
(dep-def Y X)
(ns scratch.macros)
(defmacro dep-def [name & deps]
(assert (every? #(some-> % resolve bound?) deps)
"All deps must to be defined and bound at macro-expansion!")
`(def ~name {:name '~name :refs '~deps}))
The assertion kicks in when analyzer encounters the second form in the scratch
namespace above, and the forms have not been evaluated before.