Skip to content

Commit aa27a7a

Browse files
author
awb99
committed
clojure-java-time dep removed
1 parent 0a25e14 commit aa27a7a

File tree

7 files changed

+20
-26
lines changed

7 files changed

+20
-26
lines changed

deps.edn

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
; differ
1515
lambdaisland/deep-diff2 {:mvn/version "2.0.108"} ; differ
1616
; files and resources
17-
babashka/fs {:mvn/version "0.1.1"}
17+
babashka/fs {:mvn/version "0.5.21"}
1818
resauce/resauce {:mvn/version "0.2.0"} ; jar resources
1919
hawk/hawk {:mvn/version "0.2.11"} ; file watcher ;:exclusions [[net.java.dev.jna/jna]] ; this breaks tech.ml.dataset and libpythonclj
2020
; encoding edn/transit/json
@@ -24,7 +24,8 @@
2424
cheshire/cheshire {:mvn/version "5.10.2"} ; JSON parsings and pretty printing
2525
; time encoding
2626
tick/tick {:mvn/version "0.6.2"} ; replacement for clj-time
27-
clojure.java-time/clojure.java-time {:mvn/version "0.3.3"}
27+
; 20240917 removed dep to clojure.java-time. we only use tick really
28+
;clojure.java-time/clojure.java-time {:mvn/version "0.3.3"} this caused clojure errors.
2829
com.andrewmcveigh/cljs-time {:mvn/version "0.5.2"}
2930
com.widdindustries/time-literals {:mvn/version "0.1.10"} ; also used by tick
3031
; image encoding
@@ -52,7 +53,7 @@
5253

5354
; https://github.com/clj-kondo/clj-kondo/blob/master/doc/jvm.md
5455
:lint
55-
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
56+
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "2024.08.29"}}
5657
:main-opts ["-m" "clj-kondo.main"
5758
"--lint"
5859
"src" "test"
@@ -121,10 +122,10 @@
121122
]}
122123

123124
; tree and list are here just because tools.deps.alpha does not work on my machine
124-
:tree {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.14.1178"}}
125-
:exec-fn clojure.tools.cli.api/tree}
126-
:list {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.14.1178"}}
127-
:exec-fn clojure.tools.cli.api/list}
125+
;:tree {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.14.1178"}}
126+
; :exec-fn clojure.tools.cli.api/tree}
127+
;:list {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.14.1178"}}
128+
; :exec-fn clojure.tools.cli.api/list}
128129

129130

130131
:nrepl

src/modular/date.cljc

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
(ns modular.date
22
(:require
33
[tick.core :as t]
4-
#?(:clj [java-time]))
4+
;#?(:clj [java-time])
5+
)
56
#?(:clj (:import
67
[java.util Date]
78
[java.text SimpleDateFormat]
@@ -22,10 +23,6 @@
2223

2324
;; local datetime
2425

25-
#_(defn now-local []
26-
(java-time/truncate-to
27-
(LocalDateTime/now) :seconds))
28-
2926
(defn now-local []
3027
(-> (t/now)
3128
(t/date-time)))

src/modular/encoding/edn.cljc

+7-7
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@
5858

5959
(time-literals.read-write/print-time-literals-clj!)
6060

61-
(clojure.edn/read-string "#inst \"1985-04-12T23:20:50.52Z\"")
62-
(clojure.edn/read-string "#time/date \"2021-11-04\"")
61+
#?(:clj
62+
(clojure.edn/read-string "#inst \"1985-04-12T23:20:50.52Z\""))
6363

64-
(def x (read-str "#time/date \"2011-01-01\""))
65-
(def x (read-str "#time/date-time \"2021-11-04T00:52:59.694154533\""))
64+
#?(:clj
65+
(clojure.edn/read-string "#time/date \"2021-11-04\""))
6666

67-
x
68-
(class x)
67+
(def x (edn/read-string "#time/date \"2011-01-01\""))
68+
(def x (edn/read-string "#time/date-time \"2021-11-04T00:52:59.694154533\""))
6969

70-
(pprint-str x)
70+
x
7171

7272
(str x)
7373
(pr-str x)

src/modular/helper/date.clj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(ns modular.helper.date
22
(:require
3-
[java-time])
3+
[tick.core :as t])
44
(:import
55
[java.util Date]
66
[java.text SimpleDateFormat]
@@ -15,8 +15,8 @@
1515
(tostring (now)))
1616

1717
(defn now-local []
18-
(java-time/truncate-to
19-
(LocalDateTime/now) :seconds))
18+
(-> (t/now)
19+
(t/date-time)))
2020

2121
; (local-date-time 2015 9 28 10 15)
2222

src/modular/persist/edn.clj

-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,5 @@
4949
(loadr "document/notebook.image/notebook.edn")
5050
(loadr "document/notebook.apple/notebook.edn")
5151

52-
(fipp.clojure/pprint x)
53-
5452
;
5553
)

test/modular/encoding/edn_test.clj

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns modular.encoding.edn-test
22
(:require
3-
[taoensso.timbre :as log :refer [info infof]]
43
[clojure.test :refer [deftest is testing]]
54
[modular.encoding.edn :refer [spit-edn slurp-edn]]
65
[modular.encoding.demo-data :refer [demo-data]]))

test/modular/encoding/transit_test.clj

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns modular.encoding.transit-test
22
(:require
3-
[taoensso.timbre :as log :refer [info infof]]
43
[clojure.test :refer [deftest is testing]]
54
[modular.encoding.transit :refer [spit-transit slurp-transit]]
65
[modular.encoding.demo-data :refer [demo-data]]))

0 commit comments

Comments
 (0)