Skip to content

Commit d1b068d

Browse files
committed
Remove def+
1 parent b6241a1 commit d1b068d

File tree

7 files changed

+21
-31
lines changed

7 files changed

+21
-31
lines changed

project.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject manifold "0.4.3"
1+
(defproject griffinbank/manifold "0.4.4-20250811"
22
:description "A compatibility layer for event-driven abstractions"
33
:license {:name "MIT License"
44
:url "http://opensource.org/licenses/MIT"}
@@ -10,7 +10,7 @@
1010
[org.clj-commons/primitive-math "1.0.0"]
1111
[riddley "0.2.0"]
1212
[org.clojure/core.async "1.6.673" :scope "provided"]
13-
[potemkin "0.4.6"]]
13+
[griffinbank/potemkin "0.4.9-20250811"]]
1414
:profiles {:dev {:dependencies [[criterium "0.4.6"]]
1515
:global-vars {*warn-on-reflection* true
1616
*unchecked-math* :warn-on-boxed}}

src/manifold/bus.clj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
(:require
55
[manifold
66
[stream :as s]
7-
[deferred :as d]
8-
[utils :refer [definterface+]]]
7+
[deferred :as d]]
98
[potemkin.types :refer [deftype+]]
109
[clj-commons.primitive-math :as p])
1110
(:import
@@ -16,7 +15,7 @@
1615

1716
(set! *unchecked-math* true)
1817

19-
(definterface+ IEventBus
18+
(definterface IEventBus
2019
(snapshot [])
2120
(subscribe [topic])
2221
(downstream [topic])

src/manifold/deferred.clj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
[manifold.debug :as debug]
99
[manifold.executor :as ex]
1010
[manifold.time :as time]
11-
[manifold.utils :as utils :refer [assert-some definterface+]]
12-
[potemkin.types :refer [def-abstract-type reify+ defprotocol+ deftype+]]
11+
[manifold.utils :as utils :refer [assert-some]]
12+
[potemkin.types :refer [def-abstract-type reify+ deftype+]]
1313
[clj-commons.primitive-math :as p]
1414
[riddley.compiler :as compiler]
1515
[riddley.walk :as walk])
@@ -44,11 +44,11 @@
4444
(set! *warn-on-reflection* true)
4545
(set! *unchecked-math* true)
4646

47-
(defprotocol+ Deferrable
47+
(defprotocol Deferrable
4848
(^:private to-deferred [_] "Provides a conversion mechanism to manifold deferreds."))
4949

5050
;; implies IDeref, IBlockingDeref, IPending
51-
(definterface+ IDeferred
51+
(definterface IDeferred
5252
(executor [])
5353
(^boolean realized [])
5454
(onRealized [on-success on-error])
@@ -336,7 +336,7 @@
336336

337337
;;;
338338

339-
(definterface+ IDeferredListener
339+
(definterface IDeferredListener
340340
(onSuccess [x])
341341
(onError [err]))
342342

@@ -354,7 +354,7 @@
354354
([on-success on-error]
355355
(Listener. on-success on-error)))
356356

357-
(definterface+ IMutableDeferred
357+
(definterface IMutableDeferred
358358
(success [x])
359359
(success [x claim-token])
360360
(error [x])

src/manifold/stream/core.clj

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
11
(ns manifold.stream.core
22
{:no-doc true}
3-
(:require [manifold.utils :refer [definterface+]]
4-
[potemkin.types :refer [deftype+ defprotocol+]]))
3+
(:require [potemkin.types :refer [deftype+]]))
54

6-
(defprotocol+ Sinkable
5+
(defprotocol Sinkable
76
(to-sink [_] "Provides a conversion mechanism to Manifold sinks."))
87

9-
(defprotocol+ Sourceable
8+
(defprotocol Sourceable
109
(to-source [_] "Provides a conversion mechanism to Manifold source."))
1110

12-
(definterface+ IEventStream
11+
(definterface IEventStream
1312
(description [])
1413
; Is the underlying class synchronous by default? NB: async usage is still possible, but requires wrapping
1514
(isSynchronous [])
1615
(downstream [])
1716
(weakHandle [reference-queue])
1817
(close []))
1918

20-
(definterface+ IEventSink
19+
(definterface IEventSink
2120
(put [x blocking?])
2221
(put [x blocking? timeout timeout-val])
2322
(markClosed [])
2423
(isClosed [])
2524
(onClosed [callback]))
2625

27-
(definterface+ IEventSource
26+
(definterface IEventSource
2827
(take [default-val blocking?])
2928
(take [default-val blocking? timeout timeout-val])
3029
(markDrained [])

src/manifold/stream/default.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[graph :as g]
1111
[core :as s]]
1212
[manifold.time :as time]
13-
[potemkin.types :refer [deftype+ defrecord+]]
13+
[potemkin.types :refer [deftype+]]
1414
[clj-commons.primitive-math :as p])
1515
(:import
1616
[java.util
@@ -35,8 +35,8 @@
3535

3636
(deftype+ Production [deferred message token])
3737
(deftype+ Consumption [message deferred token])
38-
(defrecord+ Producer [message deferred])
39-
(defrecord+ Consumer [deferred default-val])
38+
(defrecord Producer [message deferred])
39+
(defrecord Consumer [deferred default-val])
4040

4141
(defn de-nil [x]
4242
(if (nil? x)

src/manifold/time.clj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
[clojure.tools.logging :as log]
66
[manifold.executor :as ex]
77
[clojure.string :as str]
8-
[manifold.utils :refer [definterface+]]
9-
[potemkin.types :refer [defprotocol+]]
108
[clj-commons.primitive-math :as p])
119
(:import
1210
[java.util
@@ -130,11 +128,11 @@
130128

131129
;;;
132130

133-
(definterface+ IClock
131+
(definterface IClock
134132
(in [^double interval-millis ^Runnable f])
135133
(every [^double delay-millis ^double period-millis ^Runnable f]))
136134

137-
(defprotocol+ IMockClock
135+
(defprotocol IMockClock
138136
(now [clock] "Returns the current time for the clock")
139137
(advance [clock time]
140138
"Advances the mock clock by the specified interval of `time`.

src/manifold/utils.clj

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,6 @@
131131

132132
;;;
133133

134-
(defmacro definterface+ [name & body]
135-
(when-not (resolve name)
136-
`(definterface ~name ~@body)))
137-
138-
;;;
139-
140134
(defn fn->Function [f]
141135
(reify java.util.function.Function
142136
(apply [_ x] (f x))))

0 commit comments

Comments
 (0)