funcool

borkdude 2025-06-12T11:40:29.944959Z

@niwinz FYI I'm getting very close to get promesa to run with bb, which is cool because some important libraries are using it, which could then also run with bb. Hope you're in for a bb compatibility PR when I'm done :)

borkdude 2025-07-04T15:09:06.945219Z

https://github.com/funcool/promesa/pull/161

borkdude 2025-07-04T15:09:52.544649Z

oh yes, it depends currently on a dev build of bb, since LinkedList wasn't in there. let me fix that with a temp override

borkdude 2025-07-04T18:12:03.470629Z

I pushed a fix for the failing CLJS tests too (I guessed that the test would be similar to the CLJ test) https://github.com/funcool/promesa/pull/161 Ready for review

borkdude 2025-07-03T20:23:37.406949Z

I have made the csp + channel stuff working in bb as well. I found a project that used it so I thought, let's just fix it where possible.

$ bb -cp src:test -e "(require '[promesa.tests.exec-csp-test]) (clojure.test/run-tests 'promesa.tests.exec-csp-test)"

Testing promesa.tests.exec-csp-test

Ran 14 tests containing 66 assertions.
0 failures, 0 errors.
{:test 14, :pass 66, :fail 0, :error 0, :type :summary}
The only thing I needed to to is remove metadata support for channels (only for bb) and to remove the ISeq support (only for bb) and make chan->seq public PR upcoming if you're interested

niwinz 2025-07-04T06:29:41.174939Z

👍🏽

niwinz 2025-06-13T16:32:27.490379Z

of course :D

borkdude 2025-06-13T17:07:28.905119Z

@niwinz Awesome. I had a PR ready but I changed binding conveyance to bound-fn* which is probably not correct (in the sense that it ruins the performance gain for virtual threads). I'm now working on making clojure.Var/resetThreadBindingFrame etc working on bb, so I'll make the PR somewhat smaller

niwinz 2025-06-13T17:10:08.880789Z

nice, just a question, is bb supports conditional reder? i mean for a first approach we can think on use reader conditionals for make the code use bound-fn* on bb if it does not supports the var api for now

niwinz 2025-06-13T17:10:37.603059Z

later we can iterate on it for make it also more efficient on bb or maybe it is enough for bb scripting the bound-fn solution

borkdude 2025-06-13T17:12:22.712239Z

babashka actually also has clojure.core/binding-conveyor-fn so we could also use that. Perhaps we can just use it in JVM Clojure too? like

(def ^:private binding-conveyor-fn* @#'clojure.core/binding-conveyor-fn) 

niwinz 2025-06-13T17:12:56.653509Z

hmm looks reasonable

borkdude 2025-06-13T17:14:52.670619Z

There aren't actually any tests in promesa that fail when you don't convey the bindings

niwinz 2025-06-13T17:15:38.816679Z

noup, the test suite is not complete as it should be

borkdude 2025-06-13T17:16:14.319979Z

ok. also the CLJS tests are failing but you're probably aware of that?

borkdude 2025-06-13T17:16:24.662389Z

I did fix some CI thingie for CLJS in the PR

niwinz 2025-06-13T17:17:14.556109Z

yep, thanks, i still have some checks before releasing 12.0

borkdude 2025-06-13T17:20:51.239179Z

@niwinz Cool, here's my PR then which works with bb as released today

borkdude 2025-06-13T17:21:00.047839Z

https://github.com/funcool/promesa/pull/160/files

borkdude 2025-06-13T17:21:22.413999Z

(I cleaned up some unused imports while I was at it, hope you don't mind)

niwinz 2025-06-13T17:28:37.817569Z

Looks very nice! I think it can be merged as-is.

niwinz 2025-06-13T17:29:58.242029Z

i'm right now traveling so I think this week i can look to prepare the release a version

niwinz 2025-06-13T17:30:17.069299Z

i mean I probably can't do it this weekend...

borkdude 2025-06-13T17:30:22.622639Z

yeah sure, no problem!

niwinz 2025-06-13T17:31:15.450099Z

when you think the pr is ready, i can merge it, i looked the code and the proposed changes are all OK for me

borkdude 2025-06-13T17:31:57.751219Z

ready, I flipped the draft switch

niwinz 2025-06-13T17:48:13.342969Z

merged

niwinz 2025-06-13T17:48:13.425579Z

merged

borkdude 2025-06-13T17:48:52.546329Z

🎉 Thanks a lot!

borkdude 2025-06-13T17:49:45.689639Z

btw, the only namespace I tests were the core-tests, the rest I couldn't get to run (yet). But it seems the core namespace is the most widely used namespace anyway, right?

niwinz 2025-06-13T17:50:51.827559Z

yes, the core is the main abstraction for promise object

niwinz 2025-06-13T17:51:10.946099Z

other namespaces are more or les circumstantial

niwinz 2025-06-13T17:51:46.145809Z

we use them a lot at penpot, the exec and CSP and bulkhead

borkdude 2025-06-13T17:53:56.201689Z

yeah exec works, but bulkhead didn't I think.

$ bb -cp src -e "(require '[promesa.exec.bulkhead])"
----- Error --------------------------------------------------------------------
Type:     clojure.lang.ExceptionInfo
Message:  Protocol not found: clojure.core/Inst
Data:     {:type :sci/error, :line 54, :column 1, :file "/Users/borkdude/dev/promesa/src/promesa/exec/bulkhead.clj"}
Location: /Users/borkdude/dev/promesa/src/promesa/exec/bulkhead.clj:54:1
Ah well, we'll fix that another day :)