Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

babashka compatibility #226

Open
Sohalt opened this issue Mar 13, 2023 · 7 comments
Open

babashka compatibility #226

Sohalt opened this issue Mar 13, 2023 · 7 comments

Comments

@Sohalt
Copy link

Sohalt commented Mar 13, 2023

It would be cool to have an implementation that works with babashka, to make libraries using manifold more universally available and manifold truly a lingua franca for asynchronous programming, as per the rationale.

@KingMob
Copy link
Collaborator

KingMob commented Mar 14, 2023

This probably also requires Graal compatibility. PRs welcome!

@KingMob
Copy link
Collaborator

KingMob commented Mar 14, 2023

Also see #184

@KingMob
Copy link
Collaborator

KingMob commented Apr 5, 2023

@Sohalt You tried to add Manifold to babashka, right? It would help if you could write up some of the issues you ran into.

@Akeboshiwind
Copy link

Not an expert in manifold by any means, but I came across this issue when looking into interceptors.

Here's a small reproduction of an error in babashka:

$ echo '{:deps {manifold/manifold {:mvn/version "0.4.2"}}}' > bb.edn
$ bb -e "(require '[manifold.deferred :as d])"
----- Error --------------------------------------------------------------------
Type:     java.lang.Exception
Message:  Unable to resolve classname: clj_commons.primitive_math.Primitives
Location: clj_commons/primitive_math.clj:4:3

----- Context ------------------------------------------------------------------
1: (ns clj-commons.primitive-math
2:   (:refer-clojure
3:     :exclude [* + - / < > <= >= == rem bit-or bit-and bit-xor bit-not bit-shift-left bit-shift-right unsigned-bit-shift-right byte short int float long double inc dec zero? min max true? false?])
4:   (:import
     ^--- Unable to resolve classname: clj_commons.primitive_math.Primitives
5:     [clj_commons.primitive_math Primitives]
6:     [java.nio ByteBuffer]))
7: 
8: ;;;
9: 

----- Stack trace --------------------------------------------------------------
clj-commons.primitive-math - clj_commons/primitive_math.clj:4:3
manifold.executor          - manifold/executor.clj:2:3
manifold.deferred          - manifold/deferred.clj:5:3
user                       - <expr>:1:1

Looks like the first issue is in primitive-math :)

@KingMob
Copy link
Collaborator

KingMob commented Mar 1, 2024

Dunno what that's about. The path/ns/etc are correct. No idea how bb loads it with sci.

Only possibility that immediately jumps to mind is, primitive-math was written in an older era, before Lein suggested separating the java- and clojure-containing src dirs. When both languages share the same src root (src/ in this case), you can occasionally see weird loading order issues. But that's with lein.

@Akeboshiwind
Copy link

I think it's that babashka doesn't load external java files, I'll admit I've not looked into it too much though.

Also don't worry about looking into it too heavily, I was mostly posting to add information not because I need this issue solved :)

@KingMob
Copy link
Collaborator

KingMob commented Mar 4, 2024

No worries, it's valuable. People ask about Graal compatibility every few months, but from the few stabs we've taken at it, it seems like a lot of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants