portal

seancorfield 2024-01-06T22:55:23.349609Z

I ran across a situation where Portal stops showing new data, and tracked it down to a passing test report that produced a #object[..] value (based on a reify Object call). I'm trying to narrow it down to a small, self-contained repro -- but wondered if anyone had run into anything similar already? Maybe this just a restriction in Portal due to cljs rendering?

👀 1
djblue 2024-01-07T21:26:50.915459Z

Taking a look at this now 👌

djblue 2024-01-07T21:36:33.014089Z

Ohh, so the issue here is that objects are put into a hash-map so Portal can track what object it has sent to the UI.

djblue 2024-01-07T21:37:27.733219Z

I think some people saw similar issues with libpython-clj because a lot of python objects aren't hashable

➕ 1
djblue 2024-01-07T21:39:24.063629Z

https://github.com/djblue/portal/blob/master/src/portal/runtime.cljc#L114-L131 is the relevant code

djblue 2024-01-07T21:40:12.055909Z

I could see relaxing this requirement such that values that don't support hashing would only get a one-way mapping instead of a two-way mapping 🤔

seancorfield 2024-01-07T22:09:17.005929Z

And this came into HoneySQL via libpython-clj: https://github.com/seancorfield/honeysql/issues/509 🙂

djblue 2024-01-07T22:09:49.883709Z

Ok, I think I have a fix working locally 👍

seancorfield 2024-01-07T04:54:27.075799Z

https://github.com/djblue/portal/issues/208