-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add support for deftype #345
Comments
Updated list above |
@GreshamDanielStephens Feedback on #547
|
Hi there, I have run into this as well while trying to port our queries that are using Hugsql to babashka. The |
Was looking at using datascript from nbb. After fixing a couple minor things on a fork, I ran into this formidable issue again. |
@logseq-cldwalker Protocols aren't really a problem, it's the Java interfaces that are the problem since you can't dynamically create types in a graalvm binary. But for the above examples to work, we would have to expose |
Alternatively we could make optional bindings for nbb, like we have for babashka, so you can make a home-built version of nbb with datascript. |
I already created an issue for the first option: #639 |
@borkdude Gotcha. Both options sound intriguing. The first option sounds potentially more powerful and reusable for others |
I added very basic support for deftype: it only supports immutable fields and basically behaves the same as records in SCI. Will follow up with more issues for:
|
Exciting! 🎉 |
@logseq-cldwalker Deftype is now supported, similar to defrecord (with the same restriction that you can't add Java interfaces currently). It'd be interesting to see which of the libs are now supported by this changes in the original post. |
I went through the list: unfortunately many of these libraries implement their own data structures using But I found that https://github.com/ont-app/igraph now works (at least the require doesn't crash), but due to a weird metadata usage in the library, I had to make one change in SCI / bb. So the library should now work with bb master (and if you include spec). I think we should also make spec a built-in. |
Hi. Thanks again for defprotocol landing! Similar to #279, I figured I'd start a list of libraries that are dependent on deftype. Known libraries dependent on deftype:
See Implement protocols #279 (comment) for more
https://github.com/clojure/test.checkSee Implement protocols #279 (comment) for moreIs your feature request related to a problem? Please describe.
Would like to use libraries that depend on deftype
Describe the solution you'd like
Deftype compatibility for sci and thus babashka
Describe alternatives you've considered
n/a
Additional context
n/a
The text was updated successfully, but these errors were encountered: