I'm having difficulty with calling new on a m/latest.
Context: https://github.com/milelo/electric-multi-client-app/blob/main/src/lib/xtdb.clj#L9 is what I have
Then when pulling out a db from there, doing it via
((xtdb.db/latest-db> @xtdb.db/!xtdb) (constantly nil) (constantly nil))
works and pulls out a Latest$Process that can be deref'd.
But the demos are all pointing to using
(new (xtdb.db/latest-db> @xtdb.db/!xtdb))
which should be returning something reactive, but it's just... not. It's returning a java.lang.Object. Reflect is giving me nothing but the basic Object members.
So it looks like it's not being cast correctly when returning, but I've no idea what it should be doing/what I'm doing incorrectly here.
I couldn't find anything in the missionary docs referring to new usage, but I'm possibly blindnew is electric, it doesn't mean anything in missionary
I'm surprised it even compiles when it's called on something that is not a constructor
Oh fair enough then. I thought it was something missionary did. I'll go re-ask it in #hyperfiddle Thank you!
https://clojurians.slack.com/archives/C7Q9GSHFV/p1736322079014559