Skip to content

Commit

Permalink
Drop logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mk committed Jul 10, 2023
1 parent 41f402e commit 875c431
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/nextjournal/clerk.clj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"Recomputes the currently visible doc, without parsing it."
[]
(let [!doc (webserver/get-doc!)]
(prn :recompute! {})
(binding [*ns* (:ns @!doc)]
(let [{:keys [result time-ms]} (eval/time-ms (eval/eval-analyzed-doc @!doc))]
(println (str "Clerk recomputed '" @!last-file "' in " time-ms "ms."))
Expand Down
4 changes: 0 additions & 4 deletions src/nextjournal/clerk/analyzer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,4 @@
#_(find-blocks @nextjournal.clerk.webserver/!doc 'foo)
#_(find-blocks @nextjournal.clerk.webserver/!doc '(rand-int 1000))

(defn dependent-vars
[{:as analyzed-doc :keys [graph ->analysis-info]} vars-set]
(let [deps (dep/transitive-dependents-set graph vars-set)]
(into #{} (filter (comp :vars ->analysis-info) deps))))

10 changes: 3 additions & 7 deletions src/nextjournal/clerk/eval.clj
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@
#_(prn :thaw-error e)
nil))]
(wrapped-with-metadata (if introduced-var
(do
(prn :introduced-var introduced-var)
(var-from-def (intern (-> introduced-var namespace symbol)
(-> introduced-var name symbol)
cached-value)))
(var-from-def (intern (-> introduced-var namespace symbol)
(-> introduced-var name symbol)
cached-value))
cached-value)
hash)))

Expand Down Expand Up @@ -128,7 +126,6 @@
{:keys [result]} (time-ms (binding [config/*in-clerk* true]
(assert form "form must be set")
(with-redefs [clojure.core/intern (partial intern+record !interned-vars)]
(prn :eval form)
(eval form))))
result (if (and (nil? result) var (= 'defonce (first form)))
(find-var var)
Expand Down Expand Up @@ -249,7 +246,6 @@


(defn eval-in-session [{:as analyzed-doc :keys [session ns]}]
(prn :eval-in-session ns session)
(if session
(let [session-ns (session/session-ns-name analyzed-doc)]
(binding [*ns* (create-ns session-ns)]
Expand Down
1 change: 0 additions & 1 deletion src/nextjournal/clerk/render.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@
(defn set-reset-sync-atoms! [new-val] (set! *reset-sync-atoms?* new-val))

(defn intern-atoms! [atom-var-name->state]
(js/console.log :intern-atoms atom-var-name->state)
(let [vars-in-use (into #{} (keys atom-var-name->state))
vars-interned @!synced-atom-vars]
(doseq [var-name-to-unmap (set/difference vars-interned vars-in-use)]
Expand Down
5 changes: 2 additions & 3 deletions src/nextjournal/clerk/session.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

(defn in-session-ns [{:keys [ns session-ns]} var]
(if (and var session-ns)
(do (prn :in-session-ns session-ns ns var)
(symbol (str session-ns)
(name var)))
(symbol (str session-ns)
(name var))
var))

(def session-ns-prefix
Expand Down

0 comments on commit 875c431

Please sign in to comment.