Fork me on GitHub
#announcements
<
2023-09-21
>
cheewah15:09:50

introducing the following libs for protobuf • https://github.com/s-expresso/clojobuf-codec serialize/deserialize protobuf binary format • https://github.com/s-expresso/rubberbuf transpile protobuf definitions into ast for easy manipulation/interpretation • https://github.com/s-expresso/clojobuf encode/decode plain map to/from protobuf binary (uses above 2 libs) and of course these 3 started off as 1 single project. at some point i decided to split them up, as the first 2 might be useful to others as standalone lib, so here we go 🙂

🎉 23
mpenet15:09:41

3rd link is a 404

cheewah15:09:41

thanks for informing. i forgot to change the repo visibility to public. it is fixed now

isak15:09:23

@U02SMNATXCY have you looked at https://github.com/appsFlyer/pronto? How does it compare?

cheewah15:09:57

It is a good library. Unfortunately lack of proto2 and cljs support makes it not ideal for my use case

isak15:09:54

Ah I see, makes sense

Eugen09:09:48

@U02SMNATXCY: have you looked at polylith to keep all in the same repo https://polylith.gitbook.io/polylith/ ?

cheewah10:09:01

i looked at polylith out of curiosity... just briefly, so my understanding on it is extremely limited. at the end i think these 3 libraries dependencies are simple enough (i.e. only lib3 depends on lib1 and lib2), and keeping them as separate project is also beneficial for end user who is only interested in say only lib1 or lib2 since the codebase is smaller. in local development, i simply make lib3 use :local/root for lib1/2. i am 96.27% sure i will start using polylith when i start building sufficiently complex application, but now seems like not the time yet ;)

jjttjj14:09:01

Woah this is exactly what i wanted to exist like a month ago when I was integrating a grpc thing for the first time. On windows, when I add the clojobuf git dep with the latest sha and start a clj repl I get

...
Checking out:  at 1f8689507eb5ac1e99aef2bb36eab89804811b5b
git --git-dir C:\Users\me\.gitlibs\_repos\https\\s-expresso\clojobuf-codec worktree add --force --detach C:\Users\me\.gitlibs\libs\s-expresso\clojobuf-codec\1f8689507eb5ac1e99aef2bb36eab89804811b5b 1f8689507eb5ac1e99aef2bb36eab89804811b5b
Preparing worktree (detached HEAD 1f86895)
error: invalid path 'resources/protobuf/generated-bin/singular/string_"the quick brown fox".protobin'
fatal: Could not reset index file to revision 'HEAD'.
Error building classpath. Unable to checkout 1f8689507eb5ac1e99aef2bb36eab89804811b5b
null

jjttjj14:09:00

I see there are the file paths here: https://github.com/s-expresso/clojobuf-codec/tree/main/resources/protobuf/generated-bin/singular I guess on windows there can't be a " in a file path. I can't even clone the clojubuf repo to try to change it 😅

cheewah00:09:41

hi thanks for reporting this. it should be fixed now with v.0.1.2

{:deps
 s-expresso/clojobuf {:git/url ""
                            :git/sha "3156e4b284b8c9f9ccbef376f0698490ca06842d"
                            :git/tag "v0.1.2"}}
will appreciate if you can take it for a spin and let me know if it works on windows now 🙂

jjttjj14:09:48

Seems to be working, thanks for the fix!

👍 1