Commit graph

150 commits

Author SHA1 Message Date
dbr
aa2340965e Merge branch 'main' into sqlstore 2021-05-28 12:17:09 +10:00
dbr
baa6b59e39 Remove KvStorage 2021-05-28 12:10:18 +10:00
dbr
f91f797244 Implement storage for local server 2021-05-28 11:38:46 +10:00
dbr
991b29da6c WIP 2021-05-21 15:52:07 +10:00
Dustin J. Mitchell
bb7130f960 Support multiple exit codes
..with more specific error enums.
2021-05-18 18:57:55 +00:00
Dustin J. Mitchell
73b6648d06 assert that working-set element 0 is None 2021-05-16 09:42:18 -04:00
Dustin J. Mitchell
5f6918fbc7 Skip element 0 when rebuilding the working set
The existing code was correct, assuming that element 0 is always None,
but this is clearer.
2021-05-16 09:42:17 -04:00
Dustin J. Mitchell
fa7623ebe7 Handle setting a working set item to None twice
Without this, setting an item to None that did not already exist failed,
because the kv delete operation did not find the referenced key.

This also checks that the index is not 0, which is not allowed as the
working set is 1-indexed.
2021-05-16 09:40:35 -04:00
Dustin J. Mitchell
3a2450cb23 provide context for errors to help debugging 2021-05-16 09:40:35 -04:00
Dustin J. Mitchell
cbe11a1d3d fix new clippy warnings 2021-05-16 09:38:40 -04:00
Dustin J. Mitchell
373cef9d33 [breaking] Include /v1/ in the sync-server paths
This is an incompatible change to the sync-server protocol.
2021-05-14 12:51:24 -04:00
dbr
ff894f6ff6 Comments and rustfmt 2021-04-29 11:01:46 +10:00
dbr
a3c9a76f1d Explicit check that rusqlite::Transaction isn't auto-commited on drop 2021-04-29 10:58:34 +10:00
dbr
23531d73c4 Remove debug junk 2021-04-29 10:57:43 +10:00
dbr
e479c25c34 Tidier 2021-04-29 10:41:17 +10:00
dbr
cefd6fd6cc Serialize Uuid as string for nicer debugging
Also implement ToSql/FromSql for Operation/TaskMap so errors are handled properly
2021-04-29 10:39:29 +10:00
dbr
d5724c4dc2 Unused 2021-04-29 10:37:04 +10:00
dbr
e06e33bee4 Remove kv storage backend
Now uses sqlite by default
2021-04-29 00:20:13 +10:00
dbr
cf70ef49ed Minor tidying 2021-04-29 00:10:53 +10:00
dbr
5ae828b1eb Implement working set methods 2021-04-29 00:09:54 +10:00
dbr
2b7e121e7e Implement operations storage for SQLite 2021-04-28 12:35:50 +10:00
dbr
1959f0c63a Implement all_task_uuids and base version methods 2021-04-27 19:35:45 +10:00
dbr
305e6e2ede Appease clippy 2021-04-22 14:16:07 +10:00
dbr
11d0172bf8 fmt 2021-04-22 14:15:50 +10:00
dbr
a9b93e7c20 Use names for row.get(...) 2021-04-22 13:33:54 +10:00
dbr
4bd6c40daf Use uuid feature of rusqlite 2021-04-22 13:31:15 +10:00
dbr
0f3729d4c8 sqlite: Get all rows
Needs some improvement to error handling
2021-04-22 12:54:34 +10:00
dbr
e40724b381 Start of SQLite backed storage #131 2021-04-22 11:48:05 +10:00
Dustin J. Mitchell
c8d6619d71 Replace tempfile with tempdir 2021-04-16 19:29:27 -04:00
Dustin J. Mitchell
c2349cf708 Update links to point to new org 2021-04-03 19:44:31 -04:00
dependabot[bot]
af39be175c
Bump lmdb-rkv from 0.12.3 to 0.14.0
Bumps [lmdb-rkv](https://github.com/mozilla/lmdb-rs) from 0.12.3 to 0.14.0.
- [Release notes](https://github.com/mozilla/lmdb-rs/releases)
- [Commits](https://github.com/mozilla/lmdb-rs/compare/0.12.3...0.14.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 07:43:23 +00:00
Dustin J. Mitchell
3fc07c9e83
Merge pull request #170 from djmitche/dependabot/cargo/ureq-2.1.0
Bump ureq from 1.5.2 to 2.1.0
2021-03-29 19:51:16 -04:00
dependabot[bot]
357bbcad01
Bump uuid from 0.8.1 to 0.8.2
Bumps [uuid](https://github.com/uuid-rs/uuid) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/0.8.1...0.8.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 23:34:12 +00:00
Dustin J. Mitchell
98fdb15b75
Merge pull request #176 from djmitche/ignore-clippy-identifier-caps
fix some clippy stuff
2021-03-29 19:33:02 -04:00
Dustin J. Mitchell
fdeadfd981 Fix upper_case_acronyms lint 2021-03-29 13:26:02 +00:00
dependabot[bot]
959c4f47f7
Bump proptest from 0.9.6 to 1.0.0
Bumps [proptest](https://github.com/altsysrq/proptest) from 0.9.6 to 1.0.0.
- [Release notes](https://github.com/altsysrq/proptest/releases)
- [Changelog](https://github.com/AltSysrq/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/altsysrq/proptest/compare/0.9.6...1.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 09:49:46 +00:00
Dustin J. Mitchell
0f02b38fd8 Modify ureq usage for new version 2021-03-28 17:48:31 -04:00
dependabot[bot]
1de0816661 Bump ureq from 1.5.2 to 2.1.0
Bumps [ureq](https://github.com/algesten/ureq) from 1.5.2 to 2.1.0.
- [Release notes](https://github.com/algesten/ureq/releases)
- [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/algesten/ureq/commits/2.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-28 17:48:31 -04:00
dependabot[bot]
e0dbeb2763
Bump log from 0.4.11 to 0.4.14
Bumps [log](https://github.com/rust-lang/log) from 0.4.11 to 0.4.14.
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.11...0.4.14)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-27 22:50:56 +00:00
Dustin J. Mitchell
ded325c1be
Merge pull request #168 from djmitche/dependabot/cargo/serde-1.0.125
Bump serde from 1.0.117 to 1.0.125
2021-03-27 18:48:54 -04:00
dependabot[bot]
ae46f82d94
Bump serde from 1.0.117 to 1.0.125
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.117 to 1.0.125.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.117...v1.0.125)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-27 22:04:30 +00:00
dbr
5ee67d65e2 Remove whitespace in comment to avoid cargo fmt doing weird things 2021-03-25 18:29:53 +11:00
dbr
6d77b9a319 cargo fmt 2021-03-25 17:10:11 +11:00
dbr
4d9755c43b Replace 'failure' crate with anyhow+thiserror
Closes #148
2021-03-25 16:33:35 +11:00
Dustin J. Mitchell
3cccdc7e32 v0.3.0 2021-01-10 22:45:12 -05:00
Dustin J. Mitchell
ae4cee1ac3 add docs for the 'server' and 'storage' modules 2021-01-10 22:22:18 -05:00
Dustin J. Mitchell
02d9c577ab use StorageConfig instead of ReplicaConfig 2021-01-10 22:22:18 -05:00
Dustin J. Mitchell
b004b6cb93 use ServerConfig::into_server instead of server::from_config 2021-01-10 22:22:18 -05:00
Dustin J. Mitchell
15ffc62279 rename taskstorage to storage 2021-01-10 22:22:17 -05:00
Dustin J. Mitchell
b95c146a7e Adjust Tag syntax to match TaskWarrior 2021-01-10 03:47:38 +00:00