Commit graph

415 commits

Author SHA1 Message Date
0154e5a032
fix: try_recv() channel error : delta may be None
basically if there was no change to report, the oneshot would not get
updated which is bad. so we put back the version we got and send a None
(the channel now has nullable TextChange). so basically its always a
try_recv, but its fine since recv is implemented with try_recv + poll
anyway
2024-08-17 00:17:01 +02:00
fdcfc611b1
feat(lua): hand rolled a_sync! to the rescue 2024-08-17 00:06:57 +02:00
cschen
e7fa9f4a5b fix: Worker list_users_returns a Vec<User> instead of Vec<Identity>
chore: formatter going to town
2024-08-16 16:46:32 +02:00
cschen
9d5aae461f feat: added the file name changed to the workspace event (uniform non-unit variant enum) 2024-08-16 16:15:48 +02:00
0d3af40eb0
feat(java): expose hash function, use OptionalLong in TextChange 2024-08-16 01:21:21 +02:00
8b704fa668
feat: impl so no longer needed from::
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-15 22:48:03 +02:00
79f132236f
feat(lua): impl all methods, add callback
this uses mlua beta but whatev api is so much better
2024-08-15 22:19:08 +02:00
a8ce56bcc0
feat: callback gets the controller itself as arg 2024-08-15 20:41:53 +02:00
c0d586df90
feat: Clone+Debug on api::Event 2024-08-15 20:15:37 +02:00
d3ce714070
feat: rather than +Debug, make a newtype 2024-08-15 20:15:23 +02:00
7900ca08a7
feat: added back .callback() to controller api 2024-08-15 19:32:01 +02:00
2f955ecef4
chore: pub(crate) for cursor controller too 2024-08-15 19:31:34 +02:00
cschen
e732e6a938 feat(python): adapted glue to latest changes, still todo workspace events. 2024-08-15 17:58:02 +02:00
b51e55570f
fix(lua): return error with context
maybe wasteful? but i really want this to show error strings
2024-08-15 03:45:50 +02:00
f1b8d83bac
fix: don't clone at the end of select_buffer 2024-08-15 03:42:48 +02:00
889f745dd4
feat(lua): .event(), userdata for WorkspaceEvent 2024-08-15 03:42:25 +02:00
3e37d4ffe3
fix: don't send anything if change is a noop 2024-08-14 23:53:51 +02:00
783a51a831
feat(lua): added script
this is mostly symbolic, to show how easy it is to deal with lua native
extensions (also i dont really want to pub this on luarocks yet...)
2024-08-14 23:46:45 +02:00
e43105b919
fix: textchange can be both delete and insert 2024-08-14 23:46:16 +02:00
a5502d1f1f
fix(java): use ext::hash() instead 2024-08-14 19:17:25 +02:00
39f69cc418
feat(java): xxh3 hash checking 2024-08-14 19:09:48 +02:00
fcd2b9f1c9
chore(java): async send 2024-08-14 18:51:34 +02:00
24f5bdf2a7
feat(lua): expose hash field in text change 2024-08-14 18:07:26 +02:00
2d20887509 chore: removed prelude imports and fixed glue exports 2024-08-14 18:00:12 +02:00
b46914528a chore: updated js glue to have async send/recv 2024-08-14 17:25:23 +02:00
8806941a13
feat(lua): expose hash fn 2024-08-14 17:16:58 +02:00
cschen
c58d1db58b fix: proper translation from dt::Operation to Textchange
Co-authored-by: alemi <me@alemi.dev>
2024-08-14 17:16:05 +02:00
97b7504098
feat: hash is a public ext 2024-08-14 17:12:36 +02:00
cschen
d22446ee10 fix: this time is the good one 2024-08-14 16:31:28 +02:00
cschen
6c30699acc Revert "(to alemi: always has been) fix: try now lmao."
This reverts commit 1b5b9e74bf.
2024-08-14 16:15:42 +02:00
cschen
1b5b9e74bf (to alemi: always has been) fix: try now lmao. 2024-08-14 16:07:19 +02:00
2916848165
fix(lua): its all async now 2024-08-14 15:56:36 +02:00
4bed9d7432
fix: cursor controller backpressure
Co-authored-by: cschen <cschen@codemp.dev>
2024-08-14 15:56:10 +02:00
413247f9b4
fix: update local version on send
also keep a branch on which we merge editor's changes, which kind of
solves our race condition thing

Co-authored-by: cschen <cschen@codemp.dev>
2024-08-14 15:55:18 +02:00
3346f1c526
feat: Controller::send is now async
needed because we want this to be acked, no longer a "fire and forget"
action

Co-authored-by: cschen <cschen@codemp.dev>
2024-08-14 15:55:06 +02:00
cschen
ef9da1740a chore: explaining an extra thing 2024-08-14 13:34:01 +02:00
cschen
4d65b2db7d fix: error in the worker that merged more operations than needed. 2024-08-14 13:32:18 +02:00
bd6423856b
chore(java): try_recv async 2024-08-14 00:27:26 +02:00
a9d713fd75
feat: async try_recv, delta_request
Co-authored-by: alemi <me@alemi.dev>
2024-08-14 00:24:32 +02:00
ada6ed49c1
fix(java): async content(), moved select_buffer 2024-08-13 21:58:40 +02:00
ab9c6530cd
fix: better try_recv mutex logic for cursor ctrl 2024-08-13 18:05:46 +02:00
2a016a6619
fix: add .content() back
except now its async and can fail and basically requests the worker to
generate the content for us on demand

Co-authored-by: zaaarf <me@zaaarf.foo>
Co-authored-by: cschen <cschen@codemp.dev>
2024-08-13 18:03:20 +02:00
8874f31eeb
fix: add from error for oneshot channel
this is getting a bit overused...

Co-authored-by: zaaarf <me@zaaarf.foo>
Co-authored-by: cschen <cschen@codemp.dev>
2024-08-13 18:00:17 +02:00
6e33339fa9
fix: lua off 2024-08-13 17:59:58 +02:00
cschen
9acb7b6007 wip: Some attempts at getting DT to work with buffer controller and buffer worker!
This attempt doesn't use a ref to the crdt! But uses an extra channel!
2024-08-13 00:36:09 +02:00
0dfba0064a
chore: removed unneeded parens 2024-08-10 16:13:44 +02:00
781a130c62
chore: moved tools into ext 2024-08-10 16:13:16 +02:00
9c6036da56
chore: export CodempEvent 2024-08-10 16:12:28 +02:00
6bf541028d
feat(java): replace all expect/unwrap with throwing JNIException 2024-08-10 02:45:20 +02:00
53503ae117
feat(java): glue for workspace events 2024-08-09 14:11:13 +02:00