cschen
f8c36be6ea
feat: updated workspace manually anyway even if commented so that we have it ready just in case
2024-08-17 01:09:29 +02:00
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
ef2285d0f3
Merge branch 'dev' into pyo3_bump
2024-08-16 16:50:55 +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
cschen
610576f8b7
feat: Bumping to pyo3 0.22, removing pyo3-asyncio, moving code around to allow for
...
smoother pyo3 aggregation.
2024-08-16 12:58:43 +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
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
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
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
cschen
264dd319d3
fix(python): fixed the type hints, adapted glue to latest workspace, uniformed names in the glue
...
chore: forgot a file
2024-08-09 09:14:35 +02:00
29ffba3309
chore: remove unused deps and imports
2024-08-09 00:49:31 +02:00
61be0009ba
fix: removed InternallyMutable::wait
...
its broken in weird ways, just dont use it that way
2024-08-09 00:40:46 +02:00
a8b4eab445
feat: api struct for event
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-09 00:40:33 +02:00
07dd964466
fix: improved workspace events channel
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-09 00:39:58 +02:00
cschen
ad881ab067
chore(python): remove old monolithic ffi
2024-08-09 00:01:56 +02:00
cschen
99cbebb4f8
fix(python): stragglers files
2024-08-09 00:00:21 +02:00
cschen
7e8a46f9b8
feat(python): new leaner glue, up to date
2024-08-08 23:58:45 +02:00
754b88fd73
feat: javascript glue
...
Co-authored-by: alemi.dev <me@alemi.dev>
2024-08-08 23:25:02 +02:00
f699d2e8fe
feat: jank workspace event poll/get
2024-08-08 22:01:08 +02:00
f2be80427a
chore: move stuff around
...
im not sure about getters on Services, nor names, but ehh
2024-08-08 21:58:20 +02:00
f6edc2cbb0
feat(lua): add runtime driver stop control
2024-08-08 21:56:36 +02:00
0ca5165b73
feat: improve InternallyMutable
2024-08-08 21:55:52 +02:00
f14a8c40a5
feat: add codemp user to api
...
super stub but whatev
2024-08-08 21:55:43 +02:00
0aa7690533
feat: lua leave, detach, delete
2024-08-08 04:42:11 +02:00
e736646b8c
feat: add close_client helper in lua
2024-08-08 04:14:24 +02:00
898ab22e22
feat: add fn to get all workspace names
2024-08-08 04:14:13 +02:00
793cebb787
feat: add static client store for lua
...
so we can access clients across lua threads
2024-08-08 04:02:56 +02:00
775cde1d7f
feat: CodempClient is also an inner Arc<>
2024-08-08 03:59:28 +02:00
e1ba683fd0
fix: updated lua ffi
...
now the client is given to lua
2024-08-08 02:48:31 +02:00
a9bab2bb03
feat: java glue leave_workspace, detach, new connect
2024-08-08 02:45:52 +02:00
893c3d31e0
feat: better auth: multiworkspace, proper flow
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-08 02:30:34 +02:00
59d8a4640d
fix: proper lifetime for cursor, renamed methods
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-08 02:29:45 +02:00
515cab331c
chore: cleanup, reorganizing java glue
2024-08-08 00:29:54 +02:00
487422eb99
feat: added detach buffer and leave workspace
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-08 00:28:35 +02:00
6e9727128d
feat: controllers now implement stop
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-08 00:28:15 +02:00
cd8f7cd5c5
feat: internally mutable
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-08 00:27:24 +02:00
4de09cb164
chore: de-arced a bit
...
Co-authored-by: zaaarf <me@zaaarf.foo>
2024-08-08 00:25:22 +02:00
ffa8d8ea82
Updated Javascript Glue with Napi
...
Co-authored-by: alemi.dev <me@alemi.dev>
2024-08-07 23:06:33 +02:00
e4b6e82485
docs: fix pic
2024-08-07 17:34:46 +02:00
6212718e99
feat: recv, buffer_list, tweaks, gradle
2024-08-07 10:22:01 +02:00
84996489e1
feat: working glue
...
Co-authored-by: alemi <me@alemi.dev>
2024-08-07 02:43:25 +02:00
4bb35f1727
feat: buffer controller, cleanup
2024-08-07 01:44:27 +02:00
329287df53
feat: more work on java ffi glue
...
easy when you todo() the hard vec<string>
2024-08-07 01:34:13 +02:00
490670b8bc
feat: try_recv CursorController
...
Co-authored-by: alemi <me@alemi.dev>
2024-08-07 00:38:45 +02:00
7d90793467
feat: get_buffer, get_cursor, get_workspace_id
2024-08-07 00:00:24 +02:00
72e86a8079
fix: lua use try_init for logging
2024-08-06 23:56:28 +02:00
13f862a0e8
chore: some glue code for jni
...
made the simple ones :p
2024-08-06 23:55:57 +02:00
e2ae53b35f
feat: initial work on jni-rs java glue
2024-08-06 23:30:16 +02:00
cschen
df95b20728
Merge remote-tracking branch 'origin/glue' into glue
2024-08-06 23:28:39 +02:00
cschen
bdbd94879b
feat: added maturin wheel building config as completely separate "project",
...
feat: added stubs for python glue, bundled in the wheel,
feat: the python glue now uses less stupid names.
2024-08-06 23:28:09 +02:00
2cc23f2ec2
feat: lua logger improvements
...
distinct fn for setup and get, setup is idempotent
2024-08-06 23:02:28 +02:00
cd9a2d6247
fix: lib name is codemp_lua, override addr via env
...
use CODEMP_SERVER_ADDRESS
2024-08-06 23:01:44 +02:00
05a4c88967
fix: controller with 1 generic
2024-08-06 23:00:45 +02:00
e85833a40f
chore: migrate errors to thiserror
2024-08-06 23:00:04 +02:00
95ece68ae6
fix: removed filler error
2024-08-06 00:16:52 +02:00
Camillo Schenone
f9784e961d
feat: updated to new glue, magic.
...
fix: added sublime junk to gitignore
2024-08-05 22:44:46 +02:00
b75caaf959
fix: lua glue uses structs directly
2024-08-05 19:16:17 +02:00
39533ae086
feat: wrappers for Cursor and Op
...
so plugins dont need to interact directly with our underlying proto
struct, nor our underlying crdt ops. also for wrapping directly in glue
2024-08-05 19:15:30 +02:00
84c77eaca3
feat: inner Arc<T> on controllers
...
so we can wrap them directly in our glue
2024-08-05 19:14:35 +02:00
Camillo Schenone
25e56f9894
fix: python glue works (only tested on mac though)
2024-03-16 15:42:36 +01:00
Camillo Schenone
859baf6572
fix: whops forgot the actual python glue xD version bump
2024-03-16 15:38:09 +01:00
Camillo Schenone
13a4163d1e
feat: added python glue, still needs some tweaking in the building of the dylib
2024-03-16 14:36:41 +01:00
f0003f04bd
chore: leftover lua lib.rs
2024-03-10 13:13:11 +01:00
c748f49941
feat:added js glue
2024-03-10 12:42:56 +01:00
830ef1fa9b
fix: made lua glue work
...
Co-authored-by: alemi <me@alemi.dev>
2024-03-10 02:18:54 +01:00
074c88feee
feat: added lua ffi bindings
...
broken because no proper build target but whatev for now ig
2024-03-10 01:39:08 +01:00
73fc3005c4
chore: renamed glue module
2024-03-10 01:36:50 +01:00
23db5af4d2
feat: java glue (kind of)
2024-03-09 23:27:08 +01:00
6fe5372387
chore: removed dead code
2024-03-09 22:07:40 +01:00
a38c28f401
feat: moved out proto + feature flag cleanup
...
Co-authored-by: alemi <me@alemi.dev>
2024-03-09 19:59:36 +01:00
4694a01c9b
fix: don't borrow self as mut to join workspace
2024-03-09 17:20:40 +01:00
9422f9a216
docs: updated docs
2024-02-09 01:16:16 +01:00
a622ac773c
docs: updated main doc page examples
2024-02-09 01:04:24 +01:00
4fdd2a79c4
fix: api doesn't really require woot or similar
2024-02-09 01:04:10 +01:00
f706237828
chore: removed blocking_recv
...
just block_on(recv()) ...
2024-02-09 01:03:38 +01:00
e0d4360d09
feat: BufferNode also From<&str>
2024-02-09 00:59:04 +01:00
47127bbb41
chore: back from transport to proto
2024-02-09 00:39:07 +01:00
c9a36ea8ec
fix: cleaned up code, fixed multi-op change issues
2024-02-09 00:35:08 +01:00
99a268185a
fix: increase channels buffer size
...
maybe helps? idk probably not actually
2024-02-07 21:24:31 +01:00
ed1ce45e7f
fix: send path received from server
2024-02-07 04:41:13 +01:00
d78362c745
feat: getter for workspace
...
name doesn't really make sense: it's user-defined because we connect to
workspace contained inside token but store such connection with user
given name
2024-02-07 03:47:37 +01:00
948a1b4de5
feat: workspace streaming attach and lists
...
to join a workspace, attach to it. to leave a workspace, close the
channel. on such channel you get workspace events (new buffers, user
leave, ...). must fetch current buffers and users upon join. if
workspace doesn't exist, server should create it on attach
also dashmap everywhere to get/put simple
2024-02-07 01:12:05 +01:00
f61836e4ca
chore: we don't need user_id this deep actually
...
it's stored in our token anyway
2024-02-07 01:11:36 +01:00
1cf17dc151
chore: proto cleanup and simplification
...
reuse as much as possible, keep rpc messages close with their rpc,
helper struct for uuid with into() and from(). also replaced the simple
things, such as imports and struct fields
2024-02-07 01:09:28 +01:00
4ae31df3ff
chore: moved select_buffer under buffer::tools
...
needed to more appropriately subdivide feature flags
2024-02-01 17:54:56 +01:00
1ee185b5ec
feat: add auth service
...
sneaked in to help with server development
2024-02-01 17:54:36 +01:00
164e9887b8
fix: serialize uuid as string when sending
2024-02-01 03:19:27 +01:00
97061524e7
chore: remove snapshot
2024-02-01 01:58:27 +01:00
bc3df45726
fix: fetch buffers after creating
2024-01-31 23:57:21 +01:00
f7fcf8bd22
feat: implemented snapshot method and some getters
2024-01-27 11:49:05 +01:00
741a074464
feat: implemented leave workspace and list buffer users, various fixes
2024-01-25 17:05:06 +01:00
f7bd5849be
fix: removed instance module, fixed prelude
2024-01-25 03:25:45 +01:00
94a7786812
feat: workspaces and new library structure
...
Co-authored-by: alemi <me@alemi.dev>
Co-authored-by: frelodev <frelodev@gmail.com>
2024-01-25 02:13:45 +01:00
1657521356
workspace_service cleanup
2024-01-01 23:34:59 +01:00
85add1ca0d
moved some messages from workspace_service to files
2024-01-01 23:29:35 +01:00
6230371020
feat: fixed proto and tonic includes
...
Co-authored-by: zaaarf <me@zaaarf.foo>
Co-authored-by: alemi <me@alemi.dev>
2023-12-29 01:06:28 +01:00
ab982f4882
changed build method for proto and lib proto includes
2023-12-28 22:04:40 +01:00
2f0875a38f
docs: better select_buffer text
2023-11-30 03:50:32 +01:00
7ad1da0f27
chore: updated docs, getter for buf name
2023-11-30 03:41:53 +01:00
5401d837c7
feat: add timeout to select_buffer
2023-11-30 03:30:50 +01:00
9d349e1b1e
fix: remove tracing
2023-11-30 03:08:22 +01:00
3197c083bf
fix: discard empty textchanges, drain range
2023-11-30 03:04:26 +01:00
3881bb38ea
chore: improved seen mechanism
...
instead of manually handling the mutex leave it to tokio and use a fancy
generic struct with update() and check()
2023-11-30 03:03:09 +01:00
1f50f75eb4
fix: apply() panic when out of bounds
2023-11-30 03:02:13 +01:00
10e4a458ce
chore: more tests, imports
2023-11-30 03:01:59 +01:00
da44aff408
feat: added TextChange helper methods and more test
2023-11-30 00:38:24 +01:00
b4b955a39e
fix: caught textchange diff bug, added tests
2023-11-30 00:37:57 +01:00
d562e406f2
fix: moved select_buffer out of client
...
due to instance mutexing it held the lock while awaiting for events,
which is undesirable!
2023-11-28 02:22:21 +01:00
1265f716d6
chore: packed clonable handles in sub struct
2023-11-27 14:55:46 +01:00