Lars Wirzenius
105b65c2ac
workspace: set rust-version (MSRV)
...
This declares the minimum supported Rust version, independently of the
`rust-toolchain.toml` file, which specifies the Rust version and
toolchain components the crate/workspace should be built with. The
MSRV affects other crates that depend on anything in this workspace,
but the toolchain file does not seem to affect them. This means the
MSRV is useful for those who build or develop dependents.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
2025-05-16 13:49:38 +02:00
Fintan Halpenny
96637aca7e
chore: update rust-toolchain
...
Update the rust toolchain version to 1.85.
Note that this is not the latest, however, it is the latest available in nixpgs,
so this version is good enough for now.
2025-04-17 10:39:34 +02:00
Fintan Halpenny
86a0443916
crdt: run cargo fmt
2024-08-09 12:41:01 +02:00
Fintan Halpenny
e1470fccd7
fetch: update gix-pack and gix-odb
...
The `gix-fs` crate was flagged as vulnerable[^0]. To update it to `>=0.11.0`, it
was necessary to update the `gix-pack` and `gix-odb` crate versions to `0.51`
and `0.61`, respectively.
This in turn updated `fastrand` which changed its algorithm[^1], which meant
that some test outputs were reordered or matched new values.
[0]: https://rustsec.org/advisories/RUSTSEC-2024-0350
[1]: https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md#version-210
2024-08-09 12:41:01 +02:00
cloudhead
c6a8a00055
Update `rust-toolchain` to 1.80
...
Fix new clippy warnings.
2024-08-06 14:37:21 +02:00
cloudhead
8cb8398be9
Introduce `cargo-deny`
...
Add `deny.toml` with a few exceptions, and update certain dependencies
to get rid of duplicates.
Running `cargo deny check` will yield some warnings still, but no
errors.
2023-08-22 14:33:00 +02:00
Alexis Sellier
369fc7637c
cob: Use new `Immutable` lattice for merges
...
Instead of `Redactable`, which is not needed since we have an `LWWMap`,
we use a new `Immutable` semilattice.
2023-07-03 12:31:05 +02:00
Alexis Sellier
45e87a63b9
cob: Changes to patch code review CRDT
...
This patch incorporates several important changes to code review:
* Code review verdict is no longer editable
* Made reviews redactable instead
* Renamed review top-level comment to "summary"
* Renamed inline comments to "comments"
* Made inline comments addressable by `EntryId`
* This is to allow for editing
* Removed inline comments from review creation
* Added a `CodeComment` action instead
* Removed `Semilattice` instance from `Review`
* Added a `EditReview` action instead to have more control
* Made it valid for revisions to be redacted concurrently with a review/merge
Most of these changes are needed to support proper inline code comments.
2023-07-03 12:31:05 +02:00
Alexis Sellier
8205f8ad4e
Update `fastrand` dependency to 1.9.0
2023-04-14 13:15:52 +02:00
Fintan Halpenny
8404b5925d
radicle: force new or initial construction of LWWReg
...
Using LWWReg::from will always set the clock value to the default,
which can end up being used wrong.
Instead, introduce a constructor method `initial` to indicate that it
should be used on initial construction, while `new` should be used for
newer values of the register.
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-31 15:49:55 +02:00
Alexis Sellier
5c0505e221
crdt: Implement `GSet` type, based on `GMap`
2023-02-27 17:11:48 +01:00
Slack Coder
1cb8986830
Add Op ID string formatting
...
To help users, create an Op ID string format of the form `<actor-id>/<lamport>`.
Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-04 12:29:50 +01:00
Alexis Sellier
90f20f447a
Make `Transaction` generic, move to `store`
...
This allows us to use the transaction logic for any COB.
2022-12-13 10:16:18 +01:00
Alexis Sellier
56f9af650e
crdt: Remove some `Semilattice` instances
...
These instances were not safe to have around, as they allow
removal of items in a non-commutative way.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-08 16:37:44 +01:00
Alexis Sellier
f9c81ab382
Replace `quickcheck` with `qcheck`
...
The latter is a fork of the former, which adds const generics
and a bunch of other quality of life improvements that aren't
in the original crate due to it being unmaintained.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-04 20:40:54 +01:00
Alexis Sellier
e8a2432f9d
Move `Change` from `radicle-crdt` to `radicle`
...
Where it belongs.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
f6e8a18b15
crdt: Remove unused `Envelope` type
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
d6467fe4f1
patch: Use `GMap` to simplify code
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
ff79347eb0
crdt: Implement `LWWMap` in terms of `GMap`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
bcef784ad4
crdt: Implement Grow-only Map (`GMap`)
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:21:50 +01:00
Alexis Sellier
64ce15dbe2
crdt: Include timestamp in `Change`
...
We can then use the real change timestamp for our COBs.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-02 14:19:25 +01:00
Alexis Sellier
60d95ebbd8
crdt: Small simplification in `Redactable`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
b3faba715b
patch: Correctly merge review edits
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
252b6cd7bc
crdt: Small improvements
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
2230c8ddc4
crdt: Relax bounds and take references
...
The getter-style functions don't need owned keys.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
41309538fb
crdt: Small improvements and function additions
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
c5225c64cd
crdt: Relax some of the type constraints
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-01 12:05:44 +01:00
Alexis Sellier
a79c95283b
Minor doc and instance changes
...
Signed-off-by: Alexis Sellier<alexis@radicle.xyz>
2022-11-26 17:51:07 +01:00
Alexis Sellier
fee0296910
Rename `LClock` to `Lamport`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:48:50 +01:00
Alexis Sellier
b79e2f5b56
crdt: Remove redundant `Author` type
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:44:18 +01:00
Alexis Sellier
d18b67ba21
crdt: Remove redundant `merge` function
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:41:46 +01:00
Alexis Sellier
d1360bbec0
crdt: Remove `Copy` bound on `LWWMap`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:41:40 +01:00
Alexis Sellier
36ccab2d7a
crdt: Make some improvements to the types
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
cc33d04a7b
crdt: Require `LWWReg` value to be `Semilattice`
...
* Also derive instances of `Semilattice` for built-in types.
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
fa9a89caa3
Start integrating new CRDTs into `radicle` crate
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
550ad2b558
Make `Thread` a semilattice
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
7e8af47f59
Implement `Change::decode`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
0448441418
Use `merge` as the `Semilattice` join method
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
01b7686659
Turn `Redactable` into a semilattice
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
681a8c9374
Test CRDT storage, simplify `Thread`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-26 17:13:22 +01:00
Alexis Sellier
01ad0fb31d
cob: Split generic code from automerge-specific
2022-11-26 17:13:18 +01:00
Alexis Sellier
8dc655758e
Test ordering of timelines with concurrency
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 21:03:49 +01:00
Alexis Sellier
64862b3ab3
Add lamport clock
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 19:52:20 +01:00
Alexis Sellier
0482757ce9
Implement `LWWReg` in terms of `Max`
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 19:52:20 +01:00
Alexis Sellier
b11826b113
Add `LWWMap` and implement `LWWSet` with it
...
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-11-23 19:52:20 +01:00
Alexis Sellier
35f061746c
Add `radicle-crdt` crate
...
Explorations with CRDTs.
2022-11-23 19:52:18 +01:00