Skip to content

Commit

Permalink
Merge pull request #177 from liquidz/dev
Browse files Browse the repository at this point in the history
Next release
  • Loading branch information
liquidz authored Jul 26, 2022
2 parents bf69baa + cbd81e7 commit 7d56010
Showing 5 changed files with 21 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
All notable changes to this project will be documented in this file. This change log follows the conventions of http://keepachangelog.com/[keepachangelog.com].

== Unreleased (dev)
// {{{
=== Changed
* Bumped kaocha to 1.69.1069.

=== Fixed
* https://github.com/liquidz/antq/issues/176[#176]: Fixed not to overwrite progress bar.
// }}}

== 1.9.867 (2022-07-22)
// {{{
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
:dev
{:extra-paths ["test"
"test/resources"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.68.1059"}
:extra-deps {lambdaisland/kaocha {:mvn/version "1.69.1069"}
lambdaisland/deep-diff2 {:mvn/version "2.3.127"}}
:jvm-opts ["-Dclojure.core.async.go-checking=true"]}

3 changes: 2 additions & 1 deletion src/antq/core.clj
Original file line number Diff line number Diff line change
@@ -177,7 +177,8 @@
deps)
uniq-deps (distinct-deps org-deps)
_ (report/init-progress uniq-deps options)
uniq-deps-with-vers (pmap #(assoc-versions % options) uniq-deps)
uniq-deps-with-vers (doall (pmap #(assoc-versions % options) uniq-deps))
_ (report/deinit-progress uniq-deps options)
assoc-latest-version* #(assoc-latest-version % options)]
(->> org-deps
(pmap #(complete-versions-by % uniq-deps-with-vers))
6 changes: 6 additions & 0 deletions src/antq/report.clj
Original file line number Diff line number Diff line change
@@ -21,3 +21,9 @@
(:reporter options)))

(defmethod run-progress :default [_ _] nil)

(defmulti deinit-progress
(fn [_dep options]
(:reporter options)))

(defmethod deinit-progress :default [_ _] nil)
6 changes: 5 additions & 1 deletion src/antq/report/table.clj
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@
[{:keys [width total-count current-count]}]
(let [width (or width 50)
ratio (int (* width (/ current-count total-count)))]
(format "[ %s%s ] %d/%d\r"
(format "[%s%s] %d/%d\r"
(apply str (repeat ratio "#"))
(apply str (repeat (- width ratio) "-"))
current-count
@@ -71,3 +71,7 @@
(swap! count-atom inc)
(log/async-print
(progress-text {:total-count total-count :current-count @count-atom})))))

(defmethod report/deinit-progress "table"
[_ _]
(println ""))

0 comments on commit 7d56010

Please sign in to comment.