Commit graph

909 commits

Author SHA1 Message Date
Orion Henry
337fabe5a9
Merge pull request #271 from jeffa5/experiment-txn
Transaction API
2022-02-24 18:07:05 -05:00
Orion Henry
06302e4a17 make() defaults to text 2022-02-24 00:22:56 -05:00
Orion Henry
2fc0705907 change MAP,LIST,TEXT to be {},[],'' - allow recursion 2022-02-23 19:43:13 -05:00
Orion Henry
b96aa168b4 choking on bad value function 2022-02-22 12:10:11 -05:00
Andrew Jeffery
8d24c9e4c3 Fix rollback of transaction using index into the tree 2022-02-21 14:00:41 +00:00
Andrew Jeffery
4a6b91adb2 Add test for broken rollback 2022-02-21 13:30:23 +00:00
Andrew Jeffery
6b4393c0b3 Rename transaction module 2022-02-21 11:40:49 +00:00
Andrew Jeffery
355cbdd251 Rename try_start_transaction to ensure_transaction_open 2022-02-21 10:49:58 +00:00
Andrew Jeffery
3493dbd74a Rename autotxn to autocommit 2022-02-21 10:49:14 +00:00
Andrew Jeffery
cbd3406f8d Document commit_with and CommitOptions 2022-02-21 10:47:23 +00:00
Andrew Jeffery
66f8c73dba Document drop on transaction 2022-02-21 10:36:42 +00:00
Andrew Jeffery
50a1b4f99c Add transactable trait 2022-02-21 10:32:57 +00:00
Andrew Jeffery
f8c9343a45 Add get_heads to transaction 2022-02-19 18:57:32 +00:00
Andrew Jeffery
59e36cebe4 Improve transactions with drop, transact and better commit
Also remove modification operations directly on Automerge and switch
tests to using AutoTxn.
2022-02-17 11:29:36 +00:00
Andrew Jeffery
62c71845cd Add some basic docs for Automerge mutations 2022-02-16 15:12:51 +00:00
Andrew Jeffery
e970854042 Fix benchmark ids 2022-02-16 14:56:17 +00:00
Andrew Jeffery
2f49a82eea Have generate_sync_message not take mut self 2022-02-16 14:20:49 +00:00
Andrew Jeffery
ea826b70f4 Move TransactionInner and add get methods to Transaction 2022-02-16 14:15:36 +00:00
Andrew Jeffery
7cbd6effb7 Add autotxn document for wasm and cross-language use
These don't have the ability to preserve the semantics of the reference
based transaction model and so can make use of the nicer auto
transaction model.
2022-02-16 14:06:22 +00:00
Andrew Jeffery
d7da7267d9 Initial wasm fix 2022-02-16 11:39:14 +00:00
Andrew Jeffery
735a4ab84c Add explicit transaction API
This removes the requirement for `&mut self`s on some of the immutable
methods on `Automerge` which can be quite inconvenient.

I've reimplemented the main functions on `Automerge` that manipulate
state to create a transaction for their op for ease of use but not
performance. I've updated the edit trace to run in a single
transaction, like on a page load.

Wasm API still needs working on at the moment to expose this properly.
2022-02-16 11:38:43 +00:00
Orion Henry
ef938fdf0a manually handle js types - make sure we have good errors 2022-02-15 14:02:19 -05:00
Orion Henry
b6e0da28d8 fmt 2022-02-10 11:48:09 -05:00
Orion Henry
c8c695618b remove marks 2022-02-10 11:42:15 -05:00
Orion Henry
d1b0d41239 move marks into its own test 2022-02-10 11:17:15 -05:00
Orion Henry
9136f00e43 bugfix: duplicate seq not blocked on apply_changes, clone did not close a transaction, added fork and merge to wasm 2022-02-10 11:14:44 -05:00
Orion Henry
b53305cf7f Merge branch 'marks' into tmp 2022-02-10 09:42:38 -05:00
Karissa McKelvey
98a65f98f7 Add failing test for decoding a conflicted merge 2022-02-09 13:17:07 -08:00
rae
c655427f9a
Add support for web 2022-02-07 16:33:10 -08:00
Orion Henry
1aab66d160 fix version number 2022-02-06 19:57:25 -05:00
Orion Henry
a9ddb9398c cleanup typescript defs 2022-02-06 19:01:37 -05:00
Orion Henry
3f82850e44 fix bug in set scalar 2022-02-04 20:15:57 -05:00
Orion Henry
c54aab66c4 better error on invalid value 2022-02-04 14:43:22 -05:00
Andrew Jeffery
70c5fea968 Change rust flake to use default profile 2022-02-04 16:58:58 +00:00
Andrew Jeffery
df435b671f flake.lock: Update
Flake lock file changes:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/2ebf2558e5bf978c7fb8ea927dfaed8fefab2e28' (2021-04-25)
  → 'github:numtide/flake-utils/846b2ae0fc4cc943637d3d1def4454213e203cba' (2022-01-20)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/63586475587d7e0e078291ad4b49b6f6a6885100' (2021-05-06)
  → 'github:nixos/nixpkgs/554d2d8aa25b6e583575459c297ec23750adb6cb' (2022-02-02)
• Updated input 'rust-overlay':
    'github:oxalica/rust-overlay/d8efe70dc561c4bea0b7bf440d36ce98c497e054' (2021-05-07)
  → 'github:oxalica/rust-overlay/674156c4c2f46dd6a6846466cb8f9fee84c211ca' (2022-02-04)
• Updated input 'rust-overlay/flake-utils':
    'github:numtide/flake-utils/5466c5bbece17adaab2d82fae80b46e807611bf3' (2021-02-28)
  → 'github:numtide/flake-utils/bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4' (2021-11-15)
• Updated input 'rust-overlay/nixpkgs':
    'github:nixos/nixpkgs/54c1e44240d8a527a8f4892608c4bce5440c3ecb' (2021-04-02)
  → 'github:NixOS/nixpkgs/8afc4e543663ca0a6a4f496262cd05233737e732' (2021-11-21)
2022-02-04 16:56:38 +00:00
Andrew Jeffery
7607ebbfcc Add from () for Value 2022-02-04 11:37:33 +00:00
Orion Henry
bf184fe980 remove some un needed imports 2022-02-03 14:43:02 -05:00
Orion Henry
2019943849 bump edition from 2018 to 2021 2022-02-03 14:38:21 -05:00
Orion Henry
0f49608dde spans have types not names 2022-02-02 16:29:23 -05:00
Orion Henry
1d0c54ca9a raw_spans with ids 2022-02-02 16:21:33 -05:00
Orion Henry
ee80837feb raw_spans experiment 2022-02-02 15:55:41 -05:00
Orion Henry
da73607c98 adding make 2022-01-31 17:45:07 -05:00
Orion Henry
e88f673d63 Revert "Remove make"
This reverts commit 5b9360155c.
2022-01-31 17:43:56 -05:00
Orion Henry
5b9360155c Remove make 2022-01-31 17:28:24 -05:00
Orion Henry
17e6a9a955 fixed fixed 2022-01-31 17:24:46 -05:00
Orion Henry
1269a8951e use types in pkg 2022-01-31 17:24:17 -05:00
Orion Henry
836e6ba510 fix return types 2022-01-31 17:21:16 -05:00
Orion Henry
a9dec7aa0b remove dead code 2022-01-31 17:11:22 -05:00
Orion Henry
7b32faa238 all ts tests passing 2022-01-31 17:07:20 -05:00
Orion Henry
c49bf55ea4 almost working ts 2022-01-31 16:48:03 -05:00