Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove an undeclared ns cycle #240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 0.4.4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this from 0.4.4 to "Unreleased changes"


* manifold now requires Clojure 1.10 or later due to use of `requiring-resolve`

Contributions by Allen Rohner

### 0.4.3

* Improved clj-kondo exports
Expand Down Expand Up @@ -71,7 +77,7 @@ Contributions by Matthew Davidson, Ryan Smith
Contributions by Matthew Davidson, Ryan Smith

* Add `go-off`, a `core-async`-style macro with a manifold flavor. Big thanks to Ryan Smith and Yummly for contributing this!
* Switch to `bound-fn` in `let-flow` to fix bug where dynamic vars were incorrect for other threads
* Switch to `bound-fn` in `let-flow` to fix bug where dynamic vars were incorrect for other threads
* Modernized indentation to match current Clojure styles and fix misalignments

### 0.1.9
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ Manifold can use any transducer, which are applied via `transform`. It also pro
A Clojurescript implementation of Manifold can be found here: [dm3/manifold-cljs](https://github.com/dm3/manifold-cljs).


### Breaking Changes

### 0.4.4
- manifold now requires Clojure 1.10 or later due to use of `requiring-resolve`


### License

Copyright © 2014-2024 Zach Tellman.
Expand Down
8 changes: 2 additions & 6 deletions src/manifold/stream.clj
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,6 @@
([^IEventSource source default-val ^double timeout timeout-val]
(.take source default-val false timeout timeout-val)))

;;;

(require '[manifold.stream.graph])

(defn connect
"Connects a source to a sink, propagating all messages from the former into the latter.

Expand Down Expand Up @@ -331,7 +327,7 @@
connector (.connector ^IEventSource source sink)]
(if connector
(connector source sink options)
(manifold.stream.graph/connect source sink options))
((requiring-resolve 'manifold.stream.graph/connect) source sink options))
nil)))

;;;
Expand Down Expand Up @@ -866,7 +862,7 @@
(isSynchronous [_]
false)
(downstream [this]
(manifold.stream.graph/downstream this))
((requiring-resolve 'manifold.stream.graph/downstream) this))
(close [_]
(.close ^IEventStream buf))
(description [_]
Expand Down
2 changes: 1 addition & 1 deletion src/manifold/stream/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
(alterMeta [_ f# args#]
(manifold.utils/with-lock* ~'lock
(set! ~'__mta (apply f# ~'__mta args#))))
(~'downstream [this#] (manifold.stream.graph/downstream this#))
(~'downstream [this#] ((requiring-resolve 'manifold.stream.graph/downstream) this#))
(~'weakHandle [this# ref-queue#]
(manifold.utils/with-lock ~'lock
(or ~'__weakHandle
Expand Down
2 changes: 0 additions & 2 deletions src/manifold/stream/queue.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{:no-doc true}
(:require
[clj-commons.primitive-math :as p]
[manifold.stream.graph :as g]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, this is a little suspicious.

It looks like it can be safely removed, but it used to be the case that some namespaces were required to force initialization of necessary data structures that were indirectly needed. Yet another reason indirect requires are a bad idea.

Removing this looks ok afaict, tho.

[manifold.deferred :as d]
[manifold.stream.core :as s]
[manifold.utils :as utils])
Expand All @@ -11,7 +10,6 @@
AtomicReference]
[java.util.concurrent
BlockingQueue
LinkedBlockingQueue
TimeUnit]))

(s/def-source BlockingQueueSource
Expand Down