Fork me on GitHub
#clojurescript
<
2023-12-20
>
Pepijn de Vos18:12:54

Hmmmm I can't figure out how to make the compiler happy here

41 |       (go-loop []
-------------^------------------------------------------------------------------
 Cannot infer target type in expression (. inst_7957 -oldcontent)
--------------------------------------------------------------------------------
I vaguely recall there was some bug with annotations in go blocks but that was years ago at this point

p-himik18:12:04

I believe the bug is still there. So none of ^js work in go. Usually can be relatively easily fixed by extracting such parts into their own functions.

Pepijn de Vos18:12:25

eh wat... is this just really hard to fix somehow or is async just kinda unmaintained or what

Pepijn de Vos18:12:05

but yea putting the offending code in a separate function solves it

p-himik18:12:51

Don't know for sure but seems to be a low priority.

p-himik18:12:49

Also, just in case - if you only use core.async on the CLJS side to deal with promises, you'd probably be much better of by interop'ing with those promises and not using core.async at all.

Pepijn de Vos18:12:34

in this case I am actually using a channel

👍 1
isak19:12:22

> eh wat... is this just really hard to fix somehow or is async just kinda unmaintained or what I think that is fair to say. There are critical issues with patches open for years.