Skip to content

Commit

Permalink
v0.6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
philoskim committed Mar 1, 2020
1 parent b94b258 commit 3e467ef
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
20 changes: 12 additions & 8 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ To include `debux` in your project for development, simply add the following to

[source]
....
[philoskim/debux "0.6.3"]
[philoskim/debux "0.6.4"]
....

and this to your *production* dependencies.

[source]
....
[philoskim/debux-stubs "0.6.3"]
[philoskim/debux-stubs "0.6.4"]
....


Expand All @@ -65,6 +65,10 @@ and this to your *production* dependencies.
NOTE: You can see _All change logs since v0.3.0_
https://github.com/philoskim/debux/tree/master/doc/change-logs.adoc[here].

* v0.6.4
** Bug fixed: issue #16
** Bumps `clojure-future-spec 1.9.0` and `cljs-devtools 1.0.0`
* v0.6.3
** The printed format of evaluating the multiple forms in `dbg`/`clog` is changed for
readability. See the detalis <<eval-multiple-forms, here>>.
Expand Down Expand Up @@ -2012,8 +2016,8 @@ dbg: (repeat 5 "x") <5 times repeat> =>
[[number-option]]
### Number option

If you don't specify a number after the form returning the `coll` data type, *debux* macros
will print and return the default 100 items.
If you don't specify a number after the form returning the `coll` data type, *debux*
macros will print the default 100 items.

[source]
....
Expand Down Expand Up @@ -2051,9 +2055,9 @@ dbgn: (count (range 200)) =>
| 200
----

The same rule applies in case of evaluating an *infinite lazy-seq*. If you omit the number
in evaluating an *infinite lazy-seq*, in the same manner it will print and return default
100 elements to prevent `OutOfMemoryError`.
The same rule applies to the case of evaluating an *infinite lazy-seq*. If you omit the
number in evaluating an *infinite lazy-seq*, in the same manner it will print default 100
elements to prevent `OutOfMemoryError`.

[source]
....
Expand Down Expand Up @@ -2863,7 +2867,7 @@ an example about running the link:https://github.com/bhauman/lein-figwheel[figwh
(defproject examples "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.10.238"]
[philoskim/debux "0.6.3"]]
[philoskim/debux "0.6.4"]]
:plugins [[lein-cljsbuild "1.1.6"]
[lein-figwheel "0.5.10"]]
:source-paths ["src/clj"]
Expand Down
4 changes: 4 additions & 0 deletions doc/change-logs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
:source-highlighter: coderay
:sectnums:

* v0.6.4
** Bug fixed: issue #16
** Bumps `clojure-future-spec 1.9.0` and `cljs-devtools 1.0.0`
* v0.6.3
** The printed format of evaluating the multiple forms in `dbg`/`clog` is changed for
readability.
Expand Down
2 changes: 1 addition & 1 deletion examples/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.10.238"]
[org.clojure/core.async "0.3.465"]
[philoskim/debux "0.6.3"]]
[philoskim/debux "0.6.4"]]
:plugins [[lein-cljsbuild "1.1.7"]
[lein-figwheel "0.5.18"]]
:source-paths ["src/clj" "src/cljc"]
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject philoskim/debux "0.6.3"
(defproject philoskim/debux "0.6.4"
:description "A trace-based debugging library for Clojure and ClojureScript"
:url "https://github.com/philoskim/debux"
:license {:name "Eclipse Public License - v 1.0"
Expand Down
6 changes: 4 additions & 2 deletions src/debux/cs/clog.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
(defmacro clog-base
[form {:keys [msg n condition ns line style] :as opts} body]
`(let [condition# ~condition]
(if (or (nil? condition#) condition#)
(if (or ~(not (contains? opts :condition))
condition#)
(binding [ut/*indent-level* (inc ut/*indent-level*)]
(let [src-info# (str (ut/src-info ~ns ~line))
title# (str "%cclog: %c " (ut/truncate (pr-str '~form))
Expand Down Expand Up @@ -64,7 +65,8 @@
[form {:keys [msg n condition ns line style js once] :as opts}]
`(let [condition# ~condition
result# ~form]
(when (and (or (nil? condition#) condition#)
(when (and (or ~(not (contains? opts :condition))
condition#)
(cs.ut/changed? (str '~form " " '~(dissoc opts :ns :line))
(str result#) ))
(binding [ut/*indent-level* (inc ut/*indent-level*)]
Expand Down
6 changes: 4 additions & 2 deletions src/debux/cs/clogn.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
[form & [{:keys [msg n condition ns line style] :as opts}]]
`(let [~'+debux-dbg-opts+ ~(dissoc opts :print :once)
condition# ~condition]
(if (or (nil? condition#) condition#)
(if (or ~(not (contains? opts :condition))
condition#)
(let [src-info# (str (ut/src-info ~ns ~line))
title# (str "%cclogn: %c " (ut/truncate (pr-str '~form))
" %c" (and ~msg (str " <" ~msg ">")) " =>")
Expand All @@ -45,7 +46,8 @@
(defmacro break
"Sets a break point."
[{:keys [msg condition] :as opts}]
`(when (or (nil? ~condition) ~condition)
`(when (or ~(not (contains? opts :condition))
~condition)
(.log js/console (str "%c break %c"
(and ~msg (str " <" ~msg ">")))
"background: #FF1493; color: white"
Expand Down
3 changes: 2 additions & 1 deletion src/debux/dbg.clj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
(defmacro dbg-base
[form {:keys [msg n condition ns line] :as opts} body]
`(let [condition# ~condition]
(if (or (nil? condition#) condition#)
(if (or ~(not (contains? opts :condition))
condition#)
(binding [ut/*indent-level* (inc ut/*indent-level*)]
(let [src-info# (str (ut/src-info ~ns ~line))
title# (str "dbg: " (ut/truncate (pr-str '~form))
Expand Down
3 changes: 2 additions & 1 deletion src/debux/dbgn.clj
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,8 @@
(dissoc opts :print :style :js :once)
opts)
condition# ~condition]
(if (or (nil? condition#) condition#)
(if (or ~(not (contains? opts :condition))
condition#)
(binding [ut/*indent-level* (inc ut/*indent-level*)]
(let [src-info# (str (ut/src-info ~ns ~line))
title# (str "dbgn: " (ut/truncate (pr-str '~form))
Expand Down

0 comments on commit 3e467ef

Please sign in to comment.