Commit graph

866 commits

Author SHA1 Message Date
Alex Good
de5332af05 Run the js_test in CI
We add a script for running the js tests in `scripts/ci/js_tests`. This
script can also be run locally. We move the `automerge-js` package to
below the `automerge-wasm` crate as it is specifically testing the wasm
interface. We also add an action to the github actions workflow for CI
to run the js tests.
2021-12-30 17:30:38 -05:00
Orion Henry
6932bdff08 package.json can run on windows now 2021-12-29 14:16:15 -05:00
Alex Good
7087cbdf69 Add CI to README 2021-12-24 10:18:16 -08:00
Alex Good
e98eca3a08 Add github action 2021-12-24 10:18:16 -08:00
Alex Good
4e043e06c2 Add script to run all the CI steps 2021-12-24 10:18:16 -08:00
Alex Good
fa936b5a28 Add script to run clippy 2021-12-24 10:18:16 -08:00
Alex Good
001c9befcc Add script to run cargo fmt 2021-12-24 10:18:16 -08:00
Alex Good
05a7d24f77 Add script to run tests 2021-12-24 10:18:16 -08:00
Alex Good
216b4eed82 Add deny.toml and a script for calling cargo deny
In order to get cargo deny to pass we also update a few dependencies and
add licenses
2021-12-24 10:18:16 -08:00
Orion Henry
9d0caab6b6 import the uuid tests 2021-12-22 15:36:57 -05:00
Orion Henry
4c90b5f822 get js text tests working 2021-12-22 15:08:31 -05:00
Andrew Jeffery
7f115964f1 Unwrap text set in benchmark 2021-12-22 10:35:42 +00:00
Orion Henry
e275334e72 remove dead code and pubs we don't need 2021-12-21 12:23:55 -05:00
Orion Henry
780298b72c docs, tests, code cleanup 2021-12-21 09:23:34 -08:00
Orion Henry
8eb147333c use value_at() in the js wrapper 2021-12-21 09:23:34 -08:00
Orion Henry
265ce823da implement all the query_at(), add tests, was, cut dead code 2021-12-21 09:23:34 -08:00
Alex Good
6a63d30a56 Add some rust tests
This commit adds a bunch of testing infrastructure as well as most of
the tests from the `legacy_tests.js` file in the js codebase that seem
applicable to this codebase.
2021-12-20 17:54:40 -08:00
Alex Good
f22be2ade7 Make Automerge::visualise succinct, include succ
This abbreviates actor IDs so that object IDs are more readable and also
includes successor operation IDs in the op tables
2021-12-20 09:28:07 -08:00
Alex Good
4181f503aa UPdate Automerge::visualise to work with OpSet
The OpSet has multiple OpTrees in it so we update the visualisation
logic to show an op tree graph for each object in the OpSet.
2021-12-20 09:28:07 -08:00
Alex Good
48e01a6333 Add Automerge::visualise for debugging the optree
The OpTree is a reasonably complicated data structure. This change adds
a method on the OpTree which is then exposed through
`Automerge::visualise` which prints the structure of the OpTree in
graphviz format. Each node in the tree is printed as a simple table of
operations with outgoing edges to tables representing the children of
the node. This is behind a compile time flag (optree-visualisation)
because it's probably not useful except when debugging.
2021-12-20 09:28:07 -08:00
Alex Good
e435957125 Update README with details of the new implementation 2021-12-19 17:12:56 -08:00
Orion Henry
a305f77de3 Merge branch 'noop' into experiment 2021-12-19 20:08:46 -05:00
Orion Henry
70bd0aee53 simplify index.replace 2021-12-19 19:58:43 -05:00
Orion Henry
b7eae836d5 Merge branch 'experiment' of github.com:automerge/automerge-rs into experiment 2021-12-19 14:20:55 -05:00
Orion Henry
1f0989cbb0 break op set into one per object 2021-12-19 14:18:02 -05:00
Andrew Jeffery
e6b806b458
Add criterion benchmarks for Rust (#248) 2021-12-19 14:59:40 +00:00
Alex Good
962340805c
automerge::set - don't generate ops for noops
Repeatedly setting the same value for a particular (obj, key)
combination now no longer generates an operation. To allow this we
modify the return value of `automerge::set` so that it may return an
`Option<OpId>` instead of an `OpId`.

Signed-off-by: Alex Good <alex@memoryandthought.me>
2021-12-18 15:57:03 +00:00
Orion Henry
fc89a26302 first pass for sync in js/wasm 2021-12-18 00:22:20 -05:00
Orion Henry
25eeb256e0 remove cargo.lock from project 2021-12-17 21:19:33 -05:00
Orion Henry
503ee1ca19 Merge branch 'experiment' of github.com:automerge/automerge-rs into experiment 2021-12-17 21:15:05 -05:00
Orion Henry
1739a7e7b1 encode/decode sync in wasm 2021-12-17 21:14:16 -05:00
Andrew Jeffery
ed6975d7ee Make a rust workspace 2021-12-17 23:41:34 +00:00
Andrew Jeffery
a0f9612be9 Fixup readme and add makefile 2021-12-17 23:37:21 +00:00
Andrew Jeffery
c5f6ffc4cd Fix wasm build 2021-12-17 23:36:38 +00:00
Orion Henry
9c237c7f00 remove expanded_op and internal_op_type 2021-12-17 12:39:26 -05:00
Orion Henry
702117b996 move change_hash out of legacy, removing diff 2021-12-17 12:13:43 -05:00
Orion Henry
90244236c3 move important items out of legacy 2021-12-17 11:33:05 -05:00
Orion Henry
6b517b9894 move things we need out of legacy 2021-12-17 11:04:35 -05:00
Orion Henry
b2f339e714 update packages - get legacy tests passing 2021-12-17 10:36:02 -05:00
Orion Henry
4c83416abf cheers to andrew who found a faster B value on the tree 2021-12-17 10:19:15 -05:00
Orion Henry
0ac2407815 cargo fmt 2021-12-17 09:52:57 -05:00
Andrew Jeffery
a2191e2643 Add nix config 2021-12-17 11:48:14 +00:00
Orion Henry
db3a43c5b6 import protocol into legacy 2021-12-16 20:39:08 -05:00
Andrew Jeffery
0c417f02b2 Improve ergonomics of the main API 2021-12-16 05:46:01 -08:00
Andrew Jeffery
1bd54d5489 Optimise last function on op_tree
Rather than iterating through the children we can just skip straight to
the last. The last element is always in a leaf so we also don't need to
care about intermediate values.
2021-12-16 09:45:12 +00:00
Andrew Jeffery
54b02095fe Fix automerge-protocol dependency to use git 2021-12-16 09:41:34 +00:00
Orion Henry
26ccaf63cc readme and new tests 2021-12-15 19:07:39 -05:00
Orion Henry
0c284992cd stub out text_at 2021-12-13 10:52:06 -05:00
Orion Henry
850db4a35b objid vs opid was not useful as an external type 2021-12-13 10:45:43 -05:00
Orion Henry
0c96d504bc getting ready for at(clock) api 2021-12-13 10:28:49 -05:00