Hey guys, I've been working my way through Missionary for Dummies locally (running b44) and ran into this issue: https://github.com/leonoel/missionary/issues/130
If it's not supposed to work anymore, that's fine too. I guess document it. My expectation is that with a prepared, continuous flow that deref would always succeed with the latest value, whatever that is (`:unknown` in this case). It should not throw an exception.
Thank you for sharing your expectations. It may have accidentally worked in the past but it was never supposed to work. Continuous flows can be seen as a succession of states, but they are not references and therefore they are not derefable.
The deref operation you're referring to is a low-level operation that is part of the flow protocol and not meant to be exposed in userland. Unlike the deref operation implemented on clojure reference types, it is NOT a read-only operation, it is an effectful operation that triggers a dataflow transfer across arbitrarily many nodes in the graph and must be adequately timed.
There is currently no way to simply get the current state of a signal, there are good reasons for that which are probably worth an essay.
If you're looking for a way to inspect the state of a signal at the repl, you can just block on the first value of the flow (but keep in mind it may trigger effects and/or realize lazy computations) :
(defn await-first [flow]
(m/? (m/reduce (comp reduced {}) nil flow)))
If you're looking for an equivalent of deref for reagent-like reactive references (i.e. to maintain the rest of the computation when the state changes), use m/?< in a m/cp block - cf this thread https://clojurians.slack.com/archives/CL85MBPEF/p1744060873602489