Compare commits

..

1053 Commits

Author SHA1 Message Date
Dustin J. Mitchell
0627447a6a Update for 3.0.1 (#3382)
update for 3.0.1
2024-04-20 23:18:57 +00:00
Dustin J. Mitchell
f054a4061e Remove taskchampion-sync-server (#3380)
This crate has been moved to
https://github.com/GothenburgBitFactory/taskchampion-sync-server.

The integration-tests repo used the sync server to test integration
between taskchampion and the sync-server. We should do that again, but
after taskchampion moves to its own repo (#3209). In the interim, the
cross-sync integration test can simply test syncing between local
servers, but the snapshot test is no longer useful as the local server
does not support snapshots.
2024-04-20 12:44:06 +00:00
dependabot[bot]
304b84e4da Bump rustls from 0.21.7 to 0.21.11 (#3379)
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.7 to 0.21.11.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.7...v/0.21.11)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 19:32:49 -04:00
Dustin J. Mitchell
f86a069faf Fix paths generated from origin (#3372)
These mistakenly doubled the initial `/` character. This was broken in #3361.
2024-04-16 22:05:45 -04:00
ryneeverett
0944c73716 Recommend LSP's in development docs (#3370)
* Recommend LSP's in development docs

Per conversation in #3338.

There are already a lot of documented compile options so I think we're
better off suggesting that everybody create a compile_commands.json
whether or not they're using an LSP because it doesn't cost much.

While I was at it it seemed reasonable to mention rust LSP too. Now that
rls is deprecated I'm not sure there is any competitor to rust-analyzer
worth mentioning.

* Export compile commands by default.

Thanks to @felixschurk for the idea and telling me how to do it.

It took me a minute to figure out that this places the
compile_commands.json in the build directory rather than the root of the
project. But clangd still finds it there and that's a better place for
it anyway.
2024-04-16 08:19:58 -04:00
Dustin J. Mitchell
10cec507cb Check that sync.server.origin is a URL (#3361) 2024-04-16 02:11:55 +00:00
Dustin J. Mitchell
4d9bb20bdd Update task news to support 3.0.0 (#3342)
* Introduce Version, use it to check current version in custom reports
* Support multiple versions in 'task news'
2024-04-15 22:04:16 -04:00
dependabot[bot]
d243d000eb Bump env_logger from 0.10.0 to 0.10.2 (#3336)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.0 to 0.10.2.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.0...v0.10.2)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 21:49:56 -04:00
Dustin J. Mitchell
9040a7eb79 Throw std::strings on sync server errors (#3362) 2024-04-15 21:49:17 -04:00
Dustin J. Mitchell
0a491f36ad Store all modified tasks for use by on-exit hook (#3352)
The on-exit hook gets all modified tasks as input, but this was omitted
in the previous release. This adds a test for the desired behavior, and
updates TDB2 to correctly store the required information.
2024-04-15 21:14:25 -04:00
dependabot[bot]
7578768d9b Bump peaceiris/actions-gh-pages from 3 to 4 (#3367)
Bumps [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) from 3 to 4.
- [Release notes](https://github.com/peaceiris/actions-gh-pages/releases)
- [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peaceiris/actions-gh-pages
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 21:12:20 -04:00
dependabot[bot]
cb0d21f96e Bump peaceiris/actions-mdbook from 1 to 2 (#3366)
Bumps [peaceiris/actions-mdbook](https://github.com/peaceiris/actions-mdbook) from 1 to 2.
- [Release notes](https://github.com/peaceiris/actions-mdbook/releases)
- [Changelog](https://github.com/peaceiris/actions-mdbook/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-mdbook/compare/v1...v2)

---
updated-dependencies:
- dependency-name: peaceiris/actions-mdbook
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 21:11:17 -04:00
dependabot[bot]
3b414cd9bb Bump sigstore/cosign-installer from 3.4.0 to 3.5.0 (#3365)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 21:10:52 -04:00
Dustin J. Mitchell
c90eb8f71d remove reference to NEWS (#3357) 2024-04-12 22:46:09 -04:00
Dustin J. Mitchell
7c465ceb8f Remove NEWS, as it is redundant to 'task news' (#3354) 2024-04-07 21:58:27 -04:00
Dustin J. Mitchell
a6b721853b Remove 'sync' from default verbose flags (#3319)
Do not give sync feedback when not doing remote sync
2024-04-08 01:02:07 +00:00
ryneeverett
fd306712b8 Install corrosion as submodule. (#3348)
This will enable nixpkgs -- and any other distribution that builds in a
network sandbox and/or wants to use their own corrosion package rather
than building another one -- to do so without patching taskwarrior.

Since we're already using submodules for libshared I don't think this
should make the build process any more complicated for anyone else.

See
https://github.com/NixOS/nixpkgs/issues/300679#issuecomment-2041252688
for context.
2024-04-07 12:10:54 -04:00
Felix Schurk
b5aa7c6ae2 change order of hook invocation and setting task id (#3339)
this prevents that the task id is always returned as zero after a hook
is run on it
closes #3312
2024-04-05 19:45:55 -04:00
Dustin J. Mitchell
933885f21c Merge pull request #3341 from ryneeverett/sync-config-man-warning
sync: Point to manpage if unconfigured
2024-04-05 19:01:50 -04:00
ryneeverett
587f8910ef sync: Point to manpage if unconfigured
See #3340.
2024-04-05 10:35:15 -04:00
dependabot[bot]
de42c8ba34 Bump strum_macros from 0.25.0 to 0.25.3 (#3335)
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.25.0 to 0.25.3.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 18:16:31 +00:00
Dustin J. Mitchell
8a0a98d3ef Issue a warning if .data files remain (#3321)
This will help users realize that they have updated to an incompatible
version and must export and import their tasks.
2024-03-31 18:55:30 -04:00
Felix Schurk
5a56cff88b prefix regex strings to be treated as raw strings (#3322)
Source for documentation
https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals.
Closes #3316.
2024-03-31 09:08:56 -04:00
Dustin J. Mitchell
c91cef43b0 add note about ENABLE_SYNC to changelog (#3317) 2024-03-31 00:59:21 +00:00
Felix Schurk
8c2c629a4d use CMake project settings (#3315)
This adds a description as well as the homepage to the CMake settings.
Further it would also now use the numbering cheme as supposed to in
CMake, this way other people could now pin a specific version if
taskwarrior is included in another project.
Documentation from CMake is https://cmake.org/cmake/help/latest/command/project.html
2024-03-30 10:33:49 -04:00
dependabot[bot]
dfaf3dfcb2 Bump tokio from 1.36.0 to 1.37.0 (#3310)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.36.0 to 1.37.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.36.0...tokio-1.37.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-29 09:25:44 -04:00
Dustin J. Mitchell
06fdfc5af3 Edit Cargo.toml during release (#3302) 2024-03-27 22:56:13 +00:00
dependabot[bot]
19f2c0d7b4 Bump uuid from 1.7.0 to 1.8.0 (#3290)
* Bump uuid from 1.7.0 to 1.8.0

Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* use as_bytes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2024-03-24 22:19:27 +00:00
Dustin J. Mitchell
8bb08bf01d Add releasing docs (#3292)
add releasing docs
2024-03-24 21:32:38 +00:00
Dustin J. Mitchell
3e41fb604c Prepare for 3.0.0 release (#3287) 2024-03-24 16:13:06 -04:00
dependabot[bot]
d54264f80c Bump docker/build-push-action from 5.2.0 to 5.3.0 (#3289)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 19:40:31 -04:00
dependabot[bot]
db60bf6d72 Bump docker/login-action from 3.0.0 to 3.1.0 (#3288)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 19:40:23 -04:00
dependabot[bot]
0c8edfc50e Bump docker/build-push-action from 5.1.0 to 5.2.0 (#3285)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 08:44:18 -04:00
dependabot[bot]
904bece710 Bump mio from 0.8.10 to 0.8.11 (#3283)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

---
updated-dependencies:
- dependency-name: mio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 23:55:44 +00:00
Dustin J. Mitchell
aaff97d878 Use opensuse tumbleweed (#3282) 2024-03-04 17:42:27 +00:00
Dustin J. Mitchell
18a8bd2997 Use corrosion instead of CMakeRust (#3273)
* Use corrosion instead of CMakeRust
* use OpenSUSE tumbleweed (latest) to get newer CMake
2024-03-02 16:21:34 -05:00
Felix Schurk
8dd29e0a8a Change to out-of source build, Update build instructions (#3271)
* update build instructions

Usage of "modern" CMake syntax and using specific out of source build.
Further add example on how to build in parallel, build a specific target
and how to change the compiler.

This closes #3236.
2024-02-25 12:27:52 -05:00
ryneeverett
34c0e67469 show undo diff (#3213)
Exposes undo operations via the C API, and uses those to show a (new, differently formatted) diff before committing the undo.
2024-02-09 22:11:14 -05:00
dependabot[bot]
89df80c9f0 Bump sigstore/cosign-installer from 3.3.0 to 3.4.0 (#3267)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 11:29:42 -05:00
dependabot[bot]
79435b1a03 Bump tokio from 1.35.1 to 1.36.0 (#3268)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.35.1 to 1.36.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.1...tokio-1.36.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-05 11:28:21 -05:00
Akash Shanmugaraj
aeb6acf640 added BYOS (Bring Your Own SERVICE_ACCOUNT) for GCS authentication (#3262) 2024-01-27 07:57:12 -05:00
Dustin J. Mitchell
83bbe4ec37 Fix invalid imports in [{..}] form (#3241)
* Fix invalid imports in `[{..}]` form

Before this change, if an import of data that takes the form of a JSON
array of JSON objects results in an error, the import would be re-tried
assuming that each line of the file is a JSON object (the old format).
However, no check was made that the value actually was an object before
casting it to `json::object`, resulting in a segfault.

This adds the check, and handles the failure with a useful error message
(from the first attempt to parse the file).
2024-01-25 08:01:20 -05:00
Dustin J. Mitchell
5b5a7a37c0 Use the correct formatting for tag_ properties (#3261)
This resolves a discrepancy between Taskwarrior and Taskchampion as to
how tags should be represented.
2024-01-24 18:11:51 -05:00
dependabot[bot]
00a3b6edc2 Bump actions/cache from 3 to 4 (#3257)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 08:45:34 -05:00
Dustin J. Mitchell
4af0636b52 Add note about Rust not building automatically (#3255) 2024-01-21 22:13:46 -05:00
Dustin J. Mitchell
bacb79302a Change 'should' to 'may' in server snapshot requirements (#3256)
For an object store backend, none of the suggestions in this paragraph
make much sense. "May" is much softer, in terms of
https://datatracker.ietf.org/doc/html/rfc2119. And in particular, the
cloud server implementation does not do any of these things.
2024-01-21 22:13:10 -05:00
Dustin J. Mitchell
daca37806e Rename sync.server.encryption_secret to sync.encryption_secret. (#3249)
* Rename `sync.server.encryption_secret` to `sync.encryption_secret`.

* move pwgen
2024-01-21 19:11:24 -05:00
ryneeverett
082b6084fa sync server: Don't hash client_id for salt (#3250)
We don't know why we're doing this step so we probably shouldn't.
Cryptography isn't magic and extra steps are harmful in that they
obscure the important parts.
2024-01-21 18:16:25 -05:00
Dustin J. Mitchell
fa21835001 Better links from TW devel docs to TaskChampion (#3253) 2024-01-21 18:03:11 -05:00
ryneeverett
4008069a70 sync: Use 600,000 iterations for pbkdf2. (#3251)
Per [wikipedia](https://en.wikipedia.org/wiki/PBKDF2), "In 2023, OWASP
recommended to use 600,000 iterations for PBKDF2-HMAC-SHA256..."
2024-01-21 14:06:53 -05:00
Dustin J. Mitchell
323bd23251 Removed unused import (#3245)
Co-authored-by: Akash Shanmugaraj <65720968+akashShanmugraj@users.noreply.github.com>
2024-01-21 13:14:02 -05:00
Dustin J. Mitchell
5806413d64 Update to supported linux distros (#3248) 2024-01-21 13:13:41 -05:00
dependabot[bot]
0fca650b65 Bump webpki from 0.22.0 to 0.22.4 (#3246)
Bumps [webpki](https://github.com/briansmith/webpki) from 0.22.0 to 0.22.4.
- [Commits](https://github.com/briansmith/webpki/commits)

---
updated-dependencies:
- dependency-name: webpki
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-21 12:54:45 -05:00
Dustin J. Mitchell
9566c929e2 Add support for cloud sync, specifically GCP (#3223)
* Add support for cloud sync, specifically GCP

This adds generic support for sync to cloud services, with specific
spuport for GCP. Adding others -- so long as they support a
compare-and-set operation -- should be comparatively straightforward.

The cloud support includes cleanup of unnecessary data, and should keep
total space usage roughly proportional to the number of tasks.

Co-authored-by: ryneeverett <ryneeverett@gmail.com>
2024-01-21 12:36:37 -05:00
dependabot[bot]
6f1c16fecd Bump uuid from 1.6.0 to 1.7.0 (#3244)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.6.0...1.7.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-20 17:38:08 -05:00
Dustin J. Mitchell
80047ad5e7 Disable Clang's return-type-c-linkage warning (#3227)
* Disable return-type-c-linkage warning on Clang.

This is emitted by the compiler when it can't tell if the incomplete
type being returned is a C++ type, which might not have a C-compatible
layout. In `taskchampion.h`, the types are not C++ types so this is not
an issue and the warning is unnecessary.

* Use an if instead

Fancy generator expressions appear to not work.

* Try some different CMake syntax
2024-01-20 16:41:38 -05:00
Dustin J. Mitchell
b515f876ca Disable mac tests (#3242)
Disable mac testers
2024-01-20 16:39:53 -05:00
Dustin J. Mitchell
6d23497d6f Update task model docs (#3234)
Dependencies are now implemented, and the docs should be clear about the
format of the keys and values.

Noticed while working on GothenburgBitFactory/tw.org#212.
2023-12-27 21:22:23 -05:00
Dustin J. Mitchell
e29925155d Fix formatting of comments in taskchampion.h (#3228) 2023-12-27 20:02:23 -05:00
Dustin J. Mitchell
bd46b254af Fix unnecessary mut (#3224) 2023-12-24 20:14:17 -05:00
Dustin J. Mitchell
1380d79148 Update to 2021 edition (#3217)
..and also include the rust-version property in the taskchampion crate.
2023-12-24 08:58:04 -05:00
Dustin J. Mitchell
b52248f146 Make the sync server client an optional feature (#3216)
* Make the sync server client an optional feature

* fix comment, remove unnecessary allow(dead_code)
2023-12-24 08:57:37 -05:00
ryneeverett
e95f95eb08 xtask msrv: this subcommand is not capitalized (#3218)
$ cargo xtask MSRV 1.99
        Finished dev [unoptimized + debuginfo] target(s) in 0.21s
         Running `target/debug/xtask MSRV 1.99`
    Error: xtask: unknown xtask
    $ cargo xtask msrv 1.99
        Finished dev [unoptimized + debuginfo] target(s) in 0.21s
         Running `target/debug/xtask msrv 1.99`
    xtask: Updated MSRV in ../.github/workflows/checks.yml
    xtask: Updated MSRV in ../.github/workflows/rust-tests.yml
    xtask: Updated MSRV in taskchampion/src/lib.rs
    xtask: Updated MSRV in taskchampion/Cargo.toml
2023-12-24 08:57:01 -05:00
dependabot[bot]
1c11f8b650 Bump sigstore/cosign-installer from 3.1.2 to 3.3.0 (#3211)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.1.2 to 3.3.0.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v3.1.2...v3.3.0)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 08:42:35 -05:00
dependabot[bot]
1a783f95e5 Bump ureq from 2.8.0 to 2.9.0 (#3207)
Bumps [ureq](https://github.com/algesten/ureq) from 2.8.0 to 2.9.0.
- [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/algesten/ureq/compare/2.8.0...2.9.0)

---
updated-dependencies:
- dependency-name: ureq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-21 14:35:01 -05:00
dependabot[bot]
5b93918bee Bump uuid from 1.5.0 to 1.6.0 (#3205)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.5.0...1.6.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 21:42:53 -05:00
dependabot[bot]
d0b81166fa Bump docker/build-push-action from 4.2.1 to 5.1.0 (#3204)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4.2.1...v5.1.0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 21:23:36 -05:00
dependabot[bot]
1b6fd7c803 Bump regex from 1.9.4 to 1.10.2 (#3201)
Bumps [regex](https://github.com/rust-lang/regex) from 1.9.4 to 1.10.2.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.9.4...1.10.2)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 12:03:15 -05:00
dependabot[bot]
1392f55944 Bump proptest from 1.3.1 to 1.4.0 (#3198)
* Bump proptest from 1.3.1 to 1.4.0

Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: proptest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update MSRV to 1.65 to match proptest

Rust 1.65 is just over one year old right now.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2023-11-13 23:21:54 -05:00
dependabot[bot]
41992d4849 Bump regex from 1.5.6 to 1.9.4 (#3197)
Bumps [regex](https://github.com/rust-lang/regex) from 1.5.6 to 1.9.4.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.5.6...1.9.4)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 19:19:55 -05:00
Isaac Wyatt
8f327db5b9 Add cargo xtask msrv (#3189)
* added cargo xtask msrv X.Y placeholder function

* add placeholder function cargo xtask msrv (X.Y)

* implement CLI arg vec, graceful errors, formatting

* impl. xtask msrv insert,upsert,graceful failures

* misc fixes - still need to update write method

* interim commit before removing comments

* updated per @djmitche suggestions. 2 fixes todo

* impl unwrap error checks, file truncating, etc

* removed test paths

* updated toml with specific regex version

* updated cargo toml and lock for regex version

* updated cargo toml and lock for regex version

* fixed clippy complaints

* impl replace file content, not comments

* accept djmitche suggestion to change comment documentation

Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>

* refactored, need to fix Cow return

* removed debug prints, unncessary if, etc.

* fix non-idiomatic rust, arg.len error handling

* add #MSRV to config files and test

---------

Co-authored-by: iwyatt <sayhello+git@isaacwyatt.com>
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
2023-11-11 17:54:38 -05:00
dependabot[bot]
1583e56cfc Bump uuid from 1.4.0 to 1.5.0 (#3192)
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.4.0...1.5.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:23:57 -04:00
dependabot[bot]
a1aa7a9d74 Bump rustix from 0.37.19 to 0.37.25 (#3191)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.19 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.19...v0.37.25)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 08:17:19 -04:00
Thomas Lauf
a8f79f84a8 Fix typo 2023-10-20 12:03:02 +02:00
dependabot[bot]
9fc40c5949 Bump ureq from 2.7.0 to 2.8.0 (#3180)
* Bump ureq from 2.7.0 to 2.8.0

Bumps [ureq](https://github.com/algesten/ureq) from 2.7.0 to 2.8.0.
- [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/algesten/ureq/compare/2.7.0...2.8.0)

---
updated-dependencies:
- dependency-name: ureq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update rustls too

* more Cargo.lock updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2023-10-07 17:23:47 -04:00
dependabot[bot]
9337763491 Bump byteorder from 1.4.3 to 1.5.0 (#3184)
Bumps [byteorder](https://github.com/BurntSushi/byteorder) from 1.4.3 to 1.5.0.
- [Changelog](https://github.com/BurntSushi/byteorder/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/byteorder/compare/1.4.3...1.5.0)

---
updated-dependencies:
- dependency-name: byteorder
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-06 08:10:48 -04:00
dependabot[bot]
ee35cd6d82 Bump proptest from 1.2.0 to 1.3.1 (#3181)
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.2.0 to 1.3.1.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.2.0...v1.3.1)

---
updated-dependencies:
- dependency-name: proptest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-05 19:45:03 -04:00
dependabot[bot]
5d4abd3338 Bump docker/login-action from 2.1.0 to 3.0.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2.1.0...v3.0.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-24 13:52:46 +02:00
dependabot[bot]
98f945ba73 Bump docker/build-push-action from 3.2.0 to 4.2.1 (#3172)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 4.2.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3.2.0...v4.2.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 22:05:33 -04:00
dependabot[bot]
bf05d075a1 Bump actions/checkout from 3 to 4 (#3171)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 22:05:04 -04:00
dependabot[bot]
743ded84c1 Bump sigstore/cosign-installer from 2.8.1 to 3.1.2 (#3170)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 2.8.1 to 3.1.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/v2.8.1...v3.1.2)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-04 15:50:38 -04:00
Jonathan Neidel
d25f5a5118 Fix arch badge after pkg moved repositories (#3166) 2023-08-31 21:42:02 -04:00
Bernhard M. Wiedemann
603bf075f1 Fix issues with year 2038 (#3052)
* Fix annotations in year 2038

Fixes #3050

* Ensure 32-bit systems work better after 2038

Without this patch, their 32-bit signed long int could overflow.

This patch was done while working on reproducible builds for openSUSE.
2023-08-30 22:08:31 -04:00
dependabot[bot]
7017d8fc31 Bump rustls-webpki from 0.100.1 to 0.100.2 (#3161)
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.100.1 to 0.100.2.
- [Release notes](https://github.com/rustls/webpki/releases)
- [Commits](https://github.com/rustls/webpki/compare/v/0.100.1...v/0.100.2)

---
updated-dependencies:
- dependency-name: rustls-webpki
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 18:55:41 -04:00
gl-yziquel
0e4828f155 Fixing a link in DEVELOPER.md. (#3159) 2023-08-20 22:40:40 -04:00
Thomas Lauf
ba83ee9cac Add workflow for Taskwarrior Docker image (#3039)
The workflow is triggered by a successful run of the test suite and creates a Docker image with a Taskwarrior installation of the current branch (restricted to develop/stable)
2023-08-12 11:30:39 +02:00
Dustin J. Mitchell
971b229a4b Consolidate in-repo documentation (#3143)
* move doc/misc to top level, add READMEs

* Move docs -> doc/devel

This also consolidates the _three_ documents describing (differently)
how to build Taskwarrior into a signle document.
2023-08-09 21:30:01 -04:00
Michal Koutný
3248437326 Fix fish completion (#3068)
* Fix fish completions

As per [1] printf in fish does not support '--' as a delimiter of format
string and args.
It used to work (accidentally) earlier (fish 3.5, glibc 2.31) but it is
broken (fish 3.6, glibc 2.36) nowadays.
Fix it by using the simple form of printf invocation with no argument
escaping.

Fixes: #3048

[1] https://fishshell.com/docs/current/cmds/printf.html#description

* Fix fish completions with older fish

Older versions (fish 3.5) cannot cope with '-' in printf format hence
add a workaround for these.
2023-07-25 15:29:50 -04:00
Nathan Luong
76b21f49e8 Implement due dates related methods for Task and TaskMut (#3145)
* Implement due dates related methods for Task and TaskMut

* Merge add_due and remove_due into the single method called set_due

* reformat the file
2023-07-25 09:09:25 -04:00
Dathan Bennett
c86252d693 Add devcontainer spec (#3144)
* Add devcontainer spec from codespaces generator

I started a codespace and used the VSCode devcontainer generator to
generate the devcontainer.json, reinstall-cmake.sh, and Dockerfile.

* Add uuid-dev in Dockerfile

---------

Co-authored-by: Dathan Bennett <dathanb@netflix.com>
2023-07-20 17:33:02 -04:00
Dathan Bennett
a7bb0c9ba0 Link executables using system frameworks on Darwin (#3075)
* Link test executables using system frameworks on Darwin

On an M1 MBP, running `cmake . && make test` yields the error

```
[ 69%] Linking CXX executable tc.t
Undefined symbols for architecture arm64:
  "_CFRelease", referenced from:
      _$LT$iana_time_zone..platform..system_time_zone..SystemTimeZone$u20$as$u20$core..ops..drop..Drop$GT$::drop::hcd3964de9573de30 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.15.rcgu.o)
  "_CFStringGetBytes", referenced from:
      iana_time_zone::platform::string_ref::StringRef$LT$T$GT$::to_utf8::h39971b546d587152 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.13.rcgu.o)
  "_CFStringGetCStringPtr", referenced from:
      iana_time_zone::platform::string_ref::StringRef$LT$T$GT$::as_utf8::h8bb5c2c0d091ded1 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.13.rcgu.o)
  "_CFStringGetLength", referenced from:
      iana_time_zone::platform::string_ref::StringRef$LT$T$GT$::to_utf8::h39971b546d587152 in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.13.rcgu.o)
  "_CFTimeZoneCopySystem", referenced from:
      iana_time_zone::platform::system_time_zone::SystemTimeZone::new::hc42d30609914d79d in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.15.rcgu.o)
  "_CFTimeZoneGetName", referenced from:
      iana_time_zone::platform::system_time_zone::SystemTimeZone::name::h44947ee6deb3339a in libtc_rust.a(iana_time_zone-0e2714c6ff24f5bb.iana_time_zone.4cacef0c-cgu.15.rcgu.o)
  "_SecRandomCopyBytes", referenced from:
      ring::rand::darwin::fill::h0ad94d66d4e1a222 in libtc_rust.a(ring-e5f87a2e334d4c6a.ring.a21bac31-cgu.4.rcgu.o)
  "_kSecRandomDefault", referenced from:
      ring::rand::darwin::fill::h0ad94d66d4e1a222 in libtc_rust.a(ring-e5f87a2e334d4c6a.ring.a21bac31-cgu.4.rcgu.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [test/tc.t] Error 1
make[2]: *** [test/CMakeFiles/tc.t.dir/all] Error 2
make[1]: *** [test/CMakeFiles/test.dir/rule] Error 2
```

This change resolves the error by updating the targets in
test/CMakeLists.txt to link against the CoreFoundation and Security
frameworks when building under Mac OS.

* Link executables against CoreFoundation and Security frameworks on Mac OS

* Rename test_osx.sh to test_macos.sh

---------

Co-authored-by: Dathan Bennett <dathanb@netflix.com>
2023-07-20 17:23:12 -04:00
Dustin J. Mitchell
7f68441916 Change "client key" to "client id" (#3130)
In #3118 @ryneeverett mentioned that "key" suggests that this is a
secret, when in truth it's just a user identifier. So "ID" is a better
word for it than "key".
2023-07-11 22:13:53 -04:00
dependabot[bot]
8097e28318 Bump pretty_assertions from 1.3.0 to 1.4.0 (#3129)
Bumps [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-08 10:28:07 -04:00
Dustin J. Mitchell
31105c2ba3 Sync against taskchampion-sync-server (#3118)
This removes use of gnutls and the TLS implementation, which is no
longer needed (task synchronization is handled via Taskchampion, which
uses `reqwest`, which handles TLS via other Rust dependencies). This
incidentally removes the following config options:
 * `debug.tls`
 * `taskd.ca`
 * `taskd.certificate`
 * `taskd.ciphers`
 * `taskd.credentials`
 * `taskd.key`
 * `taskd.server`
 * `taskd.trust`
2023-07-08 10:27:33 -04:00
Dustin J. Mitchell
771977aa69 Restore check for missing config 2023-07-04 14:08:51 -04:00
dependabot[bot]
5db8b292c7 Bump uuid from 1.3.0 to 1.4.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.3.0...1.4.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-28 12:23:50 -04:00
Dustin J. Mitchell
0c3d4bbe74 bump ffizz-header to 0.5 2023-06-26 18:18:44 -04:00
Dustin J. Mitchell
48543b7fcb Put Rust deps at the root of the workspace
This allows us to be consistent about the required versions for each of
the member packages.

Fixes #3088.
2023-06-21 12:01:06 -04:00
Dustin J. Mitchell
7a310fbfc1 Remove redundant comments
There's no need to repeat comments on the fields of a struct within
taskchampion-lib.
2023-06-21 12:00:23 -04:00
dependabot[bot]
1930ea0ad0 Bump strum_macros from 0.24.3 to 0.25.0
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.3 to 0.25.0.
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 16:29:57 -04:00
dependabot[bot]
790a50f7e0 Bump strum from 0.24.1 to 0.25.0
Bumps [strum](https://github.com/Peternator7/strum) from 0.24.1 to 0.25.0.
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-19 13:36:25 -04:00
Dustin J. Mitchell
839a0c4a0f fix workflow reference 2023-06-19 13:36:17 -04:00
Dustin J. Mitchell
efc2531a7f fix a spot where C code looked like a doctest 2023-06-19 13:36:17 -04:00
Dustin J. Mitchell
a0703af0b9 Run 'cargo xtask codegen' in CI and check that there are no diffs 2023-06-19 13:36:17 -04:00
Dustin J. Mitchell
75e10676ce Use ffizz_header to generate taskchampion.h 2023-06-19 13:36:17 -04:00
dependabot[bot]
989a330e46 Bump ureq from 2.6.1 to 2.7.0
Bumps [ureq](https://github.com/algesten/ureq) from 2.6.1 to 2.7.0.
- [Changelog](https://github.com/algesten/ureq/blob/main/CHANGELOG.md)
- [Commits](https://github.com/algesten/ureq/compare/2.6.1...2.7.0)

---
updated-dependencies:
- dependency-name: ureq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 19:54:42 -04:00
Dustin J. Mitchell
a69b0c8032 Remove properties when set to an empty string
Fixes #3109.
2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
6cd5bf1237 Update "modified" on modification 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
a1b64a05ba add more information to 'task purge' footnote 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
02de8dfe67 remove TDB2::commit call from tests 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
3b4113c61a Update comments for TDB2::modify 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
18d60719e4 update comment for TDB2::get_changes 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
9df4c8156e remove TDB::commit 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
0882a08d18 Remove unnecessary TDB2::{modify,add} argument 2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
5bb9857984 Use Taskchampion to store Taskwarrior data
This replaces the TF2 task files with a TaskChampion replica.
2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
4b814bc602 [BREAKING] remove diff display from 'task undo'
TaskChampion does not make the necessary information available to
accomplish this, but see #2928.
2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
87467f72c7 [BREAKING] remove 'task purge' support
TaskChampion removes deleted tasks automatically when they expire, so
this subcommand is no longer required.
2023-06-11 17:37:03 -04:00
Dustin J. Mitchell
d47c70579f [BREAKING] Disable the 'sync' command
This will require support from TaskChampion.
2023-06-11 17:37:03 -04:00
dependabot[bot]
16c35a41d3 Bump tempfile from 3.5.0 to 3.6.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.5.0 to 3.6.0.
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 20:19:59 -04:00
dependabot[bot]
d28cdc39fa Bump proptest from 1.1.0 to 1.2.0
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: proptest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-25 10:55:10 -04:00
dependabot[bot]
66b2db52f4 Bump clap from 4.2.1 to 4.3.0
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.1 to 4.3.0.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.2.1...clap_complete-v4.3.0)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 19:09:04 -04:00
Dathan Bennett
41608dc35f Fork CMakeRust and add the aarch64-apple-darwin fix to it 2023-04-27 19:18:10 -04:00
Dathan Bennett
7492fc48bb Vendor CMakeRust 2023-04-27 19:18:10 -04:00
Dathan Bennett
37d7f3de8a Ignore IntelliJ artifacts and remove CMakeRust submodule 2023-04-27 19:18:10 -04:00
Dustin J. Mitchell
ddd367232e [BREAKING] Remove journal.info support
This support will require access to all of the operations ever performed
on a task, which is not currently exposed by TaskChampion (but see #2928)
2023-04-16 19:21:14 -04:00
dependabot[bot]
cf711f5eb1 Bump h2 from 0.3.16 to 0.3.17
Bumps [h2](https://github.com/hyperium/h2) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.16...v0.3.17)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 17:16:10 -04:00
Dustin J. Mitchell
f0ced5287b bump MSRV 2023-04-09 16:17:16 -04:00
Dustin J. Mitchell
645c6bf13f update clap used in sync-server 2023-04-09 16:17:16 -04:00
Dustin J. Mitchell
5f2d82dc72 update MSRV 2023-04-09 15:44:26 -04:00
Dustin J. Mitchell
ae028983b6 clippy fixes 2023-04-09 15:44:26 -04:00
Dustin J. Mitchell
52fdc6a877 Update Actix crates to latest versions
This avoids a vulnerability in tokio (#3085). The major version updates
of both actix-web and actix-rt required some signficant changes. Chief
among those, it turns out we were relying on actix-rt to run the
HttpServer in a different thread from the rest of the test, so that we
could talk to it from sync code in the test thread. This no longer
works, so the sync code is now run in a dedicated thread with
`actix_rt::task::spawn_blocking`.
2023-04-09 15:44:26 -04:00
Dathan Bennett
33366e2f05 Ignore the aarch64-apple-darwin directory
This directory is generated instead of the x86_64-unknown-linux-gnu
directory when building on an ARM64/AArch64 Mac, so this change adds
that directory to the gitignore config.
2023-04-09 15:29:29 -04:00
Dustin J. Mitchell
ed674ec9e5 fix branch references in dev docs 2023-04-09 15:28:45 -04:00
dependabot[bot]
491941a55c Bump tempfile from 3.4.0 to 3.5.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 17:51:08 -04:00
dependabot[bot]
77e1773b04 Bump rusqlite from 0.28.0 to 0.29.0
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 17:37:40 -04:00
dependabot[bot]
d2f2e2b4a4 Bump rstest from 0.16.0 to 0.17.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.16.0 to 0.17.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.16.0...0.17.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-21 15:23:16 -04:00
dependabot[bot]
e46533ef2b Bump tempfile from 3.3.0 to 3.4.0
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 15:12:52 -05:00
dependabot[bot]
0adced74a1 Bump libsqlite3-sys from 0.25.0 to 0.25.2
Bumps [libsqlite3-sys](https://github.com/rusqlite/rusqlite) from 0.25.0 to 0.25.2.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.25.0...v0.25.2)

---
updated-dependencies:
- dependency-name: libsqlite3-sys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-16 19:49:07 -05:00
ryneeverett
1c4e103904 taskchampion: Add time.utc_timestamp function.
Add a function that returns a Timestamp from an i64. One advantage is
improved readability since this function is guaranteed to return a
`LocalResult::Single`. Anther advantage is that it will panic if
something other than a LocalResult::Single is returned by chrono, which
shouldn't be possible for UTC timestamps which can't have DST ambiguity.
2023-02-06 08:23:27 -05:00
dependabot[bot]
5a4b981b6c Bump proptest from 1.0.0 to 1.1.0
Bumps [proptest](https://github.com/proptest-rs/proptest) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/proptest-rs/proptest/releases)
- [Changelog](https://github.com/proptest-rs/proptest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/proptest-rs/proptest/compare/1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: proptest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-06 08:04:06 -05:00
Dustin J. Mitchell
d6475cc096 explicit type for cache value 2023-02-03 20:25:51 -05:00
Dustin J. Mitchell
c701a81699 make calculation of DependencyMap easier to read 2023-02-03 20:25:51 -05:00
Dustin J. Mitchell
7b0104e177 Only consider tasks dependent if both are pending
More specifically, consider them dependent if a task in the working set
(regardless of status) depends on a task with status "pending"
(regardless of presence in the working set).  This has the desired
user-visible effect of making a task no longer +BLOCKED when the task it
depends on is marked as done, without requiring a working-set rebuild in
the intervening time.
2023-02-03 20:25:51 -05:00
Dustin J. Mitchell
05c7f36b17 fix typo 2023-02-03 20:02:48 -05:00
Dustin J. Mitchell
f94df28226 Do not further update 'modified' if it's explicitly set 2023-02-03 20:02:48 -05:00
Dustin J. Mitchell
b963af9b4b use non-deprecated chrono functions 2023-02-02 20:00:15 -05:00
dependabot[bot]
6fc78209da Bump uuid from 1.2.1 to 1.3.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.2.1...1.3.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-02 19:42:39 -05:00
ryneeverett
3fdc6d3662 simpletap: simplify to use parent run method
Per the TODO, use `__init__` to override the stream. There don't seem to
be any other substantial changes to the `run` method needed for TAP and
I'm assuming the additional code in the upstream `run` has been added
since this class was written.

My primary motivation was to set `result.buffer = self.buffer` in the
`run` method, which fixes the runner enough to be able to use
`breakpoint()`.

In addition, I updated the shebang in `tw-2189.t` for portability.
2023-01-30 18:33:42 -05:00
dependabot[bot]
717e430f2e Bump bumpalo from 3.9.1 to 3.12.0
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.9.1 to 3.12.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.9.1...3.12.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-22 22:30:07 -05:00
dependabot[bot]
84fb2f0d2f Bump bumpalo from 3.9.1 to 3.12.0 in /src/tc/rust
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.9.1 to 3.12.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.9.1...3.12.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-22 21:27:07 -05:00
ryneeverett
725dab681f fixup 2023-01-16 16:56:09 -05:00
ryneeverett
2f7196dbfc Don't expose third-party errors in public API. 2023-01-16 16:56:09 -05:00
ryneeverett
f56296ea93 Address inline review comments. 2023-01-16 16:56:09 -05:00
ryneeverett
c061d926bb taskchampion: use taskchampion::Error
Resolve #2878
2023-01-16 16:56:09 -05:00
dependabot[bot]
755100fd8a Bump actions-rs/cargo from 1.0.1 to 1.0.3
Bumps [actions-rs/cargo](https://github.com/actions-rs/cargo) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/actions-rs/cargo/releases)
- [Changelog](https://github.com/actions-rs/cargo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/actions-rs/cargo/compare/v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: actions-rs/cargo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-15 15:29:59 -05:00
dependabot[bot]
e0e1d77744 Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-15 15:29:50 -05:00
dependabot[bot]
33eab5632c Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-15 15:29:42 -05:00
ryneeverett
5c4fb01abf taskchampion: update docs
- update CI branch filters so workflows actually run on merge
- update CI docs deployment target
- update links
- fix typos
- remove references to `ta` cli which was removed
- remove build-docs.sh script which duplicates publish-docs.yml workflow
2023-01-14 11:25:46 -05:00
Saúl Nogueras
c2c803582a Add fish context completions
Fixes #3034
2023-01-11 00:11:04 -05:00
DBV
627dc79a7e Update CmdNews.cpp
typo
2023-01-11 00:09:28 -05:00
Thomas Lauf
c1ed70b63e Enable version updates for GitHub actions 2023-01-11 00:08:34 -05:00
dependabot[bot]
226df73c58 Bump ureq from 2.5.0 to 2.6.1
Bumps [ureq](https://github.com/algesten/ureq) from 2.5.0 to 2.6.1.
- [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)

---
updated-dependencies:
- dependency-name: ureq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 23:55:51 -05:00
Dustin J. Mitchell
f1e1095c0a apply clippy fixes 2022-12-26 17:49:04 -05:00
Dustin J. Mitchell
88333ac785 Expose is_* methods on tasks. 2022-12-21 16:36:23 -05:00
Dustin J. Mitchell
7c27f116ad Minor fixes to status in tc-lib 2022-12-19 20:01:38 -05:00
Tomas Babej
64aa1b1c7e osx: Set LDFLAGS to search Foundation and Security 2022-12-18 21:01:36 -05:00
Tomas Babej
3289f93073 tests: Adjust comment
The recurrence period is 1m=P30D.
2022-12-18 15:23:55 -05:00
Dustin J. Mitchell
e6f28bb7e6 include recurring tasks in working-set, but not +PENDING 2022-12-18 14:56:00 -05:00
Dustin J. Mitchell
9add31104b Add a Recurring status to TaskChampion 2022-12-18 14:56:00 -05:00
Dustin J. Mitchell
6e5d8b1dde fix recurrence test to avoid wasting a lot of time 2022-12-18 14:21:10 -05:00
Tomas Babej
19f183159e tests: Fail OS-X test workflow on error in the build process
This sets `set -e` to ensure any errors in the test script are
propagated upwards and noticed by the Github workflow.

Prior to these changes failures in the build process of the tests would
be ignored, and the success / failure would be determined purely by the
return code of the `./problems` script.
2022-12-18 14:19:56 -05:00
Dustin J. Mitchell
e4987ea7e0 use OpenFlags::default to avoid maintaining explicit defaults 2022-12-18 13:01:32 -05:00
Dustin J. Mitchell
015e8eac25 pass create_if_missing in Replica constructor 2022-12-18 13:01:32 -05:00
Dustin J. Mitchell
67fc422311 Add support for _not_ creating a DB if one does not exist 2022-12-18 13:01:32 -05:00
Dustin J. Mitchell
9e5c0001c4 Skip incorrectly-passing tests (see #2996) 2022-12-18 12:59:28 -05:00
Dustin J. Mitchell
6981aaccf2 Add a <vector> include in Replica.h
Replica.h refers to std::vector, so this header file must be included.
2022-12-18 12:58:38 -05:00
John Nguyen
591d6ccffb Bump libshared submodule 2022-12-18 12:33:36 -05:00
Tomas Babej
c483fdcc0e review-dockerfile: Setup Rust 2022-12-18 12:24:25 -05:00
Tomas Babej
7e45425075 review-dockerfile: Add workaround for a new location of CentOS repos 2022-12-18 12:24:25 -05:00
Dustin J. Mitchell
dbeee0640a Add a hint to 'make test' see test problems 2022-12-18 12:01:12 -05:00
dependabot[bot]
bfc220058f Bump rstest from 0.15.0 to 0.16.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.15.0...0.16.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-28 18:40:29 -05:00
dependabot[bot]
06c3fbefd7 Bump env_logger from 0.9.1 to 0.10.0
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.1...v0.10.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-27 12:08:44 -05:00
Dustin J. Mitchell
a93a3aa4f9 Update Cargo.lock (see #2994) 2022-11-12 17:49:42 -05:00
Matthew James Kraai
5d719ffb45 Add missing words to task documentation 2022-11-02 19:56:28 -04:00
Dustin J. Mitchell
e5ae01ea71 skip all patch updates 2022-10-26 17:22:12 -04:00
Dustin J. Mitchell
f5f37009cb Ignore patch updates for some noisy deps 2022-10-26 17:22:12 -04:00
dependabot[bot]
4af27903f9 Bump serde from 1.0.145 to 1.0.147
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.145 to 1.0.147.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.145...v1.0.147)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 14:42:44 -04:00
dependabot[bot]
c93039f1fd Bump libc from 0.2.135 to 0.2.136
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.135 to 0.2.136.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.135...0.2.136)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 14:42:33 -04:00
dependabot[bot]
cd6922ac39 Bump anyhow from 1.0.65 to 1.0.66
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.65 to 1.0.66.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.65...1.0.66)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-22 15:47:57 -04:00
dependabot[bot]
5b14f63dee Bump clap from 4.0.17 to 4.0.18
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.17 to 4.0.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.17...v4.0.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-22 15:47:43 -04:00
dependabot[bot]
6e5513d6f4 Bump futures from 0.3.24 to 0.3.25
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.24 to 0.3.25.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.24...0.3.25)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-22 15:47:35 -04:00
dependabot[bot]
2bd4c21e37 Bump serde_json from 1.0.86 to 1.0.87
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.86 to 1.0.87.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.86...v1.0.87)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-22 09:14:41 -04:00
dependabot[bot]
c6b13de344 Bump clap from 4.0.15 to 4.0.17
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.15 to 4.0.17.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.15...v4.0.17)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 18:35:46 -04:00
dependabot[bot]
1af43d505d Bump clap from 4.0.14 to 4.0.15
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.14 to 4.0.15.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.14...v4.0.15)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 18:55:33 -04:00
dependabot[bot]
be3fea8cd2 Bump clap from 4.0.13 to 4.0.14
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.13 to 4.0.14.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.13...v4.0.14)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 18:48:12 -04:00
dependabot[bot]
5588bcc2e8 Bump clap from 4.0.11 to 4.0.13
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.11 to 4.0.13.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.11...v4.0.13)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 20:09:45 -04:00
dependabot[bot]
b1d24e455b Bump libc from 0.2.134 to 0.2.135
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.134 to 0.2.135.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.134...0.2.135)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-12 20:09:35 -04:00
dependabot[bot]
5c518f9b90 Bump clap from 4.0.10 to 4.0.11
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.10 to 4.0.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.10...v4.0.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:49:17 -04:00
dependabot[bot]
0b54cbb89d Bump uuid from 1.1.2 to 1.2.1
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.1.2 to 1.2.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.1.2...1.2.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:48:55 -04:00
dependabot[bot]
75cdc6aa6f Bump serde_json from 1.0.85 to 1.0.86
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.85...v1.0.86)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 08:48:30 -04:00
dependabot[bot]
98ba98899e Bump clap from 4.0.9 to 4.0.10
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.9 to 4.0.10.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.9...v4.0.10)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-06 12:51:09 -04:00
Dustin J. Mitchell
41625f8b11 fix clippy warnings 2022-10-05 07:31:56 -04:00
dependabot[bot]
7b35121374 Bump clap from 4.0.4 to 4.0.9
Bumps [clap](https://github.com/clap-rs/clap) from 4.0.4 to 4.0.9.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.0.4...v4.0.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-04 14:39:25 -04:00
Dustin J. Mitchell
1b55e5b265 fix clippy lints 2022-10-02 15:27:25 -04:00
Dustin J. Mitchell
9e6be07e24 update to clap-4.x 2022-10-02 15:27:25 -04:00
dependabot[bot]
898ccd8797 Bump clap from 3.2.10 to 4.0.4
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.10 to 4.0.4.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.10...v4.0.4)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-02 15:27:25 -04:00
dependabot[bot]
b59581b6cc Bump libc from 0.2.133 to 0.2.134
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.133 to 0.2.134.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.133...0.2.134)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 09:11:26 -04:00
dependabot[bot]
8bda81e51e Bump thiserror from 1.0.36 to 1.0.37
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.36 to 1.0.37.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.36...1.0.37)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-01 09:11:14 -04:00
dependabot[bot]
d62435d421 Bump thiserror from 1.0.35 to 1.0.36
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.35 to 1.0.36.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.35...1.0.36)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-26 09:35:53 -04:00
dependabot[bot]
603ebb59c7 Bump serde from 1.0.144 to 1.0.145
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.144 to 1.0.145.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.144...v1.0.145)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-25 17:51:47 -04:00
dependabot[bot]
34be9b44bb Bump env_logger from 0.9.0 to 0.9.1
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/commits)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-20 16:25:55 -04:00
dependabot[bot]
78555c3014 Bump libc from 0.2.132 to 0.2.133
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.132 to 0.2.133.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.132...0.2.133)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-20 15:23:20 -04:00
dependabot[bot]
0bae7d9b65 Bump anyhow from 1.0.64 to 1.0.65
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.64 to 1.0.65.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.64...1.0.65)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-15 17:44:47 -04:00
dependabot[bot]
89f70e560d Bump thiserror from 1.0.34 to 1.0.35
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.34 to 1.0.35.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.34...1.0.35)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-15 17:44:16 -04:00
dependabot[bot]
74afa95145 Bump anyhow from 1.0.63 to 1.0.64
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.63 to 1.0.64.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.63...1.0.64)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 11:54:38 -04:00
dependabot[bot]
9421caf4ea Bump thiserror from 1.0.33 to 1.0.34
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.33 to 1.0.34.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.33...1.0.34)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-05 11:54:26 -04:00
dependabot[bot]
1337f8f2fa Bump pretty_assertions from 1.2.1 to 1.3.0
Bumps [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases)
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 20:05:54 -04:00
dependabot[bot]
889660537a Bump thiserror from 1.0.32 to 1.0.33
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.32 to 1.0.33.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.32...1.0.33)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 18:24:00 -04:00
dependabot[bot]
01c18edb8c Bump anyhow from 1.0.62 to 1.0.63
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.62 to 1.0.63.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.62...1.0.63)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-02 18:23:53 -04:00
dependabot[bot]
58497c17cd Bump iana-time-zone from 0.1.44 to 0.1.47
Bumps [iana-time-zone](https://github.com/strawlab/iana-time-zone) from 0.1.44 to 0.1.47.
- [Release notes](https://github.com/strawlab/iana-time-zone/releases)
- [Changelog](https://github.com/strawlab/iana-time-zone/blob/main/CHANGELOG.md)
- [Commits](https://github.com/strawlab/iana-time-zone/compare/0.1.44...v0.1.47)

---
updated-dependencies:
- dependency-name: iana-time-zone
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-01 19:18:49 -04:00
dependabot[bot]
a441418a5d Bump futures from 0.3.23 to 0.3.24
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.23 to 0.3.24.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.23...0.3.24)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-30 15:11:00 -04:00
dependabot[bot]
e96a89124d Bump serde from 1.0.143 to 1.0.144
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.143 to 1.0.144.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.143...v1.0.144)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 10:44:57 -04:00
dependabot[bot]
71b991a91f Bump serde_json from 1.0.83 to 1.0.85
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.83 to 1.0.85.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.83...v1.0.85)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 10:44:39 -04:00
Dustin J. Mitchell
4fdb46fd47 ffi for tc_task_get/set_value 2022-08-21 17:22:50 -04:00
dependabot[bot]
7cecac3328 Bump anyhow from 1.0.61 to 1.0.62
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.61...1.0.62)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-21 09:06:33 -04:00
dependabot[bot]
5c33e6c93c Bump libc from 0.2.131 to 0.2.132
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.131 to 0.2.132.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.131...0.2.132)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-20 21:16:48 -04:00
Dustin J. Mitchell
4a1556ccb9 Add Replica::num_undo_points and exclude undo points from num_operations 2022-08-20 21:12:44 -04:00
dependabot[bot]
17726ddfe4 Bump chrono from 0.4.21 to 0.4.22
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.21 to 0.4.22.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.21...v0.4.22)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 19:12:42 -04:00
dependabot[bot]
fd98b188e2 Bump futures from 0.3.21 to 0.3.23
Bumps [futures](https://github.com/rust-lang/futures-rs) from 0.3.21 to 0.3.23.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.21...0.3.23)

---
updated-dependencies:
- dependency-name: futures
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 19:11:32 -04:00
dependabot[bot]
4651bd1bdb Bump libc from 0.2.129 to 0.2.131
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.129 to 0.2.131.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/commits)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-13 08:57:10 -04:00
dependabot[bot]
04c95ecc56 Bump anyhow from 1.0.60 to 1.0.61
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.60 to 1.0.61.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.60...1.0.61)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-11 17:47:04 -04:00
Dustin J. Mitchell
9c0bccd08a rustsec org is now hosting audit-check 2022-08-11 01:14:37 -04:00
Dustin J. Mitchell
38ad3bc14b spell audit-check repo correctly 2022-08-11 01:14:37 -04:00
Dustin J. Mitchell
69850e5f6a [tests] Make sure waiting task is still waiting
10s is gone in an instant in a busy CI box, which is probably why this
test is failing on Macs.
2022-08-10 23:38:04 -04:00
dependabot[bot]
c51478b81a Bump chrono from 0.4.20 to 0.4.21
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.20 to 0.4.21.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.20...v0.4.21)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-10 18:02:51 -04:00
dependabot[bot]
d69359b63c Bump libc from 0.2.127 to 0.2.129
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.127 to 0.2.129.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.127...0.2.129)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-10 18:02:42 -04:00
dependabot[bot]
26fbbabe9b Bump serde from 1.0.142 to 1.0.143
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.142 to 1.0.143.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.142...v1.0.143)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-09 14:58:28 -04:00
dependabot[bot]
e3985c87b5 Bump strum_macros from 0.24.2 to 0.24.3
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.2 to 0.24.3.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 08:27:49 -04:00
Dustin J. Mitchell
4852b146a8 stop using forked audit action 2022-08-06 20:55:39 -04:00
Dustin J. Mitchell
bad3b3d700 use the (existing) .cargo/audit.toml to ignore some rust advisories 2022-08-06 20:55:39 -04:00
dependabot[bot]
152db46ce3 Bump chrono from 0.4.19 to 0.4.20
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.19 to 0.4.20.
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.19...v0.4.20)

---
updated-dependencies:
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-05 21:36:25 -04:00
dependabot[bot]
005aa817c6 Bump libc from 0.2.126 to 0.2.127
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.126 to 0.2.127.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.126...0.2.127)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-04 21:59:55 -04:00
dependabot[bot]
37f7ac4ffc Bump serde_json from 1.0.82 to 1.0.83
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.82 to 1.0.83.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.82...v1.0.83)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-04 21:59:24 -04:00
dependabot[bot]
848792fc5a Bump serde from 1.0.141 to 1.0.142
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.141 to 1.0.142.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.141...v1.0.142)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-04 21:59:12 -04:00
dependabot[bot]
79c1d88658 Bump anyhow from 1.0.59 to 1.0.60
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.59...1.0.60)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 12:59:17 -04:00
dependabot[bot]
aa8557a06f Bump thiserror from 1.0.31 to 1.0.32
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.31 to 1.0.32.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.31...1.0.32)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 12:59:00 -04:00
dependabot[bot]
2064a502ca Bump anyhow from 1.0.58 to 1.0.59
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.58 to 1.0.59.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.58...1.0.59)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 12:27:37 -04:00
dependabot[bot]
98fa4d207a Bump serde from 1.0.140 to 1.0.141
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.140 to 1.0.141.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.140...v1.0.141)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-02 12:27:17 -04:00
Dustin J. Mitchell
f5e976ae73 remove leftover src/taskchampion submodule 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
7f686a7977 update Taskchampion README 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
12ecfa2b1e rename rust/ to taskchampion/ 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
ccb9a0fdfb Import taskchampion-lib into integration-tests as rust symbols
This allows Cargo to handle the linking peculiarities of platforms.
2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
6f7c5c31a9 install Rust on each push in docker images 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
3dfd28586a fix linking for taskchampion-integration-tests 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
6a42cf00a2 Update Taskwarrior workflows to include Rust 2022-07-29 21:41:41 -04:00
Dustin J. Mitchell
8c30400af3 Add a C++ wrapper around TC FFI
This uses CMake to build a simple Rust library (in `src/tc/rust`) that
just re-exports everything from the `taskchampion-lib` crate.

The C++ wrappers then wrap this into C++ objects with proper lifecycle
maintenance, in the `tc` namespace.

The C++ wrappers are incomplete, and missing methods are tagged with
"TODO".  These will be added as needed.
2022-07-29 21:41:41 -04:00
Tomas Babej
fd03169314 man: Make frequency abbreviation more clear 2022-07-25 19:51:59 -04:00
Dustin J. Mitchell
72a8be3340 Update .github/workflows/security.yml
Co-authored-by: Tomas Babej <tomas@tbabej.com>
2022-07-24 16:46:45 -04:00
Dustin J. Mitchell
56ea105e25 Ignore RUSTSEC-2020-0071
See discussion at
https://github.com/taskchampion/taskchampion/issues/304.  Note that
RUSTSEC-2020-0159 is the same bug as RUSTSEC-2020-0071.
2022-07-24 16:46:45 -04:00
Dustin J. Mitchell
3aa14b3efc ignore RUSTSEC-2021-0124
This is a vulnerability in tokio, which is required by Actix-web. For
the moment, ignore it, and then decide whether to upgrade actix to suit,
or switch to a different (simpler) web server package.
2022-07-24 16:46:45 -04:00
Dustin J. Mitchell
977ab11af2 Revert "temporarily remove cargo audit check"
This reverts commit 892efd0b1371b0a9d7ce973c30b18b0db6ca2854.
2022-07-24 16:46:45 -04:00
Dustin J. Mitchell
35c8ce2ccb Remove references to TDB2::read_only
A TC replica is always read-write.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
f452100588 Remove references to TDB2::data_size
This value will is not relevant for TaskChampion.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
e3ef6c504a remove TBD2::clear, only used in tests 2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
271d06cd9c make TDB2.pending/completed non-public
References to methods on these fields are replaced with methods on TDB2,
several of which already existed.
2022-07-24 14:18:21 -04:00
Dustin J. Mitchell
4ebd0ffb39 make TDB2.undo non-public
The stats command calls an API to provide this information in a way that
will still be relevant for TaskChampion, while CmdInfo's access to the
data remains.  The TaskChampion interface for per-task hitsory is still
not ready.
2022-07-24 14:18:21 -04:00
Tomas Babej
2f30bc8cbf tests: Add dockerfile for Ubuntu 22.04 2022-07-24 13:58:10 -04:00
Tomas Babej
8845055abb tests: Add Ubuntu 22.04 into the test matrix 2022-07-24 13:58:10 -04:00
Tomas Babej
08d647102f tests: Remove Ubuntu 21.04 and 21.10 from the test matrix
Both releases are beyond their respective EoL [1].

[1]: https://wiki.ubuntu.com/Releases
2022-07-24 13:58:10 -04:00
Dustin J. Mitchell
4d84252012 Update pull_request_template for Rust code 2022-07-24 12:20:16 -04:00
dependabot[bot]
4d3c407db5 Bump serde from 1.0.139 to 1.0.140
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.139 to 1.0.140.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.139...v1.0.140)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 19:06:01 -04:00
dependabot[bot]
a47d08d2d9 Bump rusqlite from 0.27.0 to 0.28.0
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.27.0 to 0.28.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.27.0...v0.28.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-15 14:39:33 -04:00
Pablo Baeyens
dcc285bc4a [rust/taskchampion/src/task] Add Task::get_value and TaskMut::set_value 2022-07-13 20:49:21 -04:00
dependabot[bot]
2889e77d51 Bump clap from 3.2.8 to 3.2.10
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.8 to 3.2.10.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.8...v3.2.10)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-12 09:14:39 -04:00
dependabot[bot]
971c27ac47 Bump ureq from 2.4.0 to 2.5.0
Bumps [ureq](https://github.com/algesten/ureq) from 2.4.0 to 2.5.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/compare/2.4.0...2.5.0)

---
updated-dependencies:
- dependency-name: ureq
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 17:16:32 -04:00
dependabot[bot]
f3993c3004 Bump serde from 1.0.138 to 1.0.139
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.138 to 1.0.139.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.138...v1.0.139)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-11 17:16:11 -04:00
dependabot[bot]
4a81c1b23f Bump serde from 1.0.137 to 1.0.138
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.137 to 1.0.138.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.137...v1.0.138)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 09:36:04 -04:00
dependabot[bot]
0b61753220 Bump clap from 3.2.6 to 3.2.8
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.6 to 3.2.8.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.6...v3.2.8)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-02 10:25:00 -04:00
dependabot[bot]
4255b613bc Bump serde_json from 1.0.81 to 1.0.82
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.81...v1.0.82)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-02 10:24:48 -04:00
dependabot[bot]
fae77410fa Bump rstest from 0.14.0 to 0.15.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.14.0...0.15.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-02 10:24:37 -04:00
dependabot[bot]
9bb2bc016a Bump strum_macros from 0.24.1 to 0.24.2
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 20:17:53 -04:00
dependabot[bot]
b88623f842 Bump anyhow from 1.0.57 to 1.0.58
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.57...1.0.58)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 09:02:33 -04:00
dependabot[bot]
c113a17924 Bump rstest from 0.13.0 to 0.14.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.13.0...0.14.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 08:30:50 -04:00
dependabot[bot]
1350f41ab5 Bump clap from 3.2.5 to 3.2.6
Bumps [clap](https://github.com/clap-rs/clap) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.5...v3.2.6)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-23 08:13:33 -04:00
Dustin J. Mitchell
c8cfcec48b Make TDB2.backlog non-public
The stats command gets this information from an API that will also work
for TaskChampion.  The sync command still accesses the field directly,
as the command must be completely rewritten for TaskChampion.
2022-06-21 12:05:50 -04:00
Dustin J. Mitchell
d699ce8cba bump MSRV to the latest version 2022-06-21 12:02:25 -04:00
dependabot[bot]
bdc509bde7 Bump clap from 3.1.18 to 3.2.5
Bumps [clap](https://github.com/clap-rs/clap) from 3.1.18 to 3.2.5.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v3.1.18...v3.2.5)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 12:02:25 -04:00
dependabot[bot]
8999cdbfc0 Bump strum_macros from 0.24.0 to 0.24.1
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 11:51:33 -04:00
dependabot[bot]
3f4420850a Bump uuid from 1.1.1 to 1.1.2
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.1.1...1.1.2)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 11:51:20 -04:00
dependabot[bot]
47c6d072ec Bump strum from 0.24.0 to 0.24.1
Bumps [strum](https://github.com/Peternator7/strum) from 0.24.0 to 0.24.1.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 11:51:09 -04:00
Raf Czlonka
92a9a716a8 Use 'speakers' instead of 'users'.
"Non-English users" sounds very much like "users who are not English".
Also, "Non-English speakers" is already a well established phrase.
2022-06-12 18:30:20 -04:00
Raf Czlonka
12bdc0d480 Fix typo: 'holday' -> 'holiday'
While there, be consistent when using hyphens.
2022-06-12 18:30:20 -04:00
sec65
0d63165ca5 TW-2763: added hooks.location to show command 2022-06-12 18:11:05 -04:00
Dustin J. Mitchell
d422db32ea temporarily remove cargo audit check 2022-06-12 18:07:44 -04:00
dependabot[bot]
63bb9fc7ee Bump cbindgen from 0.23.0 to 0.24.3
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.23.0 to 0.24.3.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/master/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/compare/v0.23.0...v0.24.3)

---
updated-dependencies:
- dependency-name: cbindgen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-11 22:20:00 -04:00
dependabot[bot]
ce6626459c Bump uuid from 1.1.0 to 1.1.1
Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.1.0...1.1.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 17:24:50 -04:00
Nikos Koukis
4c179a427d Fix issue with filter not applied correctly during task _tags command
Also includes:

* Add cmake build directory + Session.vim files to .gitignore list
2022-05-31 01:31:28 -04:00
dependabot[bot]
9c4e0a43a0 Bump flate2 from 1.0.23 to 1.0.24
Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.23 to 1.0.24.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/commits)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 12:35:18 -04:00
dependabot[bot]
e842b66e5c Bump clap from 2.34.0 to 3.1.18 (#2824)
* Bump clap from 2.34.0 to 3.1.18

Bumps [clap](https://github.com/clap-rs/clap) from 2.34.0 to 3.1.18.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v2.34.0...v3.1.18)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update taskchampion-sync-server for clap 3.x

* bump MSRV to 1.54 for extended_key_value_attributes required by clap

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
2022-05-30 12:34:55 -04:00
Dustin J. Mitchell
a1bd08d6d1 bump MSRV to 1.54 for extended_key_value_attributes required by cbindgen 2022-05-29 21:52:48 -04:00
dependabot[bot]
368a6dde5f Bump cbindgen from 0.20.0 to 0.23.0
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.20.0 to 0.23.0.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/master/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: cbindgen
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-29 21:52:48 -04:00
dependabot[bot]
b1f13b29c3 Bump env_logger from 0.8.4 to 0.9.0
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.8.4 to 0.9.0.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.4...v0.9.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-29 21:00:27 -04:00
Tomas Babej
61f03a7d0a workflows: Fix a typo 2022-05-28 08:37:42 -04:00
Dustin J. Mitchell
3529ee9289 bump MSRV to 1.53 for debug_non_exhaustive 2022-05-28 08:37:00 -04:00
Dustin J. Mitchell
e5b23ef9a0 add missing unsafe block
The // SAFETY comment already exists -- only the unsafe { .. } was
omitted.
2022-05-28 08:37:00 -04:00
Dustin J. Mitchell
e6470f463f Update all Rust dependencies to their latest
Accomplished by removing Cargo.lock and running `cargo build`.
2022-05-28 08:37:00 -04:00
Dustin J. Mitchell
085da00b0c add write-all permission to the audit 2022-05-28 08:33:20 -04:00
Dustin J. Mitchell
3a675c67bf add Cargo.* to Rust CODEOWNERS 2022-05-27 22:47:59 -04:00
dependabot[bot]
13cfe1c7db Bump strum from 0.21.0 to 0.24.0
Bumps [strum](https://github.com/Peternator7/strum) from 0.21.0 to 0.24.0.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-27 18:13:10 -04:00
Dustin J. Mitchell
f9b19526f0 to_hyphenated -> as_hyphenated 2022-05-27 18:12:46 -04:00
dependabot[bot]
99dd74bef7 Bump uuid from 0.8.2 to 1.1.0
Bumps [uuid](https://github.com/uuid-rs/uuid) from 0.8.2 to 1.1.0.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/0.8.2...1.1.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-27 18:12:46 -04:00
dependabot[bot]
14a84af0db Bump rstest from 0.10.0 to 0.13.0
Bumps [rstest](https://github.com/la10736/rstest) from 0.10.0 to 0.13.0.
- [Release notes](https://github.com/la10736/rstest/releases)
- [Changelog](https://github.com/la10736/rstest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/la10736/rstest/compare/0.10.0...0.13.0)

---
updated-dependencies:
- dependency-name: rstest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 22:44:42 -04:00
dependabot[bot]
db416c9698 Bump flate2 from 1.0.20 to 1.0.23
Bumps [flate2](https://github.com/rust-lang/flate2-rs) from 1.0.20 to 1.0.23.
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.0.20...1.0.23)

---
updated-dependencies:
- dependency-name: flate2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 22:40:44 -04:00
dependabot[bot]
0d7ab56360 Bump pretty_assertions from 1.0.0 to 1.2.1
Bumps [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) from 1.0.0 to 1.2.1.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v1.0.0...v1.2.1)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 13:55:15 -04:00
dependabot[bot]
e30eae7dd7 Bump libc from 0.2.113 to 0.2.126
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.113 to 0.2.126.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.113...0.2.126)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 13:55:09 -04:00
dependabot[bot]
34b2e6a6b8 Bump strum_macros from 0.21.1 to 0.24.0
Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.21.1 to 0.24.0.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum_macros
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 13:55:02 -04:00
dependabot[bot]
e8fe3cda77 Bump rusqlite from 0.25.3 to 0.27.0
Bumps [rusqlite](https://github.com/rusqlite/rusqlite) from 0.25.3 to 0.27.0.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.25.3...v0.27.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 23:40:33 -04:00
dependabot[bot]
b14d53fbc7 Bump thiserror from 1.0.25 to 1.0.31
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.25 to 1.0.31.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.25...1.0.31)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 22:55:53 -04:00
dependabot[bot]
c259e73f2a Bump termcolor from 1.1.2 to 1.1.3
Bumps [termcolor](https://github.com/BurntSushi/termcolor) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/BurntSushi/termcolor/releases)
- [Commits](https://github.com/BurntSushi/termcolor/compare/1.1.2...1.1.3)

---
updated-dependencies:
- dependency-name: termcolor
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 22:55:13 -04:00
Dustin J. Mitchell
04f4d3a68e include images for contrib/branching 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
18e11300fd eliminate unnecessary backslash-escaped quotes 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
b1ca5d4cf8 reformat to one sentence per line 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
ade706a72e convert html table to markdown in rfcs/task.md 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
c441315488 remove unused index 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
8747cc9f94 Import design docs (RFCs) 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
07493d5fa6 Bring contributing content from tw.org into dev docs 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
377f517154 Set up a basic Jekyll theme 2022-05-25 21:17:36 -04:00
Dustin J. Mitchell
e2ef45a06e rust: Update MSRV to 1.52
The bump of minimum rust version is required by some of the updated dependencies.

Closes #2802.
2022-05-25 21:01:04 -04:00
Dustin J. Mitchell
e4a881a4a6 remove usage-docs from workflows 2022-05-25 20:55:18 -04:00
Dustin J. Mitchell
2f57edee51 remove docs about taskchampion-cli 2022-05-25 20:55:18 -04:00
Dustin J. Mitchell
c0ce1fe059 Drop the 'taskchampion-cli' crate
It was fun while it lasted, but we'll be using TaskWarrior for the CLI!
2022-05-25 20:55:18 -04:00
dependabot[bot]
2b9a389636 Bump predicates from 1.0.8 to 2.1.1
Bumps [predicates](https://github.com/assert-rs/predicates-rs) from 1.0.8 to 2.1.1.
- [Release notes](https://github.com/assert-rs/predicates-rs/releases)
- [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/predicates-rs/compare/v1.0.8...v2.1.1)

---
updated-dependencies:
- dependency-name: predicates
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-21 20:44:56 -04:00
dependabot[bot]
47a91315df Bump log from 0.4.14 to 0.4.17
Bumps [log](https://github.com/rust-lang/log) from 0.4.14 to 0.4.17.
- [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.14...0.4.17)

---
updated-dependencies:
- dependency-name: log
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-21 20:44:47 -04:00
dependabot[bot]
63e48b0a96 Bump dialoguer from 0.8.0 to 0.10.1
Bumps [dialoguer](https://github.com/mitsuhiko/dialoguer) from 0.8.0 to 0.10.1.
- [Release notes](https://github.com/mitsuhiko/dialoguer/releases)
- [Changelog](https://github.com/mitsuhiko/dialoguer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitsuhiko/dialoguer/compare/0.8.0...v0.10.1)

---
updated-dependencies:
- dependency-name: dialoguer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-21 20:44:40 -04:00
Tomas Babej
b15732ed38 Merge pull request #2783
Merge development efforts of TaskChampion and Taskwarrior
2022-05-20 03:03:45 -04:00
Dustin J. Mitchell
1ed483ecde codegen taskchampion.h 2022-05-08 20:06:06 +00:00
Dustin J. Mitchell
5c7eeeb87e set up dependabot for rust/ 2022-05-08 20:06:06 +00:00
Dustin J. Mitchell
ea39968816 add codeowners for rust/ 2022-05-08 20:06:06 +00:00
Dustin J. Mitchell
9f5994bfd1 Update GitHub actions to work in Taskwarrior
This moves the workspace Cargo.toml to the root of the repository, so
that the "actions-rs/cargo" action can find it.
2022-05-08 20:06:05 +00:00
Dustin J. Mitchell
1df54125ea Import the TaskChampion repository at rust/ 2022-05-08 19:39:44 +00:00
Dustin J. Mitchell
2a92b2a4b9 move contents of taskchampion repo to tc/ 2022-05-08 19:39:02 +00:00
Tomas Babej
0a558ef7c8 Context: Add a reminder to mirror options in the vim syntax file 2022-05-07 21:52:22 -04:00
Dominik Rehák
e0c9561a8e vim: Add missing config options to taskrc syntax file
Sourced from taskrc(5) and default config (Context.cpp).
2022-05-07 21:49:31 -04:00
Dominik Rehák
27f3e95f12 ColTypeDate: Fix countdown style width 2022-05-07 21:48:07 -04:00
Dustin J. Mitchell
73baefa0a5 Merge pull request #354 from djmitche/tc-lib-rlib
export taskchampion-lib as an rlib, too
2022-04-24 19:17:22 -04:00
Dustin J. Mitchell
ac172b1008 Name the C library differently from the crate 2022-04-24 23:09:15 +00:00
Dustin J. Mitchell
716a558ba2 ignore a C code example 2022-04-24 22:49:31 +00:00
Dustin J. Mitchell
ae3851f5a6 export taskchampion-lib as an rlib, too 2022-04-24 22:49:31 +00:00
Dustin J. Mitchell
07929f327f Merge pull request #353 from djmitche/issue352
Add `Replica.num_local_operations`
2022-04-24 18:28:41 -04:00
Dustin J. Mitchell
20823b7a73 expose Replica::num_local_operations via FFI 2022-04-23 19:19:14 +00:00
Dustin J. Mitchell
fd504b7d66 add num_local_operations to Replica 2022-04-23 18:51:40 +00:00
Jackson Abascal
c3bb3810be Fix urgency inheritance for negative-urgency tasks 2022-04-13 11:38:30 -04:00
Dominik Rehák
8c3aa95224 CmdInfo: Fix leading spaces before urgency value
The minimal field width is set to 4, so if the value is shorter, it gets
prefixed with spaces, breaking the flow of the table.
2022-04-13 11:22:49 -04:00
Dustin J. Mitchell
6f8c734186 Merge pull request #350 from djmitche/issue78
Treat priority as an arbitrary string
2022-04-06 19:10:47 -04:00
Dustin J. Mitchell
1b586a425f Treat priority as an arbitrary string
This matches what TaskWarrior does: priority is a UDA, and can be
redefined by the user's local config.
2022-03-27 17:54:12 -04:00
Dustin J. Mitchell
0dd2d9cd30 Merge pull request #336 from djmitche/issue84
Add support for dependencies
2022-03-15 19:02:32 -04:00
Dustin J. Mitchell
6f48f715ac +BLOCKED, +UNBLOCKED, and +BLOCKING tags
These are somewhat expensive tags, as they require reference to values
outside of the task itself.

To accomplish this, the replica supplies a pre-computed DependencyMap
that is only calculated once per replica, and only from the working set.
2022-03-15 19:02:24 -04:00
Dustin J. Mitchell
47e213d6ec add support for dependencies to 'ta info' 2022-03-15 19:02:24 -04:00
Dustin J. Mitchell
47b1fed42a Add support for modifying dependencies
This requires "resolving" dependencies after the command-line parsing
phase is complete.
2022-03-15 19:02:23 -04:00
Dustin J. Mitchell
db1e1c9c96 Support parsing depends:.. in CLI 2022-03-15 18:01:49 -04:00
Dustin J. Mitchell
bf73cc4cc7 add dependency support to taskchampion 2022-03-15 18:01:48 -04:00
Dustin J. Mitchell
a030053dae Merge pull request #345 from djmitche/reexport-chrono
Re-export the chrono crate from taskchampion.
2022-03-15 17:59:03 -04:00
Dustin J. Mitchell
f8c4ece238 Re-export the chrono crate from taskchampion.
The chrono types are central to use of TC, so this will help consumers
of the TC crate to avoid dependency conflicts.
2022-03-15 17:58:54 -04:00
Dustin J. Mitchell
8e5ab78440 Merge pull request #347 from djmitche/take-from-lists
Allow taking from pointer lists
2022-03-15 17:57:48 -04:00
Dustin J. Mitchell
8c91b2c3db Merge pull request #346 from djmitche/include-guard
add an include guard to taskchampion.h
2022-03-15 17:57:36 -04:00
Dustin J. Mitchell
33a3b980d0 Allow taking from pointer lists
This introduces `tc_task_list_take`, supporting taking ownership of an
item in a task list.

TCTaskList is the only pointer list, but this is a generic and could be
used for other types.
2022-03-13 16:25:59 +00:00
Dustin J. Mitchell
3c6da4138f add an include guard to taskchampion.h 2022-03-12 21:38:59 +00:00
Dustin J. Mitchell
9355e1a728 Merge pull request #341 from djmitche/issue26
Add support for expiration
2022-03-10 15:35:50 -05:00
Dustin J. Mitchell
cb87206047 Merge pull request #344 from djmitche/regex-update
Address RUSTSEC-2022-0013.
2022-03-10 15:35:21 -05:00
Dustin J. Mitchell
889e1d1cdc Merge pull request #342 from djmitche/clippy-warnings
fix some clippy warnings, and make them errors for taskchampion-lib
2022-03-10 15:35:12 -05:00
Dustin J. Mitchell
bd9a5ad5ff Address RUSTSEC-2022-0013.
Note that the risk from this vulnerability was minimal for this project.
2022-03-09 17:52:57 -05:00
Dustin J. Mitchell
a5a8e3b7c8 fix some clippy warnings, and make them errors for taskchampion-lib 2022-03-07 23:49:37 +00:00
Dustin J. Mitchell
42238b5306 add an integration test for syncing task expirations 2022-03-07 23:37:31 +00:00
Dustin J. Mitchell
411bc19762 doc expiration 2022-03-07 23:37:30 +00:00
Dustin J. Mitchell
97bd2addc9 add a 'ta delete' subcommand 2022-03-07 23:37:27 +00:00
Dustin J. Mitchell
3cdc13aa37 expire tasks in 'ta gc' 2022-03-07 23:37:25 +00:00
Dustin J. Mitchell
919e91fd13 don't automatically update modified when updating it explicitly 2022-03-07 23:37:15 +00:00
Dustin J. Mitchell
2a6c91b3f9 Support expiring old, deleted tasks 2022-03-07 23:37:13 +00:00
Dustin J. Mitchell
fcdcebb1e0 Merge pull request #339 from djmitche/uuid-len-const
use TC_UUID_STRING_BYTES constant directly
2022-03-07 10:55:28 -05:00
Dustin J. Mitchell
43ab50db42 use TC_UUID_STRING_BYTES constant directly 2022-03-06 01:25:31 +00:00
Dustin J. Mitchell
a7f353bd6e Merge pull request #332 from djmitche/cdylib
build a C interface to taskchampion
2022-03-03 19:43:22 -05:00
Dustin J. Mitchell
3a4c417cee free replica in test 2022-03-02 20:58:36 -05:00
Dustin J. Mitchell
a525935008 import order fix 2022-02-27 18:14:21 +00:00
Dustin J. Mitchell
85153423be include BCrypt on Windows 2022-02-27 17:59:58 +00:00
Dustin J. Mitchell
1c5b01975c fix unused symbol on windows 2022-02-27 17:57:34 +00:00
Dustin J. Mitchell
aadd4a762f support generation of paths from TCString on Windows 2022-02-27 17:41:45 +00:00
Dustin J. Mitchell
5072ed7458 a bit of docs 2022-02-27 17:13:55 +00:00
Dustin J. Mitchell
8a96ca7273 fix formatting 2022-02-27 17:07:09 +00:00
Dustin J. Mitchell
2c9d74515e link to libtaskchampion separately from the unity tests 2022-02-27 17:03:04 +00:00
Dustin J. Mitchell
17ccaea096 try the latest 'cc' crate in hopes it fixes things 2022-02-26 23:05:36 +00:00
Dustin J. Mitchell
f0178d4fab don't use unsafe_op_in_unsafe_fn, as it's not in MSRV 2022-02-24 03:33:08 +00:00
Dustin J. Mitchell
471119dbdf TCString as PassByValue 2022-02-18 03:52:09 +00:00
Dustin J. Mitchell
2eee761644 fix xtask Cargo.toml 2022-02-16 01:03:46 +00:00
Dustin J. Mitchell
741cb84430 better docs for C 2022-02-16 01:01:35 +00:00
Dustin J. Mitchell
b1d537ac87 use codegen, instead of build.rs, to build header file 2022-02-16 00:28:07 +00:00
Dustin J. Mitchell
02055b122e find shared library on macos as well 2022-02-16 00:07:30 +00:00
Dustin J. Mitchell
8e34c107d5 update safety comments 2022-02-13 22:21:07 +00:00
Dustin J. Mitchell
ca904d6288 improve output of C tests 2022-02-13 21:02:18 +00:00
Dustin J. Mitchell
41a578ab2b add server support 2022-02-13 20:18:07 +00:00
Dustin J. Mitchell
c0403f3f38 fix bad test 2022-02-13 16:18:17 +00:00
Dustin J. Mitchell
fc73911cde fix some clippy::wrong_self_convention 2022-02-13 03:39:39 +00:00
Dustin J. Mitchell
ad464c4779 use Uda instead of UDA 2022-02-13 03:39:39 +00:00
Dustin J. Mitchell
51a854cfef address some clippy lints 2022-02-13 03:30:02 +00:00
Dustin J. Mitchell
bbb7b64842 review safety comments 2022-02-13 03:19:11 +00:00
Dustin J. Mitchell
c22182cc19 rename trait methods to avoid ambiguity 2022-02-13 02:30:17 +00:00
Dustin J. Mitchell
213da88b27 add tc_task_get_taskmap 2022-02-13 02:05:25 +00:00
Dustin J. Mitchell
1488355b89 add working-set support 2022-02-12 22:19:09 +00:00
Dustin J. Mitchell
ad560fdb79 add UDA support 2022-02-12 16:22:45 +00:00
Dustin J. Mitchell
f81c4eec90 rename array to list in rust types 2022-02-12 15:20:46 +00:00
Dustin J. Mitchell
e9cd6adc5b fix memory leak, remove blanket pointer-by-value impls 2022-02-12 01:21:05 +00:00
Dustin J. Mitchell
76cbc2880b refactor annotations to handle invalid strings 2022-02-12 00:26:57 +00:00
Dustin J. Mitchell
7ebdaa761c treat libc::time_t as a PassByValue 2022-02-12 00:18:01 +00:00
Dustin J. Mitchell
af51e0382a implement lists in the same files as singular data 2022-02-11 23:59:22 +00:00
Dustin J. Mitchell
7996a98908 add annotation support 2022-02-11 23:54:52 +00:00
Dustin J. Mitchell
b01285d780 add some simple replica functions 2022-02-10 01:18:50 +00:00
Dustin J. Mitchell
1c734851ae safety notes for new types 2022-02-10 01:10:40 +00:00
Dustin J. Mitchell
7a473d0eda simplify imports 2022-02-10 01:01:02 +00:00
Dustin J. Mitchell
a4d992012e TCUuidList, refactor traits 2022-02-10 00:55:34 +00:00
Dustin J. Mitchell
8cbd44544c remove commented-out code 2022-02-10 00:30:13 +00:00
Dustin J. Mitchell
914017b46c tc_replica_all_tasks 2022-02-10 00:11:30 +00:00
Dustin J. Mitchell
c9c72b4fd3 return TCResult from tc_uuid_from_str 2022-02-09 23:43:23 +00:00
Dustin J. Mitchell
28a4599a6a rename TCStrings to TCStringList 2022-02-09 23:37:32 +00:00
Dustin J. Mitchell
8caf442e3f mark all extern-C functions as unsafe 2022-02-09 23:26:39 +00:00
Dustin J. Mitchell
ae5afff4f7 fix another lint 2022-02-09 03:20:17 +00:00
Dustin J. Mitchell
5cf3ce4bc8 comment out failing clippy lint 2022-02-09 03:16:14 +00:00
Dustin J. Mitchell
f96b5415c8 fix some clippy warnings 2022-02-09 02:59:01 +00:00
Dustin J. Mitchell
a270b6c254 Simplify implementation of arrays 2022-02-07 00:15:09 +00:00
Dustin J. Mitchell
e11506ee6a always implement traits for C type 2022-02-06 23:05:33 +00:00
Dustin J. Mitchell
1e585ba0d9 comment updates 2022-02-06 16:50:43 +00:00
Dustin J. Mitchell
831eb0bb15 TCTags -> TCStrings to be more general 2022-02-06 16:40:17 +00:00
Dustin J. Mitchell
3d248b55fd factor out some utilities for pointer arrays 2022-02-06 16:38:31 +00:00
Dustin J. Mitchell
b0f7850711 trivially implement PassByValue for usize 2022-02-06 16:26:09 +00:00
Dustin J. Mitchell
dadc9473d3 unit tests for TCString 2022-02-06 16:21:42 +00:00
Dustin J. Mitchell
f4c6e04d44 TCTags as PassByValue 2022-02-06 05:27:30 +00:00
Dustin J. Mitchell
23ba6a57b3 switch to PassByValue and PassByPointer traits 2022-02-06 04:02:53 +00:00
Dustin J. Mitchell
a46a9d587a fix typo 2022-02-05 00:25:02 +00:00
Dustin J. Mitchell
3dd2ae5011 implement TCTags as an array 2022-02-04 02:49:55 +00:00
Dustin J. Mitchell
8b160c7ee8 more task functions 2022-02-01 03:01:09 +00:00
Dustin J. Mitchell
e5625e1597 entry and wait time support 2022-02-01 02:45:28 +00:00
Dustin J. Mitchell
f2b3e5fd0a tc_task_has_tag 2022-02-01 01:02:49 +00:00
Dustin J. Mitchell
03ffb6ce83 limit unsafe regions 2022-02-01 00:48:49 +00:00
Dustin J. Mitchell
22a6857c1b simplify TCResult to just two values 2022-02-01 00:46:04 +00:00
Dustin J. Mitchell
b675cef99c add error handling for tasks 2022-02-01 00:35:02 +00:00
Dustin J. Mitchell
2dc9358085 add warn(unsafe_op_in_unsafe_fn) 2022-01-31 19:57:05 +00:00
Dustin J. Mitchell
ce45c1004c add tc_task_add_tag and check errors 2022-01-31 19:44:00 +00:00
Dustin J. Mitchell
ef0bb2ced4 allow task setters to return error values 2022-01-31 19:34:21 +00:00
Dustin J. Mitchell
8bd9605b25 support starting and stopping tasks 2022-01-31 00:04:58 +00:00
Dustin J. Mitchell
d24319179c TCFoo::from_arg to take from a pointer 2022-01-30 23:53:12 +00:00
Dustin J. Mitchell
364ca57736 Slightly more ergonomic task mutation 2022-01-30 23:42:52 +00:00
Dustin J. Mitchell
452ae2074f implement task mutability 2022-01-29 03:08:45 +00:00
Dustin J. Mitchell
50aceb9696 use RefCell for replica, more consistent rust methods 2022-01-29 01:00:55 +00:00
Dustin J. Mitchell
82459e699c use a simple constant 2022-01-28 03:51:58 +00:00
Dustin J. Mitchell
b3cbec1af3 more unsafe notations 2022-01-28 02:11:13 +00:00
Dustin J. Mitchell
1470bbf741 mark unsafe utils as such; add safety comments 2022-01-27 02:22:47 +00:00
Dustin J. Mitchell
633ea5cf47 correctly handle invalid utf-8 2022-01-27 02:22:47 +00:00
Dustin J. Mitchell
b5201a28c3 build bindings-test shared 2022-01-27 02:22:47 +00:00
Dustin J. Mitchell
e1c348b96e tc_replica_get_task 2022-01-26 02:15:57 +00:00
Dustin J. Mitchell
f3b73ca0e4 add task_import_with_uuid 2022-01-26 02:15:57 +00:00
Dustin J. Mitchell
96b59dd5b2 serialize C integration tests 2022-01-26 02:15:57 +00:00
Dustin J. Mitchell
8f703fd63a use TCString in UUIDs 2022-01-26 01:29:29 +00:00
Dustin J. Mitchell
dd87f7da1e simplify defining suites 2022-01-26 00:58:29 +00:00
Dustin J. Mitchell
f8cffb798c fix confusing doc string 2022-01-26 00:58:28 +00:00
Dustin J. Mitchell
c5ff2398f7 ignore test-db 2022-01-26 00:57:36 +00:00
Dustin J. Mitchell
0d68e65354 some polish on strings 2022-01-26 00:57:06 +00:00
Dustin J. Mitchell
ca0279a73f move existing integration tests into new crate 2022-01-26 00:57:06 +00:00
Dustin J. Mitchell
c006cbe8e5 test bindings in an integration-tests crate 2022-01-25 02:54:01 +00:00
Dustin J. Mitchell
56a805151d use 2018 edition like the other crates 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
017fb398be replace a clone with a copy 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
40f30c6d89 remove unnecessary string clone 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
65082c26e7 improved TCString support 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
bb722325fe more task functionality 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
821118106a add TC prefix to types, too 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
46e08bc040 add some UUID support 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
e590dc7c98 add tc_replica_undo 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
ce56127bbf create / free replicas, plus error handling 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
33f5f056b1 first bits of a dynamc lib 2022-01-25 02:26:04 +00:00
Dustin J. Mitchell
8576e7ffa7 Merge pull request #330 from djmitche/issue327
Support an 'end' key in task maps
2022-01-24 10:24:18 -05:00
Dustin J. Mitchell
e7d4e1e8f3 Merge pull request #329 from djmitche/issue94
Implement `ta import` and `ta import-tdb2`
2022-01-24 10:23:22 -05:00
Dustin J. Mitchell
50300c4ad7 remove empty conditional 2022-01-23 15:31:58 +00:00
Dustin J. Mitchell
a49e51defd Merge branch 'main' into issue327 2022-01-23 15:31:02 +00:00
Dustin J. Mitchell
210eb60c86 'ta import' -> 'ta import-tw' 2022-01-23 15:27:13 +00:00
Dustin J. Mitchell
656f7e9ea0 replica.create_task -> import_task_with_uuid 2022-01-23 15:22:41 +00:00
Dustin J. Mitchell
0308b7a4c7 Merge branch 'main' into issue94 2022-01-23 15:18:17 +00:00
Dustin J. Mitchell
e4399cde26 Merge pull request #331 from djmitche/issue326
add 'entry' key to tasks when created
2022-01-23 10:16:17 -05:00
Dustin J. Mitchell
5019ecb4f8 allow windows newlines in TDB2 files 2022-01-08 22:34:32 +00:00
Dustin J. Mitchell
69d052603d ta import-tdb2 2022-01-08 22:28:33 +00:00
Dustin J. Mitchell
162a9eae95 Support parsing TDB2 files 2022-01-08 22:11:16 +00:00
Dustin J. Mitchell
9824ac1fd3 add 'entry' key to tasks when created 2022-01-06 02:18:32 +00:00
Dustin J. Mitchell
b663745892 Support an 'end' key in task maps
This definition matches how TaskWarrior uses the same key.
2022-01-06 02:02:13 +00:00
Dustin J. Mitchell
4b2ef1913a use owned values to avoid unnecessary cloning 2022-01-06 00:17:01 +00:00
Dustin J. Mitchell
63804b5652 Implement 'ta import'
Tests include "TODO" notes for data not handled by TaskChampion,
including links to the associated GitHub issues.
2022-01-06 00:06:19 +00:00
Dustin J. Mitchell
e2e0951c81 Make a public method 2022-01-05 03:12:44 +00:00
Dustin J. Mitchell
e3f438d9fa make taskdb.apply for create/delete not fail if already exists/doesn't exist 2022-01-05 02:49:04 +00:00
Dustin J. Mitchell
d6efad06ee Merge pull request #320 from djmitche/issue318
use strum_macros::Display to display Status
2022-01-03 10:14:31 -05:00
Dustin J. Mitchell
9965d10736 Maintain unrecognized statuses 2022-01-03 02:35:19 +00:00
Dustin J. Mitchell
6a1d1a8c3c use strum_macros::Display to display Status 2022-01-03 02:35:19 +00:00
Dustin J. Mitchell
1bc7b5f019 Merge pull request #316 from djmitche/issue90
Define UDAs
2021-12-27 17:06:47 -05:00
Dustin J. Mitchell
bc8bb52551 do not use str.split_once, as it is not in MSRV 2021-12-27 00:14:40 +00:00
Dustin J. Mitchell
e94c29ae2f use better trait bounds 2021-12-27 00:09:02 +00:00
Dustin J. Mitchell
829f67ee02 Merge branch 'main' into issue90 2021-12-26 19:04:10 -05:00
Dustin J. Mitchell
b255ad2a7d use namespace.key for UDAs in the API, with legacy support 2021-12-27 00:01:14 +00:00
Dustin J. Mitchell
d5f087bf9a Merge pull request #324 from djmitche/issue322
Update clippy toolchain to 1.57
2021-12-23 09:08:49 -05:00
Dustin J. Mitchell
cb1395ea32 Merge pull request #323 from taskchampion/issue92
Support 'undo'
2021-12-23 09:08:01 -05:00
Dustin J. Mitchell
8195b187c4 fix docs typo 2021-12-23 09:06:19 -05:00
Dustin J. Mitchell
691a3e49e8 Update clippy toolchain to 1.57 2021-12-22 00:43:15 +00:00
Dustin J. Mitchell
36c51d2d93 fix clippy 2021-12-22 00:31:46 +00:00
Dustin J. Mitchell
5fb3f700c0 add some logging for undo 2021-12-21 01:12:30 +00:00
Dustin J. Mitchell
e328b86d97 add user docs for 'ta undo' 2021-12-21 01:10:08 +00:00
Dustin J. Mitchell
caa62ba9a0 add a 'ta undo' subcommand 2021-12-21 01:05:52 +00:00
Dustin J. Mitchell
9d93928996 support undo operations 2021-12-21 00:43:26 +00:00
Dustin J. Mitchell
9e20935f04 Merge pull request #319 from djmitche/issue317
Fix application of modifications during 'ta add'
2021-12-20 19:28:32 -05:00
Dustin J. Mitchell
2b63a227d2 Merge pull request #321 from djmitche/clippy-1-57-fixes
fix a few lints in clippy 1.57
2021-12-20 18:29:14 -05:00
Dustin J. Mitchell
4fa1f9c6bc fix a few lints in clippy 1.57 2021-12-20 16:35:55 +00:00
Dustin J. Mitchell
2456012ed6 Fix application of modifications during 'ta add' 2021-12-20 16:16:25 +00:00
Dustin J. Mitchell
1647ba9144 insert UndoPoint appropriately into the replica operations 2021-12-20 00:33:32 +00:00
Dustin J. Mitchell
103bbcdf8f Store data necessary to undo ReplicaOps 2021-12-19 23:58:57 +00:00
Dustin J. Mitchell
1789344cd0 refactor sync to use SyncOps 2021-12-19 23:44:45 +00:00
Dustin J. Mitchell
cefdd83d94 Use the latest taskmap when modifying a task
The previous logic duplicated the action of applying an operation to the
TaskDb with a "manual" application to the Task's local TaskMap.  This
now uses the updated TaskMap fetched from the DB, which will help to
incorporate any other concurrent DB updates.
2021-12-19 23:29:16 +00:00
Dustin J. Mitchell
fee25fa742 Apply SyncOps, but keep a list of ReplicaOps
This changes a lot of function signatures, but basically:
 * TaskDB::apply now takes a SyncOp, not a ReplicaOp
 * Replica::update_task returns a TaskMap
2021-12-19 23:29:15 +00:00
Dustin J. Mitchell
0b29efab31 rename Operation to ReplicaOp for clarity 2021-12-19 22:55:24 +00:00
Dustin J. Mitchell
6f7794c7de introduce a new taskchampion::server::SyncOp type 2021-12-19 22:55:24 +00:00
Dustin J. Mitchell
ff9ad8185b undo docs 2021-12-19 22:55:24 +00:00
Dustin J. Mitchell
ef12e1a2f8 Define UDAs 2021-12-18 23:39:56 +00:00
Dustin J. Mitchell
acd4aefc17 Merge pull request #313 from djmitche/issue89
Add support for annotations
2021-10-31 09:49:25 -04:00
Dustin J. Mitchell
af56efdbd5 Merge pull request #314 from djmitche/issue312
Use `tag_<tag>` instead of `tag.<tag>`
2021-10-30 09:31:36 -04:00
Dustin J. Mitchell
e9b3611fd9 Use tag_<tag> instead of tag.<tag>
This aligns with the Taskwarrior data model.
2021-10-29 20:41:37 -04:00
Dustin J. Mitchell
4314b8bc2d Add support for annotations
This matches the taskwarrior task model for annotations.
2021-10-29 20:28:23 -04:00
Dustin J. Mitchell
7fe5553093 fix errors from merges 2021-10-26 22:37:51 -04:00
Dustin J. Mitchell
7c8c85f27f Merge pull request #301 from djmitche/issue299
Drop tindercrypt, document encryption
2021-10-26 22:05:59 -04:00
Dustin J. Mitchell
ae80cbef2a Merge pull request #309 from djmitche/issue286
use TW's semantics for `start`
2021-10-25 09:21:11 -04:00
Dustin J. Mitchell
5648d20bde add changelog 2021-10-25 09:20:44 -04:00
Dustin J. Mitchell
9ebff38277 Merge pull request #310 from djmitche/issue23-integration
Add integration tests for snapshots
2021-10-25 09:15:57 -04:00
Dustin J. Mitchell
5bae2b6464 remove debug print 2021-10-24 21:41:41 -04:00
Dustin J. Mitchell
2e65d172cd Add an integration test for snapshot syncing 2021-10-24 21:41:41 -04:00
Dustin J. Mitchell
8df3e4f2f8 use TW's semantics for start 2021-10-24 20:57:58 -04:00
Dustin J. Mitchell
43a21ba3a6 Merge pull request #306 from djmitche/no-audit-on-pr
do not run audit on PRs
2021-10-21 19:41:23 -04:00
dbr/Ben
c1c9b7f80b Merge pull request #307 from taskchampion/auditcfg
Add config for cargo-audit
2021-10-21 19:56:34 +11:00
dbr
ae244055f7 Also ignore time bug 2021-10-21 13:45:32 +11:00
dbr
6aa355b835 Add config for cargo-audit 2021-10-21 13:33:19 +11:00
Dustin J. Mitchell
642da4da3e do not run audit on PRs 2021-10-20 22:29:16 -04:00
Dustin J. Mitchell
2f7c11bcc3 Merge pull request #305 from djmitche/issue23-client-apply
Client initialization from snapshots
2021-10-20 22:22:51 -04:00
Dustin J. Mitchell
c63a21797a remove dbg!(..) 2021-10-20 21:25:28 -04:00
Dustin J. Mitchell
ec35d4fa20 use a distinct error for out-of-sync replica 2021-10-20 21:23:29 -04:00
Dustin J. Mitchell
c72cae648d Apply snapshots automatically on empty taskdbs 2021-10-20 21:23:29 -04:00
Dustin J. Mitchell
0af66fd6c8 Validate encryption using externally-generated data 2021-10-19 18:31:30 -04:00
Dustin J. Mitchell
17f5521ea4 add an app_id to the encryption AAD 2021-10-17 18:06:16 -04:00
Dustin J. Mitchell
4300f7bdda use CHACHA20_POLY1305 instead of AES_256_GCM 2021-10-17 17:37:32 -04:00
Dustin J. Mitchell
97d1366b66 move taskchampion::server::remote::crypto to taskchampion::server::crypto 2021-10-16 22:37:28 +00:00
Dustin J. Mitchell
0f39a3f3b2 [BREAKING CHANGE] drop use of tindercrypt, and use ring directly 2021-10-16 22:34:33 +00:00
Dustin J. Mitchell
ddfb327292 WIP 2021-10-15 02:56:46 +00:00
Dustin J. Mitchell
636862f8c5 update README with current relationship to TW 2021-10-13 17:59:58 -04:00
Dustin J. Mitchell
bd2189e589 Merge pull request #300 from djmitche/issue23-client
Client support for adding snapshots
2021-10-13 16:44:50 -04:00
Dustin J. Mitchell
1c6a5315c9 remove unused file 2021-10-11 21:29:49 -04:00
Dustin J. Mitchell
333cb37091 Support add_snapshots on cli 2021-10-11 21:00:08 -04:00
Dustin J. Mitchell
ed3475d9ea support avoiding snapshots 2021-10-11 21:00:08 -04:00
Dustin J. Mitchell
b97f6dc4d5 Send snapshots to server 2021-10-11 21:00:07 -04:00
Dustin J. Mitchell
13a96efacb Add snapshot encoding / decoding 2021-10-11 20:58:36 -04:00
Dustin J. Mitchell
bde19d7f07 Return SnapshotUrgency from AddVersion 2021-10-11 20:58:34 -04:00
Dustin J. Mitchell
b8d892878c document sync data formats 2021-10-11 20:56:45 -04:00
Dustin J. Mitchell
79f07b57ad more taskdb refactoring 2021-10-11 20:56:45 -04:00
Dustin J. Mitchell
f229715242 Merge pull request #295 from taskchampion/issue23-config
add server-side config --snapshot-{days,versions}
2021-10-10 15:24:18 -04:00
Dustin J. Mitchell
ef1d8f37a8 write config defaults once 2021-10-10 01:43:30 +00:00
Dustin J. Mitchell
329c0d0aef move ServerConfig to crate::server 2021-10-10 01:35:12 +00:00
Dustin J. Mitchell
4d19ca7bdb add server-side config --snapshot-{days,versions} 2021-10-10 01:28:05 +00:00
Dustin J. Mitchell
74aee49107 Merge pull request #297 from djmitche/versionid-nil
Replace NO_VERSION_ID with NIL_VERSION_ID
2021-10-09 21:14:43 -04:00
Dustin J. Mitchell
45e2f2cde8 Merge pull request #296 from djmitche/app-configure
Use App::configure to set up actix
2021-10-09 21:14:22 -04:00
Dustin J. Mitchell
dd9bef0a7b Merge pull request #294 from taskchampion/taskdb-refactor
factor taskdb into multiple modules
2021-10-09 21:13:56 -04:00
Dustin J. Mitchell
aaac1c3356 Use App::configure to set up actix
This avoids the need for the messy cache-control-header macro.
Otherwise, it has no effect.
2021-10-09 18:07:25 -04:00
Dustin J. Mitchell
536b88c8f4 Replace NO_VERSION_ID with NIL_VERSION_ID
The docs refer to this as the "nil version ID" so let's do the same.

This started out more ambitiously, to change this to `VersionId::NIL`,
but that required making VersionId a newtype and all of the implicit
conversions from VersionId to Uuid would have to be explicit.  That
didn't seem wortht the trouble.
2021-10-09 17:59:09 -04:00
Dustin J. Mitchell
a0a3f36a16 factor taskdb into multiple modules 2021-10-09 09:47:10 -04:00
Dustin J. Mitchell
f109056340 Merge pull request #289 from taskchampion/issue23
Add support for snapshots
2021-10-09 09:40:57 -04:00
Dustin J. Mitchell
7bb6ea6865 Request snapshots in AddVersion 2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
d1da8eee52 Add add_snapshot API method 2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
e2f79edad6 add get_snapshot API method 2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
53d1f8dbc2 update get_child_version to distinguish gone and not-found 2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
2570956710 [breaking] Add snapshot support to server storage
This refactors the storage API pretty substantially, and represents a
breaking change to the schema used by the sqlite storage
2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
8d2be3b495 add get_version to server storage api 2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
eadce9f15a Add documentation for snapshots 2021-10-08 23:15:48 -04:00
Dustin J. Mitchell
75fd0ff83a Remove cargo fmt error
This was added to test the 'Formatting' action.  It works :)
2021-10-03 22:26:03 +00:00
Dustin J. Mitchell
e2320fb9aa Merge pull request #293 from taskchampion/cargo-fmt
add a cargo-fmt job to CI
2021-10-02 22:16:06 -04:00
Dustin J. Mitchell
fbd140a706 add fmt error 2021-10-02 15:03:41 +00:00
Dustin J. Mitchell
de5d46d3c7 add a cargo-fmt job to CI 2021-10-02 14:57:47 +00:00
Dustin J. Mitchell
d01386f3ea Merge pull request #292 from taskchampion/issue291
Switch to pretty_assertions
2021-10-02 10:54:25 -04:00
Dustin J. Mitchell
bcef6bf392 remove redundant {..} 2021-10-01 22:18:24 -04:00
Dustin J. Mitchell
d923dc7bae Merge pull request #288 from taskchampion/docs-update
Docs update
2021-10-01 22:08:40 -04:00
Dustin J. Mitchell
a143660124 Switch to pretty_assertions 2021-10-02 01:08:26 +00:00
Dustin J. Mitchell
267288c9e6 Merge pull request #290 from taskchampion/update-cache
use actions/cache@v2
2021-09-29 08:42:16 -04:00
Dustin J. Mitchell
a95860b0d1 use actions/cache@v2 2021-09-29 12:24:02 +00:00
Dustin J. Mitchell
a76d7580ce cargo fmt 2021-09-26 13:59:58 -04:00
Dustin J. Mitchell
255cf29d4f Update docs
* improve linking
* parallel construction for storage and servers
* clarify rationale for Task/TaskMut
2021-09-26 13:59:04 -04:00
Dustin J. Mitchell
7881b2993c update docs 2021-09-26 09:34:35 -04:00
Dustin J. Mitchell
bfb732947c more build-docs fixes 2021-09-26 09:33:37 -04:00
Dustin J. Mitchell
c62eeb4fcb v0.4.1 2021-09-26 09:26:38 -04:00
Dustin J. Mitchell
a122a28993 Add derive feature for serde
This feature had previously been indirectly required by a dependency,
and this is no longer the case.
2021-09-26 09:07:15 -04:00
Dustin J. Mitchell
e9dfcaaa44 more updates to build-docs.sh 2021-09-25 23:53:08 +00:00
Dustin J. Mitchell
67b2f261a1 fix build-docs to create gh-pages branch 2021-09-25 23:50:39 +00:00
Dustin J. Mitchell
fe7d421c21 v0.4.0 2021-09-25 23:42:16 +00:00
Dustin J. Mitchell
b1b17310e6 fix typo 2021-09-25 23:16:16 +00:00
Dustin J. Mitchell
56bcd24e37 Merge pull request #285 from taskchampion/issue99
Add cache-control headers to API responses
2021-09-25 10:26:38 -04:00
Dustin J. Mitchell
217f3bf28a Add cache-control headers to API responses 2021-09-15 22:32:35 +00:00
Dustin J. Mitchell
3837a61b6f Merge pull request #284 from taskchampion/issue128
Add integration test for replica/server interactions
2021-09-14 09:36:57 -04:00
Dustin J. Mitchell
7d3aae4555 allow publishing taskchampion-cli, to allow 'cargo install' 2021-09-14 09:26:44 -04:00
Dustin J. Mitchell
757f923c66 reword README 2021-09-13 17:42:16 -04:00
Dustin J. Mitchell
fb39c90592 Add an integration test combining replica and server
This confirms that task changes are replicated via the server.
2021-09-12 21:30:05 +00:00
Dustin J. Mitchell
ebcf9527dc refactor sync-server into a lib crate with a binary 2021-09-12 21:30:04 +00:00
dbr/Ben
4690cf7fc8 Merge pull request #206 from dbr/sqlstore
Switch to SQLite storage backend
2021-09-10 10:04:08 +09:30
dbr
11a3b7882b Changelog entry! 2021-09-10 10:03:46 +10:00
dbr
43ca0623b1 Merge branch 'main' into sqlstore 2021-09-10 09:59:35 +10:00
dbr/Ben
4cbc9a805f Merge pull request #279 from taskchampion/changelog
Basic changelog infrastructure
2021-09-10 09:26:24 +09:30
Dustin J. Mitchell
1ee07de6a9 Merge pull request #282 from taskchampion/issue281
Fix clippy and only run it with the MSRV
2021-09-06 10:12:39 -04:00
Dustin J. Mitchell
91b2e1164f run clippy on the MSRV 2021-09-05 22:14:21 +00:00
Dustin J. Mitchell
72b4941485 fix new clippy warnings 2021-09-05 21:55:09 +00:00
dbr
8ca7f70cef Store changelog snippets as .md 2021-09-05 17:02:48 +10:00
dbr
a4b67d9f4e Remove unused error variant 2021-09-04 13:29:03 +10:00
dbr
f8ed4cecdd Reset operation auto-increment ID 2021-09-04 13:05:21 +10:00
dbr
5db04ee1af Tidying 2021-09-04 13:05:10 +10:00
dbr
89e9a42374 Refactor calculation of next working set ID
As per Dustin's code-review comment
2021-09-04 13:02:03 +10:00
dbr
1d62799437 Deduplicate StoredUuid wrapper 2021-09-04 12:53:37 +10:00
dbr/Ben
477bf9e328 Tweaks from code review
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
2021-09-04 12:05:30 +09:30
Dustin J. Mitchell
fd2add5dea Merge pull request #280 from gravityvi/feature/support-more-timestamps
added common business date acronyms
2021-08-28 16:14:57 -04:00
Ravi Sawlani
037807e3ac update image ref 2021-08-28 02:06:33 +05:30
Ravi Sawlani
3edf45d238 added ref pic 2021-08-28 01:47:50 +05:30
Ravi Sawlani
d001b5dbc9 update doc 2021-08-28 01:01:02 +05:30
Ravi Sawlani
f013233c88 document changes 2021-08-28 00:59:09 +05:30
dbr
e8a4d8029b Update contribute+release docs regarding changelog 2021-08-26 19:56:53 +10:00
Ravi Sawlani
f824d6123c added tests 2021-08-25 12:42:37 +05:30
Ravi Sawlani
c5e18aec31 lint issue 2021-08-24 22:41:45 +05:30
Ravi Sawlani
90b06df30f refactor 2021-08-24 22:38:27 +05:30
Ravi Sawlani
4a3b19bba6 added common business date acronyms 2021-08-24 22:26:30 +05:30
dbr
cae03c6d7e Initial changelog
Also simple process/script to manage entries in PR's without merge conflicts:

1. Unreleased entries area stored as text files in ".changelogs/"
2. On release these are concatenated together and put in CHANGELOG.md

Script basically just add line of text to a "YYYY-MM-DD-branch.txt" formatted file
2021-06-20 22:13:57 +10:00
Dustin J. Mitchell
c8533c86f5 Merge pull request #273 from taskchampion/issue269
Create a new doc if necessary in `ta config set`
2021-06-16 21:29:46 -04:00
Dustin J. Mitchell
cc5240eeec Create config directory if necessary 2021-06-16 13:45:00 +00:00
Dustin J. Mitchell
8e84bf0446 Create a new doc if necessary in ta config set 2021-06-16 13:44:42 +00:00
dbr
86deed3197 Remove unused Transaction from Txn
Also note about why StorageTxn isn't implemented
2021-06-16 11:22:17 +10:00
dbr/Ben
53cba2b31e Merge pull request #276 from taskchampion/ci-platforms
CI tests on Windows+macOS
2021-06-16 10:55:43 +10:00
Dustin J. Mitchell
a709f8a132 Merge remote-tracking branch 'upstream/main' into ci-platforms 2021-06-15 10:13:51 -04:00
Dustin J. Mitchell
9c35b31fbe Merge pull request #275 from taskchampion/issue274
Fix arg parsing on Windows
2021-06-15 10:13:00 -04:00
dbr
75f0447c7b Fix empty-dir problem with server also, and add tests 2021-06-15 22:09:54 +10:00
dbr
c3bc93f631 Clipplease 2021-06-15 22:02:32 +10:00
dbr
e72b990ea2 Avoid error if DB folder does not exist 2021-06-15 20:01:47 +10:00
dbr
2f533d2f3a Merge remote-tracking branch 'origin/main' into sqlstore
# Conflicts:
#	Cargo.lock
#	taskchampion/Cargo.toml
2021-06-15 19:49:36 +10:00
dbr
2a2aef2b25 Maybe this time 2021-06-15 12:25:04 +10:00
dbr
5769b20702 Important missing line to make CI actually run on matrix.os 2021-06-15 12:20:55 +10:00
dbr
41c5cc842d Typo 2021-06-15 12:16:09 +10:00
dbr
fbc97c871b Test on Windows+macOS 2021-06-15 12:13:15 +10:00
Dustin J. Mitchell
62c17ab411 Fix arg parsing on Windows 2021-06-14 10:57:44 -04:00
Dustin J. Mitchell
4917d49331 Merge pull request #267 from taskchampion/issue179
Add confirmation prompts for modifications of lots of tasks
2021-06-10 21:16:28 -04:00
Dustin J. Mitchell
0de4fc1dee Add confirmation prompts for modifications of lots of tasks 2021-06-10 10:55:42 -04:00
Dustin J. Mitchell
31ff46bee6 pin mdbook version 2021-06-09 15:38:36 -04:00
Dustin J. Mitchell
ebdae1f44a Merge pull request #266 from taskchampion/issue80
Add support for synthetic tags
2021-06-09 15:28:10 -04:00
Dustin J. Mitchell
4ccd33bc0c Merge pull request #265 from taskchampion/issue264
Treat partially-matched arguments as an error
2021-06-09 15:27:10 -04:00
dbr/Ben
5c7d9330fd Merge pull request #263 from taskchampion/actionnames
Tidy up CI actions names
2021-06-09 11:37:59 +10:00
Dustin J. Mitchell
64b319bd20 Merge pull request #268 from taskchampion/use-built
Use `built` to determine version information
2021-06-08 11:10:18 -04:00
Dustin J. Mitchell
6c9ba48674 Use built to determine version information 2021-06-07 15:29:12 -04:00
dbr/Ben
0c43f82176 Merge pull request #262 from taskchampion/usagecmdname
Remove path from ta command in usage text
2021-06-06 15:00:35 +10:00
Dustin J. Mitchell
7956f6a34b implement FromStr instead of just from_str 2021-06-05 21:30:28 -04:00
Dustin J. Mitchell
cf3a053a0e Add PENDING, COMPLETED, DELETED synthetic tags
Note that DELETED is not tested since we don't yet support deleting
tasks.
2021-06-05 21:30:27 -04:00
Dustin J. Mitchell
0e60bcedaf hide the implementation of Tag 2021-06-05 21:20:36 -04:00
Dustin J. Mitchell
ff23c9148b refactor taskchampion::task into submodules 2021-06-05 21:20:10 -04:00
Dustin J. Mitchell
3d698f7939 add support for synthetic tags 2021-06-05 20:27:02 -04:00
Dustin J. Mitchell
2b3383842e Treat partially-matched arguments as an error 2021-06-05 09:15:24 -04:00
Dustin J. Mitchell
21c4f95fd9 fix clippy 2021-06-05 09:03:59 -04:00
dbr
4b0ceb31ac Tweak clippy job names 2021-06-05 13:50:59 +10:00
dbr
2a928e05b3 Check to see if the two clippy's can be merged into one 2021-06-05 12:24:57 +10:00
dbr
52d5500687 Make security more consistent 2021-06-05 12:22:09 +10:00
dbr
9cbe245fc1 First pass at tidying action names 2021-06-05 12:19:12 +10:00
dbr
4cc41a8731 Clippy the Pendant 2021-06-05 12:05:56 +10:00
dbr
8069d1badc Remove path from ta command in usage text
Previously would show things like "target/bin/ta [filter] list"
2021-06-05 11:54:30 +10:00
Dustin J. Mitchell
5f28eb3a74 produce Tag instances in the parser (#260)
and..
* fix usage-docs plugin
* upgrade mdbook
2021-06-04 09:26:12 -04:00
Dustin J. Mitchell
5a454a5dfd Merge pull request #250 from taskchampion/issue83
Support "wait"
2021-06-03 17:51:57 -04:00
Dustin J. Mitchell
ac6b020b6d minor updates from review 2021-06-01 09:24:40 -04:00
Dustin J. Mitchell
b18701c3cb remove many duration strings to simplify 2021-06-01 09:20:14 -04:00
Dustin J. Mitchell
0259a5e2e2 parse durations and timestamps 2021-05-31 08:49:37 -04:00
Dustin J. Mitchell
288f29d9d5 refactor argparse::args into submodules 2021-05-31 08:49:37 -04:00
Dustin J. Mitchell
1aae7e059d Add wait to reports, for display and sorting 2021-05-31 08:49:37 -04:00
Dustin J. Mitchell
cf078e1233 add 'wait' to the info output 2021-05-31 08:49:37 -04:00
Dustin J. Mitchell
e977fb294c Implement modifying tasks' "wait" value 2021-05-31 08:49:35 -04:00
Dustin J. Mitchell
d7d703f135 Merge pull request #256 from taskchampion/issue233
Summarize tasks nicely in console output
2021-05-31 08:47:17 -04:00
Dustin J. Mitchell
1bd97fd15d Merge pull request #254 from taskchampion/issue216
Define and test an MSRV
2021-05-31 08:39:01 -04:00
Dustin J. Mitchell
ae56313162 Merge pull request #257 from taskchampion/sec-md
Create SECURITY.md based on POLICY.md
2021-05-30 22:00:36 -04:00
Dustin J. Mitchell
e81a078506 Create SECURITY.md based on POLICY.md 2021-05-30 21:41:35 -04:00
Dustin J. Mitchell
9e3646bf84 Summarize tasks nicely in console output 2021-05-30 16:36:20 -04:00
Dustin J. Mitchell
d4f669ed6e Define and test an MSRV 2021-05-30 16:07:41 -04:00
dbr
7c665c9a77 Clippy things 2021-05-28 20:41:03 +10:00
dbr
0f6323e2de Unused 2021-05-28 20:35:57 +10:00
dbr
3c8c7d4888 Updated Cargo.lock 2021-05-28 12:19:49 +10:00
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
98f2ab51cb Functional sqlite backend
..but not too efficient, creating a new connection pretty much per-query
2021-05-28 12:09:36 +10:00
dbr
f91f797244 Implement storage for local server 2021-05-28 11:38:46 +10:00
Dustin J. Mitchell
adfde8be15 Merge pull request #236 from taskchampion/issue140
Generate usage documentation
2021-05-26 11:03:49 -04:00
dbr/Ben
1d14737e30 Merge pull request #247 from taskchampion/defaultrun
Make 'cargo run' run ta binary
2021-05-25 15:21:21 +10:00
Dustin J. Mitchell
09558f9329 Substitute usage information into the documentation
This will simplify keeping documentation in sync with the code.
2021-05-24 08:51:05 -04:00
dbr
b944e27880 Make 'cargo run' run ta binary 2021-05-24 19:44:32 +10:00
Dustin J. Mitchell
e9dc6e987d Merge pull request #245 from taskchampion/issue138
add 'ta config path'
2021-05-23 09:12:44 -04:00
Dustin J. Mitchell
45db886f2a add 'ta config path' 2021-05-23 09:12:04 -04:00
Dustin J. Mitchell
7f046a8e27 Merge pull request #225 from taskchampion/issue217
Support multiple exit codes
2021-05-21 10:26:24 -04:00
Dustin J. Mitchell
ae5511623c Merge pull request #244 from taskchampion/codeowners
Add CODEOWNERS pointing to @dbr and me
2021-05-21 10:26:16 -04:00
Dustin J. Mitchell
9d78654573 Merge pull request #221 from taskchampion/issue177
Require a filter be specified for modifications
2021-05-21 10:25:45 -04:00
dbr/Ben
3e4437ab14 Merge pull request #242 from dbr/betterversion
Include git HEAD rev in version output
2021-05-21 23:11:02 +10:00
Dustin J. Mitchell
8ba72d19df Add CODEOWNERS pointing to @dbr and me 2021-05-21 09:07:35 -04:00
dbr
00089639fe Include git HEAD rev in version output
Closes #241
2021-05-21 16:31:25 +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
0852bfd195 Require a filter be specified for modifications
This filter can either be `*` or some "real" filter.  But an empty set
of arguments no longer automatically matches all tasks.
2021-05-18 18:57:46 +00:00
Dustin J. Mitchell
2345a57940 fix clippy warning 2021-05-18 18:57:29 +00:00
Dustin J. Mitchell
023e638335 Merge pull request #231 from taskchampion/working_set_rebuild_bug
Fix a working set rebuild bug
2021-05-17 21:36:56 -04:00
Dustin J. Mitchell
fd4b35f3fe Merge pull request #228 from taskchampion/issue164-edit
Support editing config file from the command line
2021-05-17 21:35:54 -04:00
Dustin J. Mitchell
47b3148a38 Merge pull request #239 from taskchampion/fix-new-clippy
fix new clippy warnings
2021-05-17 21:34:03 -04:00
Dustin J. Mitchell
3bb198425c Use ta config set in documentation 2021-05-16 09:53:41 -04:00
Dustin J. Mitchell
fd62c8327b Add a ta config set subcommand
This uses `toml_edit` to edit the config file in-place.  For the moment,
it only supports top-level arguments, but can be extended to do other
things later.
2021-05-16 09:53:41 -04:00
Dustin J. Mitchell
a778423cbc store the filename of the loaded config file 2021-05-16 09:53:41 -04:00
Dustin J. Mitchell
09efb33073 move Settings to its own module
..and add some tests for it
2021-05-16 09:53:40 -04: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
fa9e6ddcd5 Don't unwrap in production code 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
cea5ae87c7 Merge pull request #237 from taskchampion/issue151
[breaking] Include /v1/ in the sync-server paths
2021-05-16 09:18:19 -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
Dustin J. Mitchell
febe6d8b68 sort the 'next' repot by id 2021-05-11 14:58:57 -04:00
Dustin J. Mitchell
ac53383aea remove debugging prints 2021-05-09 21:30:58 -04:00
Dustin J. Mitchell
3f1453b70b Merge pull request #230 from taskchampion/issue100
Document environment variables all in one place
2021-05-08 09:56:57 -04:00
dbr
027225d2a3 More WIP.
Workaround for !Send SQLite causing problems as each get_txn creates a new transaction
2021-05-08 22:09:48 +10:00
Dustin J. Mitchell
7aea34c7a3 Document environment variables all in one place 2021-05-07 11:16:10 -04:00
dbr
7ff54ed0de WIP. Open new connection for each transaction as workaround 2021-05-07 22:24:55 +10:00
Dustin J. Mitchell
1d0ed132df remove spurious dependency from mdbook-deploy workflow
Fixes #227.
2021-05-05 16:55:21 +00:00
Dustin J. Mitchell
f30264b77f Merge pull request #223 from taskchampion/issue222
rename CLI to `ta`
2021-05-04 17:19:42 -04:00
Dustin J. Mitchell
0f0f2b0e75 rename CLI to ta 2021-05-04 17:09:47 -04:00
Dustin J. Mitchell
73ad035bed Merge pull request #220 from taskchampion/issue120
Fix doc links
2021-05-03 09:41:11 -04:00
Dustin J. Mitchell
5d8a1f50d4 Merge pull request #224 from taskchampion/issue164
Switch to TOML for configuration
2021-05-03 09:36:37 -04:00
Dustin J. Mitchell
94d1217d81 Switch to TOML for configuration 2021-05-02 17:04:26 -04:00
Dustin J. Mitchell
c696bf35d4 Fix doc links
`installation.md` was not being included due to using `-` instead of `*`
in `SUMMARY.md`.  The usage link was just incorrect.
2021-05-01 12:25:19 -04:00
Dustin J. Mitchell
b4a8b150a8 Merge pull request #218 from taskchampion/graphics
Add CGI assets
2021-05-01 10:43:03 -04:00
dbr
60ff0a8d11 Very WIP (i.e broken) start of SQLite storage in server 2021-04-29 16:00:22 +10: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
Dustin J. Mitchell
24011b5e8d Merge pull request #212 from savchenko/main
Compatibility, deprecation and security policies
2021-04-28 13:55:27 -04: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
Andrew Savchenko
aad0496620 Add CGI assets
- Closes https://github.com/taskchampion/taskchampion/issues/207
2021-04-28 14:02:08 +09:30
Andrew Savchenko
8f0f8bf31b Add CGI assets
- Closes https://github.com/taskchampion/taskchampion/issues/207
2021-04-28 13:56:29 +09:30
Andrew Savchenko
db9d5483e8 Update Policy
- Closes https://github.com/taskchampion/taskchampion/pull/212
2021-04-28 13:43:06 +09:30
Andrew Savchenko
990c540563 Update Policy
- https://github.com/taskchampion/taskchampion/pull/212#discussion_r621457029
2021-04-28 13:37:11 +09:30
Andrew Savchenko
62f3dab049 Update Policy
- https://github.com/taskchampion/taskchampion/pull/212#discussion_r621458637
2021-04-28 12:20:34 +09:30
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
Andrew Savchenko
215fda0539 [ABI] Add notice about backend upgrade 2021-04-27 16:00:22 +09:30
Andrew Savchenko
c81d61dfa6 Removed SECURITY.md in favour of POLICY.md 2021-04-27 15:41:29 +09:30
Andrew Savchenko
8aa6b50969 Add POLICY.md
- https://github.com/taskchampion/taskchampion/issues/210
- https://github.com/taskchampion/taskchampion/milestone/1
2021-04-27 15:40:11 +09:30
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
6a0bddab38 Merge pull request #205 from taskchampion/issue201
Replace tempfile with tempdir
2021-04-17 09:09:56 -04:00
Dustin J. Mitchell
f6550233e6 Merge pull request #204 from taskchampion/audit-fix-2021-04-16
run 'git audit fix'
2021-04-17 09:09:47 -04:00
Dustin J. Mitchell
c8d6619d71 Replace tempfile with tempdir 2021-04-16 19:29:27 -04:00
Dustin J. Mitchell
27c20074e3 run 'git audit fix' 2021-04-16 19:22:08 -04:00
Dustin J. Mitchell
9c54985fac Merge pull request #203 from taskchampion/issue198
Use `dirs-next` instead of `dirs`
2021-04-16 13:26:45 -04:00
Dustin J. Mitchell
6c0f7a736f Use dirs-next instead of dirs 2021-04-16 09:21:59 -04:00
Dustin J. Mitchell
10536f024d use audit action from the README 2021-04-15 16:45:22 -04:00
Dustin J. Mitchell
8d15ce896f try cargo audit at main 2021-04-12 11:16:24 -04:00
Dustin J. Mitchell
1b8672ffc9 fix audit cron 2021-04-11 19:55:35 +00:00
Dustin J. Mitchell
6bfa77e29d Merge pull request #195 from taskchampion/issue174-actions
add taskchampion-tests action
2021-04-03 20:17:57 -04:00
Dustin J. Mitchell
d20884281b add security audit 2021-04-03 20:16:12 -04:00
Dustin J. Mitchell
e4e40b3e5e Add actions
These will be more easily maintained by others than a Taskcluster
configuration.
2021-04-03 20:11:08 -04:00
Dustin J. Mitchell
c767718ac9 Merge pull request #194 from taskchampion/issue174
Update links ot point to new org
2021-04-03 19:46:21 -04:00
Dustin J. Mitchell
c2349cf708 Update links to point to new org 2021-04-03 19:44:31 -04:00
Dustin J. Mitchell
ed576a8c6c Merge pull request #193 from djmitche/dependabot/cargo/serde_json-1.0.64
Bump serde_json from 1.0.59 to 1.0.64
2021-03-31 18:29:39 -04:00
Dustin J. Mitchell
51f9a1093e Merge pull request #192 from djmitche/dependabot/cargo/textwrap-0.13.4
Bump textwrap from 0.12.1 to 0.13.4
2021-03-31 18:29:32 -04:00
Dustin J. Mitchell
ad878b7b29 Merge pull request #191 from djmitche/dependabot/cargo/actix-web-3.3.2
Bump actix-web from 3.3.0 to 3.3.2
2021-03-31 18:29:19 -04:00
Dustin J. Mitchell
b9ad3ea9a0 Merge pull request #190 from djmitche/dependabot/cargo/anyhow-1.0.40
Bump anyhow from 1.0.39 to 1.0.40
2021-03-31 18:28:39 -04:00
dependabot[bot]
35ae3420b8 Bump serde_json from 1.0.59 to 1.0.64
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.59 to 1.0.64.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.59...v1.0.64)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 07:30:38 +00:00
dependabot[bot]
e69efe79d0 Bump textwrap from 0.12.1 to 0.13.4
Bumps [textwrap](https://github.com/mgeisler/textwrap) from 0.12.1 to 0.13.4.
- [Release notes](https://github.com/mgeisler/textwrap/releases)
- [Changelog](https://github.com/mgeisler/textwrap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mgeisler/textwrap/compare/0.12.1...0.13.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 07:30:25 +00:00
dependabot[bot]
5b28993be0 Bump actix-web from 3.3.0 to 3.3.2
Bumps [actix-web](https://github.com/actix/actix-web) from 3.3.0 to 3.3.2.
- [Release notes](https://github.com/actix/actix-web/releases)
- [Changelog](https://github.com/actix/actix-web/blob/master/CHANGES.md)
- [Commits](https://github.com/actix/actix-web/compare/web-v3.3.0...web-v3.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 07:30:16 +00:00
dependabot[bot]
a21c85a872 Bump anyhow from 1.0.39 to 1.0.40
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.39 to 1.0.40.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.39...1.0.40)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 07:30:05 +00:00
dependabot[bot]
0e982a52d7 Merge pull request #188 from djmitche/dependabot/cargo/config-0.11.0 2021-03-30 12:15:32 +00:00
dependabot[bot]
82fc8dcd97 Bump config from 0.10.1 to 0.11.0
Bumps [config](https://github.com/mehcode/config-rs) from 0.10.1 to 0.11.0.
- [Release notes](https://github.com/mehcode/config-rs/releases)
- [Changelog](https://github.com/mehcode/config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mehcode/config-rs/commits/0.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 12:09:05 +00:00
Dustin J. Mitchell
2f3ee17e0b Merge pull request #189 from djmitche/dependabot/cargo/nom-6.1.2
Bump nom from 6.0.1 to 6.1.2
2021-03-30 08:08:16 -04:00
Dustin J. Mitchell
b003332ba0 Merge pull request #187 from djmitche/dependabot/cargo/lmdb-rkv-0.14.0
Bump lmdb-rkv from 0.12.3 to 0.14.0
2021-03-30 08:07:20 -04:00
Dustin J. Mitchell
f2b79026b6 Merge pull request #186 from djmitche/dependabot/cargo/thiserror-1.0.24
Bump thiserror from 1.0.22 to 1.0.24
2021-03-30 08:06:59 -04:00
Dustin J. Mitchell
ef995d7cac Merge pull request #185 from djmitche/dependabot/cargo/actix-rt-2.2.0
Bump actix-rt from 1.1.1 to 2.2.0
2021-03-30 08:06:37 -04:00
dependabot[bot]
cc7f522e2a Bump nom from 6.0.1 to 6.1.2
Bumps [nom](https://github.com/Geal/nom) from 6.0.1 to 6.1.2.
- [Release notes](https://github.com/Geal/nom/releases)
- [Changelog](https://github.com/Geal/nom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Geal/nom/compare/6.0.1...6.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 07:43:37 +00: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
dependabot[bot]
c89b646fdc Bump thiserror from 1.0.22 to 1.0.24
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.22 to 1.0.24.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.22...1.0.24)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 07:43:17 +00:00
dependabot[bot]
695785116d Bump actix-rt from 1.1.1 to 2.2.0
Bumps [actix-rt](https://github.com/actix/actix-net) from 1.1.1 to 2.2.0.
- [Release notes](https://github.com/actix/actix-net/releases)
- [Commits](https://github.com/actix/actix-net/compare/rt-1.1.1...rt-v2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 07:43:11 +00:00
dependabot[bot]
74041221e7 Merge pull request #184 from djmitche/dependabot/cargo/assert_cmd-1.0.3 2021-03-29 23:51:58 +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]
def67c81b6 Bump assert_cmd from 1.0.2 to 1.0.3
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v1.0.2...v1.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 23:45:28 +00:00
dependabot[bot]
55f8d1c7c0 Merge pull request #182 from djmitche/dependabot/cargo/uuid-0.8.2 2021-03-29 23:40:59 +00:00
dependabot[bot]
1bc881b1a5 Merge pull request #183 from djmitche/dependabot/cargo/predicates-1.0.7 2021-03-29 23:39:56 +00: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
dependabot[bot]
ff58711b2d Bump predicates from 1.0.5 to 1.0.7
Bumps [predicates](https://github.com/assert-rs/predicates-rs) from 1.0.5 to 1.0.7.
- [Release notes](https://github.com/assert-rs/predicates-rs/releases)
- [Changelog](https://github.com/assert-rs/predicates-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/predicates-rs/compare/v1.0.5...v1.0.7)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 23:34:08 +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
bbceed41f9 fix needless_question_mark 2021-03-29 19:25:12 -04:00
Dustin J. Mitchell
dba50ae60b Merge pull request #181 from djmitche/dependabot/cargo/proptest-1.0.0
Bump proptest from 0.9.6 to 1.0.0
2021-03-29 09:28:03 -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
Dustin J. Mitchell
c42cc3bdcb fix new clippy warnings 2021-03-27 23:38:51 -04:00
Dustin J. Mitchell
7ed2bf4441 Merge pull request #172 from djmitche/dependabot/cargo/env_logger-0.8.3
Bump env_logger from 0.8.2 to 0.8.3
2021-03-27 19:12:57 -04:00
dependabot[bot]
718f16154c Bump env_logger from 0.8.2 to 0.8.3
Bumps [env_logger](https://github.com/env-logger-rs/env_logger) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.2...v0.8.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-27 23:05:56 +00:00
Dustin J. Mitchell
e8566df3a7 Merge pull request #169 from djmitche/dependabot/cargo/log-0.4.14
Bump log from 0.4.11 to 0.4.14
2021-03-27 19:03:56 -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
Dustin J. Mitchell
0724c4b02d Merge pull request #156 from dbr/remove-failure
Replace 'failure' with anyhow + thiserror
2021-03-27 18:48:35 -04:00
Dustin J. Mitchell
bb821feaa9 use clippy stable, not preview 2021-03-27 18:47:49 -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
Dustin J. Mitchell
0f2002663d Merge pull request #166 from djmitche/issue165
use the correct 'package-ecosystem' config
2021-03-27 18:03:36 -04:00
Dustin J. Mitchell
5745e9b396 use the correct 'package-ecosystem' config 2021-03-26 09:00:17 -04:00
dbr
5ee67d65e2 Remove whitespace in comment to avoid cargo fmt doing weird things 2021-03-25 18:29:53 +11:00
dbr
c04ece0e90 Fix one actual clippy lint: remove an unnecessary clone 2021-03-25 18:21:18 +11:00
dbr
b5b9e63a4f Disable "unnecessary_wraps" linter as it is almost entirely false-positives
Was added in 1.50 and will be reduced in severity in next release as per https://github.com/rust-lang/rust-clippy/pull/6765
2021-03-25 18:20:47 +11:00
dbr
6d77b9a319 cargo fmt 2021-03-25 17:10:11 +11:00
dbr
0e7a4c2c33 Fix minor typo in doc comment 2021-03-25 16:34:53 +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
9cfbe01271 Merge pull request #147 from djmitche/issue144
Reorganize the 'taskchampion' crate
2021-01-10 22:31:40 -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
a318ceebe2 Merge pull request #146 from djmitche/issue106
Adjust Tag syntax to match TaskWarrior
2021-01-09 23:00:52 -05:00
Dustin J. Mitchell
824c14b5b8 Notes about active development of TW 2021-01-10 03:51:46 +00:00
Dustin J. Mitchell
b95c146a7e Adjust Tag syntax to match TaskWarrior 2021-01-10 03:47:38 +00:00
Dustin J. Mitchell
2bacc05ced Merge pull request #145 from djmitche/issue123
Centralize API for working set to a single struct
2021-01-09 18:42:36 -05:00
Dustin J. Mitchell
087769146e Centralize API for working set to a single struct
Rather than allow addressing tasks either by working set ID or uuid,
with attendant performance issues, this moves the API for the working
set to a single struct that just serves as a 1-1 mapping of indexes to
UUIDs.  It's up to the caller to use this information.
2021-01-09 23:42:27 +00:00
Dustin J. Mitchell
d06f2e5aeb Merge pull request #143 from djmitche/issue125
Always pass Uuids by value
2021-01-09 17:57:29 -05:00
Dustin J. Mitchell
45d3e38c63 Always pass Uuids by value
Rust handles this well.  Fixes #125.
2021-01-09 22:09:06 +00:00
Dustin J. Mitchell
ca1b7da9bf Merge pull request #142 from djmitche/issue68
Automatically add new pending tasks to working set after sync
2021-01-02 14:59:56 -05:00
Dustin J. Mitchell
5e92770eb8 Automatically rebuild working set after sync 2021-01-02 14:47:36 -05:00
Dustin J. Mitchell
dc2df10158 Control whether to renumber the working set when rebuilding it 2021-01-02 14:47:36 -05:00
Dustin J. Mitchell
b62370c150 Rename replica.gc to replica.rebuild_working_set
The command-line operation is still `gc`, but we'll break that down into
finer pieces in the replica.
2021-01-02 13:23:48 -05:00
Dustin J. Mitchell
da63d77d9d Merge pull request #141 from djmitche/issue102
Update documentation for reports, new CLI
2021-01-01 16:49:55 -05:00
Dustin J. Mitchell
8b4f345387 Update documentation for reports, new CLI
This is basically a redraft of the documentation to be more complete and
better cover some of the features added since it was written.
2021-01-01 21:18:49 +00:00
Dustin J. Mitchell
b29f75a075 fix to tc.yml to only build on pushes to main 2020-12-30 21:46:23 +00:00
Dustin J. Mitchell
d57efbec5d Merge pull request #136 from djmitche/issue120
Parse reports from config, with defaults
2020-12-30 16:45:05 -05:00
Dustin J. Mitchell
46c3b31208 Parse reports from config, with defaults 2020-12-30 21:18:45 +00:00
Dustin J. Mitchell
2928bab41c Merge pull request #133 from djmitche/issue121
Use named reports
2020-12-29 20:06:19 -05:00
Dustin J. Mitchell
705edce82b only run CI on pushes to main, not to topic branches 2020-12-30 01:02:00 +00:00
Dustin J. Mitchell
b7c12eec1e Allow filtering by status 2020-12-30 00:52:53 +00:00
Dustin J. Mitchell
83d8fc3b4e Factor out the unnecessary ModArg struct 2020-12-30 00:28:48 +00:00
Dustin J. Mitchell
fc977a0fe6 Limit Filter "universes" to invocation::filter
Universes are really an optimization of filtering tasks, so let's define
them there, and derive them from the set of conditions.  This means that
complex filters might get missed and end up doing a full task scan, but
that's probably OK.

Note that this does not fix the working-set API issues (#108 and #123).
2020-12-30 00:26:53 +00:00
Dustin J. Mitchell
0a458b5f5b Treat any bare word in the command line as a report name 2020-12-29 22:54:07 +00:00
Dustin J. Mitchell
21684666a6 Merge pull request #132 from djmitche/issue60
Use a single secret value to identify clients
2020-12-28 20:51:08 -05:00
Dustin J. Mitchell
31378cb8d4 Include client key in a header, not the URL
Since this value is used both for identification and authentication, it
shouldn't be in the URL where it might be logged or otherwise
discovered.
2020-12-28 23:08:42 +00:00
Dustin J. Mitchell
92d629522b rename client id -> client key 2020-12-28 21:32:59 +00:00
Dustin J. Mitchell
e555af8895 add request logging 2020-12-28 00:25:26 +00:00
Dustin J. Mitchell
812b49587f Merge pull request #130 from djmitche/issue25
Encrypt content sent to the server.
2020-12-27 13:59:24 -05:00
Dustin J. Mitchell
a8d45c67c6 Encrypt content sent to the server
This implements client-side encryption, so that users' task information
is not availble to the server (or to anyone who does not have the
`encryption_secret`).
2020-12-27 18:51:41 +00:00
Dustin J. Mitchell
6b70b47aa0 specify version ranges 2020-12-26 16:03:57 +00:00
Dustin J. Mitchell
c472e04a09 Merge pull request #127 from djmitche/issue76
Default to a local server, so `task sync` works out of the box
2020-12-26 10:45:15 -05:00
Dustin J. Mitchell
64b38ee814 add some debug logging 2020-12-26 15:34:00 +00:00
Dustin J. Mitchell
57834848f2 Default to a local server, so task sync works out of the box 2020-12-26 15:29:48 +00:00
Dustin J. Mitchell
db85ff86a1 Merge pull request #126 from djmitche/issue119
implement generic report generation
2020-12-26 09:59:12 -05:00
Dustin J. Mitchell
00f548c713 implement generic report generation 2020-12-26 04:11:20 +00:00
Dustin J. Mitchell
f264e74288 specify nom version 2020-12-25 04:18:24 +00:00
Dustin J. Mitchell
e7b7e88bc9 convert unrwap to expect and add testing 2020-12-25 02:52:49 +00:00
Dustin J. Mitchell
8a10fa8335 fix some more pedantic lints 2020-12-25 02:43:51 +00:00
Dustin J. Mitchell
46512b78d7 Merge pull request #118 from djmitche/issue112
use a s!(..) shorthand in CLI tests
2020-12-24 21:37:48 -05:00
Dustin J. Mitchell
922e71cd4d use a s!(..) shorthand in CLI tests 2020-12-24 21:15:56 +00:00
Dustin J. Mitchell
7e906ced22 Merge pull request #117 from djmitche/issue113
use static strings for usage
2020-12-24 16:15:51 -05:00
Dustin J. Mitchell
75aaf8d4ab use static strings for usage 2020-12-24 21:07:27 +00:00
Dustin J. Mitchell
7594144a2d Merge pull request #115 from djmitche/issue110
Fix clippy warnings and make them all errors
2020-12-24 13:30:39 -05:00
Dustin J. Mitchell
8989b0d2e3 Fix clippy warnings and make them all errors 2020-12-24 17:39:49 +00:00
Dustin J. Mitchell
c75d07df94 Merge pull request #114 from djmitche/issue11
Support filtering by tags
2020-12-24 12:14:10 -05:00
Dustin J. Mitchell
8c9e240e97 Document filter and modification syntax 2020-12-24 17:04:51 +00:00
Dustin J. Mitchell
9c94a7b753 support filtering by tags 2020-12-24 16:38:08 +00:00
Dustin J. Mitchell
161c38807d Merge pull request #109 from djmitche/issue11-filter-refactor
Refactor filtering to start with a universe
2020-12-24 11:05:32 -05:00
Dustin J. Mitchell
a0568f017c Refactor filtering to start with a universe 2020-12-23 03:50:34 +00:00
Dustin J. Mitchell
e6d60524fa Merge pull request #107 from djmitche/issue103
Implement tags in the Replica API and the CLI
2020-12-22 21:06:37 -05:00
Dustin J. Mitchell
5ea72f878a display tags in 'task info' 2020-12-21 20:43:09 +00:00
Dustin J. Mitchell
54e8484bc2 Support CLI syntax for changing tags 2020-12-21 20:43:09 +00:00
Dustin J. Mitchell
28c5fb2268 Add support for task tags
Based on properties named `tag.<tag>` as already documented
2020-12-21 20:43:09 +00:00
Dustin J. Mitchell
141752bd4b Merge pull request #98 from djmitche/issue44
Switch to a command-line API closer to TaskWarrior
2020-12-21 10:20:55 -05:00
Dustin J. Mitchell
8ba6277cce use 'atty' to detect when colors can be used 2020-12-20 19:54:38 -05:00
Dustin J. Mitchell
7d17740ca8 use a generic Write instance for command output 2020-12-20 19:45:24 -05:00
Dustin J. Mitchell
6b550e7516 implement cli help 2020-12-20 18:42:21 -05:00
Dustin J. Mitchell
2c579b9f01 Switch to a command-line API closer to TaskWarrior
* Use a parser (rather than clap) to process the command line
* Outline some generic support for filtering, reporting, modifying, etc.
* Break argument parsing strictly from invocation, to allow independent testing
2020-12-19 16:40:09 -05:00
Dustin J. Mitchell
87bb829634 Merge pull request #96 from srfraser/i88_append
subcommands: prepend and append to description
2020-12-18 16:38:38 -05:00
Simon Fraser
ee341ac7d5 subcommands: prepend and append to description
This currently uses format!() which may not be the best
option. Fixes #88
2020-12-17 12:59:50 +00:00
Dustin J. Mitchell
8f5e299077 Merge remote-tracking branch 'upstream/main' into main 2020-11-29 21:27:35 -05:00
Dustin J. Mitchell
de03209285 bits of docs 2020-11-29 21:26:39 -05:00
Dustin J. Mitchell
0d5635f092 Update RELEASING.md 2020-11-29 21:10:49 -05:00
Dustin J. Mitchell
8601c0cb67 update Cargo.lock 2020-11-29 21:09:28 -05:00
Dustin J. Mitchell
a1747546d6 Update RELEASING.md 2020-11-29 21:09:22 -05:00
Dustin J. Mitchell
e6abfc5f56 more RELEASING stuff 2020-11-29 20:59:52 -05:00
Dustin J. Mitchell
451690afb7 v0.2.0 2020-11-29 20:59:09 -05:00
Dustin J. Mitchell
17a13e0de9 Merge pull request #78 from djmitche/issue49
Add release stuff
2020-11-29 20:49:18 -05:00
Dustin J. Mitchell
0e2e60372d release process 2020-11-29 20:42:10 -05:00
Dustin J. Mitchell
95ada3d2bb Add metadata for the taskchampion crate 2020-11-29 20:35:25 -05:00
Dustin J. Mitchell
81cee8d375 use CARGO_PKG_VERSION for version 2020-11-29 20:35:25 -05:00
Dustin J. Mitchell
dd01c985ec fix typo 2020-11-29 20:34:59 -05:00
Dustin J. Mitchell
8f361c28b7 remove unnecessary warning suppression 2020-11-29 20:34:43 -05:00
Dustin J. Mitchell
89a0071136 Merge pull request #77 from djmitche/issue49
Add a getting-started section
2020-11-29 20:24:47 -05:00
Dustin J. Mitchell
08faac957a Add a getting-started section 2020-11-29 20:14:06 -05:00
Dustin J. Mitchell
33283658d5 Merge pull request #75 from djmitche/issue54
use log and env_logger, and add some logging around sync
2020-11-29 18:34:01 -05:00
Dustin J. Mitchell
0a1ee470f7 use log and env_logger, and add some logging around sync 2020-11-29 18:18:28 -05:00
Dustin J. Mitchell
c117494ce6 Merge pull request #74 from djmitche/issue66
Implement actual on-disk storage for sync-server.
2020-11-29 17:47:11 -05:00
Dustin J. Mitchell
8b233de46e Merge pull request #73 from djmitche/issue72
Add done and delete subcommands
2020-11-29 17:42:02 -05:00
Dustin J. Mitchell
786d5b6a17 Implement actual on-disk storage for sync-server. 2020-11-29 17:41:28 -05:00
Dustin J. Mitchell
1b7dbd0715 remove delete_task from the Replica API so it's not misused 2020-11-29 14:26:47 -05:00
Dustin J. Mitchell
af7363f3aa add delete subcommand 2020-11-29 14:07:16 -05:00
Dustin J. Mitchell
29ab993397 add done 2020-11-29 14:07:16 -05:00
Dustin J. Mitchell
42d988d601 fix clippy warnings 2020-11-29 14:05:51 -05:00
Dustin J. Mitchell
d832b0b859 fix merge error 2020-11-29 11:18:29 -05:00
Dustin J. Mitchell
47cd051bd7 Merge pull request #71 from djmitche/issue7
Add start and stop commands
2020-11-28 23:19:21 -05:00
Dustin J. Mitchell
0e4ab4b88f Add start and stop commands 2020-11-28 23:12:37 -05:00
Dustin J. Mitchell
7a2857e814 Merge pull request #70 from djmitche/issue9
Support configuration of the cli
2020-11-28 22:02:07 -05:00
Dustin J. Mitchell
6d08eacd98 limit config file usage to just yaml 2020-11-28 19:43:30 -05:00
Dustin J. Mitchell
0e926df578 Add configuration-file support to the 'task' command 2020-11-28 18:18:43 -05:00
Dustin J. Mitchell
8af7ba286d Factor replica and sync configuration into simple owned structs 2020-11-28 16:57:32 -05:00
Dustin J. Mitchell
87596bb1f0 update Cargo.lock to latest 2020-11-28 15:14:49 -05:00
Dustin J. Mitchell
091f5b5b17 use semver ranges for dependencies 2020-11-28 15:13:30 -05:00
Dustin J. Mitchell
3c976a324e Create dependabot.yml 2020-11-28 11:31:12 -05:00
Dustin J. Mitchell
383f77b5c6 Merge pull request #69 from djmitche/issue6
add 'task modify' (that can only modify description right now)
2020-11-28 11:26:02 -05:00
Dustin J. Mitchell
a665ff83de add 'task modify' (that can only modify description right now) 2020-11-28 11:17:38 -05:00
Dustin J. Mitchell
b34ef34b2a Merge pull request #67 from djmitche/issue58
take configuration in env vars temporarily
2020-11-28 10:16:56 -05:00
Dustin J. Mitchell
1a92613ddc take configuration in env vars temporarily 2020-11-28 10:02:17 -05:00
Dustin J. Mitchell
97a8a87c24 Merge pull request #64 from djmitche/issue57
Add RemoteServer to the taskchampion crate
2020-11-27 20:23:39 -05:00
Dustin J. Mitchell
a02f864b87 Merge pull request #65 from djmitche/issue63
do not require taskchampion from sync-server
2020-11-27 20:15:25 -05:00
Dustin J. Mitchell
2a37f090a5 Add RemoteServer to the taskchampion crate 2020-11-27 20:15:17 -05:00
Dustin J. Mitchell
3092a6bb7f do not require taskchampion from sync-server 2020-11-27 20:08:54 -05:00
Dustin J. Mitchell
d46f20e75a adjust visibility, comment 2020-11-27 18:16:42 -05:00
Dustin J. Mitchell
f59355f827 set default theme to ayu 2020-11-26 23:38:14 -05:00
Dustin J. Mitchell
f5859bc45c fix docs to include all files 2020-11-26 23:38:14 -05:00
Dustin J. Mitchell
efb1bc6a39 Create CONTRIBUTING.md 2020-11-26 23:36:54 -05:00
Dustin J. Mitchell
367c2fa2bd Create LICENSE 2020-11-26 23:20:45 -05:00
Dustin J. Mitchell
b10dc01213 Create CODE_OF_CONDUCT.md 2020-11-26 23:18:32 -05:00
Dustin J. Mitchell
c96e40e494 Create SECURITY.md 2020-11-26 23:16:39 -05:00
Dustin J. Mitchell
d53d83d06e Merge pull request #62 from djmitche/issue37
replica.new_task now invents its own uuid
2020-11-26 23:13:15 -05:00
Dustin J. Mitchell
eb47cf4e7f scrpit to push docs 2020-11-26 23:02:15 -05:00
Dustin J. Mitchell
0f98727d9b replica.new_task now invents its own uuid 2020-11-26 22:44:13 -05:00
Dustin J. Mitchell
2064057688 fix clippy warnings
I don't know why these are "intermittent"
2020-11-26 22:36:31 -05:00
Dustin J. Mitchell
26b17c6dbc Revert "add signing support"
It turns out we don't need this.

This reverts commit e92fc0628b.
2020-11-26 22:34:20 -05:00
Dustin J. Mitchell
b0dd3905e7 fix crate name for tc-sync-server 2020-11-26 22:30:07 -05:00
Dustin J. Mitchell
e32b9d1bf6 Merge pull request #61 from djmitche/issue55
Implement the sync server
2020-11-26 20:00:22 -05:00
Dustin J. Mitchell
5b1b911bf7 Move add_version and get_child_version to server module
..and add some tests specifically for those functions, in the absence of
all the HTTP nonsense.
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
fb22b9686f refactor sync server to use pluggable storage
..with a fixed implementation of the replica / server protocol logic.
There isn't much logic yet, and there's a lot of boilerplate to take
care of, so this looks a little lopsided, but I'm confident this is the
right structure for this code's future.
2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
7472749fee add tests for API methods 2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
3fb2327a5b add docs for replica/server protocol 2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
2dae271851 build an in-memory sync server implementation 2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
2457d8bc43 move types in crate::types to crate::server 2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
e84871931f Refactor HTTP implementation of API methods 2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
a5c06008b3 use a trait object for the server, for dynamic dispatch 2020-11-26 19:59:52 -05:00
Dustin J. Mitchell
087333a227 refactor sync server into modules 2020-11-26 19:59:49 -05:00
Dustin J. Mitchell
d0bfbbb7f0 Merge pull request #59 from djmitche/issue8
Refactor synchronization
2020-11-25 20:12:46 -05:00
Dustin J. Mitchell
1511a0e38e update docs based on modified sync designs 2020-11-25 19:46:23 -05:00
Dustin J. Mitchell
3537db9bbe implement a local sync server 2020-11-25 19:13:32 -05:00
Dustin J. Mitchell
8f7e2e2790 add a 'task sync' command using a copy of the test server 2020-11-25 18:07:04 -05:00
Dustin J. Mitchell
a81c84d7c7 refactor sync to new model 2020-11-25 17:58:03 -05:00
Dustin J. Mitchell
e92fc0628b add signing support 2020-11-25 17:58:02 -05:00
Dustin J. Mitchell
75edd2773f make server operations fallible 2020-11-25 17:53:23 -05:00
Dustin J. Mitchell
549d3b9f6d refactor taskchampion::server into a module with submodules 2020-11-25 17:53:23 -05:00
Dustin J. Mitchell
7cfa27fc7e Merge pull request #51 from djmitche/issue34
Remove `remove_from_working_set` method.
2020-11-24 13:14:12 -05:00
Dustin J. Mitchell
fc4fcc9e5d Remove remove_from_working_set method.
Items are only removed from the working set when it is rebuilt, so this
method is unnecessary.
2020-11-24 13:11:40 -05:00
Dustin J. Mitchell
a0573e2dbe Merge pull request #50 from djmitche/issue18
add cargo clippy to CI
2020-11-24 13:08:48 -05:00
Dustin J. Mitchell
ca70d2c914 add cargo clippy to CI 2020-11-24 13:02:14 -05:00
Dustin J. Mitchell
2232aa8083 Merge pull request #47 from djmitche/issue43
Update handling of working set and show id's more widely
2020-11-24 12:19:47 -05:00
Dustin J. Mitchell
122abf4c5b Merge pull request #46 from djmitche/issue40
export the Uuid type from taskchampion
2020-11-24 12:06:46 -05:00
Dustin J. Mitchell
1c5e9b009b Add Replica::get_working_set_index and use it
This is probably ridiculously inefficient, as it will load the working
set for each and every task listed.  Optimize later!
2020-11-24 12:05:30 -05:00
Dustin J. Mitchell
2dd86edd4a use Replica::get_working_set_task 2020-11-24 11:54:48 -05:00
Dustin J. Mitchell
fc668e5ca8 use usize to index working set 2020-11-24 11:53:11 -05:00
Dustin J. Mitchell
c8f14d68cb export the Uuid type from taskchampion 2020-11-24 11:44:21 -05:00
Dustin J. Mitchell
d84c156782 Merge pull request #45 from djmitche/issue30
add an 'info' subcommand
2020-11-24 11:42:34 -05:00
Dustin J. Mitchell
8233763295 add an 'info' subcommand 2020-11-24 11:31:56 -05:00
Dustin J. Mitchell
888b38fd79 Merge pull request #42 from djmitche/issue28
use prettytable for tabular outputs
2020-11-24 09:47:48 -05:00
Dustin J. Mitchell
f31a96176d use prettytable for tabular outputs 2020-11-23 21:58:45 -05:00
Dustin J. Mitchell
f7f5c379ea Merge pull request #41 from djmitche/refactor-cli
Refactor command-line handling
2020-11-23 21:35:04 -05:00
Dustin J. Mitchell
fe4183c3ca Refactor command-line handling into modules per subcommands 2020-11-23 21:29:46 -05:00
Dustin J. Mitchell
e0b69a62b1 fix --help metadata 2020-11-23 16:18:24 -05:00
Dustin J. Mitchell
1de24f66dc restore README to top level 2020-11-23 16:12:46 -05:00
Dustin J. Mitchell
635852c6d9 Merge pull request #39 from djmitche/issue14
Refactor into several crates
2020-11-23 16:10:18 -05:00
Dustin J. Mitchell
084c978b31 move docs back to top level 2020-11-23 16:07:38 -05:00
Dustin J. Mitchell
2296d0fa35 rename DB to TaskDB for consistency 2020-11-23 16:03:04 -05:00
Dustin J. Mitchell
8e2b4c3f6c Reorganize taskchampion crate for docs and tests
The public API of the taskchampion crate now contains the expected parts
and no more, and has some better documentation.

This moves the crate's external `tests/` into internal tests, as the
TaskDB is no longer exposed as part of the crate API.
2020-11-23 15:59:37 -05:00
Dustin J. Mitchell
8f4924f903 remove unnecessary 'extern crate' 2020-11-23 15:02:37 -05:00
Dustin J. Mitchell
ba55d298ce stop ignoring dead code and unused variables 2020-11-23 14:29:51 -05:00
Dustin J. Mitchell
779a331003 reorganize into separate crates
- taskchampion -- core implementation of a replica
 - taskchampion-cli -- command-line interface
 - taskchampion-sync-server -- server implementation (not much yet!)
2020-11-23 14:27:47 -05:00
Dustin J. Mitchell
2830043e13 Merge pull request #38 from djmitche/issue21
Reorganize the Task API
2020-11-23 13:46:16 -05:00
Dustin J. Mitchell
245969e390 make task a simple top-level module 2020-11-23 12:53:58 -05:00
Dustin J. Mitchell
634aaadb73 Reorganize handling of task data
This abandons field-by-field compatibility with the TaskWarrior TDB2
format, which wasn't a sustainable strategy anyway.

Instead, tasks are represented as a TaskMap with custom key formats.  In
this commit, there are only a few allowed keys, with room to grow.

Replica returns convenience wrappers Task (read-only) and TaskMut
(read-write) with getters and setters to make modifying tasks easier.
2020-11-23 12:53:58 -05:00
Dustin J. Mitchell
c2c2a00ed5 Merge pull request #36 from djmitche/issue20
refactor working-set support, improve data model docs
2020-11-22 19:48:52 -05:00
Dustin J. Mitchell
03e4fc7cee Refactor working-set support, add pending tasks
This refactors the working-set support so that taskdb knows how to
rebuild the working set (in a single transaction) but replica knows what
tasks should be in that set.

This also adds support for automatically adding tasks to the working set
when they are marked pending.  Note that tasks are not *removed* from
the working set automatically, but only on a gc operation.
2020-11-22 18:19:05 -05:00
Dustin J. Mitchell
39a0dfe798 revise and expand docs about storage / taskdb / replica 2020-11-22 17:30:42 -05:00
Dustin J. Mitchell
ffbf272afc Merge pull request #32 from djmitche/issue22
fix up some TODOs in replica.rs
2020-11-22 00:56:10 -05:00
Dustin J. Mitchell
1a2c17ab8c Merge branch 'main' into issue22 2020-11-22 00:55:58 -05:00
Dustin J. Mitchell
4074db7729 Merge pull request #31 from djmitche/issue15-more
remove more taskwarrior compatibility stuff
2020-11-22 00:55:39 -05:00
Dustin J. Mitchell
f45292d049 remove more taskwarrior compatibility stuff 2020-11-22 00:51:41 -05:00
Dustin J. Mitchell
74fb3c3c41 fix up some TODOs in replica.rs 2020-11-21 23:46:53 -05:00
Dustin J. Mitchell
b3a0fe9f20 Merge pull request #27 from djmitche/issue12
add an mdbook
2020-11-21 21:32:09 -05:00
Dustin J. Mitchell
17fe90c8d0 poor excuse for documentation 2020-11-21 21:27:58 -05:00
Dustin J. Mitchell
ae8872d51e add an mdbook 2020-11-21 21:27:58 -05:00
Dustin J. Mitchell
1e28289b8b Merge pull request #19 from djmitche/issue3
use a v1 .taskcluster.yml
2020-11-21 19:15:57 -05:00
Dustin J. Mitchell
c8a28b5ab3 install rustfmt 2020-11-21 19:09:55 -05:00
Dustin J. Mitchell
2bd68e85d3 remove TODO (now moved to issues) 2020-11-21 19:06:15 -05:00
Dustin J. Mitchell
0e792ad584 use a v1 .taskcluster.yml 2020-11-21 18:55:29 -05:00
Dustin J. Mitchell
785f3940c5 Merge pull request #17 from djmitche/issue13
rename to taskchampion
2020-11-21 18:01:44 -05:00
Dustin J. Mitchell
1fa6155b22 rename to taskchampion 2020-11-21 18:01:25 -05:00
Dustin J. Mitchell
8ed54e9728 Merge pull request #16 from djmitche/issue15
remove taskwarrior compatibility stuff
2020-11-21 17:54:01 -05:00
Dustin J. Mitchell
3ddaff07ca remove taskwarrior compatibility stuff 2020-11-21 17:52:09 -05:00
Dustin J. Mitchell
ae93d91b6e more CLI compatibility WIP 2020-02-02 18:46:27 -05:00
Dustin J. Mitchell
cfdb266800 add some cli parsing stuff 2020-02-02 15:11:14 -05:00
Dustin J. Mitchell
61b2de132b support rebuilding the working set 2020-01-19 15:55:15 -05:00
Dustin J. Mitchell
12980da5fd add working_set support to taskstorage 2020-01-19 14:56:09 -05:00
Dustin J. Mitchell
ad08991292 Start on making replica higher-level, with some TODO's 2020-01-19 14:03:03 -05:00
Dustin J. Mitchell
4203f232ad docs 2020-01-12 16:00:40 -05:00
Dustin J. Mitchell
f8977c9ce3 use kv in cli 2020-01-12 13:51:58 -05:00
Dustin J. Mitchell
4172c7012c simplify the taskstorage methods 2020-01-12 13:48:16 -05:00
Dustin J. Mitchell
2f973d3e62 task storge implementation based on kv / LMDB 2020-01-12 13:36:02 -05:00
Dustin J. Mitchell
afd11d08a7 make the TaskStorage API fallible everywhere 2020-01-05 15:39:34 -05:00
Dustin J. Mitchell
611b1cd68f factor storage out to a trait object 2020-01-05 15:00:08 -05:00
Dustin J. Mitchell
e228c99b83 partial refactor to separate taskdb and storage 2020-01-05 13:17:07 -05:00
Dustin J. Mitchell
727db7f669 name taskwarrior-rest 2020-01-02 21:08:17 -05:00
Dustin J. Mitchell
752d05e96b merge README 2020-01-01 19:57:01 -05:00
Dustin J. Mitchell
2d000fdeb9 merge ot with rask 2020-01-01 19:54:26 -05:00
Dustin J. Mitchell
e17943d878 add a simple CLI 2020-01-01 18:53:12 -05:00
Dustin J. Mitchell
b898ec1fde add a Replica 2020-01-01 18:22:01 -05:00
Dustin J. Mitchell
f6ffcc7039 add proptest for action sequences 2020-01-01 17:45:50 -05:00
Dustin J. Mitchell
04f6b1d421 add test for syncing deletes and creates 2019-12-29 13:38:36 -05:00
Dustin J. Mitchell
41acb1fa1e Add support for Delete operations 2019-12-29 13:16:42 -05:00
Dustin J. Mitchell
e83bdc28cd use strings as values, with option to allow removing 2019-12-29 11:54:59 -05:00
Dustin J. Mitchell
e5bd258e84 comments about applying 2019-12-29 11:09:37 -05:00
Dustin J. Mitchell
4a62413e21 add TODO 2019-12-29 11:09:05 -05:00
Dustin J. Mitchell
59f4e6abd7 actually support synchronization 2019-12-28 22:46:10 -05:00
Dustin J. Mitchell
0a2293a9c5 use proptest to check invariants 2019-12-28 14:31:37 -05:00
Dustin J. Mitchell
8799636c1a add a transform function for operations 2019-12-28 12:17:42 -05:00
Dustin J. Mitchell
72a12c751e remove text operations 2019-12-28 11:45:26 -05:00
Dustin J. Mitchell
0c3e4d5c2e add a tasks method to db 2019-12-28 11:44:45 -05:00
Dustin J. Mitchell
83b2318a06 backup scheme 2019-12-28 11:24:20 -05:00
Dustin J. Mitchell
e5a92826f6 add taskdb 2019-12-28 11:20:35 -05:00
Dustin J. Mitchell
10c7dd28b9 add README 2019-12-25 17:44:40 -05:00
Dustin J. Mitchell
05d26285e3 implement TextOperation 2019-12-25 10:51:44 -05:00
Dustin J. Mitchell
93ce28ed15 add README 2018-11-24 17:00:44 -05:00
Dustin J. Mitchell
1809fe3674 build on push 2018-11-24 16:55:53 -05:00
Dustin J. Mitchell
63d5f78cb8 add .taskcluster.yml 2018-11-24 16:55:01 -05:00
Dustin J. Mitchell
d0744d5178 refactor to a library, add integration tests 2018-11-12 18:25:47 -05:00
Dustin J. Mitchell
9f310c76bd use a distinct error_chain for the tdb submodule 2018-11-12 17:42:19 -05:00
Dustin J. Mitchell
7fd94f6495 Remove unused methods from Pig 2018-11-12 09:39:59 -05:00
Dustin J. Mitchell
1272acb893 Use error_chain 2018-11-11 21:09:53 -05:00
Dustin J. Mitchell
f9d950e621 rename Nibbler to Pig as per latest code in Taskwarrior 2018-11-10 19:46:32 -05:00
Dustin J. Mitchell
6a66b7a84b parse all defined fields in tasks 2018-11-10 19:34:23 -05:00
Dustin J. Mitchell
de5e4e134c parse into tasks 2018-11-09 20:48:29 -05:00
Dustin J. Mitchell
d1c09f2561 parse a TDB2 file 2018-11-09 19:34:55 -05:00
321 changed files with 30468 additions and 4715 deletions

6
.cargo/audit.toml Normal file
View File

@@ -0,0 +1,6 @@
[advisories]
ignore = [
"RUSTSEC-2021-0124", # see https://github.com/GothenburgBitFactory/taskwarrior/issues/2830
"RUSTSEC-2020-0159", # segfault in localtime_r - low risk to TC
"RUSTSEC-2020-0071", # same localtime_r bug as above
]

2
.cargo/config Normal file
View File

@@ -0,0 +1,2 @@
[alias]
xtask = "run --package xtask --"

20
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-22.04
ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.22.2"
# Optionally install the cmake for vcpkg
COPY ./reinstall-cmake.sh /tmp/
RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
fi \
&& rm -f /tmp/reinstall-cmake.sh
RUN sudo apt update && sudo apt install uuid-dev
# [Optional] Uncomment this section to install additional vcpkg ports.
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
# [Optional] Uncomment this section to install additional packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

View File

@@ -0,0 +1,24 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"name": "Taskwarrior development environment",
"build": {
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/rust:1": {}
}
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "gcc -v",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@@ -0,0 +1,59 @@
#!/usr/bin/env bash
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
#
set -e
CMAKE_VERSION=${1:-"none"}
if [ "${CMAKE_VERSION}" = "none" ]; then
echo "No CMake version specified, skipping CMake reinstallation"
exit 0
fi
# Cleanup temporary directory and associated files when exiting the script.
cleanup() {
EXIT_CODE=$?
set +e
if [[ -n "${TMP_DIR}" ]]; then
echo "Executing cleanup of tmp files"
rm -Rf "${TMP_DIR}"
fi
exit $EXIT_CODE
}
trap cleanup EXIT
echo "Installing CMake..."
apt-get -y purge --auto-remove cmake
mkdir -p /opt/cmake
architecture=$(dpkg --print-architecture)
case "${architecture}" in
arm64)
ARCH=aarch64 ;;
amd64)
ARCH=x86_64 ;;
*)
echo "Unsupported architecture ${architecture}."
exit 1
;;
esac
CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh"
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt"
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX)
echo "${TMP_DIR}"
cd "${TMP_DIR}"
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O
sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}"
sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest

3
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,3 @@
taskchampion/* @dbr @djmitche
Cargo.toml @dbr @djmitche
Cargo.lock @dbr @djmitche

1
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1 @@
Please see the ["Contributing to Taskwarrior"](https://github.com/GothenburgBitFactory/taskwarrior/tree/develop/doc/devel/contrib) section of the developer documentation.

18
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
version: 2
updates:
# Enable version updates for GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
# Enable updates for Rust packages
- package-ecosystem: "cargo"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
ignore:
# skip patch updates, as they can be quite noisy, but keep
# minor and major updates so that we don't fall too far
# behind
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

View File

@@ -4,6 +4,8 @@ Replace this text with a description of the PR.
#### Additional information...
- [ ] Have you run the test suite?
Many changes need to be tested. Please run the test suite
and include the output of ```cd test && ./problems```.
- [ ] I changed C++ code or build infrastructure.
Please run the test suite and include the output of `cd test && ./problems`.
- [ ] I changed Rust code or build infrastructure.
Please run `cargo test` and address any failures before submitting.

115
.github/workflows/checks.yml vendored Normal file
View File

@@ -0,0 +1,115 @@
name: checks
on:
push:
branches:
- develop
pull_request:
types: [opened, reopened, synchronize]
jobs:
clippy:
runs-on: ubuntu-latest
name: "Check & Clippy"
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: "1.70.0" # MSRV
override: true
- uses: actions-rs/cargo@v1.0.3
with:
command: check
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
name: "Clippy Results"
mdbook:
runs-on: ubuntu-latest
name: "Documentation"
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
# if this changes, change it in .github/workflows/publish-docs.yml as well
mdbook-version: '0.4.10'
- run: mdbook test taskchampion/docs
- run: mdbook build taskchampion/docs
fmt:
runs-on: ubuntu-latest
name: "Formatting"
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt
toolchain: stable
override: true
- uses: actions-rs/cargo@v1.0.3
with:
command: fmt
args: --all -- --check
codegen:
runs-on: ubuntu-latest
name: "codegen"
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: "1.70.0" # MSRV
override: true
- uses: actions-rs/cargo@v1.0.3
with:
command: run
args: --package xtask -- codegen
- name: check for changes
run: |
if ! git diff; then
echo "Generated code not up-to-date;
run `cargo run --package xtask -- codegen` and commit the result";
exit 1;
fi

53
.github/workflows/docker-image.yaml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Taskwarrior Docker image
on:
workflow_dispatch:
workflow_run:
workflows: [tests]
branches:
- develop
- stable
types:
- completed
env:
REGISTRY: "ghcr.io"
jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install cosign
uses: sigstore/cosign-installer@v3.5.0
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Taskwarrior Docker image
id: build-and-push
uses: docker/build-push-action@v5.3.0
with:
context: .
file: "./docker/task.dockerfile"
push: true
tags: ${{ env.REGISTRY }}/${{ github.actor }}/task:${{ github.ref_name }}
- name: Sign the published Docker image
env:
COSIGN_EXPERIMENTAL: "true"
run: cosign sign ${{ env.REGISTRY }}/${{ github.actor }}/task@${{ steps.build-and-push.outputs.digest }}

31
.github/workflows/publish-docs.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: docs
on:
push:
branches:
- develop
permissions:
contents: write
jobs:
mdbook-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
# if this changes, change it in .github/workflows/checks.yml as well
mdbook-version: '0.4.10'
- run: mdbook build taskchampion/docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./taskchampion/docs/book
destination_dir: taskchampion

83
.github/workflows/rust-tests.yml vendored Normal file
View File

@@ -0,0 +1,83 @@
name: tests - rust
on:
push:
branches:
- develop
pull_request:
types: [opened, reopened, synchronize]
jobs:
## Run the `taskchampion` crate's tests with various combinations of features.
features:
strategy:
matrix:
features:
- ""
- "server-sync"
name: "taskchampion ${{ matrix.features == '' && 'with no features' || format('with features {0}', matrix.features) }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ubuntu-latest-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ubuntu-latest-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: test
run: cargo test -p taskchampion --no-default-features --features "${{ matrix.features }}"
## Run all TaskChampion crate tests, using both the minimum supported rust version
## and the latest stable Rust.
test:
strategy:
matrix:
rust:
- "1.70.0" # MSRV
- "stable"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
name: "rust ${{ matrix.rust }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: "${{ matrix.rust }}"
override: true
- name: test
run: cargo test

20
.github/workflows/security.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: security
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
audit:
runs-on: ubuntu-latest
permissions: write-all
name: "Audit Rust Dependencies"
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,54 +1,97 @@
## Run the Taskwarrior tests, using stable rust to build TaskChampion.
name: tests
on: [push, pull_request]
jobs:
# MacOS tests do not run in Docker, and use the actions-rs Rust installaction
tests-macos-12:
name: tests (Mac OS 12.latest)
if: false # see #3242
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: "stable"
override: true
- name: Test MacOS
run: bash test/scripts/test_macos.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests-macos-13:
name: tests (Mac OS 13.latest)
if: false # see #3242
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: "stable"
override: true
- name: Test MacOS
run: bash test/scripts/test_macos.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests:
strategy:
fail-fast: false
matrix:
include:
- name: "Centos 8"
- name: "Fedora 38"
runner: ubuntu-latest
dockerfile: centos8
- name: "Fedora 32"
dockerfile: fedora38
- name: "Fedora 39"
runner: ubuntu-latest
dockerfile: fedora32
- name: "Fedora 33"
runner: ubuntu-latest
dockerfile: fedora33
- name: "Fedora 34"
runner: ubuntu-latest
dockerfile: fedora34
- name: "Fedora 35"
runner: ubuntu-latest
dockerfile: fedora35
dockerfile: fedora39
- name: "Debian Testing"
runner: ubuntu-latest
dockerfile: debiantesting
- name: "Ubuntu 18.04"
runner: ubuntu-latest
dockerfile: ubuntu1804
- name: "Ubuntu 20.04"
runner: ubuntu-latest
dockerfile: ubuntu2004
- name: "Ubuntu 21.04"
- name: "Ubuntu 22.04"
runner: ubuntu-latest
dockerfile: ubuntu2104
- name: "Ubuntu 21.10"
dockerfile: ubuntu2204
- name: "OpenSUSE Tumbleweed (Rolling)"
runner: ubuntu-latest
dockerfile: ubuntu2110
- name: "OpenSUSE 15"
runner: ubuntu-latest
dockerfile: opensuse15
dockerfile: opensuse
- name: "Archlinux Base (Rolling)"
runner: ubuntu-latest
dockerfile: arch
- name: "Mac OS X 10.13"
runner: macos-latest
dockerfile: osx
runs-on: ${{ matrix.runner }}
continue-on-error: ${{ matrix.continue-on-error == true }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build ${{ matrix.name }}
env:
DOCKER_REGISTRY: docker.pkg.github.com
@@ -56,9 +99,10 @@ jobs:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER: ${{ matrix.dockerfile }}
run: if [[ $CONTAINER != "osx" ]]; then docker-compose build test-$CONTAINER ; fi
run: docker-compose build test-$CONTAINER
- name: Test ${{ matrix.name }}
run: if [[ $CONTAINER != "osx" ]]; then docker-compose run test-$CONTAINER; else bash test/scripts/test_osx.sh ; fi
run: docker-compose run test-$CONTAINER
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER: ${{ matrix.dockerfile }}

15
.gitignore vendored
View File

@@ -1,22 +1,15 @@
cmake.h
commit.h
Makefile
src/task
src/taskd
src/libtask.a
src/commands/libcommands.a
src/columns/libcolumns.a
*~
.*.swp
Session.vim
package-config/osx/binary/task
CMakeFiles
CMakeCache.txt
cmake_install.cmake
/build*/
install_manifest.txt
_CPack_Packages
CPackConfig.cmake
CPackSourceConfig.cmake
patches
*.exe
tutorials
.prove
/target/
/.idea/

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "src/libshared"]
path = src/libshared
url = https://github.com/GothenburgBitFactory/libshared.git
[submodule "src/tc/corrosion"]
path = src/tc/corrosion
url = https://github.com/corrosion-rs/corrosion.git

View File

@@ -1,16 +1,22 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
set (CMAKE_EXPORT_COMPILE_COMMANDS ON)
project (task
VERSION 3.0.1
DESCRIPTION "Taskwarrior - a command-line TODO list manager"
HOMEPAGE_URL https://taskwarrior.org/)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
include (FetchContent)
include (CheckFunctionExists)
include (CheckStructHasMember)
set (HAVE_CMAKE true)
project (task)
include (CXXSniffer)
set (PROJECT_VERSION "2.6.2")
OPTION (ENABLE_WASM "Enable 'wasm' support" OFF)
if (ENABLE_WASM)
@@ -18,15 +24,6 @@ if (ENABLE_WASM)
set(CMAKE_EXECUTABLE_SUFFIX ".js")
endif (ENABLE_WASM)
OPTION (ENABLE_SYNC "Enable 'task sync' support" ON)
if (ENABLE_SYNC)
set (USE_GNUTLS ON CACHE BOOL "Build gnutls support." FORCE)
else (ENABLE_SYNC)
set (USE_GNUTLS OFF CACHE BOOL "Build gnutls support." FORCE)
message (WARNING "ENABLE_SYNC=OFF. Not building sync support.")
endif (ENABLE_SYNC)
message ("-- Looking for libshared")
if (EXISTS ${CMAKE_SOURCE_DIR}/src/libshared/src)
message ("-- Found libshared")
@@ -66,19 +63,8 @@ SET (TASK_DOCDIR share/doc/task CACHE STRING "Installation directory for doc fi
SET (TASK_RCDIR "${TASK_DOCDIR}/rc" CACHE STRING "Installation directory for configuration files")
SET (TASK_BINDIR bin CACHE STRING "Installation directory for the binary")
if (USE_GNUTLS)
message ("-- Looking for GnuTLS")
find_package (GnuTLS)
if (GNUTLS_FOUND)
set (HAVE_LIBGNUTLS true)
set (TASK_INCLUDE_DIRS ${TASK_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIR})
set (TASK_LIBRARIES ${TASK_LIBRARIES} ${GNUTLS_LIBRARIES})
endif (GNUTLS_FOUND)
endif (USE_GNUTLS)
if (ENABLE_SYNC AND NOT GNUTLS_FOUND)
message (FATAL_ERROR "Cannot find GnuTLS. Use -DENABLE_SYNC=OFF to build Taskwarrior without sync support. See INSTALL for more information.")
endif (ENABLE_SYNC AND NOT GNUTLS_FOUND)
# rust libs require these
set (TASK_LIBRARIES dl pthread)
check_function_exists (timegm HAVE_TIMEGM)
check_function_exists (get_current_dir_name HAVE_GET_CURRENT_DIR_NAME)
@@ -143,6 +129,11 @@ if (SOLARIS)
endif (NSL_LIBRARY)
endif (SOLARIS)
# Disable the Clang return-type-c-linkage warning globally. See #3225.
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage")
endif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
message ("-- Configuring cmake.h")
configure_file (
${CMAKE_SOURCE_DIR}/cmake.h.in
@@ -150,6 +141,7 @@ configure_file (
add_subdirectory (src)
add_subdirectory (src/commands)
add_subdirectory (src/tc)
add_subdirectory (src/columns)
add_subdirectory (doc)
add_subdirectory (scripts)
@@ -160,7 +152,7 @@ if (EXISTS performance)
add_subdirectory (performance EXCLUDE_FROM_ALL)
endif (EXISTS performance)
set (doc_FILES NEWS ChangeLog README.md INSTALL AUTHORS COPYING LICENSE)
set (doc_FILES ChangeLog README.md INSTALL AUTHORS COPYING LICENSE)
foreach (doc_FILE ${doc_FILES})
install (FILES ${doc_FILE} DESTINATION ${TASK_DOCDIR})
endforeach (doc_FILE)
@@ -177,15 +169,15 @@ add_custom_command(OUTPUT run-reproduce
)
add_custom_target(reproduce DEPENDS run-reproduce)
add_custom_command(OUTPUT show-problems
COMMAND cd test && ./problems
)
add_custom_target(problems DEPENDS show-problems)
# ---
set (CPACK_SOURCE_GENERATOR "TGZ")
set (CPACK_SOURCE_PACKAGE_FILE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION})
set (CPACK_SOURCE_IGNORE_FILES "CMakeCache" "CMakeFiles" "CPackConfig" "CPackSourceConfig"
"_CPack_Packages" "cmake_install" "install_manifest" "Makefile$"
"test" "package-config" "misc/*" "src/task$" "src/calc$" "performance"
"src/libtask.a" "src/columns/libcolumns.a" "src/commands/libcommands.a"
"swp$" "src/lex$" "task-.*.tar.gz" "commit.h" "cmake.h$" "\\\\.gitmodules"
"src/libshared/\\\\.git" ".github/" ".*\\\\.gitignore$"
"src/liblibshared.a" "docker-compose.yml" "\\\\.git/")
set (CPACK_SOURCE_IGNORE_FILES "build" "test" "misc/*" "performance" "swp$" "src/lex$" "task-.*.tar.gz"
"commit.h" "cmake.h$" "\\\\.gitmodules" "src/libshared/\\\\.git" ".github/" ".*\\\\.gitignore$" "docker-compose.yml" "\\\\.git/")
include (CPack)

2334
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

42
Cargo.toml Normal file
View File

@@ -0,0 +1,42 @@
[workspace]
members = [
"taskchampion/taskchampion",
"taskchampion/lib",
"taskchampion/integration-tests",
"taskchampion/xtask",
]
resolver = "2"
# src/tc/rust is just part of the TW build and not a public crate
exclude = [ "src/tc/rust" ]
# All Rust dependencies are defined here, and then referenced by the
# Cargo.toml's in the members with `foo.workspace = true`.
[workspace.dependencies]
anyhow = "1.0"
byteorder = "1.5"
cc = "1.0.73"
chrono = { version = "^0.4.22", features = ["serde"] }
ffizz-header = "0.5"
flate2 = "1"
google-cloud-storage = { version = "0.15.0", default-features = false, features = ["rustls-tls", "auth"] }
lazy_static = "1"
libc = "0.2.136"
log = "^0.4.17"
pretty_assertions = "1"
proptest = "^1.4.0"
ring = "0.17"
rstest = "0.17"
rusqlite = { version = "0.29", features = ["bundled"] }
serde_json = "^1.0"
serde = { version = "^1.0.147", features = ["derive"] }
strum = "0.25"
strum_macros = "0.25"
tempfile = "3"
tokio = { version = "1", features = ["rt-multi-thread"] }
thiserror = "1.0"
ureq = { version = "^2.9.0", features = ["tls"] }
uuid = { version = "^1.8.0", features = ["serde", "v4"] }
url = { version = "2" }

View File

@@ -1,4 +1,71 @@
------ current release ---------------------------
3.0.1 -
- Fix an error in creation of the 3.0.0 tarball which caused builds to fail (#3302)
- Improvements to `task news`, including notes for the 3.0.0 release
- Minor improvements to documentation and error handling
- Fix incorrect task ID of 0 when using hooks (#3339)
- Issue a warning if .data files remain (#3321)
------ old releases ------------------------------
3.0.0 -
- [BREAKING CHANGE] the sync functionality has been rewritten entirely, and
no longer supports taskserver/taskd. Instead, the recommended solution is
a cloud-storage backend, although `taskchampion-sync-server` is also
available.
See https://taskwarrior.org/docs/upgrade-3/ for information on upgrading to
Taskwarrior 3.0.
The following config options are no longer supported:
- `debug.tls`
- `taskd.ca`
- `taskd.certificate`
- `taskd.ciphers`
- `taskd.credentials`
- `taskd.key`
- `taskd.server`
- `taskd.trust`
The Taskwarrior build no longer requires GnuTLS. The build option
`ENABLE_SYNC=OFF` is also no longer supported; sync support is always built
in.
Deep thanks to the following for contributions to this work:
- Akash Shanmugaraj
- Andrew Savchenko
- Dathan Bennett
- Dustin Mitchell
- dbr/Ben
- Felix Schurk
- Isaac Wyatt
- Nathan Luong
- Nikos Koukis
- Pablo Baeyens
- Ravi Sawlani
- ryneeverett
- Simon Fraser
- TW #2732 Fix urgency inheritance for negative-urgency tasks.
Thanks to Jackson Abascal for contributing.
- TW #2763 `task show` now shows `hooks.location.
Thanks to rollniak for reporting and sec65 for contributing.
- TW #2765 Fix leading space before urgency value in `task info`.
Thanks to Dominik Rehák for contributing.
- TW #2780 Fix formatting of countdown-style dates
Thanks to Dominik Rehák for contributing.
- TW #2826 Fix issue with filter not applied correctly during `task _tags` command
Thanks to Nikos Koukis for contributing.
- TW #3052 Parsing of timestamp values now uses 64-bit integers, avoiding
issues in the year 2032.
Thanks to Bernhard M. Wiedemann for contributing.
- TW #3068 Fix fish completion.
Thanks to Michal Koutný for contributing.
2.6.2 -
- TW #502 Sequence of IDs doesn't work with attribute "depends"
@@ -175,8 +242,6 @@
Thanks to bharatvaj for contributing.
- TW #2581 Config entry with a trailing comment cannot be modified
------ old releases ------------------------------
2.5.3 (2021-01-05) - 2f47226f91f0b02f7617912175274d9eed85924f
- #2375 task hangs then dies when certain tasks are present in a report

View File

@@ -1,146 +1 @@
# How to Build Taskwarrior
## Satisfy the Requirements:
* CMake 3.0 or later
* gcc 7.0 or later, clang 6.0 or later, or a compiler with full C++17 support
* libuuid (if not on macOS)
* gnutls (optional)
* python 3 (optional, for running the test suite)
## Obtain and build code:
```
$ git clone --recursive https://github.com/GothenburgBitFactory/taskwarrior taskwarrior.git
$ cd taskwarrior.git
$ git checkout develop # Latest dev branch
$ git submodule init # This is now done by cmake as a test
$ git submodule update # Update the libhsared.git submodule
$ cmake -DCMAKE_BUILD_TYPE=debug . # debug or release. Default: neither
$ make VERBOSE=1 -j4 # Shows details, builds using 4 jobs
# Alternately 'export MAKEFLAGS=-j 4'
```
## Running Test Suite:
```
$ cd test
$ make VERBOSE=1 # Shows details
$ ./run_all # Runs all tests silently > all.log
$ ./problems # Enumerate test failures in all.log
```
Note that any development should be performed using a git clone, and the
current development branch. The source tarballs do not reflect HEAD, and do
not contain the test suite.
If you send a patch (support@gothenburgbitfactory.org), make sure that patch is made
against git HEAD on the development branch. We cannot apply patches made
against the tarball source, or master.
# General Statement
This file is intended to convey the current efforts, priorities and needs of
the code base. It is for anyone looking for a way to start contributing.
Here are many ways to contribute that may not be obvious:
* Use Taskwarrior, become familiar with it, and make suggestions. There are
always ongoing discussions about new features and changes to existing
features.
* Join us in the #taskwarrior IRC channel on freenode.net or libera.chat.
Many great ideas, suggestions, testing and discussions have taken place
there. It is also the quickest way to get help, or confirm a bug.
* Review documentation: there are man pages, online articles, tutorials and
so on, and these may contain errors, or they may not convey ideas in the
best way. Perhaps you can help improve it. Contact us - documentation is
a separate effort from the code base, and includes all web sites, and all
are available as git repositories.
* Take a look at the bug database, and help triage the bug list. This is a
review process that involves confirming bugs, providing additional data,
information or analysis. Bug triage is very useful and much needed. You
could check to see that an old bug is still relevant - sometimes they are
not.
* Review the source code, and point out inefficiencies, problems, unreadable
functions, bugs and assumptions.
* Fix a bug. For this you'll need C++ and Git skills. We welcome all bug
fixes, provided the work is done well and doesn't create other problems or
introduce new dependencies. We recommend talking to us before starting.
Seriously.
* Add unit tests. Unit tests are possibly the most useful contributions of
all, because they not only improve the quality of the code, but prevent
future regressions, therefore maintaining quality of subsequent releases.
Plus, broken tests are a great motivator for us to fix the causal defect.
You'll need Python skills.
* Add a feature. Well, let's be very clear about this: adding a feature is
not usually well-received, and if you add a feature and send a patch, it
will most likely be rejected. The reason for this is that there are many
efforts under way, in various code branches. There is a very good chance
that the feature you add is either already in progress, or being done in a
way that is more fitting when considering other work in progress. So if
you want to add a feature, please don't. Start by talking to us, and find
out what is currently under way or planned. You might find that we've
already rejected such a feature for some very good reasons. So please
check first, so we don't duplicate effort or waste anyone's time.
* Spread the word. Help others become more effective at managing tasks.
* Encouragement. Tell us what works for you, and what doesn't. Tell us about
your methodology for managing tasks. It's all useful information.
* Request a feature. This not only tells us that you think something is
missing from the software, but gives us insights into how you use it.
Plus, you might get your feature implemented.
# Unit Tests Needed
There are always more unit tests needed. More specifically, better unit tests
are always needed. The convention is that there are four types of unit test:
1. High level tests that exercise large features, or combinations of commands.
For example, dependencies.t runs through a long list of commands that test
dependencies, but do so by using 'add', 'modify', 'done' and 'delete'.
1. Regression tests that ensure certain bugs are fixed and stay fixed. These
tests are named tw-NNNN.t where NNNN refers to the bug number. While it is
not worth creating tests for small fixes like typos, it is for logic
changes.
1. Small feature tests. When small features are added, we would like small,
low-level feature tests named feature.t, with a descriptive name and
focused tests.
1. Code tests. These are tests written in C++ that exercise C++ objects, or
function calls. These are the lowest level tests. It is important that
these kind of tests be extensive and thorough, because the software depends
on this code the most.
The tests are written in Python, Bash and C++, and all use TAP.
## Tests needed
* Take a look at the bug database (https://github.com/GothenburgBitFactory/taskwarrior/issues)
and notice that many issues, open and closed, have the "needsTest" label.
These are things that we would like to see in the test suite, as regression
tests.
All new unit tests should follow the test/template.t standard.
# Patches
Patches are encouraged and welcomed. Either send a pull request on Github or
email a patch to support@taskwarrior.org. A good patch:
* Maintains the MIT license, and does not contain code lifted from other
sources. You will have written 100% of the code in the patch, otherwise
we cannot maintain the license.
* Precisely addresses one issue only.
* Doesn't break unit tests. This means yes, run the unit tests.
* Doesn't introduce dependencies.
* Is accompanied by new or updated unit tests, where appropriate.
* Is accompanied by documentation changes, where appropriate.
* Conforms to the prevailing coding standards - in other words, it should
fit in with the existing code.
A patch may be rejected for violating any of the above rules, and more.
Bad patches may be accepted and modified depending on work load and mood. It
is possible that a patch may be rejected because it conflicts in some way with
plans or upcoming changes. Check with us first, before sinking time and effort
into a patch.
See [Developing Taskwarrior](./doc/devel/contrib/README.md).

17
INSTALL
View File

@@ -20,7 +20,6 @@ You will need a C++ compiler that supports full C++17, which includes:
You will need the following libraries:
- libuuid (not needed for OSX)
- gnutls (can be optional - see '"sync" command' below)
Basic Installation
@@ -89,20 +88,6 @@ get absolute installation directories:
CMAKE_INSTALL_PREFIX/TASK_MAN5DIR /usr/local/share/man/man5
"sync" command
--------------
By default, GnuTLS support is required, which enables the "sync" command.
For Debian based distributions, installing "libgnutls-dev" is sufficient.
In order to build Taskwarrior without "sync" support, call cmake with the
"-DENABLE_SYNC=OFF" flag:
$ cmake . -DENABLE_SYNC=OFF
and proceed as described in "Basic Installation".
Uninstallation
--------------
@@ -161,7 +146,7 @@ OpenBSD
WASM
Using the Emscripten compiler, you can achieve it like this:
cmake -DCMAKE_CXX_COMPILER=emcc -DENABLE_SYNC=OFF -DCMAKE_BUILD_TYPE=release -DENABLE_WASM=ON \
cmake -DCMAKE_CXX_COMPILER=emcc -DCMAKE_BUILD_TYPE=release -DENABLE_WASM=ON \
-DCMAKE_EXE_LINKER_FLAGS="-m32 -s NO_DYNAMIC_EXECUTION=1 -s WASM=1 -s NO_EXIT_RUNTIME=1 -s INVOKE_RUN=0" \
-DCMAKE_CXX_FLAGS_RELEASE="-O2 -m32"

152
NEWS
View File

@@ -1,152 +0,0 @@
New Features in Taskwarrior 2.6.0
- The logic behind new-uuid verbosity option changed. New-uuid now overrides
new-id if set and will cause Taskwarrior to display UUIDs instead of IDs
for new tasks (machine friendly).
- If ~/.taskrc is not found, Taskwarrior will look for its configuration in
$XDG_CONFIG_HOME/task/taskrc (defaulting to ~/.config/task/taskrc). This
allows users to setup their Taskwarrior to follow XDG standard without
using config overrides.
- Newer Unicode characters, such as emojis are correctly handled and displayed.
Taskwarrior now supports all Unicode characters up to Unicode 12.
- Datetime values until year 9999 are now supported.
Duration values of up to 1 000 000 years are now supported.
- 64-bit numeric values (up to 9,223,372,036,854,775,807) are now supported.
- Later/someday named datetime values now resolve to 9999-12-30 (instead of
2038-01-18).
- Calendar now supports displaying due dates until year 9999.
- Calendar now displays waiting tasks with due dates on the calendar.
- Calendar supports highlighting days with scheduled tasks.
- Multi-day holidays are now supported.
- Holiday data files for fr-CA, hu-HU, pt-BR, sk-SK and sv-FI locales are now
generated and shipped with Taskwarrior.
- The task edit command can now handle multi-line annotations and UDAs in a
user friendly way, withouth having to handle with JSON escaping of special
chars.
- A large portion of currently known parser-related issues was fixed.
- The taskrc file now supports relative paths, which are evaluated with
respect to (a) current directory, (b) taskrc directory and (c) now also the
installation directory of configuration files.
- The currently selected context is now applied for "task add" and "task log"
commands. Section on contexts in the manpage was updated to describe this
functionality.
- Users can specify per-context specific overrides of configuration variables.
- The `task import` command can now accept annotations with missing entry
values. Current time will be assumed.
- The new 'by' filter attribute modifier compares using '<=' rather than '<'
as 'before' uses. This allows the last second of the day to match with
'due.by:eod', which it would not otherwise. It also works with
whole units like days, e.g. 'add test due:2021-07-17' would not match
'due.before:tomorrow' (on the 16th), but would match 'due.by:tomorrow'.
- Waiting is now an entirely "virtual" concept, based on a task's
'wait' property and the current time. Task is considered "waiting" if its
wait attribute is in the future. TaskWarrior no longer explicitly
"unwaits" a task (the wait attribute is not removed once its value is in
the past), so the "unwait' verbosity token is no longer available.
This allows for filtering for tasks that were waiting in the past
intervals, but are not waiting anymore.
- The configuration file now supports environment variables.
- Taskwarrior can now handle displaying tasks in windows with limited width,
even if columns contain long strings (like URLs).
- The nag message is emitted at most once per task command, even with bulk
operations. Additionally, the urgency of the task considered is taken
before the completion, not after.
- The export command now takes an optional argument that references an
existing report. As such, "task export <report>" command will export
the same tasks that "task <report>" prints, and in the same order.
- The burndown command now supports non-cumulative display, where tasks only
get plotted within the interval segment when they got completed.
New Commands in Taskwarrior 2.6.0
- The 'news' command will guide the user through important release notes
anytime a new version of Taskwarrior is installed. It provides personalized
feedback, deprecation warnings and usage advice, where applicable.
New Configuration Options in Taskwarrior 2.6.0
- The context definitions for reporting commmands are now stored in
"context.<name>.read". Context definitions for write commands are now
supported using "context.<name>.write" configuration variable.
- The context-specific configuration overrides are now supported. Use
context.<name>.rc.<key>=<value> to override, such as
context.work.rc.urgency.blocking=5.0 to override the value of urgency.blocking
when the 'work' context is active.
- Each report (and the timesheet command) can explicitly opt-out from the
currently active context by setting the report.<name>.context variable to 0
(defaults to 1). Useful for defining universal reports that ignore
currently set context, such as 'inbox' report for GTD methodology.
- Multi-day holidays are now supported. Use holiday.<name>.start=<date> and
holiday.<name>.end=<date> to specify a range-based holiday, such as a
vacation.
- Verbosity token 'default' was introduced in order to display information
about default actions.
- The new burndown.cumulative option can be used to toggle between
non-cumulative and cumulative version of the burndown command.
- The new color.calendar.scheduled setting can be used to control the
highlighting color of days in the calendar that have scheduled tasks.
Newly Deprecated Features in Taskwarrior 2.6.0
- The 'PARENT' and 'CHILD' virtual tags are replaced by 'TEMPLATE' and 'INSTANCE'.
- The 'waiting' status is now deprecated. We recommend using +WAITING virtual tag
or wait-attribute based filters, such as 'wait.before:eow' instead.
- The configuration variable 'monthsperline' is deprecated. Please use
'calendar.monthsperline' instead.
Fixed regressions in 2.6.0
- The "end of <date>" named dates ('eod', 'eow', ...) were pointing to the
first second of the next day, instead of last second of the referenced
interval. This was a regression introduced in 2.5.2.
- The "eow" and "eonw" were using a different weekday as a reference. This
was a regeression introduced in 2.5.2.
- The rc.verbose=<value> configuration override was applied only if it were
the first configuration override. In #2247, this manifested itself as
inability to supress footnotes about the overrides, and in #1953 as failure
to force task to display UUIDs of on task add. This was a regression
introduced in 2.5.2.
- The attribute values of the form "<attribute name>-<arbitrary string>", for
example "due-nextweek" or "scheduled-work" would fail to parse (see
#1913). This was a regression introduced in 2.5.1.
- The capitalized versions of named dates (such as Monday, February or
Tomorrow) are again supported. This was a regression introduced in 2.5.2.
- The duration periods are converted to datetime values using the
current time as the anchor, as opposed to the beginning of unix time.
This was a regression in 2.5.2.
- Filtering for attribute values containing dashes and numbers (such as
'vs.2021-01', see #2392) or spaces (such as "Home renovation", see #2388)
is again supported. This was a regression introduced in 2.4.0.
Removed Features in 2.6.0
-
Other notable changes in 2.6.0
- C++17 compatible compiler is now required (GCC 7.1 or older / clang 5.0 or older).
Known Issues
- https://github.com/GothenburgBitFactory/taskwarrior
Taskwarrior 2.6.0 has been built and tested on the following configurations:
* Archlinux
* OpenSUSE
* macOS 10.15
* Fedora (31, 32, 33, 34)
* Ubuntu (18.04, 20.04, 21.04)
* Debian (Stable, Testing)
* CentOS (7, 8)
However, we expect Taskwarrior to work on other platforms as well.
---
While Taskwarrior has undergone testing, bugs are sure to remain. If you
encounter a bug, please enter a new issue at:
https://github.com/GothenburgBitFactory/taskwarrior

View File

@@ -6,7 +6,6 @@
[![Release date](https://img.shields.io/github/release-date/GothenburgBitFactory/taskwarrior)](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/GothenburgBitFactory?color=green)](https://github.com/sponsors/GothenburgBitFactory/)
</br>
[![Twitter](https://img.shields.io/twitter/follow/taskwarrior?style=social)](https://twitter.com/taskwarrior)
</div>
## Taskwarrior
@@ -20,7 +19,7 @@ with an active and quite vast [ecosystem of tools, hooks and
extensions](https://taskwarrior.org/tools/).
## Install
[![Arch](https://img.shields.io/archlinux/v/community/x86_64/task)](https://archlinux.org/packages/community/x86_64/task/)
[![Arch](https://img.shields.io/archlinux/v/extra/x86_64/task)](https://archlinux.org/packages/extra/x86_64/task/)
[![Debian](https://img.shields.io/debian/v/task/testing)](https://packages.debian.org/search?keywords=task&searchon=names&suite=all&section=all)
[![Fedora](https://img.shields.io/fedora/v/task)](https://bodhi.fedoraproject.org/updates/?packages=task)
[![Homebrew](https://img.shields.io/homebrew/v/task)](https://formulae.brew.sh/formula/task#default)
@@ -31,17 +30,13 @@ Windows](https://taskwarrior.org/download/). Check out the latest available
packages in repositories of your OS distribution of choice [on
Repology](https://repology.org/project/taskwarrior/versions).
Alternatively, you can build Taskwarrior from source.
Alternatively, you can [build Taskwarrior from source](doc/devel/contrib).
## Documentation
The [online documentation](https://taskwarrior.org/docs), downloads, news and
more are available on our website, [taskwarrior.org](https://taskwarrior.org).
We also recommend following [@taskwarrior on
Twitter](https://twitter.com/taskwarrior), where we share info about new
features, releases and various tips and tricks for new Taskwarrior users.
## Community
[![Twitter](https://img.shields.io/twitter/follow/taskwarrior?style=social)](https://twitter.com/taskwarrior)
[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/taskwarrior?style=social)](https://reddit.com/r/taskwarrior/)
@@ -56,54 +51,8 @@ Github](https://github.com/GothenburgBitFactory/taskwarrior/discussions). For
other support options, take a look at
[taskwarrior.org/support](https://taskwarrior.org/support)
For code contributions, please use pull requests, or alternately send your code patches to
[support@gothenburgbitfactory.org](mailto:support@gothenburgbitfactory.org)
## Branching Model
We use the following branching model:
* `stable` is a branch containing the content of the latest release. Building
from here is the same as building from the latest tarball, or installing a
binary package. No development is done on the `stable` branch.
* `develop` is the current development branch. All work is done here, and upon
release it will be merged to `stable`. While development branch is not
stable, we utilize CI to ensure we're at least not merging improvements that
break existing tests, and hence should be relatively safe. We still recommend
making backups when using the development branch.
## Installing
There are many binary packages available, but to install from source requires:
* git
* cmake
* make
* C++ compiler, currently gcc 7.1+ or clang 5.0+ for full C++17 support
* libuuid
* GnuTLS (optional, required for sync)
Download the tarball, and expand it:
$ curl -O https://taskwarrior.org/download/task-2.6.2.tar.gz
$ tar xzf task-2.6.2.tar.gz
$ cd task-2.6.2
Or clone this repository:
$ git clone --recursive -b stable https://github.com/GothenburgBitFactory/taskwarrior.git
$ cd taskwarrior
Then build:
$ cmake -DCMAKE_BUILD_TYPE=release .
...
$ make
...
[$ make test]
...
$ sudo make install
For code contributions, please use pull requests.
See [Contributing to Taskwarrior](doc/devel/contrib) for more details.
## Contributing
[![Contributors](https://img.shields.io/github/contributors/GothenburgBitFactory/taskwarrior)](https://github.com/GothenburgBitFactory/taskwarrior/graphs/contributors)
@@ -112,8 +61,7 @@ Then build:
Your contributions are especially welcome.
Whether it comes in the form of code patches, ideas, discussion, bug reports, encouragement or criticism, your input is needed.
Visit [Github](https://github.com/GothenburgBitFactory/taskwarrior) and participate in the future of Taskwarrior.
See further development documentation in [`doc/devel`](./doc/devel).
## Sponsoring
[![GitHub Sponsors](https://img.shields.io/github/sponsors/GothenburgBitFactory?color=green)](https://github.com/sponsors/GothenburgBitFactory/)

View File

@@ -38,9 +38,6 @@
#cmakedefine GNUHURD
#cmakedefine UNKNOWN
/* Found the GnuTLS library */
#cmakedefine HAVE_LIBGNUTLS
/* Found tm_gmtoff */
#cmakedefine HAVE_TM_GMTOFF

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
message ("-- Configuring man pages")
set (man_FILES task-color.5 task-sync.5 taskrc.5 task.1)
foreach (man_FILE ${man_FILES})

9
doc/README.md Normal file
View File

@@ -0,0 +1,9 @@
# Documentation
This directory contains Taskwarrior documentation that is built and installed along with the executable:
* [`man`](man/) contains the source for the Taskwarrior manual pages.
* [`rc`](rc/) contains rcfiles that will be installed in `/usr/share/doc/task/rc` or equivalent.
* [`ref`](ref/) contains reference documentation that will be installed in `/usr/share/doc/task` or equivalent.
It also contains [developer documentation](devel/README.md) with a high-level view of how Taskwarrior development is done and how the pieces of the system fit together.

20
doc/devel/README.md Normal file
View File

@@ -0,0 +1,20 @@
# Development Documentation
This directory contains the _development_ documentation for Taskwarrior.
For all other documenation, see https://taskwarrior.org.
* [Contributing To Taskwarrior](contrib/README.md)
* [Taskwarrior RFCs](rfcs/README.md)
## Taskwarrior and TaskChampion
As of the 3.0 release, Taskwarrior uses TaskChampion to manage task data.
Find documentation of TaskChampion here:
* [TaskChampion README](../../taskchampion)
* [TaskChampion CONTRIBUTING guide](../../taskchampion/CONTRIBUTING.md)
* [TaskChampion Book](../../taskchampion/docs/src/SUMMARY.md)
* [TaskChampion API Documentation](https://docs.rs/taskchampion)
TaskChampion will [become its own
project](https://github.com/GothenburgBitFactory/taskwarrior/issues/3209) soon.

View File

@@ -0,0 +1,8 @@
# Contributing To Taskwarrior
* [Welcome, Open Source Contributor](first_time.md)
* [Developing Taskwarrior](development.md)
* [Coding Style](coding_style.md)
* [Branching Model](branching.md)
* [Rust and C++](rust-and-c++.md)
* [Releasing Taskwarrior](releasing.md)

View File

@@ -0,0 +1,13 @@
Software development typically requires a standardized branching model, to manage complexity and parallel efforts.
The branching model can be a source of confusion for developers, so this document describes how branching is used.
We use the following branching model:
* `develop` is the current development branch. All work is done here, and upon
release it will be branched to a release branch. While `develop` is not
stable, we utilize CI to ensure we're at least not merging improvements that
break existing tests, and hence should be relatively safe. We still recommend
making backups when using the development branch.
* The most recent minor release is in a branch named after the release, e.g., `2.7.0`.
This branch is used for bug-fixes of the latest release.

View File

@@ -0,0 +1,31 @@
# Coding Style
The coding style used for the Taskwarrior, Taskserver, and other codebases is deliberately kept simple and a little vague.
This is because there are many languages involved (C++, C, Python, sh, bash, HTML, troff and more), and specіfying those would be a major effort that detracts from the main focus which is improving the software.
Instead, the general guideline is simply this:
Make all changes and additions such that they blend in perfectly with the surrounding code, so it looks like only one person worked on the source, and that person is rigidly consistent.
To be a little more explicit:
## C++
- All functionality in C++17 is allowed.
- Indent C++ code using two spaces, no tabs
- Surround operators and expression terms with a space.
This includes a space between a function name and its list of arguments.
- No cuddled braces
- Class names are capitalized, variable names are not
## Python
Follow [PEP8](https://www.python.org/dev/peps/pep-0008/) as much as possible.
## Rust
Rust code should be formatted with `rustfmt` and generally follow Rust style guidelines.

View File

@@ -0,0 +1,79 @@
# Developing Taskwarrior
The following describes the process for developing Taskwarrior. If you are only
changing TaskChampion (Rust code), you can simply treat it like any other Rust
project: modify the source under `taskchampion/` and use `cargo test` to run
the TaskChampion tests.
See the [TaskChampion CONTRIBUTING guide](../../../taskchampion/CONTRIBUTING.md) for more.
## Satisfy the Requirements:
* CMake 3.0 or later
* gcc 7.0 or later, clang 6.0 or later, or a compiler with full C++17 support
* libuuid (if not on macOS)
* Rust 1.64.0 or higher (hint: use https://rustup.rs/ instead of using your system's package manager)
## Install Optional Dependencies:
* python 3 (for running the test suite)
* clangd or ccls (for C++ integration in many editors)
* rust-analyzer (for Rust integration in many editors)
## Obtain and Build Code:
The following documentation works with CMake 3.14 and later.
Here are the minimal steps to get started, using an out of source build directory and calling the underlying build tool over the CMake interface.
See the general CMake man pages or the [cmake-documentation](https://cmake.org/cmake/help/latest/manual/cmake.1.html) for more,
## Basic Building
```sh
git clone https://github.com/GothenburgBitFactory/taskwarrior
cd taskwarrior
cmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build build
```
Other possible build types can be `Release` and `Debug`.
This will build several executables, but the one you want is probably `src/task`, located in the `build` directory.
When you make changes, just run the last line again.
### Building a specific target
For **only** building the `task` executable, use
```sh
cmake --build build --target task_executable
```
### Building in parallel
If a parallel build is wanted use
```sh
cmake --build build -j <number-of-jobs>
```
### Building with clang as compiler
```sh
cmake -S . -B build-clang\
-DCMAKE_C_COMPILER=clang\
-DCMAKE_CXX_COMPILER=clang++
cmake --build build-clang
```
## Run the Test Suite:
First switch to the test directory:
```
$ cd build/test
```
Then you can run all tests, showing details, with
```
$ make VERBOSE=1
```
Alternately, run the tests with the details hidden in `all.log`:
```
$ ./run_all
```
Either way, you can get a summary of any test failures with:
```
$ ./problems
```
Note that any development should be performed using a git clone, and the current development branch.
The source tarballs do not reflect HEAD, and do not contain the test suite.
Follow the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow) for creating a pull request.

View File

@@ -0,0 +1,68 @@
# Welcome, Open Source Contributor
Welcome, potential new Open Source contributor! This is a guide to show you exactly how to make a contribution, and will lead you through the entire process.
There are many people who wish to start contributing, but don't know how or where to start.
If this might be the case for you, then please read on, this guide is for you.
Because we want you to join in the fun with Open Source - it can be fun and rewarding, improve your skills, or just give you a way to contribute back to a project.
## How to Help
Help is needed in all areas of Taskwarrior development - design, coding, testing, support and marketing.
Applicants must be friendly.
Perhaps you are looking to help, but don't know where to start.
Perhaps you have skills we are looking for, here are ways you may be able to help:
- Use Taskwarrior, become familiar with it, and make suggestions.
We get great feedback from both new users and veteran users.
New users have a fresh approach that we can no longer achieve, while veteran users develop clever and crafty ways to use the product.
- Report bugs and odd behavior when you see it.
We don't necessarily know it's broken, unless you tell us.
- Suggest enhancements.
We get lots of these, and it's great.
Some really good ideas have been suggested and implemented.
Sure, some are out of scope, or plain crazy, but the stream of suggestions is fascinating to think about.
- Participate in the [bug tracking](https://github.com/GothenburgBitFactory/taskwarrior/issues) database, to help others and maybe learn something yourself.
- Proofread the documentation and man pages.
- Improve the documentation.
- Improve the man pages.
- Help improve the tutorials.
Make your own tutorial.
- Confirm a bug.
Nothing gets fixed without confirmation.
- Refine a bug.
Provide relevant details, elaborate on the behavior.
- Fix a bug.
Send a patch.
For this you'll need to know some C++ or Rust, and understand the [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow).
See [Developing Taskwarrior](./development.md) for more information.
We welcome all bug fixes, provided the work is done well and doesn't create other problems or introduce new dependencies.
We recommend talking to us before starting: we are happy to help you out!
- Write a unit test.
Unit tests are possibly the most useful contributions of all, because they not only improve the quality of the code, but prevent future regressions, therefore maintaining quality of subsequent releases.
Plus, broken tests are a great motivator for us to fix the causal defect.
You'll need Python skills.
- Spread the word.
Help others become more effective at managing tasks.
Share your methodology, to inspire others.
- Encouragement.
Tell us what works for you, and what doesn't.
It's all good.
- Donate! Help offset costs.
Please remember that we need contributions from all skillsets, however small.
Every contribution helps.

View File

@@ -0,0 +1,24 @@
# Releasing Taskwarrior
To release Taskwarrior, follow this process:
- Examine the changes since the last version, and update `src/commands/CmdNews.cpp` accordingly.
There are instructions at the top of the file.
- Create a release PR
- Update version in CMakeLists.txt
- Update Changelog
- get this merged
- On `develop` after that PR merges, create a release tarball:
- `git clone . release-tarball`
- `cd release-tarball/`
- edit `Cargo.toml` to contain only `taskchampion` and `taskchampion-lib` in `members` (see https://github.com/GothenburgBitFactory/taskwarrior/issues/3294).
- `cmake -S. -Bbuild`
- `make -Cbuild package_source`
- copy build/task-*.tar.gz elsewhere and delete the `release-tarball` dir
- NOTE: older releases had a `test-*.tar.gz` but it's unclear how to generate this
- Update `stable` to the released commit and push upstream
- Tag the commit as vX.Y.Z and push the tag upstream
- Find the tag under https://github.com/GothenburgBitFactory/taskwarrior/tags and create a release from it
- Give it a clever title if you can think of one; refer to previous releases
- Include the tarball from earlier
- Add a new item in `content/news` on https://github.com/GothenburgBitFactory/tw.org

View File

@@ -0,0 +1,42 @@
# Rust and C++
Taskwarrior has historically been a C++ project, but as part of an [ongoing effort to replace its storage backend](https://github.com/GothenburgBitFactory/taskwarrior/issues/2770) it now includes a Rust library called TaskChampion.
To develop Taskwarrior, you will need both a [C++ compiler and tools](./development.md), and a [Rust toolchain](https://www.rust-lang.org/tools/install).
However, most tasks will only require you to be familiar with one of the two languages.
## TaskChampion
TaskChampion implements storage and access to "replicas" containing a user's tasks.
It defines an abstract model for this data, and also provides a simple Rust API for manipulating replicas.
It also defines a method of synchronizing replicas and provides an implementation of that method in the form of a sync server.
TaskChampion provides a C interface via the `taskchampion-lib` crate.
Other applications, besides Taskwarrior, can use TaskChampion to manage tasks.
Applications written in Rust can use the `taskchampion` crate, while those in other languages may use the `taskchampion-lib` crate.
Taskwarrior is just one application using the TaskChampion interface.
You can build TaskChampion locally by simply running `cargo build` in the root of this repository.
The implementation, including more documentation, is in the [`rust`](../../rust) subdirectory.
## Taskwarrior's use of TaskChampion
Taskwarrior's interface to TaskChampion has a few layers:
* The skeletal Rust crate in [`src/tc/rust`](../../src/tc/rust) brings the symbols from `taskchampion-lib` under CMake's management.
The corresponding header file is included from [`taskchampion/lib`](../../taskchampion/lib).
All of these symbols are placed in the C++ namespace, `tc::ffi`.
* C++ wrappers for the types from `taskchampion-lib` are defined in [`src/tc`](../../src/tc), ensuring memory safety (with `unique_ptr`) and adding methods corresponding to the Rust API's methods.
The wrapper types are in the C++ namespace, `tc`.
## WARNING About Dependency Tracking
CMake cannot detect changes to Rust files in under the `taskchampion/` directory.
Running `make` after these files are changed will not incorporate the changes into the resulting executables.
To force re-compilation of the Rust dependencies:
```
rm -rf src/tc/rust/x86_64-unknown-linux-gnu/debug/libtc_rust.a
make
```
You may need to adjust the `x86_64-unknown-linux-gnu` part of that command depending on what system you are using for development.

18
doc/devel/rfcs/README.md Normal file
View File

@@ -0,0 +1,18 @@
# Taskwarrior RFCS
In the mid-2010's, Taskwarrior development was organized around RFCs, as a way to invite comment before designs were finalized.
Although these documents were less formal than [IETF RFCs](https://www.ietf.org/rfc) they serve a similar purpose.
In more recent years, use of RFCs has been discontinued, and the documents linked here should be considered historical.
Many were never completely implemented.
* [General Plans](plans.md)
* [Rules System](rules.md)
* [Full DOM Support ](dom.md)
* [Work Week Support](workweek.md)
* [Recurrence](recurrence.md)
* [Taskwarrior JSON Format](task.md)
* [CLI Updates ](cli.md)
* [Taskserver Sync Protocol](protocol.md)
* [Taskserver Message Format](request.md)
* [Taskserver Sync Algorithm](sync.md)
* [Taskserver Client](client.md)

154
doc/devel/rfcs/cli.md Normal file
View File

@@ -0,0 +1,154 @@
---
title: "Taskwarrior - Command Line Interface"
---
## Work in Progress
This design document is a work in progress, and subject to change. Once finalized, the feature will be scheduled for an upcoming release.
# CLI Syntax Update
The Taskwarrior command line syntax is being updated to allow more consistent and predictable results, while making room for new features.
Adding support for arbitrary expressions on the command line has become complicated because of the relaxed syntax of Taskwarrior. While the relaxed syntax allows for a very expressive command line, it also creates ambiguity for the parser, which needs to be reduced.
With some limited and careful changes it will be possible to have a clear and unambiguous command line syntax, which means a predictable and deterministic experience.
It should be stated that for straightforward and even current usage patterns, the command line will likely not change for you. Another goal is to not require changes to 3rd-party software, where possible. Only the more advanced and as-yet unintroduced features will require a more strict syntax. This is why now is an ideal time to tighten the requirements.
## Argument Types
The argument types supported remain the same, adding some new constructs.
* Config file override
* `rc:<file>`
* Configuration override
* `rc:<name>:<value>` Literal value
* `rc:<name>=<value>` Literal value
* `rc:<name>:=<value>` Calculated value
* Tag
* `+<tag>`
* `-<tag>`
* `'+tag one'` Multi-word tag
* Attribute modifier
* `rc:<name>.<modifier>:<value>`
* Modifier is one of:
* `before`
* `after`
* `under`
* `over`
* `above`
* `below`
* `none`
* `any`
* `is`
* `isnt`
* `equals`
* `not`
* `contains`
* `has`
* `hasnt`
* `left`
* `right`
* `startswith`
* `endswith`
* `word`
* `noword`
* Search pattern
* `/<pattern>/`
* Substitution
* `/<from>/<to>/`
* `/<from>/<to>/g`
* Command
* `add`
* `done`
* `delete`
* `list`
* etc.
* Separator
* `--`
* ID Ranges
* `<id>[-&ltid>][,<id>[-&ltid>]...]`
* UUID
* `<uuid>`
* Everything Else
* `<word>`
* `'<word> <word> ...'`
## New Command Line Rules
Certain command line constructs will no longer be supported, and this is imposed by the new rules:
1. Each command line argument may contain only one instance of one argument type, unless that type is `<word>`.
task add project:Home +tag Repair the thing # Good
task add project:Home +tag 'Repair the thing' # Good
task add 'project:Home +tag Repair the thing' # Bad
Putting two arguments into one quoted arg makes that arg a `<word>`.
2. If an argument type contains spaces, it must either be quoted or escaped.
task add project:'Home & Garden' ... # Good
task add 'project:Home & Garden' ... # Good
task add project:Home\ \&\ Garden ... # Good
task add project:Home' & 'Garden ... # Good
task add project:Home \& Garden ... # Bad
The parser will not combine multiple arguments, for example:
task '/one two/' list # Good
task /one two/ list # Bad
task /'one two'/ list # Bad, unless ' is part of the pattern
3. By default, *no* calculations are made, unless the `:=` eval operator is used, and if so, the whole argument may need to be quoted or escaped to satisfy Rule 1.
task add project:3.project+x # Literal
task add project:=3.project+x # DOM reference + concatenation
4. Bare word search terms are no longer supported.
Use the pattern type argument instead.
task /foo/ list # Good
task foo list # Bad
5. Expressions must be a series of arguments, not a quoted string.
task urgency \< 5.0 list # Good
task 'urgency < 5.0 list' # Bad
## Other Changes
Aside from the command line parser, there are other changes needed:
- Many online documents will need to be modified.
- Filters will be automatically parenthesized, so that every command line will now looke like:
task [overrides] [(cli-filter)] [(context-filter)] [(report-filter)] command [modifications]
- There will be more errors when the command line is not understood.
- Ambiguous ISO date formats are dropped.
YYYYMMDD # Bad
YYYY-MM-DD # Good
hhmmss # Bad
hh:mm:ss # Good
- The tutorial videos will be even more out of date, and will be replaced by a large number of smaller demo 'movies'.

392
doc/devel/rfcs/client.md Normal file
View File

@@ -0,0 +1,392 @@
---
title: "Taskwarrior - Creating a Taskserver Client"
---
# Creating a Taskserver Client
A Taskserver client is a todo-list manager.
It may be as simple as a program that captures a single task, as complex as Taskwarrior, or anything in between.
It can be a mobile client, a web application, or any other type of program.
This document describes how such a client would interact with the server.
A client to the Taskserver is a program that manages a task list, and wishes to exchange data with the server so that the task list may be shared.
In order to do this, a client must store tasks locally, upload local changes, download remote changes, and apply remote changes to the local tasks.
The client must consider that there may be no network connectivity, or no desire by the user to synchronize.
The client will need proper credentials to talk to the server.
## Requirements
In this document, we adopt the convention discussed in Section 1.3.2 of [RFC1122](https://tools.ietf.org/html/rfc1122#page-16) of using the capitalized words MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, and OPTIONAL to define the significance of each particular requirement specified in this document.
In brief: "MUST" (or "REQUIRED") means that the item is an absolute requirement of the specification; "SHOULD" (or "RECOMMENDED") means there may exist valid reasons for ignoring this item, but the full implications should be understood before doing so; and "MAY" (or "OPTIONAL") means that this item is optional, and may be omitted without careful consideration.
## Taskserver Account
A Taskserver account must be created.
This process creates a storage area, and generates the necessary credentials.
## Credentials
A Taskserver client needs the following credentials in order to communicate with a server:
- Server address and port
- Organization name
- User name
- Password
- Certificate
- Key
The server address and port are the network location of the server.
An example of this value is:
foo.example.com:53589
In addition to a DNS name, this can be an IPv4 or IPv6 address.
The organization name is an arbitrary grouping, and is typically 'PUBLIC', reflecting the individual nature of server accounts.
Future capabilities will provide functionality that support groups of users, called an organization.
The user name is the full name.
This will be the name used to identify other users in an organization, in a future release.
Example 'John Doe'.
The password is a text string generated by the server at account creation time.
It should be considered a secret.
The certificate is an X.509 PEM file generated by the server at account creation time.
This is used for authentication.
It should be considered a secret.
The key is an X.509 PEM file generated by the server at account creation time.
This is used for encryption.
It should be considered a secret.
These credentials need to be stored on the client, and used during the sync operation.
## Description of a Taskserver Client
This section describes how a client might behave in order to facilitate integration with the Taskserver.
## Encryption
The Taskserver only communicates using encryption.
Therefore all user data is encrypted while in transit.
The Taskserver currently uses [GnuTLS](https://gnutls.org) to support this encryption, and therefore supports the following protocols:
- SSL 3.0
- TLS 1.0
- TLS 1.1
- TLS 1.2
The client may use any library that supports the above.
## Configuration
The client needs to store configuration, which matches the credentials needed for Taskserver communication.
See section 2.1 "Credentials".
The credentials may not be modified by the user without losing server access.
The server:port data may need to be changed automatically following a redirect response from the server.
See section 5 "Server Errors".
## Local Storage
The client needs to store task data locally.
The client will need to be able to find tasks by their UUID and overwrite them.
Uploaded and downloaded task changes will use the [Taskwarrior Data Interchange Format](/docs/design/task).
## Local Changes
Whenever local data is modified, that change MUST be synced with the server.
But this does not have to occur immediately, in fact the client SHOULD NOT assume connectivity at any time.
A client SHOULD NOT also assume that the server is available.
If the server is not available, the local changes should be retained, and the sync operation repeated later.
Ideally the client will give the user full control over sync operations.
Automatically syncing after all local modifications is not recommended.
If a client performs too many sync operations, the server MAY revoke the certificate.
Effectively, the client should maintain a separate list of tasks changed since the last successful sync operation.
Note that tasks have a "modified" attribute, which should be updated whenever a change is made.
This attribute contributes to conflict resolution on the server.
## Remote Changes
When a server sends remote changes to a client, in the response to a sync request, the changes have already been merged by the server, and therefore the client should simply store them intact.
Based on the UUID in the task, the client can determine whether a task is new (and should be added to the local list of tasks), or whether it represents a modification (and should overwrite it's existing entry).
The client MUST NOT perform any merges.
## Sync Key
Whenever a sync is performed, the server responds by sending a sync key and any remote changes.
The sync key is important, and should be included in the next sync request.
The client is REQUIRED to store the sync key in every server response message.
If a client omits the sync key in a sync message, the response will be a complete set of all tasks and modifications.
## Data Integrity
Although a task is guaranteed to contain at least 'entry', 'description' and 'uuid' attributes, it may also contain other known fields, and unknown user-defined fields.
An example might be an attribute named 'estimate'.
If a task is received via sync that contains an attribute named 'estimate', then a client has the responsibility of preserving the attribute intact.
If that data is shown, then it is assumed to be of type 'string', which is the format used by JSON for all values.
Conversely, if a client wishes to add a custom attribute, it is guaranteed that the server and other clients will preserve that attribute.
Using this rule, two clients of differing capabilities can exchange data and still maintain custom attributes.
This is a requirement.
Any client that does not obey this requirement is broken.
## Synchronizing
Synchronizing with the Taskserver consists of a single transaction.
Once an encrypted connection is made with the server, the client MUST compose a [sync request message](/docs/design/request).
This message includes credentials and local changes.
The response message contains status and remote changes, which MUST be stored locally.
## Establishing Encrypted Connection
All communication with the Taskserver is encrypted using the certificate and key provided to each user.
Using the 'server' configuration setting, establish a connection.
## Sync Request
See [sync request message](/docs/design/request).
A sync request MUST contain a sync key if one was provided by a previous sync.
A sync request MUST contain a list of modified tasks, in JSON format (see [Task JSON](/docs/design/task)), if local modifications have been made.
## Sync Response
A sync response WILL contain a 'code' and 'status' header variable, WILL contain a sync key in the payload, and MAY contain a list of tasks from the server in JSON format (see [Task JSON](/docs/design/task)).
## Server Messages
There are cases when the server needs to inform the user of some condition.
This may be anticipated server downtime, for example.
The response message is typically not present, but may be present in the header, containing a string:
...
message: Scheduled maintenance 2013-07-14 08:00UTC for 10 minutes.
...
If such a message is returned by the server, it SHOULD be made available to the user.
This is a recommendation, not a requirement.
## Server Errors
The server may generate many errors (See [Protocol](/docs/design/protocol)), but the following is a list of the ones most in need of special handling:
- 200 Success
- 201 No change
- 301 Redirect
- 430 Access denied
- 431 Account suspended
- 432 Account terminated
- 5xx Error
The 200 indicates success, and that a change was recorded.
The 201 indicates success but no changes were necessary.
The 301 is a redirect message indicating that the client MUST re-request from a new server.
The 43x series messages are account-related.
Any 5xx series code is a server error of some kind.
All errors consist of a code and a status message:
code: 200
status: Success
## Examples
Here are examples of properly formatted request and response messages.
Note that the messages are indented for clarity in this document, but is not the case in a properly formatted message.
Also note that newline characters U+000D are not shown, but are implied by the separate lines.
Because some messages have trailing newline characters, the text is delimited by the 'cut' markers:
foo
The example above illustrates text consisting of:
U+0066 f
U+006F o
U+006F o
U+000D newline
U+000D newline
Note that these values are left unspecified, but should be clear from the context, and the [message format](/docs/design/request) spec:
<size>
<organization>
<user>
<password>
## First Sync
The first time a client syncs, there is (perhaps) no data to upload, and no sync key from a previous sync.
<size>type: sync
org: <organization>
user: <user>
key: <password>
client: task 2.3.0
protocol: v1
Note the double newline character separating header from payload, with an empty payload.
## Request: Sync No Data
Ordinarily when a client syncs, there is a sync key from the previous sync response to send.
This example shows a sync with no local changes, but a sync key from a previous sync.
<size>type: sync
org: <organization>
user: <user>
key: <password>
client: task 2.3.0
protocol: v1
2e4685f8-34bc-4f9b-b7ed-399388e182e1
## Request: Sync Data
This sync request shows a sync key from the previous sync, and a locally modified task.
<size>type: sync
org: <organization>
user: <user>
key: <password>
client: task 2.3.0
protocol: v1
2e4685f8-34bc-4f9b-b7ed-399388e182e1
{"description":"An example","uuid":"8ad2e3db-914d-4832-b0e6-72fa04f6e331",...}
## Response: No Data
If a sync results in no downloads to the client, the response will look like this.
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 200
status: Ok
45da7110-1bcc-4318-d33e-12267a774e0f
Note that there is a sync key which must be stored and used in the next sync request, but there are no remote changes to store.
## Response: Remote Data
This shows a sync response providing a new sync key, and a remote change to two tasks.
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 200
status: Ok
45da7110-1bcc-4318-d33e-12267a774e0f
{"description":"Test data","uuid":"8ad2e3db-914d-4832-b0e6-72fa04f6e331",...}
{"description":"Test data2","uuid":"3b6218f9-726a-44fc-aa63-889ff52be442",...}
Note that the sync key must be stored for the next sync request.
Note that the two changed tasks must be stored locally, and if the UUID in the tasks matches local tasks, then the local tasks must be overwritten.
## Response: Error
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 431
status: Account suspended
Note the double newline character separating header from payload, with an empty payload.
## Response: Relocate
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 301
status: Redirect
info:
Note the 'info' field will contain a ':' string that should be used for all future sync requests.
This indicates that a user account was moved to another server.
Note the double newline character separating header from payload, with an empty payload.
## Response: Message
Occasionally the server will need to convey a message, and will include an additional header variable containing that message.
The server [protocol](/docs/design/protocol) states that the message SHOULD be shown to the user.
This message will be used for system event messages, used rarely, and never used for advertising or promotion.
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 200
status: Ok
message: Scheduled maintenance 2013-07-14 08:00UTC for 10 minutes.
45da7110-1bcc-4318-d33e-12267a774e0f
Note that the same message will likely be included in consecutive responses.
## Reference Implementation
The Taskserver 1.1.0 codebase contains a reference implementation of an SSL/TLS client and server program, which communicate text strings.
taskd.git/src/tls/Makefile # To build the example
taskd.git/src/tls/README # How to run the example
taskd.git/src/tls/TLSClient.cpp # TLS client code
taskd.git/src/tls/TLSClient.h
taskd.git/src/tls/TLSServer.cpp # TLS Server code
taskd.git/src/tls/TLSServer.h
taskd.git/src/tls/c.cpp # Client program
taskd.git/src/tls/s.cpp # Server program
taskd.git/src/tls/text.cpp # Text manipulation
taskd.git/src/tls/text.h # Text manipulation
The Taskwarrior codebase, version 2.4.0, is the reference implementation.
task.git/src/TLSClient.cpp # TLS client code
task.git/src/TLSClient.h
task.git/src/commands/CmdSync.cpp # Sync implementation
task.git/src/commands/CmdSync.h

249
doc/devel/rfcs/dom.md Normal file
View File

@@ -0,0 +1,249 @@
---
title: "Taskwarrior - Full DOM Support"
---
## Work in Progress
This design document is a work in progress, and subject to change.
Once finalized, the feature will be scheduled for an upcoming release.
# Full DOM Support
Taskwarrior currently supports DOM references that can access any stored data item.
The general forms supported are:
[ <id> | <uuid> ] <attribute> [ <part> ]
Examples include:
due
123.uuid
entry.month
123.annotations.0.entry.year
a87bc10f-931b-4558-a44a-e901a77db011.description
Additionally there are references for accessing configuration and system/program level items.
rc.<name>
context.program
context.args
context.width
context.height
system.version
system.os
While this is adequate for data retrieval, we have the possibility of extending it further to include data formats, higher-level constructs, and then to make use of DOM references in more locations.
This contributes to our goal of simplifying Taskwarrior.
## Proposed Format Support
When defining a custom report, the columns shown are defined like this:
report.x.columns=uuid.short,description.oneline ...
This syntax is:
<attribute> [ . <format> ]
If no `format` is specified, then `default` is assumed.
The `src/columns/ColΧ\*` objects are responsible for supporting and rendering these formats.
There is currently no consistency among these formats based on data type.
By incorporating formats into DOM references, we eliminate the need for a separate syntax for custom reports, and provide this:
123.due.iso
123.due.month.short
123.uuid.short
A standard set of formats per data type would be:
Type
Formats
Example
Numeric
default
`123 `
indicator
Based on `rc.<attribute>.indicator` which overrides `rc.numeric.indicator`.
json
`"<attribute>":"<value>"`
String
default
Buy milk
short
Feb
indicator
Based on `rc.<attribute>.indicator` which overrides `rc.string.indicator`.
json
`"<attribute>":"<value>"`
Date
default
Based on `rc.dateformat`
iso
2017-02-20T09:02:12
julian
2457805.12858
epoch
1234567890
age
2min
relative
-2min
remaining
0:02:04
countdown
0:02:04
indicator
Based on `rc.<attribute>.indicator` which overrides `rc.date.indicator`.
json
`"<attribute>":"<value>"`
Duration
default
1wk
iso
P1W
indicator
Based on `rc.<attribute>.indicator` which overrides `rc.duration.indicator`.
json
`"<attribute>":"<value>"`
There will also be a set of attribute-specific formats, similar to the currently supported set:
depends.list
depends.count
description.combined
description.desc
description.oneline
description.truncated
description.count
description.truncated_count
parent.default|long
parent.short
project.full
project.parent
project.indented
status.default|long
status.short
tags.default|list
tags.count
urgency.default|real
urgency.integer
uuid.default|long
uuid.short
Custom report sort criteria will also use DOM references.
This will be augmented by the `+`/`-` sort direction and `/` break indicator, which are not part of the DOM.
## High Level Construct Support
There need to be read-only DOM references that do not correspond directly to stored attributes.
Tasks have emergent properties represented by virtual tags, which will be accessible, in this case returning a `0` or `1`:
123.tags.OVERDUE
Using `rc.due` and the `due` attribute, the `OVERDUE` virtual tag is a combination of the two.
Other examples may include:
task.syncneeded
task.pending.count
task.hooks.installed
## Writable References
When a DOM reference refers to an attribute or RC setting, and does not extend further and reference a component or format, it may be writable.
For example:
rc.hooks # writable
123.description # writable
123.entry.month # not writable, not an attribute
## Data Interchange
The export command can be used to show a filtered set of tasks in JSON format, and this will also be available as a DOM format:
123.json
a87bc10f-931b-4558-a44a-e901a77db011.json
## RC File Support
The RC file (`~/.taskrc`) will support DOM references in values.
This will form a late-bound reference, which is evaluated at runtime, every time.
An example is to make two reports share the same description:
$ task config -- report.ls.description rc.report.list.description
This sets the description for the `ls` report to be a reference to the description of the `list` report.
This reference is not evaluated when the entry is written, but is evaluated every time the value is read, thus providing late-bound behavior.
Then if the description of the `list` report changes, so does that of the `ls` report automatically.
## Implementation Details
These notes list a series of anticipated changes to the codebase.
- The `src/columns/Col*` objects will implement type-specific and attribute-specific DOM support.
DOM reference lookup will defer to the column objects first.
- Some DOM references will be writable, permitting a `_set` command to complement the `_get` command.
- The `Config` object will recognize DOM references in values and perform lookup at read time.
This will require circularity detection.
- `src/DOM.cpp` will provide a memoized function to determine whether a DOM reference is valid.
- `src/DOM.cpp` will provide a function to obtain a DOM reference value, with supporting metadata (type, writable).

436
doc/devel/rfcs/plans.md Normal file
View File

@@ -0,0 +1,436 @@
---
title: "Plans"
---
There are many interconnected features and technologies in Taskwarrior, Taskserver, Tasksh and Timewarrior, each piece having it's own goals.
This matrix allows a simple reading of where things are, and where they are going.
This is a low-resolution time line.
It is subject to change.
It does not constitute a concrete plan.
This is an all-volunteer effort, and scheduling is difficult.
[Last updated 2016-08-08.]
<table class="table table-bordered table-striped">
<tr>
<th>Taskwarrior<br />Technology/Feature</th>
<th>
<span class="label label-success">2.5.1</span><br />
Current<br /><br />
Released 2016-02-24
</th>
<th>
<span class="label label-danger">2.6.0</span><br />
Next<br /><br />
2017
</th>
<th>
<span class="label label-info">2.x</span><br />
Future
</th>
</tr>
<tr>
<td>Core</td>
<td>
<a href="/docs/dom.html">DOM</a><br />
Filters<br />
Expressions<br />
Color Rules<br />
Custom Reports<br />
Annotations<br />
Tags / Virtual Tags<br />
<a href="/docs/context.html">Context</a><br />
</td>
<td>
<a href="/docs/design/recurrence.html">Recurrence</a><br />
Shared library<br />
<code>purge</code> command<br />
</td>
<td>
True Color
</td>
</tr>
<tr>
<td>API</td>
<td>
<a href="/docs/design/task.html">JSON</a><br />
Import<br />
Export<br />
<a href="/docs/hooks.html">Hooks</a><br />
<a href="/docs/hooks2.html">Hooks v2</a><br />
<a href="/docs/dom.html">DOM</a><br />
Helper commands<br />
</td>
<td>
</td>
<td>
<code>on-sync</code> hook<br />
Full DOM<br />
DOM access in rc<br />
<code>$ENV</code> access in rc<br />
Report columns as DOM refs<br />
</td>
</tr>
<tr>
<td>
Attributes<br />
<a href="/docs/udas.html">User Defined Attributes (UDA)</a>
</td>
<td>
<code>modified</code><br />
<code>priority</code> as a UDA<br />
</td>
<td>
<code>template</code><br />
<code>rtype</code><br />
Remove <code>mask</code><br />
Remove <code>imask</code><br />
Remove <code>parent</code><br />
</td>
<td>
<code>org</code><br />
<code>group</code><br />
</td>
</tr>
<tr>
<td>Reports</td>
<td>
Improved layouts<br />
Improved Themes
</td>
<td>
Daily, Weekly reports (history, ghistory)<br />
</td>
<td>
</td>
</tr>
<tr>
<td>Synchronization</td>
<td>
<code>task sync</code><br />
<code>task sync init</code> (all tasks)<br />
</td>
<td>
</td>
<td>
<code>task sync reset</code><br />
</td>
</tr>
<tr>
<td>TDB (task database)</td>
<td>
Local file locking<br />
Single file set<br />
Single user
</td>
<td>
</td>
<td>
Threaded file load<br />
Read-only mode
</td>
</tr>
<tr>
<td>I18N / L10N</td>
<td>
UTF-8 support<br />
<code>deu-DEU</code><br />
<code>eng-USA</code><br />
<code>epo-RUS</code><br />
<code>esp-ESP</code><br />
<code>fra-FRA</code><br />
<code>ita-ITA</code><br />
<code>pol-POL</code><br />
<code>por-PRT</code><br />
</td>
<td>
No I18N / L10N
</td>
<td>
Migrate to <a href="https://www.gnu.org/software/gettext/">gettext</a><br />
</td>
</tr>
<tr>
<td>Documentation</td>
<td>
man: task<br />
man: taskrc<br />
man: task-color<br />
man: task-sync<br />
youtube: various<br />
<a href="https://taskwarrior.org">taskwarrior.org</a><br />
taskwarrior.com: Support Site<br />
</td>
<td>
</td>
<td>
New video tutorials<br />
</td>
</tr>
<tr>
<td>Testing</td>
<td>
C++ tests<br />
Python tests<br />
Sync tests<br />
Parallel tests<br />
</td>
<td>
Migration to Flod2<br />
</td>
<td>
</td>
</tr>
<tr>
<td>Tool Chain</td>
<td>
GCC 4.7 / Clang 3.3<br />
C++11 support<br />
CMake<br />
</td>
<td>
GCC 4.9 / Clang 3.4<br />
Full C++11 support<br />
</td>
<td>
Full C++14 support<br />
Full C++17 support<br />
</td>
</tr>
</table>
<table class="table table-bordered table-striped">
<tr>
<th>Tasksh<br />Technology/Feature</th>
<th>
<span class="label label-success">1.1.0</span><br />
Current<br /><br />
Released 2016-09-05
</th>
<th>
<span class="label label-danger">1.2.0</span><br />
Next<br /><br />
2017
</th>
<th>
<span class="label label-info">1.x</span><br />
Future
</th>
</tr>
<tr>
<td>Core</td>
<td>
<a href="/docs/review.html">Review</a><br />
libreadline<br />
Shared library<br />
</td>
<td>
</td>
<td>
Pomodoro timer<br />
</td>
</tr>
<tr>
<td>Tool Chain</td>
<td>
CMake<br />
GCC 4.7 / Clang 3.3<br />
</td>
<td>
GCC 4.9 / Clang 3.4<br />
Full C++11 support<br />
</td>
<td>
Full C++14 support<br />
Full C++17 support<br />
</td>
</tr>
</table>
<table class="table table-bordered table-striped">
<tr>
<th>Taskserver<br />Technology/Feature</th>
<th>
<span class="label label-success">1.1.0</span><br />
Current<br /><br />
Released 2015-05-10
</th>
<th>
<span class="label label-danger">1.2.0</span><br />
Next<br /><br />
2017
</th>
<th>
<span class="label label-info">1.x</span><br />
Future
</th>
</tr>
<tr>
<td>Core</td>
<td>
Serial server
</td>
<td>
Shared library<br />
</td>
<td>
Threaded server
</td>
</tr>
<tr>
<td>Protocol</td>
<td>
v1
</td>
<td>
v1.1 - client reset request<br />
</td>
<td>
v1.2
</td>
</tr>
<tr>
<td>DB (Data Storage)</td>
<td>
</td>
<td>
</td>
<td>
GC
</td>
</tr>
<tr>
<td>Security</td>
<td>
Validation
</td>
<td>
</td>
<td>
UUID:Cert Verification<br />
Combined Certs
</td>
</tr>
<tr>
<td>Tool Chain</td>
<td>
GCC 4.7 / Clang 3.3<br />
CMake<br />
</td>
<td>
GCC 4.9 / Clang 3.4<br />
Full C++11 support<br />
</td>
<td>
Full C++14 support<br />
Full C++17 support<br />
</td>
</tr>
</table>
<table class="table table-bordered table-striped">
<tr>
<th>Timewarrior<br />Technology/Feature</th>
<th>
<span class="label label-success">1.0.0</span><br />
Current<br /><br />
Released 2016-08-20
</th>
<th>
<span class="label label-danger">1.1.0</span><br />
Next<br /><br />
2017
</th>
<th>
<span class="label label-info">1.x</span><br />
Future
</th>
</tr>
<tr>
<td>Core</td>
<td>
Shared library<br />
</td>
<td>
</td>
<td>
True Color
</td>
</tr>
<tr>
<td>Reports</td>
<td>
<code>summary</code> report<br />
<code>gaps</code> report<br />
<code>day</code> chart<br />
<code>week</code> chart<br />
<code>month</code> chart<br />
<code>totals.py</code> extension<br />
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>Rules</td>
<td>
Simple configuration rules
</td>
<td>
</td>
<td>
Rule System<br />
</td>
</tr>
<tr>
<td>Integration</td>
<td>
Taskwarrior <code>on-modify</code> hook script
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>Tool Chain</td>
<td>
CMake<br />
GCC 4.7 / Clang 3.3<br />
C++11 support<br />
</td>
<td>
GCC 4.9 / Clang 3.4<br />
Full C++11 support<br />
</td>
<td>
Full C++14 support<br />
Full C++17 support<br />
</td>
</tr>
</table>

171
doc/devel/rfcs/protocol.md Normal file
View File

@@ -0,0 +1,171 @@
---
title: "Taskwarrior - Sync Protocol"
---
# Sync Protocol
## Introduction
Taskwarrior data has typically been shared in several ways.
Those include SCM (source code management) systems, directory synchronizing software (such as DropBox), and by use of the 'push', 'pull' and 'merge' commands introduced in version 1.9.3.
While these methods work, they each have problems associated with the merging of data.
In the case of directory synchronizing software, there is no merging at all - just simple file overwrite, despite many people believing that the data is somehow combined and preserved.
The Taskserver is a solution.
It is an online/cloud storage and sync service for taskwarrior data.
It performs conflict-free data merging, and minimizes bandwidth use.
The Taskserver also provides multi-client access, so that a task added using a web client could be immediately viewed using a mobile client, or modified using taskwarrior.
Choice of clients is important - people have widely varying behaviors and tastes.
The Taskserver also provides multi-user access, which introduces new capabilities, such as list sharing and delegation.
These will require later modification to this protocol.
The Taskserver protocol will be implemented by the taskd project and first used in taskwarrior 2.3.0.
Other clients will follow.
## Requirements
In this document, we adopt the convention discussed in Section 1.3.2 of [RFC1122](https://tools.ietf.org/html/rfc1122#page-16) of using the capitalized words MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, and OPTIONAL to define the significance of each particular requirement specified in this document.
In brief: "MUST" (or "REQUIRED") means that the item is an absolute requirement of the specification; "SHOULD" (or "RECOMMENDED") means there may exist valid reasons for ignoring this item, but the full implications should be understood before doing so; and "MAY" (or "OPTIONAL") means that this item is optional, and may be omitted without careful consideration.
## Link Level
The Taskserver protocol assumes a reliable data stream such as provided by TCP.
When TCP is used, a Taskserver listens on a single predetermined port *for the given client* only.
This means the server may be using multiple ports to serve distinct sets of clients.
This server is only an interface between programs and the task data.
It does not perform any user interaction or presentation-level functions.
## Transactions
Each transaction is a single incoming message, with a single response message.
All communication therefore consists of a single 'send', followed by a single 'receive', then termination.
There are no sessions, and no continuously open connections.
The message format is described in the [Taskserver Message Format](/docs/design/request) document.
## Responsibilities of the Server
The server will maintain a set of transactions, in the original sequence, punctuated by sync keys which are UUIDs.
Each sync key represents a non- trivial sync operation by a client.
Each transaction is a [JSON-formatted task](/docs/design/task), followed by a newline (\\n) character.
The result is a single file that contains interleaved lines of two types: tasks and sync keys.
This design allows the server to maintain a set of deltas such that multiple clients may request a minimal set of changes since their last sync.
## Responsibilities of the Client
This describes how Taskwarrior implements sync.
All modifications to tasks (add, modify, done, delete \...) are recorded in the form of a fully-composed [JSON-formatted task](/docs/design/task).
The formatted task is added to a local backlog.data file.
If a task is modified a second time, it is added again to the backlog.data file - the lines are not combined.
Each task SHALL have a 'modified' date attribute that will help resolve conflicts.
On sync:
* Send a 'sync' type message with the entire contents of the backlog.data, unmodified, as the message payload.
* Receive one of the following response codes:
* 201: This means 'no change', and there is no further action to be taken.
* 200: This means 'success', and the message payload contains a set of tasks and a sync key:
* The formatted tasks are to be stored as-is.
These tasks will either be appended to the client data or will overwrite existing client data, based on the UUID of the task.
No merge logic is necessary.
* The sync key will be written to the backlog.data file, overwriting the previous contents, such that it will now contain only one line.
* 301: Redirect to : found in the 'info' response header, will force the client to resubmit the request to the new server.
* 3xx, 4xx, 5xx: The 'status' field contains an error message.
* If the response contained any error or warning, the error should be shown to the user.
This provides an opportunity for the server to announce downtime, or relocation.
If no sync key is sent, the server cannot provide an incremental delta, and so will send all task data, which should be stored as above.
This should be the case for a client making its first sync call.
If an unrecognized attribute is present in the task data, the client MUST preserve the attribute unmodified, and assume it is of type 'string'.
This permits individual clients to augment the task data without other clients stripping it meaningful data.
This is how UDAs (user defined attributes) are handled.
## Extensions
This protocol was designed so that extensions to the protocol will take the form of additional message types and status codes.
## Summary of Response Codes
Status responses indicate the server's response to the last command received from the client.
The codes consist of a 3 digit numeric code.
The first digit of the response broadly indicates the success, failure, or progress of the previous command (based generally on [RFC640](https://tools.ietf.org/html/rfc640) [RFC821](https://tools.ietf.org/html/rfc821)):
| 1yz | Positive Preliminary reply |
| 2yz | Positive Completion reply |
| 3yz | Positive Intermediate reply |
| 4yz | Transient Negative Completion reply |
| 5yz | Permanent Negative Completion reply |
The next digit in the code indicates the response category:
| x0z | Syntax |
| x1z | Information (e.g., help) |
| x2z | Connections |
| x3z | Authentication |
| x4z | Unspecified as yet |
| x5z | Taskd System (\...) |
| x8z | Nonstandard (private implementation) extensions |
A summary of all status response are:
| 200 | Success |
| 201 | No change |
| 300 | Deprecated message type. This message will not be supported in future Taskserver releases. |
| 301 | Redirect. Further requests should be made to the specified server/port. |
| 302 | Retry. The client is requested to wait and retry the same request. The wait time is not specified, and further retry responses are possible. |
| 400 | Malformed data |
| 401 | Unsupported encoding |
| 420 | Server temporarily unavailable |
| 421 | Server shutting down at operator request |
| 430 | Access denied |
| 431 | Account suspended |
| 432 | Account terminated |
| 500 | Syntax error in request |
| 501 | Syntax error, illegal parameters |
| 502 | Not implemented |
| 503 | Command parameter not implemented |
| 504 | Request too big |
## Security Considerations
All communication with the Taskserver uses SSL 3.0 or TLS 1.0, 1.1 or 1.2.
Encryption is mandatory.
Data is never transmitted in plain text.
## Limitations and Guidelines
Some limitations exists to reduce bandwidth and load on the server.
They are:
- A client may only connect to a single server.
Synchronization among a set of servers is not supported.
- A client should attempt to minimize data bandwidth usage by maintaining a local data store, and properly using sync keys.
- A client should minimize data transfers by limiting the frequency of sync requests.

View File

@@ -0,0 +1,195 @@
---
title: "Taskwarrior - Recurrence"
---
# Draft
This is a draft design document.
Your [feedback](mailto:support@taskwarrior.org?Subject=Feedback) is welcomed.
Recurrence
----------
Recurrence needs an overhaul to improve weaknesses and add new features.
# Terminology
- The hidden 'parent' task is called the template.
- Synthesis is the name for the generation of new recurring task instances when necessary.
- The synthesized tasks are called instances.
- The index is the zero-based monotonically increasing number of the instance.
- Drift is the accumulated errors in time that cause a due date to slowly change for each recurring task.
# Criticism of Current Implementation
- The `mask` attribute grows unbounded.
- Only strict recurrence cycles are supported.
The example of mowing the lawn is that you want to mow the lawn every seven days, but when you are four days late mowing the lawn, the next mowing should be in seven days, not in three.
- Intances generated on one machine and then synced, may collide with equivalent unsynced instances tasks on another device, because the UUIDs are different.
- You cannot `wait` a recurring task and have that wait period propagate to all other child tasks.
- Task instances cannot individually expire.
# Proposals
## Proposal: Eliminate `mask`, `imaѕk` Attributes
The `mask` attribute in the template is replaced by `last`, which indicates the most recent instance index synthesized.
Because instances are never synthesized out of order, we only need to store the most recent index.
The `imask` attribute in the instance is no longer needed.
## Proposal: Rename `parent` to `template`
The name `parent` implies subtasks, and confuses those who inspect the internals.
The value remains the UUID of the template.
This frees up the namespace for future use with subtasks.
## Proposal: New 'rtype' attribute
To indicate the flavor of recurrence, support the following values:
* `periodic` - Instances are created on a regular schedule.
Example: send birthday flowers.
It must occur on a regular schedule, and doesn't matter if you were late last year.
This is the default value.
* `chained` - Instances are created back to back, so when one instance ends, the next begins, with the same recurrence.
Example: mow the lawn.
If you mow two days late, the next instance is not two days early to compensate.
## Proposal: Use relative offsets
The delta between `wait` and `due` date in the template should be reflected in the delta between `wait` and `due` date in the instance.
Similarly, 'scheduled' must be handled the same way.
## Proposal: On load, auto-upgrade legacy tasks
Upgrade template:
- Add `rtype:periodic`
- Add `last:N` where `N` is the length of `mask`
- Delete `mask`
Upgrade instance:
- Rename `parent` to `template`
- Delete `imask`
- Update `wait` if not set to: `wait:due + (template.due - template.wait)`
- Update `scheduled` if not set to: `scheduled:due + (template.due - template.scheduled)`
## Proposal: Deleting a chained instance
Deleting a `rtype:chained` instance causes the next chained instance to be synthesized.
This gives the illusion that the due date is simply pushed out to `(now + template.recur)`.
## Proposal: Modification Propagation
TBD
## Proposal: Exotic Dates
Expand date specifications to use pattern phrases:
- `4th thursday in November`
- `4th thursday of November`
- `Friday before easter`
- `next Tuesday`
- `last Tuesday`
- `last July`
- `weekend`
- `3 days before eom`
- `in the morning`
- `4pm`
- `noon`
- `midnight`
Got suggestions?
## Proposal: User-Defined Week Start
TBD
# Implementation
## Implementation: Adding a new `periodic` template
When adding a new periodic template:
task add ... due:D recur:R wait:D-1wk scheduled:D-1wk until:U
Creates:
template.uuid: NEW_UUID
template.description: ...
template.entry: now
template.modified: now
template.due: D
template.recur: R (stored in raw form, ie 'P14D')
template.wait: D-1wk
template.scheduled: D-1wk
template.until: U
template.rtype: periodic
template.last:
Creating the Nth instance (index N):
Clone instance from template.
instance.uuid: NEW_UUID
instance.modified: now
instance.due: template.due + (N * template.recur)
instance.wait: instance.due + (template.due - template.wait)
instance.scheduled: instance.due + (template.due - template.scheduled)
instance.start:
template.last: N
## Implementation: Adding a new `chained` template
When adding a new chained template:
task add ... due:D recur:R wait:D-1wk scheduled:D-1wk until:U rtype:chained
Creates:
template.uuid: NEW_UUID
template.description: ...
template.entry: now
template.modified: now
template.due: D
template.recur: R (stored in raw form, ie 'P14D')
template.wait: D-1wk
template.scheduled: D-1wk
template.until: U
template.rtype: chained
Creating the Nth instance (index N):
Clone instance from template.
instance.uui d: NEW_UUID
instance.mod ified: now
instance.due : instance[N-1].end + template.recur
instance.wai t: instance.due + (template.due - template.wait)
instance.sch eduled: instance.due + (template.due - template.scheduled)
instance.sta rt:
Chained tasks do not obey `rc.recurrence.limit`, and show only one pending task
at a time.
## Implementation: Special handling for months
Certain recurrence periods are inexact:
- P1M
- P1Y
- P1D
When the recurrence period is `P1M` the number of days in a month varies and causes drift.
When the recurrence period is `P1Y` the number of days in a year varies and causes drift.
When the recurrence period is `P1D` the number of hours in a day varies due to daylight savings, and causes drift.
Drift should be avoided by carefully implementing:
instance.due: template.due + (N * template.recur)

198
doc/devel/rfcs/request.md Normal file
View File

@@ -0,0 +1,198 @@
---
title: "Taskwarrior - Request"
---
# Taskserver Message Format
The Taskserver accepts and emits only messages.
These messages look somewhat like email, as defined in [RFC821](https://tools.ietf.org/html/rfc821), [RFC2822](https://tools.ietf.org/html/rfc2822).
The message format allows for data, metadata, and extensibility.
This combination allows the Taskserver to accommodate current and future needs.
This document describes the message format, and the supported message types.
## Requirements
In this document, we adopt the convention discussed in Section 1.3.2 of [RFC1122](https://tools.ietf.org/html/rfc1122#page-16) of using the capitalized words MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, and OPTIONAL to define the significance of each particular requirement specified in this document.
In brief: "MUST" (or "REQUIRED") means that the item is an absolute requirement of the specification; "SHOULD" (or "RECOMMENDED") means there may exist valid reasons for ignoring this item, but the full implications should be understood before doing so; and "MAY" (or "OPTIONAL") means that this item is optional, and may be omitted without careful consideration.
## Encoding
All messages are UTF8-encoded text.
## Message Format
This format is based on [RFC2822](https://tools.ietf.org/html/rfc2822), 'Internet Message Format'.
Here is an example of the format:
<SIZE>
name: value
name2: value2
payload
There are three sections.
The first is the size, which is a 4-byte, big- Endian, binary byte count of the length of the message, including the 4 bytes for the size.
The header section is a set of name/value pairs separated by newline characters (U+000D).
The name is separated from the value by ': ' (colon U+003A, space U+0020) The header section is terminated by two consecutive newline (U+000D) characters.
All text is UTF8-encoded.
The payload section is arbitrary, and message type-specific.
However, it is still UTF8-encoded text.
## Message Requirements
Messages SHALL contain particular headers.
Those are:
- type
- protocol
- client
The 'type' value is what determines the interpretation of the payload.
The 'protocol' value should be 'v1', or any subsequently published protocol version.
The 'client' represent the client identifier, so that any special cases can be handled.
For example, an emergency fix that is client version-specific could be released, to support users that have not updated their client, or perhaps the client has not released a fix.
The form of the 'version' value is:
<product identifier> <version number>
As an example:
taskwarrior 2.3.0
DO NOT spoof any other software using this client value.
If another client is spoofed, then patches addressing protocol errors may break working software.
## Auth Data
Every request from the client SHALL contain "auth" information, which involves these header entries:
org: <organization>
user: <user>
key: <key>
The user and org fields uniquely identify a user.
The key field is generated when a new server account is set up.
It is a shared secret, equivalent to a password, and should be protected.
Authentication failure can result in these errors:
- 430 Authentication failed
- 431 Account suspended
## Status Data
Every response from the Taskserver SHALL contain status data:
code: <code>
status: <status text>
The code is a numeric status indicator defined in the [Sync Protocol](/docs/design/protocol).
## Payload Data
Payload data is optional, arbitrary and message type dependent.
It is always UTF8-encoded text.
## Message Types
The Taskserver supports several message types, thus providing a set of primitives for use by clients.
It is expected that the number of supported ticket types will increase over time.
## Sync Message
The "sync" message always originates from the client, but the response will contain data from the server.
A sync is therefore a single request with a single response.
The "sync" message type MUST contain the following headers:
- type
- org
- user
- key
- client
- protocol
The "sync" message payload has this format:
<uuid>
<JSON task 1>
<JSON task 2>
...
<JSON task N>
Here is an example of a sync message:
<size>type: sync
org: <organization>
user: <user>
key: <key>
client: task 2.3.0
protocol: v1
2e4685f8-34bc-4f9b-b7ed-399388e182e1
{"description":"Test data","entry":"20130602T002341Z","status":"pending"}
The request contains the proper auth section, and the body contains the current sync key followed by a newline characters (U+000D), then a list of JSON-formatted tasks \[2\] each separated by a newline character (U+000D).
An example response message might be:
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 200
status: Ok
45da7110-1bcc-4318-d33e-12267a774e0f
The status indicates success, and the payload contains zero remote task modifications, followed by a sync key.
## Statistics Message
The message format іs simply:
<size>type: statistics
org: <Organization>
user: <User>
key: <Key>
client: taskd 1.0.0
protocol: v1
There is no payload.
An example response message might be:
<size>type: response
client: taskd 1.0.0
protocol: v1
code: 200
status: Ok
average request bytes: 0
average response bytes: 0
average response time: 0.000000
errors: 0
idle: 1.000000
maximum response time: 0.000000
total bytes in: 0
total bytes out: 0
tps: 0.000000
transactions: 1
uptime: 28
There is no payload, and the results are in the header variables.
Note that the statistics gathered by the server are growing, which means new values are occasionally added to the response message.
Existing values will not be removed.

240
doc/devel/rfcs/rules.md Normal file
View File

@@ -0,0 +1,240 @@
---
title: "Taskwarrior - Rule System"
---
## Work in Progress
This design document is a work in progress, and subject to change.
Once finalized, the feature will be scheduled for an upcoming release.
# Rule System
The rule system is a framework that supports highly configurable features, with runtime evaluation, DOM access and an internal API.
Implementing a rule system meets the goal of shrinking and stabilizing the product core, while adding new features, and enabling many more.
## Required Enhancements
To prepare for a Rules System, various subsystems must first be enhanced:
- DOM references need to be unambiguous, and will all have the `dom.` prefix.
- DOM references need to be able to access any Taskwarrior data, in any
- Custom reports will change from referencing `<column>[.<format>]` to simply
`<domref>`
- RC file syntax needs to be enhanced, so support rule definitions, which are
multi-line blocks that are indentation-sensitive
- RC file syntax will support two ways of specifying the same data:
a.b.c=...
a:
b:
c=...
- RC file syntax will allow the use of environment variables inline:
name=${TERM}
include ${HOME}/.taskrc_local
- The `Variant` object will migrate to `libshared`
- The expression evaluator `Eval` object will migrate to `libshared`
- The column objects will gain a more structured base class, and will serve as
providers for DOM references
- The 'exec' command will be able to run a rule, if the reference is correct
- Taskwarrior will store state data in a new `state.data` file
- `Config` object needs to use the `rat` parser, to tackle the more complex
syntax
- The RC file will support environment variable expansion, where `${NAME}`
will be replaced by its corresponding value at launch time
At that point, the rules system can be implemented in `libshared`, and will use a pluggable architecture to allow its integration into several projects.
## DOM Enhancements
DOM references will be enhanced, with many more references supported.
All DOM references will begin with `dom.`, yielding unambiguous references.
References will have a type.
Types will support sub-references (`<date>.<month>`, `<tags>.<N>`, `<annotation>.<description>`), and display formats included.
dom . [<id> .] <attribute> [. <sub-reference>] . <format>
dom . 123 . entry . year . yyyy
dom . 123 . entry
dom . 123 . tags
dom . 123 . tags . count
dom . 123 . tags . 1
In addition to direct attribute access, DOM references will also support tw references beyond the current set: dom.rc.<name>
dom.cli.args
dom.terminal.width
dom.terminal.height
dom.system.version
dom.system.oѕ
And will also support higher-level constructs that do not directly correlate to attributes, for example:
dom.active Boolean indicator of any active tasks
dom.synced Boolean indicator of the need to sync
dom.rc.path String path of .taskrc file (or override)
dom.data.path String path of data directory
dom.hooks.path String path of hooks directory
Finally, access to state:
dom.state.program
dom.state.sync.last
dom.state.sync.configured
dom.state.run.last
dom.state.context
## RC Syntax Changes
The current configuration system supports only two different forms of syntax:
<name> = [ <value> ]
include <file>
A rule is a new form of syntax that consists of the rule keyword, a name, optional trigger, followed by indented actions in the form of API calls and flow control.
For example:
rule myRule() on_launch:
# Some code here
A rule definition will appear in the RC file, alongside all the existing settings.
The rule syntax will require a blank line to terminate the rule definition, the result being that the RC file should be quite readable, although it will look like Python.
## Hook Scripts
While this functionality can also be implemented using hook scripts, rules will run in-process, and therefore do not require external interpreters to be launched every time.
This creates the potential to run faster than a hook script.
For complex processing, hook scripts will be the preferred mechanism, but as the rules system matures, rules will be made to run more quickly.
With adequate performance, a rule will be the preferred implementation over a hook script.
This is not expected to be the case at first.
Hook scripts are not likely to be extended beyond their current form, and with greater DOM access and a growing API, rules should be able to supplant most hook script use cases.
## Rule Triggers
The set of supported rule types will include:
* `on_launch` - Triggered on program launch.
* `on_add` - Triggered when a task is added.
A context task will be provided.
The rule can modify the task, and approve or reject it.
* `on_modify` - Triggered when a task is modified.
A before and after context task will be provided.
The rule can modify the task, and approve or reject it.
* `on_exit` - Triggered on program exit.
* `color` - Triggered when colors are being determined.
* `virtual tag` - Defines a new virtual tag.
* `format` - Triggered when an attribute needs formatting, defines are new format.
More rules types will be added for more capabilities in future releases.
## API
The API is a simple set of actions that may be taken by a rule.
* `debug(<string>)` - Displays the string in debug mode only and continues processing.
* `warn(<string>)` - Displays the string as a warning continues processing.
* `error(<string>)` - Displays the string as an error and terminates processing.
* `exec(<binary> [ <args> ... ])` - Executes the external program and passes arguments to it.
If the program exits with non-zero status, it is treated as an error.
* `return <value>` - Provides a result value for the rule, when necessary.
This is a very limited set at first, and more API calls will be added to support capabilities in future releases.
## Grammar
The grammar closely tracks that of Python.
Blocks are indented consistently.
* `if <condition>: ... else: ...` - The condition is a full Algebraic expression, and supports none of the command line conveniences.
Terms must be combined with logical operators.
The condition is an expression that is evaluated and converted to a Boolean value.
* `for <name> in <collection>:` - There is no native type for a collection, but there are DOM references (`tags` \...) that reference collections.
This provides a way to iterate.
* `set <name> = <expression>` - Writes to a named type.
The name may be a writable DOM object (`dom...`) or temporary variable storage (`tmp...`).
Writing to a read-only DOM reference is an error.
* `<function>([<args>])` - A function is either a rule or an API call.
Calling an undefined function is an error.
## Examples
Here are some example rules which illustrate the syntax and API.
The replacement for the nag feature:
rule Nag(before, after) on-modify:
if before.urgency < tasks.max.urgency:
warn You have more urgent tasks
if after.status == 'completed' and before.urgency < (dom.urgency.max - 2.0):
warn 'You have more urgent tasks!'
Correct commonly misspelled word:
rule CorrectSpelling(task) on_add:
set task.description = substitute(task.description, 'teh', 'the')
Abbreviation expansion:
rule ExpandAbbreviation(task) on_modify:
set task.description = substitute(task.description, '/TW-\d+/', 'https:\/\/github.com\/GothenburgBitFactory\/taskwarrior\/issues\/\1')
Warn on missing project:
rule WarnOnMissingProject(task) on_add:
if task.project == :
warn(Project not specified)
Color rule:
rule ColorizeDue(task) color:
if task.due > now:
if task.due < (now + 5d):
return dom.rc.color.due
else:
return dom.rc.color.due.later
Policy:
rule policyProject(task) on_add:
if task.project == '':
if rc.default.project == '':
error('You must specify a project')
set task.project = rc.default.project

242
doc/devel/rfcs/sync.md Normal file
View File

@@ -0,0 +1,242 @@
---
title: "Taskwarrior - Taskserver Sync Algorithm"
---
# Taskserver Sync Algorithm
This document describes how task changes are merged by the Taskserver.
It does not describe [the protocol](/docs/design/protocol) used by the Taskserver.
The Taskserver merges tasks from multiple sources, resulting in conflict- free syncing of data.
The algorithm used to achieve this is simple and effective, paralleling what SCM systems do to perform a rebase.
## Requirements
In this document, we adopt the convention discussed in Section 1.3.2 of
[RFC1122](https://tools.ietf.org/html/rfc1122#page-16) of using the capitalized words MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, and OPTIONAL to define the significance of each particular requirement specified in this document.
In brief: "MUST" (or "REQUIRED") means that the item is an absolute requirement of the specification; "SHOULD" (or "RECOMMENDED") means there may exist valid reasons for ignoring this item, but the full implications should be understood before doing so; and "MAY" (or "OPTIONAL") means that this item is optional, and may be omitted without careful consideration.
## Problem Definition
The sync algorithm considers a single task, with multiple changes occurring in two separate locations that must be resolved.
The two locations are the local machine and the server.
This results in two parallel change sequences.
Examples using multiple clients collapse down to the simple two-branch case because the clients are merged serially.
## Change Sequence
A sequence of changes to the same task is represented as:
T0 --> T1 --> T2
Although all examples are of the two-branch variety, some involve trivial branches.
Going through these examples will illustrate the algorithm.
First the legend:
T0 Represents the original task, the base.
T1 Represents the task with a non-trivial set of changes.
T2 Represents the task with further changes.
## Deltas
The transition from T0 \--\> T1 can be seen as a transform applied to T0, resulting in T1.
That transform is the delta (d1) between T0 and T1, which is a subtractive term:
d1 = (T1 - T0)
Therefore:
T0 --> T1 = T0 + d1
= T0 + (T1 - T0)
This states that the transition from T0 to T1 is the application of a delta to the original, T0, which results in T1.
Applying this to the whole change sequence yields:
T0 --> T1 --> T2 = T0 + d1 + d2
= T0 + (T1 - T0) + (T2 - T1)
## Use Case Classification
Because clients sync requests are processed serially, there is no need to consider the multiple client cases.
This means there is only ever the case with two parallel change sequences = the two branch case.
## Two Branch Case
The two branch case represents changes made to the same task in two locations, resulting in two deltas that must be applied to the same base.
T0 --> T1
T0 --> T2
This reduces to a base with two deltas, but the order in which the deltas are applied is important.
For example:
T0 + d1 + d2 =/= T0 + d2 + d1
The application of deltas is not commutative, except in the trivial case where the two deltas are identical, or the deltas do not overlap.
The deltas therefore need to be applied in the correct sequence.
Tasks have metadata that indicates the last modified time, which dictates the sequence.
Assuming d1 occurred before d2, this neatly collapses down to a single branch sequence:
T0 + d1 + d2 = T3
Note that the result in this case is T3, because it will be neither T1 nor T2, unless the deltas are identical.
## Two Branch, Multiple Changes Case
The two branch case can be complicated by multiple changes per branch:
T0 --> T1 --> T3 --> T5
T0 --> T2 --> T4
Note that the numbers were chosen to represent the order in which the changes were made.
First a list of deltas is generated:
T0 --> T1 = d1
T1 --> T3 = d3
T3 --> T5 = d5
T0 --> T2 = d2
T0 --> T4 = d4
d1, d3, d5, d2, d4
Then the deltas are sorted by modified time:
d1, d2, d3, d4, d5
Then epplied to the base, yielding T6:
T0 + d1 + d2 + d3 + d4 +d5 = T6
## Two Branch Case Example
Suppose the base task looks like this:
T0 project:ONE due:tomorrow priority:H +tag1 Original description
The first branch looks like this:
T1 project:TWO due:23rd priority:H +tag1 Original description
The second branch looks like this:
T2 project:ONE due:tomorrow priority:H +tag1 Modified description
Delta d1 is:
T0 project:ONE due:tomorrow priority:H +tag1 Original description
T1 project:TWO due:23rd priority:H +tag1 Original description
----------------------------------------------------------------------
d1 project:TWO due:23rd
Delta d2 is:
T0 project:ONE due:tomorrow priority:H +tag1 Original description
T2 project:ONE due:tomorrow priority:H +tag1 Modified description
----------------------------------------------------------------------
d2 Modified description
If d1 occurred before d2, the result is:
T3 = T0 + d1 + d2
= T0 + (project:TWO due:23rd) + (Modified description)
T3 = project:TWO due:23rd priority:H +tag1 Modified description
## Use Cases
A range of illustrated use cases, from the trivial to the complex will show the algorithm in use.
## Use Case 1: New Local Task
Initial state:
Server: -
Client: T0
The server has no data, and so T0 is stored.
The result is now:
Server: T0
Client: T0
## Use Case 2: Local Change
Initial state:
Server: T0
Client: T0 --> T1
The server resolves the change:
T0 --> T1 = T0 + d1
= T1
T1 is stored.
The result is now:
Server: T0 --> T1
Client: T1
## Use Case 3: Local and Remote Change
Initial state:
Server: T0 --> T1
Client: T0 --> T2
This is the two branch case, and the deltas are generated:
T0 --> T1 = T0 + d1
T0 --> T2 = T0 + d2
The order of change is determine to be d1, d2, yielding T3:
T3 = T0 + d1 + d2
T3 is stored on the server, and returned to the client.
The result is now:
Server: T0 --> T1 --> T2 --> T3
Client: T3
## Use Case 4: Multiple Local and Remote Changes
Initial state:
Server: T0 --> T1 --> T3
Client: T0 --> T2 --> T4
This is the two branch case, and the deltas are generated:
T0 --> T1 = T0 + d1
T1 --> T3 = T0 + d3
T0 --> T2 = T0 + d2
T2 --> T4 = T0 + d4
d1, d3, d2, d4
The order of change is determine to be d1, d2, d3, d4, yielding T5:
T5 = T0 + d1 + d2 + d3 + d4
T5 is stored on the server, and returned to the client.
The result is now:
Server: T0 --> T1 --> T2 --> T3 --> T4 --> T5
Client: T5

469
doc/devel/rfcs/task.md Normal file
View File

@@ -0,0 +1,469 @@
---
title: "Taskwarrior - Taskwarrior JSON Format"
---
# Taskwarrior JSON Format
When Taskwarrior exchanges data, it uses [JSON](https://www.json.org/).
This document describes the structure and semantics for tasks exported from Taskwarrior, imported to Taskwarrior, or synced with the Taskserver.
Any client of the Taskserver will need to communicate task information.
This document describes the format of a single task.
It does not describe the communication and sync protocol between client and server.
This document is subject to change.
The data attributes are also subject to change.
## Requirements
In this document, we adopt the convention discussed in Section 1.3.2 of [RFC1122](https://tools.ietf.org/html/rfc1122#page-16) of using the capitalized words MUST, REQUIRED, SHOULD, RECOMMENDED, MAY, and OPTIONAL to define the significance of each particular requirement specified in this document.
In brief: "MUST" (or "REQUIRED") means that the item is an absolute requirement of the specification; "SHOULD" (or "RECOMMENDED") means there may exist valid reasons for ignoring this item, but the full implications should be understood before doing so; and "MAY" (or "OPTIONAL") means that this item is optional, and may be omitted without careful consideration.
## General Format
The format is JSON, specifically a JSON object as a single line of text, terminated by a newline (U+000D).
The JSON looks like this:
{"description":"One two three","status":"pending", ... }
While this is not a valid task (there are missing fields), the format is illustrated.
All attribute names are quoted with " (U+0022).
A name will always have a corresponding value, and if a value is blank, then the name/value pair is omitted from the line.
Newline characters are not permitted within the value, meaning that a task consists of a single line of text.
All data is UTF8.
## Data Types
There are five data types used in the task format.
## Data Type: String
Strings may consist of any UTF8 encoded characters.
## Data Type: Fixed String
A fixed string is one value from a set of acceptable values, such as a priority level, where the values may only be "", "L", "M" or "H".
## Data Type: UUID
A UUID is a 32-hex-character lower case string, formatted in this way:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
An example:
296d835e-8f85-4224-8f36-c612cad1b9f8
## Data Type: Integer
Integers are rendered in a simple fashion:
123
## Data Type: Date
Dates are rendered in ISO 8601 combined date and time in UTC format using the template:
YYYYMMDDTHHMMSSZ
An example:
20120110T231200Z
No other formats are supported.
## Data Type: Duration
Duration values represent a time period.
They take the form:
[[<sign>] <number>] <unit>
Some examples include:
- -3days
- annual
- 4hrs
The supported units are:
- annual
- biannual
- bimonthly
- biweekly
- biyearly
- daily
- days
- day
- d
- fortnight
- hours
- hour
- hrs
- hr
- h
- minutes
- mins
- min
- monthly
- months
- month
- mnths
- mths
- mth
- mos
- mo
- quarterly
- quarters
- qrtrs
- qtrs
- qtr
- q
- seconds
- secs
- sec
- s
- semiannual
- sennight
- weekdays
- weekly
- weeks
- week
- wks
- wk
- w
- yearly
- years
- year
- yrs
- yr
- y
Note that some values lack precision, for example "2q" means two quarters, or half a year.
Note that not all combinations of number and unit make sense, for example "3annual" makes no sense, but evaluates to "3years".
## The Attributes
Here are the standard attributes that may comprise a task:
| Name | Type |
|--------------|---------|
| status | String |
| uuid | UUID |
| entry | Date |
| description | String |
| start | Date |
| end | Date |
| due | Date |
| until | Date |
| wait | Date |
| modified | Date |
| scheduled | Date |
| recur | String |
| mask | String |
| imask | Integer |
| parent | UUID |
| project | String |
| priority | String |
| depends | String |
| tags * | String |
| annotation * | String |
| (UDA) | ? |
\* Both tags and annotations are lists of strings and objects.
Any UDA fields are assumed to be of type string.
There are other forms, which are conditional upon the state of a task:
| Status Value | Pending | Deleted | Completed | Waiting | Recurring Parent | Recurring Child |
|--------------|---------|---------|-----------|---------|------------------|-----------------|
| status | Reqd | Reqd | Reqd | Reqd | Reqd | Reqd |
| uuid | Reqd | Reqd | Reqd | Reqd | Reqd | Reqd |
| entry | Reqd | Reqd | Reqd | Reqd | Reqd | Reqd |
| description | Reqd | Reqd | Reqd | Reqd | Reqd | Reqd |
| start | Opt | Opt | Opt | Opt | Opt | Opt |
| end | | Reqd | Reqd | | | |
| due | Opt | Opt | Opt | Opt | Reqd | Opt |
| until | Opt | Opt | Opt | Opt | Opt | Opt |
| scheduled | Opt | Opt | Opt | Opt | Opt | Opt |
| wait | | | | Reqd | | |
| recur | | | | | Reqd | Reqd |
| mask | | | | | Intrn | |
| imask | | | | | | Intrn |
| parent | | | | | | Reqd |
| annotation | Opt | Opt | Opt | Opt | Opt | Opt |
| project | Opt | Opt | Opt | Opt | Opt | Opt |
| tags | Opt | Opt | Opt | Opt | Opt | Opt |
| priority | Opt | Opt | Opt | Opt | Opt | Opt |
| depends | Opt | Opt | Opt | Opt | Opt | Opt |
| modified | Intrn | Intrn | Intrn | Intrn | Intrn | Intrn |
| UDA | Opt | Opt | Opt | Opt | Opt | Opt |
(Legend: Reqd = required, Opt = optional, Intrn = Internally generated)
All tasks have four required fields.
There are other states in which a task may exist, and the requirements change.
At a minimum, a valid task contains:
- uuid
- status
- entry
- description
*Deleted* - A deleted task MUST also have "status":"deleted", an "end" date and a "modified" date.
*Completed* - A completed task MUST also have "status":"completed", an "end" date and a "modified" date.
*Waiting* - A waiting task MUST also have "status":"waiting" and a "wait" date.
The task is hidden from the user, until that "wait" date has passed, whereupon the status reverts to "pending", and the "wait" date is removed.
*Recurring Parent* - When a recurring task is entered, it MUST have "status":"recurring", a "recur" period and a "due" date.
It MAY also have an "until" date.
Recurring parent tasks are hidden from the user.
*Recurring Child* - A recurring child task is not created by the user, but is cloned from the recurring parent task by the Taskserver.
It may be modified by the user.
On completion, there is special handling to be done.
See section 3.11.
## Additional Attributes
There MAY be other fields than those listed above in a task definition.
Such fields MUST be preserved intact by any client, which means that if a task is downloaded that contains an unrecognized field, that field MUST not be modified, and MUST continue to exist in the task..
User Defined Attributes (UDAs) are additional fields.
## Attribute Details
The individual fields convey important information about a task, and in some cases work only in collusion with other fields.
All such details are listed here.
## Attribute: status
The status field describes the state of the task, which may ONLY be one of these literal strings:
"status":"pending"
"status":"deleted"
"status":"completed"
"status":"waiting"
"status":"recurring"
A pending task is a task that has not yet been completed or deleted.
This is the typical state for a task.
A deleted task is one that has been removed from the pending state, and MUST have an "end" field specified.
Given the required "entry" and "end" field, it can be determined how long the task was pending.
A completed task is one that has been removed from the pending state by completion, and MUST have an "end" field specified.
Given the required "entry" and "end" fields, it can be determine how long the task was pending.
A waiting task is ostensibly a pending task that has been hidden from typical view, and MUST have a "wait" field containing the date when the task is automatically returned to the pending state.
If a client sees a task that is in the waiting state, and the "wait" field is earlier than the current date and time, the client MUST remove the "wait" field and set the "status" field to "pending".
A recurring task is essentially a parent template task from which child tasks are cloned.
The parent remains hidden from view, and contains a "mask" field that represents the recurrences.
Each cloned child task has an "imask" field that indexes into the parent "mask" field, as well as a "parent" field that lists the UUID of the parent.
## Attribute: uuid
When a task is created, it MUST be assigned a new UUID by the client.
Once assigned, a UUID field MUST NOT be modified.
UUID fields are permanent.
## Attribute: entry
When a task is created, it MUST be assigned an "entry" date by the client.
This is the creation date of the task.
## Attribute: description
When a task is created, it MUST have a "description" field value, which contains UTF8 characters.
A "description" field may not contain newline characters, but may contain other characters, properly escaped.
See <https://json.org> for details.
## Attribute: start
To indicate that a task is being worked on, it MAY be assigned a "start" field.
Such a task is then considered Active.
## Attribute: end
When a task is deleted or completed, is MUST be assigned an "end" field.
It is not valid for a task to have an "end" field unless the status is also "completed" or "deleted".
If a completed task is restored to the "pending" state, the "end" field is removed.
## Attribute: due
A task MAY have a "due" field, which indicates when the task should be completed.
## Attribute: until
A recurring task MAY have an "until" field, which is the date after which no more recurring tasks should be generated.
At that time, the parent recurring task is set to "completed".
## Attribute: wait
A task MAY have a "wait" field date, in conjunction with a "status" of "waiting".
A waiting task is one that is not typically shown on reports until it is past the wait date.
An example of this is a birthday reminder.
A task may be entered for a birthday reminder in 10 months time, but can have a "wait" date 9 months from now, which means the task remains hidden until 1 month before the due date.
This prevents long-term tasks from cluttering reports until they become relevant.
## Attribute: recur
The "recur" field is for recurring tasks, and specifies the period between child tasks, in the form of a duration value.
The value is kept in the raw state (such as "3wks") as a string, so that it may be evaluated each time it is needed.
## Attribute: mask
A parent recurring task has a "mask" field that is an array of child status indicators.
Suppose a task is created that is due every week for a month.
The "mask" field will look like:
"----"
This mask has four slots, indicating that there are four child tasks, and each slot indicates, in this case, that the child tasks are pending ("-").
The possible slot indicators are:
* `-` - Pending
* `+` - Completed
* `X` - Deleted
* `W` - Waiting
Suppose the first three tasks has been completed, the mask would look like this:
"+++-"
If there were only three indicators in the mask:
"+-+"
This would indicate that the second task is pending, the first and third are complete, and the fourth has not yet been generated.
## Attribute: imask
Child recurring tasks have an "imask" field instead of a "mask" field like their parent.
The "imask" field is a zero-based integer offset into the "mask" field of the parent.
If a child task is completed, one of the changes that MUST occur is to look up the parent task, and using "imask" set the "mask" of the parent to the correct indicator.
This prevents recurring tasks from being generated twice.
## Attribute: parent
A recurring task instance MUST have a "parent" field, which is the UUID of the task that has "status" of "recurring".
This linkage between tasks, established using "parent", "mask" and "imask" is used to track the need to generate more recurring tasks.
## Attribute: annotation\_\...
Annotations are strings with timestamps.
Each annotation itself has an "entry" field and a "description" field, similar to the task itself.
Annotations form an array named "annotations".
For example (lines broken for clarity):
"annotations":[
{"entry":"20120110T234212Z","description":"Remember to get the mail"},
{"entry":"20120110T234559Z","description":"Pay the bills"}
]
## Attribute: project
A project is a single string.
For example:
"project":"Personal Taxes"
Note that projects receive special handling, so that when a "." (U+002E) is used, it implies a hierarchy, which means the following two projects:
"Home.Kitchen"
"Home.Garden"
are both considered part of the "Home" project.
## Attribute: tags
The "tags" field is an array of string, where each string is a single word containing no spaces.
For example:
"tags":["home","garden"]
## Attribute: priority
The "priority" field, if present, MAY contain one of the following strings:
"priority":"H"
"priority":"M"
"priority":"L"
These represent High, Medium and Low priorities.
An absent priority field indicates no priority.
## Attribute: depends
The "depends" field is a string containing a comma-separated unique set of UUIDs.
If task 2 depends on task 1, then it is task 1 that must be completed first.
Task 1 is considered a "blocking" tasks, and task 2 is considered a "blocked" task.
For example:
"depends":",, ..."
Note that in a future version of this specification, this will be changed to a JSON array of strings, like the "tags" field.
## Attribute: modified
A task MUST have a "modified" field set if it is modified.
This field is of type "date", and is used as a reference when merging tasks.
## Attribute: scheduled
A task MAY have a "scheduled" field, which indicates when the task should be available to start.
A task that has passed its "scheduled" data is said to be "ready".
## User Defined Attributes
A User Defined Attribute (UDA) is a field that is defined via configuration.
Given that the configuration is not present in the JSON format of a task, any fields that are not recognized are to be treated as UDAs.
This means that if a task contains a UDA, unless the meaning of it is understood, it MUST be preserved.
UDAs may have one of four types: string, numeric, date and duration.

View File

@@ -0,0 +1,29 @@
---
title: "Taskwarrior - Work Week Support"
---
## Work in Progress
This design document is a work in progress, and subject to change.
Once finalized, the feature will be scheduled for an upcoming release.
# Work Week Support
Taskwarrior supports the idea that a week starts on either a Sunday or a Monday, as determined by configuration.
This was added eight years ago, simply for display purposes in the `calendar` report.
Since then its use has propagated and it influences the `sow` date reference.0
Further requests have been made to make this more flexible, so that the notion of 'weekend' can be defined.
Furthermore, the idea that every week has a weekend has also been questioned.
It has become clear that a `weekstart` setting, and the notion of a weekend are no longer useful.
## Proposed Support
One option is to allow the user to completely define a work week in the following way:
workweek=1,2,3,4,5
With Sunday as day zero, this states that the work week is the typical Monday - Friday.
From this setting, the meaning of `soww` and `eoww` can be determined, as well as `recur:weekday`.

BIN
doc/devel/rfcs/year.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,51 +1,176 @@
.TH task-sync 5 2016-02-24 "${PACKAGE_STRING}" "User Manuals"
.SH NAME
task-sync \- A discussion and tutorial for the various task(1) data
synchronization capabilities.
task-sync \- A discussion and tutorial for the various
.BR task (1)
data synchronization capabilities.
.SH INTRODUCTION
Taskwarrior has several sync options, both external and built in. If you wish
to sync your data, choose one method only; mixing methods is going to lead to
problems. Each of the methods discussed have their own strengths.
.SH ALTERNATIVES
There are three alternatives for syncing data, which are:
1) Version control systems, such as git, hg, svn
Taskwarrior can synchronize your tasks to a server. This has a few benefits:
.br
2) File sharing systems, such as DropBox, Google Drive
- Makes your tasks accessible from multiple systems, called "replicas".
.br
3) Using the Taskserver and the 'sync' command
.SH OPTION 1: VERSION CONTROL SYSTEMS
There are several good, distributed VCS systems (git, hg, ...) and centralized
VCS systems (svn, cvs ...), and they all function in a similar fashion for our
purposes.
Setup is straightforward. You place your .task directory under revision
control. You then need to perform a regular commit/push/pull/update to make
sure that the data is propagated when needed. You can even do this using shell
scripts so that every task command is preceded by a 'pull' and followed by
a 'push'.
Strengths:
- Provides a backup of your tasks.
.br
- Good data transport mechanisms
.br
- Secure transport options
- Saves disk space.
For example, you might want a replica of your tasks on your laptop and on your phone.
NOTE: A side-effect of synchronization is that once changes have been
synchronized, they cannot be undone. This means that each time synchronization
is run, it is no longer possible to undo previous operations.
.SH MANAGING SYNCHRONIZATION
.SS Adding a Replica
To add a new replica, configure a new, empty replica identically to
the existing replica, and run `task sync`.
.SS When to Synchronize
Taskwarrior can perform a sync operation at every garbage collection (gc) run.
This is the default, and is appropriate for local synchronization.
For synchronization to a server, a better solution is to run
$ task sync
periodically, such as via
.BR cron (8) .
.SH CONFIGURATION
Taskwarrior provides several options for synchronizing your tasks:
- To a server specifically designed to handle Taskwarrior data.
+ To a cloud storage provider. Currently only GCP is supported.
- To a local, on-disk file.
For most of these, you will need an encryption secret used to encrypt and
decrypt your tasks. This can be any secret string, and must match for all
replicas sharing tasks.
$ task config sync.encryption_secret <encryption_secret>
Tools such as
.BR pwgen (1)
can generate suitable secret values.
.SS Sync Server
To synchronize your tasks to a sync server, you will need the following
information from the server administrator:
Weaknesses:
.br
- You need proficiency with VCS tools
- The server's URL ("origin", such as "https://tw.example.com")
.br
- You will need to manually resolve conflicts frequently
.br
- You need to provide the mechanism for making sure copies are up to date
- A client ID ("client_id") identifying your tasks
Configure Taskwarrior with these details:
$ task config sync.server.origin <origin>
$ task config sync.server.client_id <client_id>
Note that the origin must include the scheme, such as 'http://' or 'https://'.
.SS Google Cloud Platform
To synchronize your tasks to GCP, use the GCP Console to create a new project,
and within that project a new Cloud Storage bucket. The default settings for
the bucket are adequate.
Authenticate to the project with:
$ gcloud config set project $PROJECT_NAME
$ gcloud auth application-default login
Then configure Taskwarrior with:
$ task config sync.gcp.bucket <bucket-name>
However you can bring your own service account credentials if your
`application-default` is already being used by some other application
To begin, navigate to the "IAM and Admin" section in the Navigation Menu, then select "Roles."
On the top menu bar within the "Roles" section, click "CREATE ROLE."
Provide an appropriate name and description for the new role.
Add permissions to your new role using the filter "Service:storage" (not the "Filter permissions by role" input box).
Select the following permissions:
- storage.buckets.create
- storage.buckets.get
- storage.buckets.update
- storage.objects.create
- storage.objects.get
- storage.objects.list
- storage.objects.update
Create your new role.
On the left sidebar, navigate to "Service accounts."
On the top menu bar within the "Service accounts" section, click "CREATE SERVICE ACCOUNT."
Provide an appropriate name and description for the new service account.
Select the role you just created and complete the service account creation process.
Now, in the Service Account dashboard, click into the new service account and select "keys" on the top menu bar.
Click on "ADD KEY" to create and download a new key (a JSON key).
.SH OPTION 2: FILE SHARING SERVICES
Then configure Taskwarrior with:
$ task config sync.gcp.bucket <bucket-name>
$ task config sync.gcp.credential_path <absolute-path-to-downloaded-credentials>
.SS Local Synchronization
In order to take advantage of synchronization's side effect of saving disk
space without setting up a remote server, it is possible to sync tasks locally.
To configure local sync:
$ task config sync.local.server_dir /path/to/sync
The default configuration is to sync to a database in the task directory
("data.location").
.SH RUNNING TASKCHAMPION-SYNC-SERVER
The TaskChampion sync server is an HTTP server supporting multiple users.
Users are identified by a client ID, and users with different client IDs are
entirely independent. Task data is encrypted by Taskwarrior, and the sync
server never sees un-encrypted data.
The server is developed in
https://github.com/GothenburgBitFactory/taskchampion-sync-server.
.SS Adding a New User
To add a new user to the server, invent a new client ID with a tool like
`uuidgen` or an online UUID generator. There is no need to configure the server
for this new client ID: the sync server will automatically create a new user
whenever presented with a new client ID. Supply the ID, along with the
origin, to the user for inclusion in their Taskwarrior config. The user should
invent their own "encryption_secret".
.SH AVOIDING DUPLICATE RECURRING TASKS
If you run multiple clients that sync to the same server, you will need to run
this command on your primary client (the one you use most often):
$ task config recurrence on
And on the other clients, run:
$ task config recurrence off
This protects you against the effects of a sync/duplication bug.
.SH ALTERNATIVE: FILE SHARING SERVICES
There are many file sharing services, such as DropBox, Amazon S3, Google Drive,
SkyDrive and more. This technique involves storing your .task directory in a
shared directory under the control of the file hosting services.
@@ -74,78 +199,6 @@ Weaknesses:
- Tasks are not properly merged
.SH OPTION 3: TASKSERVER
The Taskserver was designed for this purpose to be secure, fast and conflict-
free, allowing data interchange between assorted Taskwarrior clients, and
tolerant of network connectivity problems.
There is a 'sync' command built in to Taskwarrior (provided the GnuTLS library
is installed), and with a server account and client configuration, syncing is
done on demand.
Setup is a matter of creating an account on a Taskserver (see your Taskserver
provider or operate your own - see
https://taskwarrior.org/docs/taskserver/setup.html)
Once you have an account, you'll receive a certificate, key, and credentials.
You'll need to put the certificate and key somewhere like this:
$ cp <name>.cert.pem ~/.task
$ cp <name>.key.pem ~/.task
Then you configure Taskwarrior, using the provided details:
$ task config taskd.certificate ~/.task/<name>.cert.pem
$ task config taskd.key ~/.task/<name>.key.pem
$ task config taskd.credentials <organization>/<name>/<UUID>
$ task config taskd.server <server domain>:<port>
If you are using a private server, you are likely also using a self-signed
certificate, which means you will need one of the following additional entries:
$ task config taskd.ca ~/.task/ca.cert.pem
The CA (Certificate Authority) will be used to verify the server certificate.
After setup, you run a one-time sync initialization, like this:
$ task sync init
This will make sure your client and the server are properly in sync to begin
with. From this point on, you never run the 'initialize' command again, just
go about your business, and when you want to sync, run this:
$ task sync
You'll see a summary of how many tasks were uploaded and downloaded. You can
safely run the command as often as you like. When there are no changes to sync,
nothing happens. If you do not have connectivity, your task changes accumulate
so that when you next run 'sync' with proper connectivity, the changes are
properly handled, in the right order.
If you run multiple clients that sync to the same server, you will need to run
this command on your primary client (the one you use most often):
$ task config recurrence on
And on the other clients, run:
$ task config recurrence off
This protects you against the effects of a sync/duplication bug.
Strengths:
.br
- Secure communication
.br
- Minimal bandwidth
.br
- Tolerates connectivity outage
Weaknesses:
.br
- You need to manage your own server, or gain access to a hosted server.
.SH "CREDITS & COPYRIGHTS"
Copyright (C) 2006 \- 2021 T. Babej, P. Beckingham, F. Hernandez.

View File

@@ -401,15 +401,6 @@ Modifies the existing task with provided information.
.B task <filter> prepend <mods>
Prepends description text to an existing task. Is affected by the context.
.TP
.B task <filter> purge
Permanently removes the specified tasks from the data files. Only
tasks that are already deleted can be purged. This command has a
local-only effect and changes introduced by it are not synced.
Is affected by the context.
Warning: causes permanent, non-revertible loss of data.
.TP
.B task <filter> start <mods>
Marks the specified tasks as started. Is affected by the context.
@@ -547,13 +538,9 @@ Shows statistics of the tasks defined by the filter. Is affected by the context.
Shows a report of aggregated task status by project. Is affected by the context.
.TP
.B task sync [init]
.B task sync
The sync command synchronizes data with the Taskserver, if configured.
The init subcommand should only ever be run once, and only on one client, because
it sends all data to the Taskserver. This allows all the subsequent sync commands
to only send small deltas.
Note: If you use multiple sync clients, make sure this setting (which is the default)
is on your primary client:
@@ -1142,11 +1129,11 @@ task ... due:juhannus
.SS FREQUENCIES
Recurrence periods. Taskwarrior supports several ways of specifying the
.I frequency
of recurring tasks.
of recurring tasks. Note that frequencies can be abbreviated.
.RS
.TP
daily, day, 1da, 2da, ...
daily, day, 1day, 1days, 2day, 2days, 1da, 2da, ...
Every day or a number of days.
.TP
@@ -1200,7 +1187,6 @@ active context. Here is a list of the commands that are affected:
log
prepend
projects
purge
start
stats
stop

View File

@@ -516,7 +516,7 @@ debug output can be useful. It can also help explain how the command line is
being parsed, but the information is displayed in a developer-friendly, not a
user-friendly way.
Turning debug on automatically sets debug.hooks=1, debug.parser=1 and debug.tls=2
Turning debug on automatically sets debug.hooks=1 and debug.parser=1
if they do not already have assigned values. Defaults to "0".
.TP
@@ -531,11 +531,6 @@ Level 1 shows the final parse tree.
Level 2 shows the parse tree from all phases of the parse.
Level 3 shows expression evaluation details.
.TP
.B debug.tls=0
Controls the GnuTLS diagnostic level. For 'sync' debugging. Level 0 means no
diagnostics. Level 9 is the highest. Level 2 is a good setting for debugging.
.TP
.B obfuscate=0
When set to '1', will replace all report text with 'xxx'.
@@ -1527,58 +1522,6 @@ context.home.rc.default.command=home_report
These configuration settings are used to connect and sync tasks with the task
server.
.TP
.B taskd.server=<host>:<port>
.RS
Specifies the hostname and port of the Taskserver. Hostname may be an IPv4 or
IPv6 address, or domain. Port is an integer.
.RE
.TP
.B taskd.credentials=<organization>/<user>/<key>
.RS
User identification for the Taskserver, which includes a private key.
.RE
.TP
.B taskd.certificate=<path>
.RS
Specifies the path to the client certificate used for identification with the
Taskserver.
.RE
.TP
.B taskd.key=<path>
.RS
Specifies the path to the client key used for encrypted communication with the
Taskserver.
.RE
.TP
.B taskd.ca=<path>
.RS
Specifies the path to the CA certificate in the event that your Taskserver is
using a self-signed certificate. Optional.
.RE
.TP
.B taskd.trust=strict|ignore hostname|allow all
.RS
This settings allows you to override the trust level when server certificates
are validated. With "allow all", the server certificate is trusted
automatically. With "ignore hostname", the server certificate is verified but
the hostname is ignored. With "strict", the server certificate is verified.
Default is "strict", which requires full validation.
.RE
.TP
.B taskd.ciphers=NORMAL
Override of the cipher selection. The set of ciphers used by TLS may be
controlled by both server and client. There must be some overlap between
client and server supported ciphers, or communication cannot occur.
Default is "NORMAL". See GnuTLS documentation for full details.
.RE
.SH "CREDITS & COPYRIGHTS"
Copyright (C) 2006 \- 2021 T. Babej, P. Beckingham, F. Hernandez.

View File

@@ -1,57 +1,17 @@
version: '3'
services:
test-centos7:
test-fedora38:
build:
context: .
dockerfile: test/docker/centos7
dockerfile: test/docker/fedora38
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-centos8:
test-fedora39:
build:
context: .
dockerfile: test/docker/centos8
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-fedora32:
build:
context: .
dockerfile: test/docker/fedora32
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-fedora33:
build:
context: .
dockerfile: test/docker/fedora33
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-fedora34:
build:
context: .
dockerfile: test/docker/fedora34
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-fedora35:
build:
context: .
dockerfile: test/docker/fedora35
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu1804:
build:
context: .
dockerfile: test/docker/ubuntu1804
dockerfile: test/docker/fedora39
network_mode: "host"
security_opt:
- label=type:container_runtime_t
@@ -64,26 +24,10 @@ services:
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu2104:
test-ubuntu2204:
build:
context: .
dockerfile: test/docker/ubuntu2104
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-ubuntu2110:
build:
context: .
dockerfile: test/docker/ubuntu2110
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-debianstable:
build:
context: .
dockerfile: test/docker/debianstable
dockerfile: test/docker/ubuntu2204
network_mode: "host"
security_opt:
- label=type:container_runtime_t
@@ -96,18 +40,10 @@ services:
security_opt:
- label=type:container_runtime_t
tty: true
test-gentoo:
test-opensuse:
build:
context: .
dockerfile: test/docker/gentoo
network_mode: "host"
security_opt:
- label=type:container_runtime_t
tty: true
test-opensuse15:
build:
context: .
dockerfile: test/docker/opensuse15
dockerfile: test/docker/opensuse
network_mode: "host"
security_opt:
- label=type:container_runtime_t

42
docker/task.dockerfile Normal file
View File

@@ -0,0 +1,42 @@
FROM ubuntu:22.04 AS base
FROM base AS builder
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
curl \
git \
libgnutls28-dev \
uuid-dev
# Setup language environment
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Add source directory
ADD .. /root/code/
WORKDIR /root/code/
# Setup Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \
sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs
# Build Taskwarrior
RUN git clean -dfx && \
git submodule init && \
git submodule update && \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release . && \
cmake --build build -j 8
FROM base AS runner
# Install Taskwarrior
COPY --from=builder /root/code/build/src/task /usr/local/bin
# Initialize Taskwarrior
RUN ( echo "yes" | task ) || true

3
misc/README.md Normal file
View File

@@ -0,0 +1,3 @@
# misc/
This directory contains bits and bobs that do not belong elsewhere.

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
add_custom_target (performance ./run_perf
DEPENDS task_executable

View File

@@ -31,18 +31,18 @@ while (my $line = <$fh>)
if ($. % 20 == 19)
{
my $anno_id = $id - 1;
qx{../src/task rc:perf.rc rc.gc=off $anno_id annotate $line};
qx{../build/src/task rc:perf.rc rc.gc=off $anno_id annotate $line};
print "[$.] task rc:perf.rc rc.gc=off $anno_id annotate $line\n" if $?;
}
elsif ($. % 4 == 1)
{
qx{../src/task rc:perf.rc rc.gc=off add $line};
qx{../build/src/task rc:perf.rc rc.gc=off add $line};
print "[$.] task rc:perf.rc rc.gc=off add $line\n" if $?;
++$id;
}
else
{
qx{../src/task rc:perf.rc rc.gc=off log $line};
qx{../build/src/task rc:perf.rc rc.gc=off log $line};
print "[$.] task rc:perf.rc rc.gc=off log $line\n" if $?;
}
}

View File

@@ -16,7 +16,7 @@ fi
# Allow override.
if [[ -z $TASK ]]
then
TASK=../src/task
TASK=../build/src/task
fi
# Run benchmarks.

View File

@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
install (DIRECTORY bash fish vim hooks
DESTINATION ${TASK_DOCDIR}/scripts)
install (FILES zsh/_task

View File

@@ -123,6 +123,10 @@ function __fish.task.need_to_complete.config
contains (__fish.task.current.command) 'config' 'show'
end
function __fish.task.need_to_complete.context
contains (__fish.task.current.command) 'context'
end
function __fish.task.need_to_complete.filter
__fish.task.before_command
end
@@ -217,6 +221,10 @@ function __fish.task.list.config
task _config
end
function __fish.task.list.context
task _context
end
function __fish.task.list.depends
__fish.task.list.id with_description
end
@@ -287,8 +295,9 @@ end
function __fish.task.list.tag
set -l tags (task _tags)
printf -- '+%s\n' $tags
printf -- '-%s\n' $tags
printf '+%s\n' $tags
# compatibility, older fish won't allow - in format
printf ' %s\n' $tags | tr ' ' '-'
end
function __fish.task.list.task
@@ -346,10 +355,10 @@ end
# static variables that won't changes even when taskw's data is modified
set __fish_task_static_commands_with_desc (__fish.task.zsh commands | sort | string collect)
set __fish_task_static_commands (echo -e $__fish_task_static_commands_with_desc | cut -d ' ' -f 1 | string collect)
set __fish_task_static_command_mods (printf -- '%s\n' 'add' 'annotate' 'append' 'delete' 'done' 'duplicate' 'log' 'modify' 'prepend' 'start' 'stop' | string collect)
set __fish_task_static_mod (printf -- '%s\n' 'before' 'after' 'over' 'under' 'none' 'is' 'isnt' 'has' 'hasnt' 'startswith' 'endswith' 'word' 'noword' | string collect)
set __fish_task_static_status (printf -- '%s\tstatus\n' 'pending' 'completed' 'deleted' 'waiting' | string collect)
set __fish_task_static_priority (printf -- '%s\n' 'H\tHigh' 'M\tMiddle' 'L\tLow' | string collect)
set __fish_task_static_command_mods (printf '%s\n' 'add' 'annotate' 'append' 'delete' 'done' 'duplicate' 'log' 'modify' 'prepend' 'start' 'stop' | string collect)
set __fish_task_static_mod (printf '%s\n' 'before' 'after' 'over' 'under' 'none' 'is' 'isnt' 'has' 'hasnt' 'startswith' 'endswith' 'word' 'noword' | string collect)
set __fish_task_static_status (printf '%s\tstatus\n' 'pending' 'completed' 'deleted' 'waiting' | string collect)
set __fish_task_static_priority (printf '%s\n' 'H\tHigh' 'M\tMiddle' 'L\tLow' | string collect)
set __fish_task_static_freq 'daily:Every day' \
'day:Every day' \
@@ -364,17 +373,17 @@ set __fish_task_static_freq 'daily:Every day' \
'yearly:Every year' \
'biannual:Every two years' \
'biyearly:Every two years'
set __fish_task_static_freq (printf -- '%s\n' $__fish_task_static_freq | sed 's/:/\t/' | string collect)
set __fish_task_static_freq (printf '%s\n' $__fish_task_static_freq | sed 's/:/\t/' | string collect)
set __fish_task_static_freq_numeric 'd:days' \
'w:weeks' \
'q:quarters' \
'y:years'
set __fish_task_static_freq_numeric (printf -- '%s\n' $__fish_task_static_freq_numeric | sed 's/:/\t/' | string collect)
set __fish_task_static_freq_numeric (printf '%s\n' $__fish_task_static_freq_numeric | sed 's/:/\t/' | string collect)
set __fish_task_static_freq_numeric 'd:days' \
'w:weeks' \
'q:quarters' \
'y:years'
set __fish_task_static_freq_numeric (printf -- '%s\n' $__fish_task_static_freq_numeric | sed 's/:/\t/' | string collect)
set __fish_task_static_freq_numeric (printf '%s\n' $__fish_task_static_freq_numeric | sed 's/:/\t/' | string collect)
set __fish_task_static_dates 'today:Today' \
'yesterday:Yesterday' \
'tomorrow:Tomorrow' \
@@ -406,7 +415,7 @@ set __fish_task_static_dates 'today:Today' \
'midsommarafton:Midsommarafton' \
'later:Later' \
'someday:Some Day'
set __fish_task_static_dates (printf -- '%s\n' $__fish_task_static_dates | sed 's/:/\t/' | string collect)
set __fish_task_static_dates (printf '%s\n' $__fish_task_static_dates | sed 's/:/\t/' | string collect)
set __fish_task_static_reldates 'hrs:n hours' \
'day:n days' \
# '1st:first' \
@@ -414,7 +423,7 @@ set __fish_task_static_reldates 'hrs:n hours' \
# '3rd:third' \
# 'th:4th, 5th, etc.' \
'wks:weeks'
set __fish_task_static_reldates (printf -- '%s\n' $__fish_task_static_reldates | sed 's/:/\t/' | string collect)
set __fish_task_static_reldates (printf '%s\n' $__fish_task_static_reldates | sed 's/:/\t/' | string collect)
# the followings are actually not used for autocomplete, but to retrieve friendly description that aren't present in internal command
set __fish_task_static_attr_desc_keys 'description' 'status' 'project' \
'priority' 'due' 'recur' \
@@ -429,6 +438,7 @@ set __fish_task_static_attr_desc_vals 'Task description text' 'Status of task -
# fish's auto-completion when multiple `complete` have supplied with '-k' flag, the last will be displayed first
__fish.task.complete config
__fish.task.complete context
__fish.task.complete attr_value
__fish.task.complete attr_name
__fish.task.complete tag

View File

@@ -5,7 +5,7 @@ FROM centos:8
RUN dnf update -y
RUN yum install epel-release -y
RUN dnf install python38 vim git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime sudo man gdb -y
RUN dnf install python38 vim git gcc gcc-c++ cmake make libuuid-devel libfaketime sudo man gdb -y
RUN useradd warrior
RUN echo warrior ALL=NOPASSWD:ALL > /etc/sudoers.d/warrior

View File

@@ -3,9 +3,13 @@
FROM centos:8
# Workaround to the location of the repos
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
RUN dnf update -y
RUN yum install epel-release -y
RUN dnf install python38 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime sudo man -y
RUN dnf install python38 git gcc gcc-c++ cmake make libuuid-devel libfaketime sudo man -y
RUN useradd warrior
RUN echo warrior ALL=NOPASSWD:ALL > /etc/sudoers.d/warrior
@@ -13,6 +17,10 @@ RUN echo warrior ALL=NOPASSWD:ALL > /etc/sudoers.d/warrior
USER warrior
WORKDIR /home/warrior/
# Setup Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \
sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs
# Setup taskwarrior
# The purpose is to speed up subsequent re-installs due to Docker layer caching
RUN git clone https://github.com/GothenburgBitFactory/taskwarrior.git

View File

@@ -38,12 +38,15 @@ syn match taskrcGoodKey '^\s*\V_forcecolor='he=e-1
syn match taskrcGoodKey '^\s*\Vabbreviation.minimum='he=e-1
syn match taskrcGoodKey '^\s*\Vactive.indicator='he=e-1
syn match taskrcGoodKey '^\s*\Valias.\S\{-}='he=e-1
syn match taskrcGoodKey '^\s*\Vallow.empty.filter='he=e-1
syn match taskrcGoodKey '^\s*\Vavoidlastcolumn='he=e-1
syn match taskrcGoodKey '^\s*\Vbulk='he=e-1
syn match taskrcGoodKey '^\s*\Vburndown.cumulative='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.details='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.details.report='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.holidays='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.legend='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.monthsperline='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.offset='he=e-1
syn match taskrcGoodKey '^\s*\Vcalendar.offset.value='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor='he=e-1
@@ -58,10 +61,13 @@ syn match taskrcGoodKey '^\s*\Vcolor.calendar.due='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.due.today='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.holiday='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.overdue='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.scheduled='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.today='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.weekend='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.calendar.weeknumber='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.completed='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.debug='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.deleted='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.due='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.due.today='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.error='he=e-1
@@ -70,6 +76,8 @@ syn match taskrcGoodKey '^\s*\Vcolor.header='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.history.add='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.history.delete='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.history.done='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.label='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.label.sort='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.overdue='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.uda.priority.H='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.uda.priority.L='he=e-1
@@ -85,11 +93,16 @@ syn match taskrcGoodKey '^\s*\Vcolor.tagged='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.undo.after='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.undo.before='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.until='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.warning='he=e-1
syn match taskrcGoodKey '^\s*\Vcolor.\(tag\|project\|keyword\|uda\).\S\{-}='he=e-1
syn match taskrcGoodKey '^\s*\Vcolumn.padding='he=e-1
syn match taskrcGoodKey '^\s*\Vcomplete.all.tags='he=e-1
syn match taskrcGoodKey '^\s*\Vconfirmation='he=e-1
syn match taskrcGoodKey '^\s*\Vcontext='he=e-1
syn match taskrcGoodKey '^\s*\Vcontext.\S\{-}.\(read\|write\)='he=e-1
syn match taskrcGoodKey '^\s*\Vcontext.\S\{-}.rc.\S\{-}='he=e-1
syn match taskrcGoodKey '^\s*\Vdata.location='he=e-1
syn match taskrcGoodKey '^\s*\Vdate.iso='he=e-1
syn match taskrcGoodKey '^\s*\Vdateformat='he=e-1
syn match taskrcGoodKey '^\s*\Vdateformat.annotation='he=e-1
syn match taskrcGoodKey '^\s*\Vdateformat.edit='he=e-1
@@ -97,7 +110,8 @@ syn match taskrcGoodKey '^\s*\Vdateformat.holiday='he=e-1
syn match taskrcGoodKey '^\s*\Vdateformat.info='he=e-1
syn match taskrcGoodKey '^\s*\Vdateformat.report='he=e-1
syn match taskrcGoodKey '^\s*\Vdebug='he=e-1
syn match taskrcGoodKey '^\s*\Vdebug.tls='he=e-1
syn match taskrcGoodKey '^\s*\Vdebug.hooks='he=e-1
syn match taskrcGoodKey '^\s*\Vdebug.parser='he=e-1
syn match taskrcGoodKey '^\s*\Vdefault.command='he=e-1
syn match taskrcGoodKey '^\s*\Vdefault.due='he=e-1
syn match taskrcGoodKey '^\s*\Vdefault.priority='he=e-1
@@ -112,11 +126,14 @@ syn match taskrcGoodKey '^\s*\Vdetection='he=e-1
syn match taskrcGoodKey '^\s*\Vdisplayweeknumber='he=e-1
syn match taskrcGoodKey '^\s*\Vdom='he=e-1
syn match taskrcGoodKey '^\s*\Vdue='he=e-1
syn match taskrcGoodKey '^\s*\Veditor='he=e-1
syn match taskrcGoodKey '^\s*\Vexit.on.missing.db='he=e-1
syn match taskrcGoodKey '^\s*\Vexpressions='he=e-1
syn match taskrcGoodKey '^\s*\Vextensions='he=e-1
syn match taskrcGoodKey '^\s*\Vfontunderline='he=e-1
syn match taskrcGoodKey '^\s*\Vgc='he=e-1
syn match taskrcGoodKey '^\s*\Vhooks='he=e-1
syn match taskrcGoodKey '^\s*\Vhooks.location='he=e-1
syn match taskrcGoodKey '^\s*\Vhyphenate='he=e-1
syn match taskrcGoodKey '^\s*\Vindent.annotation='he=e-1
syn match taskrcGoodKey '^\s*\Vindent.report='he=e-1
@@ -130,18 +147,25 @@ syn match taskrcGoodKey '^\s*\Vlist.all.tags='he=e-1
syn match taskrcGoodKey '^\s*\Vlocale='he=e-1
syn match taskrcGoodKey '^\s*\Vlocking='he=e-1
syn match taskrcGoodKey '^\s*\Vnag='he=e-1
syn match taskrcGoodKey '^\s*\Vnews.version='he=e-1
syn match taskrcGoodKey '^\s*\Vobfuscate='he=e-1
syn match taskrcGoodKey '^\s*\Vprint.empty.columns='he=e-1
syn match taskrcGoodKey '^\s*\Vrecurrence='he=e-1
syn match taskrcGoodKey '^\s*\Vrecurrence.confirmation='he=e-1
syn match taskrcGoodKey '^\s*\Vrecurrence.indicator='he=e-1
syn match taskrcGoodKey '^\s*\Vrecurrence.limit='he=e-1
syn match taskrcGoodKey '^\s*\Vregex='he=e-1
syn match taskrcGoodKey '^\s*\Vreport.\S\{-}.\(description\|columns\|labels\|sort\|filter\|dateformat\|annotations\)='he=e-1
syn match taskrcGoodKey '^\s*\Vreport.\S\{-}.\(description\|columns\|context\|labels\|sort\|filter\|dateformat\|annotations\)='he=e-1
syn match taskrcGoodKey '^\s*\Vreserved.lines='he=e-1
syn match taskrcGoodKey '^\s*\Vrow.padding='he=e-1
syn match taskrcGoodKey '^\s*\Vrule.color.merge='he=e-1
syn match taskrcGoodKey '^\s*\Vrule.precedence.color='he=e-1
syn match taskrcGoodKey '^\s*\Vsearch.case.sensitive='he=e-1
syn match taskrcGoodKey '^\s*\Vsummary.all.projects='he=e-1
syn match taskrcGoodKey '^\s*\Vsugar='he=e-1
syn match taskrcGoodKey '^\s*\Vsync.\(server.\(origin\|client_id\|encryption_secret\)\|local.server_dir\)='he=e-1
syn match taskrcGoodKey '^\s*\Vtag.indicator='he=e-1
syn match taskrcGoodKey '^\s*\Vtaskd.\(server\|credentials\|certificate\|key\|ca\|trust\|ciphers\)='he=e-1
syn match taskrcGoodKey '^\s*\Vuda.\S\{-}.\(default\|type\|label\|values\)='he=e-1
syn match taskrcGoodKey '^\s*\Vuda.\S\{-}.\(default\|type\|label\|values\|indicator\)='he=e-1
syn match taskrcGoodKey '^\s*\Vundo.style='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.active.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.age.coefficient='he=e-1
@@ -159,6 +183,9 @@ syn match taskrcGoodKey '^\s*\Vurgency.scheduled.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.tags.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.uda.\S\{-}.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.waiting.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.user.tag.\S\{-}.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.user.project.\S\{-}.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.user.keyword.\S\{-}.coefficient='he=e-1
syn match taskrcGoodKey '^\s*\Vurgency.inherit='he=e-1
syn match taskrcGoodKey '^\s*\Vverbose='he=e-1
syn match taskrcGoodKey '^\s*\Vweekstart='he=e-1

View File

@@ -1,9 +1,11 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/tc
${CMAKE_SOURCE_DIR}/src/commands
${CMAKE_SOURCE_DIR}/src/columns
${CMAKE_SOURCE_DIR}/src/libshared/src
${CMAKE_SOURCE_DIR}/taskchampion/lib
${TASK_INCLUDE_DIRS})
add_library (task STATIC CLI2.cpp CLI2.h
@@ -15,8 +17,8 @@ add_library (task STATIC CLI2.cpp CLI2.h
Lexer.cpp Lexer.h
TDB2.cpp TDB2.h
Task.cpp Task.h
TLSClient.cpp TLSClient.h
Variant.cpp Variant.h
Version.cpp Version.h
ViewTask.cpp ViewTask.h
dependency.cpp
feedback.cpp
@@ -50,9 +52,16 @@ add_executable (calc_executable calc.cpp)
add_executable (lex_executable lex.cpp)
# Yes, 'task' (and hence libshared) is included twice, otherwise linking fails on assorted OSes.
target_link_libraries (task_executable task commands columns libshared task libshared ${TASK_LIBRARIES})
target_link_libraries (calc_executable task commands columns libshared task libshared ${TASK_LIBRARIES})
target_link_libraries (lex_executable task commands columns libshared task libshared ${TASK_LIBRARIES})
# Similarly for `tc`.
target_link_libraries (task_executable task tc commands tc columns libshared task libshared ${TASK_LIBRARIES})
target_link_libraries (calc_executable task tc commands tc columns libshared task libshared ${TASK_LIBRARIES})
target_link_libraries (lex_executable task tc commands tc columns libshared task libshared ${TASK_LIBRARIES})
if (DARWIN)
# SystemConfiguration is required by Rust libraries like reqwest, to get proxy configuration.
target_link_libraries (task_executable "-framework CoreFoundation -framework Security -framework SystemConfiguration")
target_link_libraries (calc_executable "-framework CoreFoundation -framework Security -framework SystemConfiguration")
target_link_libraries (lex_executable "-framework CoreFoundation -framework Security -framework SystemConfiguration")
endif (DARWIN)
set_property (TARGET task_executable PROPERTY OUTPUT_NAME "task")

View File

@@ -58,6 +58,7 @@
////////////////////////////////////////////////////////////////////////////////
// This string is parsed and used as default values for configuration.
// Note: New configuration options should be added to the vim syntax file in scripts/vim/syntax/taskrc.vim
std::string configurationDefaults =
"# Taskwarrior program configuration file.\n"
"# For more documentation, see https://taskwarrior.org or try 'man task', 'man task-color',\n"
@@ -271,21 +272,19 @@ std::string configurationDefaults =
"list.all.tags=0 # Include old tag names in 'tags' command\n"
"print.empty.columns=0 # Print columns which have no data for any task\n"
"debug=0 # Display diagnostics\n"
"debug.tls=0 # Sync diagnostics\n"
"sugar=1 # Syntactic sugar\n"
"obfuscate=0 # Obfuscate data for error reporting\n"
"fontunderline=1 # Uses underlines rather than -------\n"
"\n"
"# WARNING: Please read the documentation (man task-sync) before setting up\n"
"# Taskwarrior for Taskserver synchronization.\n"
"#taskd.ca=<certificate file>\n"
"#taskd.certificate=<certificate file>\n"
"#taskd.credentials=<organization>/<name>/<password>\n"
"#taskd.server=<server>:<port>\n"
"taskd.trust=strict\n"
"#taskd.trust=ignore hostname\n"
"#taskd.trust=allow all\n"
"taskd.ciphers=NORMAL\n"
"\n"
"#sync.encryption_secret # Encryption secret for sync to a server\n"
"#sync.server.client_id # Client ID for sync to a server\n"
"#sync.server.origin # Origin of the sync server\n"
"#sync.local.server_dir # Directory for local sync\n"
"#sync.gcp.credential_path # Path to JSON file containing credentials to authenticate GCP Sync\n"
"#sync.gcp.bucket # Bucket for sync to GCP\n"
"\n"
"# Aliases - alternate names for commands\n"
"alias.rm=delete # Alias for the delete command\n"
@@ -559,9 +558,11 @@ int Context::initialize (int argc, const char** argv)
if (taskdata_overridden && verbose ("override"))
header (format ("TASKDATA override: {1}", data_dir._data));
tdb2.set_location (data_dir);
createDefaultConfig ();
bool create_if_missing = !config.getBoolean ("exit.on.missing.db");
tdb2.open_replica (data_dir, create_if_missing);
////////////////////////////////////////////////////////////////////////////
//
// [3] Instantiate Command objects and capture command entities.
@@ -734,7 +735,6 @@ int Context::run ()
{
hooks.onLaunch ();
rc = dispatch (output);
tdb2.commit (); // Harmless if called when nothing changed.
hooks.onExit (); // No chance to update data.
timer_total.stop ();
@@ -850,8 +850,7 @@ int Context::dispatch (std::string &out)
assert (c);
// The command know whether they need a GC.
if (c->needs_gc () &&
! tdb2.read_only ())
if (c->needs_gc ())
{
run_gc = config.getBoolean ("gc");
tdb2.gc ();
@@ -861,13 +860,6 @@ int Context::dispatch (std::string &out)
run_gc = false;
}
/*
// Only read-only commands can be run when TDB2 is read-only.
// TODO Implement TDB2::read_only
if (tdb2.read_only () && !c->read_only ())
throw std::string ("");
*/
// This is something that is only needed for write commands with no other
// filter processing.
if (c->accepts_modifications () &&
@@ -1261,23 +1253,6 @@ void Context::createDefaultConfig ()
if (! File::write (rc_file._data, contents.str ()))
throw format ("Could not write to '{1}'.", rc_file._data);
}
// Create data location, if necessary.
Directory d (data_dir);
if (! d.exists ())
{
if (config.getBoolean ("exit.on.missing.db"))
throw std::string ("Error: rc.data.location does not exist - exiting according to rc.exit.on.missing.db setting.");
d.create ();
if (config.has ("hooks.location"))
d = Directory (config.get ("hooks.location"));
else
d += "hooks";
d.create ();
}
}
////////////////////////////////////////////////////////////////////////////////
@@ -1377,16 +1352,13 @@ void Context::loadAliases ()
}
////////////////////////////////////////////////////////////////////////////////
// Using the general rc.debug setting automaticalls sets debug.tls, debug.hooks
// Using the general rc.debug setting automaticalls sets debug.hooks
// and debug.parser, unless they already have values, which by default they do
// not.
void Context::propagateDebug ()
{
if (config.getBoolean ("debug"))
{
if (! config.has ("debug.tls"))
config.set ("debug.tls", 2);
if (! config.has ("debug.hooks"))
config.set ("debug.hooks", 1);

View File

@@ -90,13 +90,8 @@ bool getDOM (const std::string& name, Variant& value)
if (name == "tw.syncneeded")
{
value = Variant (0);
for (const auto& line : Context::getContext ().tdb2.backlog.get_lines ())
{
if (line[0] == '{')
{
value = Variant (1);
break;
}
if (Context::getContext ().tdb2.num_local_changes () > 0) {
value = Variant (1);
}
return true;
@@ -422,7 +417,7 @@ bool getDOM (const std::string& name, const Task* task, Variant& value)
{
// annotation_1234567890
// 0 ^11
value = Variant ((time_t) strtol (i.first.substr (11).c_str (), NULL, 10), Variant::type_date);
value = Variant ((time_t) strtoll (i.first.substr (11).c_str (), NULL, 10), Variant::type_date);
return true;
}
else if (elements[2] == "description")

View File

@@ -98,7 +98,7 @@ void Filter::subset (std::vector <Task>& output)
if (precompiled.size ())
{
Timer timer_pending;
auto pending = Context::getContext ().tdb2.pending.get_tasks ();
auto pending = Context::getContext ().tdb2.pending_tasks ();
Context::getContext ().time_filter_us -= timer_pending.total_us ();
_startCount = (int) pending.size ();
@@ -126,7 +126,7 @@ void Filter::subset (std::vector <Task>& output)
if (! shortcut)
{
Timer timer_completed;
auto completed = Context::getContext ().tdb2.completed.get_tasks ();
auto completed = Context::getContext ().tdb2.completed_tasks ();
Context::getContext ().time_filter_us -= timer_completed.total_us ();
_startCount += (int) completed.size ();
@@ -149,11 +149,7 @@ void Filter::subset (std::vector <Task>& output)
safety ();
Timer pending_completed;
for (auto& task : Context::getContext ().tdb2.pending.get_tasks ())
output.push_back (task);
for (auto& task : Context::getContext ().tdb2.completed.get_tasks ())
output.push_back (task);
output = Context::getContext ().tdb2.all_tasks ();
Context::getContext ().time_filter_us -= pending_completed.total_us ();
}

File diff suppressed because it is too large Load Diff

View File

@@ -35,71 +35,12 @@
#include <stdio.h>
#include <FS.h>
#include <Task.h>
#include <tc/WorkingSet.h>
#include <tc/Replica.h>
// TF2 Class represents a single file in the task database.
class TF2
{
public:
TF2 ();
~TF2 ();
void target (const std::string&);
const std::vector <Task>& get_tasks ();
const std::vector <std::string>& get_lines ();
bool get (int, Task&);
bool get (const std::string&, Task&);
bool has (const std::string&);
void add_task (Task&);
bool modify_task (const Task&);
bool purge_task (const Task&);
void add_line (const std::string&);
void clear_tasks ();
void clear_lines ();
void commit ();
Task load_task (const std::string&);
void load_gc (Task&);
void load_tasks (bool from_gc = false);
void load_lines ();
// ID <--> UUID mapping.
std::string uuid (int);
int id (const std::string&);
void has_ids ();
void auto_dep_scan ();
void clear ();
const std::string dump ();
void dependency_scan ();
bool _read_only;
bool _dirty;
bool _loaded_tasks;
bool _loaded_lines;
bool _has_ids;
bool _auto_dep_scan;
std::vector <Task> _tasks;
// _tasks_map was introduced mainly for speeding up "task import".
// Iterating over all _tasks for each imported task is slow, making use of
// appropriate data structures is fast.
std::unordered_map <std::string, Task> _tasks_map;
std::vector <Task> _added_tasks;
std::vector <Task> _modified_tasks;
std::unordered_set <std::string> _purged_tasks;
std::vector <std::string> _lines;
std::vector <std::string> _added_lines;
File _file;
private:
std::unordered_map <int, std::string> _I2U; // ID -> UUID map
std::unordered_map <std::string, int> _U2I; // UUID -> ID map
};
namespace tc {
class Server;
}
// TDB2 Class represents all the files in the task database.
class TDB2
@@ -109,19 +50,18 @@ public:
TDB2 ();
void set_location (const std::string&);
void add (Task&, bool add_to_backlog = true);
void modify (Task&, bool add_to_backlog = true);
void purge (Task&);
void commit ();
void open_replica (const std::string&, bool create_if_missing);
void add (Task&);
void modify (Task&);
void get_changes (std::vector <Task>&);
void revert ();
void gc ();
int next_id ();
int latest_id ();
// Generalized task accessors.
const std::vector <Task> all_tasks ();
const std::vector <Task> pending_tasks ();
const std::vector <Task> completed_tasks ();
bool get (int, Task&);
bool get (const std::string&, Task&);
bool has (const std::string&);
@@ -132,32 +72,24 @@ public:
std::string uuid (int);
int id (const std::string&);
// Read-only mode.
bool read_only ();
int num_local_changes ();
int num_reverts_possible ();
void clear ();
void dump ();
private:
void gather_changes ();
void update (Task&, const bool, const bool addition = false);
bool verifyUniqueUUID (const std::string&);
void show_diff (const std::string&, const std::string&, const std::string&);
void revert_undo (std::vector <std::string>&, std::string&, std::string&, std::string&, std::string&);
void revert_pending (std::vector <std::string>&, const std::string&, const std::string&);
void revert_completed (std::vector <std::string>&, std::vector <std::string>&, const std::string&, const std::string&);
void revert_backlog (std::vector <std::string>&, const std::string&, const std::string&, const std::string&);
public:
TF2 pending;
TF2 completed;
TF2 undo;
TF2 backlog;
void sync (tc::Server server, bool avoid_snapshots);
bool confirm_revert(struct tc::ffi::TCReplicaOpList);
private:
std::string _location;
int _id;
std::vector <Task> _changes;
tc::Replica replica;
std::optional<tc::WorkingSet> _working_set;
// UUID -> Task containing all tasks modified in this invocation.
std::map<std::string, Task> changes;
const tc::WorkingSet &working_set ();
static std::string option_string (std::string input);
static void show_diff (const std::string&, const std::string&, const std::string&);
};
#endif

View File

@@ -1,576 +0,0 @@
////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// https://www.opensource.org/licenses/mit-license.php
//
////////////////////////////////////////////////////////////////////////////////
#include <cmake.h>
#ifdef HAVE_LIBGNUTLS
#include <TLSClient.h>
#include <iostream>
#include <sstream>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <errno.h>
#include <sys/types.h>
#include <netdb.h>
#include <gnutls/x509.h>
#include <shared.h>
#include <format.h>
#define HEADER_SIZE 4
#define MAX_BUF 16384
#if GNUTLS_VERSION_NUMBER < 0x030406
#if GNUTLS_VERSION_NUMBER >= 0x020a00
static int verify_certificate_callback (gnutls_session_t);
#endif
#endif
////////////////////////////////////////////////////////////////////////////////
static void gnutls_log_function (int level, const char* message)
{
std::cout << "c: " << level << ' ' << message;
}
////////////////////////////////////////////////////////////////////////////////
#if GNUTLS_VERSION_NUMBER < 0x030406
#if GNUTLS_VERSION_NUMBER >= 0x020a00
static int verify_certificate_callback (gnutls_session_t session)
{
const TLSClient* client = (TLSClient*) gnutls_session_get_ptr (session); // All
return client->verify_certificate ();
}
#endif
#endif
////////////////////////////////////////////////////////////////////////////////
TLSClient::~TLSClient ()
{
gnutls_deinit (_session); // All
gnutls_certificate_free_credentials (_credentials); // All
#if GNUTLS_VERSION_NUMBER < 0x030300
gnutls_global_deinit (); // All
#endif
if (_socket)
{
shutdown (_socket, SHUT_RDWR);
close (_socket);
}
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::limit (int max)
{
_limit = max;
}
////////////////////////////////////////////////////////////////////////////////
// Calling this method results in all subsequent socket traffic being sent to
// std::cout, labelled with 'c: ...'.
void TLSClient::debug (int level)
{
if (level)
_debug = true;
gnutls_global_set_log_function (gnutls_log_function); // All
gnutls_global_set_log_level (level); // All
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::trust (const enum trust_level value)
{
_trust = value;
if (_debug)
{
if (_trust == allow_all)
std::cout << "c: INFO Server certificate will be trusted automatically.\n";
else if (_trust == ignore_hostname)
std::cout << "c: INFO Server certificate will be verified but hostname ignored.\n";
else
std::cout << "c: INFO Server certificate will be verified.\n";
}
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::ciphers (const std::string& cipher_list)
{
_ciphers = cipher_list;
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::init (
const std::string& ca,
const std::string& cert,
const std::string& key)
{
_ca = ca;
_cert = cert;
_key = key;
int ret;
#if GNUTLS_VERSION_NUMBER < 0x030300
ret = gnutls_global_init (); // All
if (ret < 0)
throw format ("TLS init error. {1}", gnutls_strerror (ret)); // All
#endif
ret = gnutls_certificate_allocate_credentials (&_credentials); // All
if (ret < 0)
throw format ("TLS allocation error. {1}", gnutls_strerror (ret)); // All
#if GNUTLS_VERSION_NUMBER >= 0x030014
// Automatic loading of system installed CA certificates.
ret = gnutls_certificate_set_x509_system_trust (_credentials); // 3.0.20
if (ret < 0)
throw format ("Bad System Trust. {1}", gnutls_strerror (ret)); // All
#endif
if (_ca != "")
{
// The gnutls_certificate_set_x509_key_file call returns number of
// certificates parsed on success (including 0, when no certificate was
// found) and negative values on error
ret = gnutls_certificate_set_x509_trust_file (_credentials, _ca.c_str (), GNUTLS_X509_FMT_PEM); // All
if (ret == 0)
throw format ("CA file {1} contains no certificate.", _ca);
else if (ret < 0)
throw format ("Bad CA file: {1}", gnutls_strerror (ret)); // All
}
// TODO This may need 0x030111 protection.
if (_cert != "" &&
_key != "" &&
(ret = gnutls_certificate_set_x509_key_file (_credentials, _cert.c_str (), _key.c_str (), GNUTLS_X509_FMT_PEM)) < 0) // 3.1.11
throw format ("Bad client CERT/KEY file. {1}", gnutls_strerror (ret)); // All
#if GNUTLS_VERSION_NUMBER < 0x030406
#if GNUTLS_VERSION_NUMBER >= 0x020a00
// The automatic verification for the server certificate with
// gnutls_certificate_set_verify_function only works with gnutls
// >=2.9.10. So with older versions we should call the verify function
// manually after the gnutls handshake.
gnutls_certificate_set_verify_function (_credentials, verify_certificate_callback); // 2.10.0
#endif
#endif
ret = gnutls_init (&_session, GNUTLS_CLIENT); // All
if (ret < 0)
throw format ("TLS client init error. {1}", gnutls_strerror (ret)); // All
// Use default priorities unless overridden.
if (_ciphers == "")
_ciphers = "NORMAL";
const char *err;
ret = gnutls_priority_set_direct (_session, _ciphers.c_str (), &err); // All
if (ret < 0)
{
if (_debug && ret == GNUTLS_E_INVALID_REQUEST)
std::cout << "c: ERROR Priority error at: " << err << '\n';
throw format ("Error initializing TLS. {1}", gnutls_strerror (ret)); // All
}
// Apply the x509 credentials to the current session.
ret = gnutls_credentials_set (_session, GNUTLS_CRD_CERTIFICATE, _credentials); // All
if (ret < 0)
throw format ("TLS credentials error. {1}", gnutls_strerror (ret)); // All
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::connect (const std::string& host, const std::string& port)
{
_host = host;
_port = port;
int ret;
#if GNUTLS_VERSION_NUMBER >= 0x030406
// For _trust == TLSClient::allow_all we perform no action
if (_trust == TLSClient::ignore_hostname)
gnutls_session_set_verify_cert (_session, nullptr, 0); // 3.4.6
else if (_trust == TLSClient::strict)
gnutls_session_set_verify_cert (_session, _host.c_str (), 0); // 3.4.6
#endif
// SNI. Only permitted when _host is a DNS name, not an IPv4/6 address.
std::string dummyAddress;
int dummyPort;
if (! isIPv4Address (_host, dummyAddress, dummyPort) &&
! isIPv6Address (_host, dummyAddress, dummyPort))
{
ret = gnutls_server_name_set (_session, GNUTLS_NAME_DNS, _host.c_str (), _host.length ()); // All
if (ret < 0)
throw format ("TLS SNI error. {1}", gnutls_strerror (ret)); // All
}
// Store the TLSClient instance, so that the verification callback can access
// it during the handshake below and call the verification method.
gnutls_session_set_ptr (_session, (void*) this); // All
// use IPv4 or IPv6, does not matter.
struct addrinfo hints {};
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE; // use my IP
struct addrinfo* res;
ret = ::getaddrinfo (host.c_str (), port.c_str (), &hints, &res);
if (ret != 0)
throw std::string (::gai_strerror (ret));
// Try them all, stop on success.
struct addrinfo* p;
for (p = res; p != nullptr; p = p->ai_next)
{
if ((_socket = ::socket (p->ai_family, p->ai_socktype, p->ai_protocol)) == -1)
continue;
// When a socket is closed, it remains unavailable for a while (netstat -an).
// Setting SO_REUSEADDR allows this program to assume control of a closed,
// but unavailable socket.
int on = 1;
if (::setsockopt (_socket,
SOL_SOCKET,
SO_REUSEADDR,
(const void*) &on,
sizeof (on)) == -1)
throw std::string (::strerror (errno));
if (::connect (_socket, p->ai_addr, p->ai_addrlen) == -1)
continue;
break;
}
free (res);
if (p == nullptr)
throw format ("Could not connect to {1} {2}", host, port);
#if GNUTLS_VERSION_NUMBER >= 0x030100
gnutls_handshake_set_timeout (_session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT); // 3.1.0
#endif
#if GNUTLS_VERSION_NUMBER >= 0x030109
gnutls_transport_set_int (_session, _socket); // 3.1.9
#else
gnutls_transport_set_ptr (_session, (gnutls_transport_ptr_t) (intptr_t) _socket); // All
#endif
// Perform the TLS handshake
do
{
ret = gnutls_handshake (_session); // All
}
while (ret < 0 && gnutls_error_is_fatal (ret) == 0); // All
if (ret < 0)
{
#if GNUTLS_VERSION_NUMBER >= 0x030406
if (ret == GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR)
{
auto type = gnutls_certificate_type_get (_session); // All
auto status = gnutls_session_get_verify_cert_status (_session); // 3.4.6
gnutls_datum_t out;
gnutls_certificate_verification_status_print (status, type, &out, 0); // 3.1.4
std::string error {(const char*) out.data};
gnutls_free (out.data); // All
throw format ("Handshake failed. {1}", error); // All
}
#else
throw format ("Handshake failed. {1}", gnutls_strerror (ret)); // All
#endif
}
#if GNUTLS_VERSION_NUMBER < 0x020a00
// The automatic verification for the server certificate with
// gnutls_certificate_set_verify_function does only work with gnutls
// >=2.10.0. So with older versions we should call the verify function
// manually after the gnutls handshake.
ret = verify_certificate ();
if (ret < 0)
{
if (_debug)
std::cout << "c: ERROR Certificate verification failed.\n";
throw format ("Error initializing TLS. {1}", gnutls_strerror (ret)); // All
}
#endif
if (_debug)
{
#if GNUTLS_VERSION_NUMBER >= 0x03010a
char* desc = gnutls_session_get_desc (_session); // 3.1.10
std::cout << "c: INFO Handshake was completed: " << desc << '\n';
gnutls_free (desc);
#else
std::cout << "c: INFO Handshake was completed.\n";
#endif
}
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::bye ()
{
gnutls_bye (_session, GNUTLS_SHUT_RDWR); // All
}
////////////////////////////////////////////////////////////////////////////////
int TLSClient::verify_certificate () const
{
if (_trust == TLSClient::allow_all)
return 0;
if (_debug)
std::cout << "c: INFO Verifying certificate.\n";
// This verification function uses the trusted CAs in the credentials
// structure. So you must have installed one or more CA certificates.
unsigned int status = 0;
const char* hostname = _host.c_str();
#if GNUTLS_VERSION_NUMBER >= 0x030104
if (_trust == TLSClient::ignore_hostname)
hostname = nullptr;
int ret = gnutls_certificate_verify_peers3 (_session, hostname, &status); // 3.1.4
if (ret < 0)
{
if (_debug)
std::cout << "c: ERROR Certificate verification peers3 failed. " << gnutls_strerror (ret) << '\n'; // All
return GNUTLS_E_CERTIFICATE_ERROR;
}
// status 16450 == 0100000001000010
// GNUTLS_CERT_INVALID 1<<1
// GNUTLS_CERT_SIGNER_NOT_FOUND 1<<6
// GNUTLS_CERT_UNEXPECTED_OWNER 1<<14 Hostname does not match
if (_debug && status)
std::cout << "c: ERROR Certificate status=" << status << '\n';
#else
int ret = gnutls_certificate_verify_peers2 (_session, &status); // All
if (ret < 0)
{
if (_debug)
std::cout << "c: ERROR Certificate verification peers2 failed. " << gnutls_strerror (ret) << '\n'; // All
return GNUTLS_E_CERTIFICATE_ERROR;
}
if (_debug && status)
std::cout << "c: ERROR Certificate status=" << status << '\n';
if ((status == 0) && (_trust != TLSClient::ignore_hostname))
{
if (gnutls_certificate_type_get (_session) == GNUTLS_CRT_X509) // All
{
const gnutls_datum* cert_list;
unsigned int cert_list_size;
gnutls_x509_crt cert;
cert_list = gnutls_certificate_get_peers (_session, &cert_list_size); // All
if (cert_list_size == 0)
{
if (_debug)
std::cout << "c: ERROR Certificate get peers failed. " << gnutls_strerror (ret) << '\n'; // All
return GNUTLS_E_CERTIFICATE_ERROR;
}
ret = gnutls_x509_crt_init (&cert); // All
if (ret < 0)
{
if (_debug)
std::cout << "c: ERROR x509 init failed. " << gnutls_strerror (ret) << '\n'; // All
return GNUTLS_E_CERTIFICATE_ERROR;
}
ret = gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER); // All
if (ret < 0)
{
if (_debug)
std::cout << "c: ERROR x509 cert import. " << gnutls_strerror (ret) << '\n'; // All
gnutls_x509_crt_deinit(cert); // All
return GNUTLS_E_CERTIFICATE_ERROR;
}
if (gnutls_x509_crt_check_hostname (cert, hostname) == 0) // All
{
if (_debug)
std::cout << "c: ERROR x509 cert check hostname. " << gnutls_strerror (ret) << '\n'; // All
gnutls_x509_crt_deinit(cert);
return GNUTLS_E_CERTIFICATE_ERROR;
}
}
else
return GNUTLS_E_CERTIFICATE_ERROR;
}
#endif
#if GNUTLS_VERSION_NUMBER >= 0x030104
gnutls_certificate_type_t type = gnutls_certificate_type_get (_session); // All
gnutls_datum_t out;
ret = gnutls_certificate_verification_status_print (status, type, &out, 0); // 3.1.4
if (ret < 0)
{
if (_debug)
std::cout << "c: ERROR certificate verification status. " << gnutls_strerror (ret) << '\n'; // All
return GNUTLS_E_CERTIFICATE_ERROR;
}
if (_debug)
std::cout << "c: INFO " << out.data << '\n';
gnutls_free (out.data);
#endif
if (status != 0)
return GNUTLS_E_CERTIFICATE_ERROR;
// Continue handshake.
return 0;
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::send (const std::string& data)
{
std::string packet = "XXXX" + data;
// Encode the length.
unsigned long l = packet.length ();
packet[0] = l >>24;
packet[1] = l >>16;
packet[2] = l >>8;
packet[3] = l;
unsigned int total = 0;
int status;
do
{
status = gnutls_record_send (_session, packet.c_str () + total, packet.length () - total); // All
}
while ((status > 0 && (total += status) < packet.length ()) ||
status == GNUTLS_E_INTERRUPTED ||
status == GNUTLS_E_AGAIN);
if (_debug)
std::cout << "c: INFO Sending 'XXXX"
<< data.c_str ()
<< "' (" << total << " bytes)"
<< std::endl;
}
////////////////////////////////////////////////////////////////////////////////
void TLSClient::recv (std::string& data)
{
data = ""; // No appending of data.
int received = 0;
int total = 0;
// Get the encoded length.
unsigned char header[HEADER_SIZE] {};
do
{
received = gnutls_record_recv (_session, header + total, HEADER_SIZE - total); // All
}
while ((received > 0 && (total += received) < HEADER_SIZE) ||
received == GNUTLS_E_INTERRUPTED ||
received == GNUTLS_E_AGAIN);
if (total < HEADER_SIZE) {
throw std::string ("Failed to receive header: ") +
(received < 0 ? gnutls_strerror(received) : "connection lost?");
}
// Decode the length.
unsigned long expected = (header[0]<<24) |
(header[1]<<16) |
(header[2]<<8) |
header[3];
if (_debug)
std::cout << "c: INFO expecting " << expected << " bytes.\n";
if (_limit && expected >= (unsigned long) _limit) {
std::ostringstream err_str;
err_str << "Expected message size " << expected << " is larger than allowed limit " << _limit;
throw err_str.str ();
}
// Arbitrary buffer size.
char buffer[MAX_BUF];
// Keep reading until no more data. Concatenate chunks of data if a) the
// read was interrupted by a signal, and b) if there is more data than
// fits in the buffer.
do
{
int chunk_size = 0;
do
{
received = gnutls_record_recv (_session, buffer + chunk_size, MAX_BUF - chunk_size); // All
if (received > 0) {
total += received;
chunk_size += received;
}
}
while ((received > 0 && (unsigned long) total < expected && chunk_size < MAX_BUF) ||
received == GNUTLS_E_INTERRUPTED ||
received == GNUTLS_E_AGAIN);
// Other end closed the connection.
if (received == 0)
{
if (_debug)
std::cout << "c: INFO Peer has closed the TLS connection\n";
break;
}
// Something happened.
if (received < 0)
throw std::string (gnutls_strerror (received)); // All
data.append (buffer, chunk_size);
// Stop at defined limit.
if (_limit && total > _limit)
break;
}
while (received > 0 && total < (int) expected);
if (_debug)
std::cout << "c: INFO Receiving 'XXXX"
<< data.c_str ()
<< "' (" << total << " bytes)"
<< std::endl;
}
////////////////////////////////////////////////////////////////////////////////
#endif

View File

@@ -144,6 +144,19 @@ Task::Task (const json::object* obj)
parseJSON (obj);
}
////////////////////////////////////////////////////////////////////////////////
Task::Task (tc::Task obj)
{
id = 0;
urgency_value = 0.0;
recalc_urgency = true;
is_blocked = false;
is_blocking = false;
annotation_count = 0;
parseTC (obj);
}
////////////////////////////////////////////////////////////////////////////////
Task::status Task::textToStatus (const std::string& input)
{
@@ -186,8 +199,8 @@ const std::string Task::identifier (bool shortened /* = false */) const
////////////////////////////////////////////////////////////////////////////////
void Task::setAsNow (const std::string& att)
{
char now[16];
snprintf (now, 16, "%u", (unsigned int) time (nullptr));
char now[22];
snprintf (now, 22, "%lli", (long long int) time (nullptr));
set (att, now);
recalc_urgency = true;
@@ -895,6 +908,29 @@ void Task::parseJSON (const json::object* root_obj)
}
}
////////////////////////////////////////////////////////////////////////////////
// Note that all fields undergo encode/decode.
void Task::parseTC (const tc::Task& task)
{
data = task.get_taskmap ();
// count annotations
annotation_count = 0;
for (auto i : data)
{
if (isAnnotationAttr (i.first))
{
++annotation_count;
}
}
data["uuid"] = task.get_uuid ();
id = Context::getContext ().tdb2.id (data["uuid"]);
is_blocking = task.is_blocking();
is_blocked = task.is_blocked();
}
////////////////////////////////////////////////////////////////////////////////
// No legacy formats are currently supported as of 2.4.0.
void Task::parseLegacy (const std::string& line)
@@ -1153,7 +1189,7 @@ void Task::addAnnotation (const std::string& description)
do
{
key = "annotation_" + format ((int) now);
key = "annotation_" + format ((long long int) now);
++now;
}
while (has (key));
@@ -1211,7 +1247,7 @@ void Task::setAnnotations (const std::map <std::string, std::string>& annotation
void Task::addDependency (int depid)
{
// Check that id is resolvable.
std::string uuid = Context::getContext ().tdb2.pending.uuid (depid);
std::string uuid = Context::getContext ().tdb2.uuid (depid);
if (uuid == "")
throw format ("Could not create a dependency on task {1} - not found.", depid);
@@ -1259,7 +1295,7 @@ void Task::addDependency (const std::string& uuid)
////////////////////////////////////////////////////////////////////////////////
void Task::removeDependency (int id)
{
std::string uuid = Context::getContext ().tdb2.pending.uuid (id);
std::string uuid = Context::getContext ().tdb2.uuid (id);
// The removeDependency(std::string&) method will check this too, but here we
// can give a more natural error message containing the id provided by the user
@@ -1296,7 +1332,7 @@ std::vector <int> Task::getDependencyIDs () const
if (!isDepAttr (attr))
continue;
auto dep = attr2Dep (attr);
ids.push_back (Context::getContext ().tdb2.pending.id (dep));
ids.push_back (Context::getContext ().tdb2.id (dep));
}
return ids;
@@ -1326,7 +1362,7 @@ std::vector <Task> Task::getDependencyTasks () const
// efficient.
std::vector <Task> blocking;
if (uuids.size() > 0)
for (auto& it : Context::getContext ().tdb2.pending.get_tasks ())
for (auto& it : Context::getContext ().tdb2.pending_tasks ())
if (it.getStatus () != Task::completed &&
it.getStatus () != Task::deleted &&
std::find (uuids.begin (), uuids.end (), it.get ("uuid")) != uuids.end ())
@@ -1341,7 +1377,7 @@ std::vector <Task> Task::getBlockedTasks () const
auto uuid = get ("uuid");
std::vector <Task> blocked;
for (auto& it : Context::getContext ().tdb2.pending.get_tasks ())
for (auto& it : Context::getContext ().tdb2.pending_tasks ())
if (it.getStatus () != Task::completed &&
it.getStatus () != Task::deleted &&
it.hasDependency (uuid))
@@ -1501,7 +1537,7 @@ void Task::removeTag (const std::string& tag)
////////////////////////////////////////////////////////////////////////////////
void Task::fixTagsAttribute ()
{
// Fix up the old `tags` attribute to match the `tags_..` attributes (or
// Fix up the old `tags` attribute to match the `tag_..` attributes (or
// remove it if there are no tags)
auto tags = getTags ();
if (tags.size () > 0) {
@@ -1514,14 +1550,14 @@ void Task::fixTagsAttribute ()
////////////////////////////////////////////////////////////////////////////////
bool Task::isTagAttr(const std::string& attr)
{
return attr.compare(0, 5, "tags_") == 0;
return attr.compare(0, 4, "tag_") == 0;
}
////////////////////////////////////////////////////////////////////////////////
const std::string Task::tag2Attr (const std::string& tag) const
{
std::stringstream tag_attr;
tag_attr << "tags_" << tag;
tag_attr << "tag_" << tag;
return tag_attr.str();
}
@@ -1529,7 +1565,7 @@ const std::string Task::tag2Attr (const std::string& tag) const
const std::string Task::attr2Tag (const std::string& attr) const
{
assert (isTagAttr (attr));
return attr.substr(5);
return attr.substr(4);
}
////////////////////////////////////////////////////////////////////////////////
@@ -1711,6 +1747,9 @@ void Task::substitute (
// 1) To provide missing attributes where possible
// 2) To provide suitable warnings about odd states
// 3) To generate errors when the inconsistencies are not fixable
// 4) To update status depending on other attributes
//
// Critically, note that despite the name this is not a read-only function.
//
void Task::validate (bool applyDefault /* = true */)
{
@@ -1787,7 +1826,7 @@ void Task::validate (bool applyDefault /* = true */)
if ((status == Task::pending) && (get ("end") != ""))
remove ("end");
// Provide an entry date unless user already specified one.
// Provide a modified date unless user already specified one.
if (! has ("modified") || get ("modified") == "")
setAsNow ("modified");
@@ -1938,6 +1977,31 @@ const std::string Task::decode (const std::string& value) const
return str_replace (modified, "&close;", "]");
}
////////////////////////////////////////////////////////////////////////////////
tc::Status Task::status2tc (const Task::status status)
{
switch (status) {
case Task::pending: return tc::Status::Pending;
case Task::completed: return tc::Status::Completed;
case Task::deleted: return tc::Status::Deleted;
case Task::waiting: return tc::Status::Pending; // waiting is no longer a status
case Task::recurring: return tc::Status::Recurring;
default: return tc::Status::Unknown;
}
}
////////////////////////////////////////////////////////////////////////////////
Task::status Task::tc2status (const tc::Status status)
{
switch (status) {
case tc::Status::Pending: return Task::pending;
case tc::Status::Completed: return Task::completed;
case tc::Status::Deleted: return Task::deleted;
case tc::Status::Recurring: return Task::recurring;
default: return Task::pending;
}
}
////////////////////////////////////////////////////////////////////////////////
int Task::determineVersion (const std::string& line)
{
@@ -2141,7 +2205,7 @@ float Task::urgency ()
////////////////////////////////////////////////////////////////////////////////
float Task::urgency_inherit () const
{
float v = FLT_MIN;
float v = -FLT_MAX;
#ifdef PRODUCT_TASKWARRIOR
// Calling getBlockedTasks is rather expensive.
// It is called recursively for each dependency in the chain here.

View File

@@ -35,6 +35,7 @@
#include <JSON.h>
#include <Table.h>
#include <Datetime.h>
#include <tc/Task.h>
class Task
{
@@ -65,6 +66,7 @@ public:
bool operator!= (const Task&);
Task (const std::string&);
Task (const json::object*);
Task (tc::Task);
void parse (const std::string&);
std::string composeF4 () const;
@@ -87,6 +89,8 @@ public:
// Series of helper functions.
static status textToStatus (const std::string&);
static std::string statusToText (status);
static tc::Status status2tc (const Task::status);
static Task::status tc2status (const tc::Status);
void setAsNow (const std::string&);
bool has (const std::string&) const;
@@ -178,10 +182,12 @@ public:
Table diffForUndoSide (const Task& after) const;
Table diffForUndoPatch (const Task& after, const Datetime& lastChange) const;
private:
int determineVersion (const std::string&);
void parseJSON (const std::string&);
void parseJSON (const json::object*);
void parseTC (const tc::Task&);
void parseLegacy (const std::string&);
void validate_before (const std::string&, const std::string&);
const std::string encode (const std::string&) const;

118
src/Version.cpp Normal file
View File

@@ -0,0 +1,118 @@
////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2024, Dustin Mitchell.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// https://www.opensource.org/licenses/mit-license.php
//
////////////////////////////////////////////////////////////////////////////////
#include <Version.h>
#include <cmake.h>
#include <iostream>
#include <sstream>
#include <string>
#include <tuple>
#include <vector>
////////////////////////////////////////////////////////////////////////////////
Version::Version(std::string version) {
std::vector<int> parts;
std::string part;
std::istringstream input(version);
while (std::getline(input, part, '.')) {
int value;
// Try converting string to integer
if (std::stringstream(part) >> value && value >= 0) {
parts.push_back(value);
} else {
return;
}
}
if (parts.size() != 3) {
return;
}
major = parts[0];
minor = parts[1];
patch = parts[2];
}
////////////////////////////////////////////////////////////////////////////////
Version Version::Current() { return Version(PACKAGE_VERSION); }
////////////////////////////////////////////////////////////////////////////////
bool Version::is_valid() const { return major >= 0; }
////////////////////////////////////////////////////////////////////////////////
bool Version::operator<(const Version &other) const {
return std::tie(major, minor, patch) <
std::tie(other.major, other.minor, other.patch);
}
////////////////////////////////////////////////////////////////////////////////
bool Version::operator<=(const Version &other) const {
return std::tie(major, minor, patch) <=
std::tie(other.major, other.minor, other.patch);
}
////////////////////////////////////////////////////////////////////////////////
bool Version::operator>(const Version &other) const {
return std::tie(major, minor, patch) >
std::tie(other.major, other.minor, other.patch);
}
////////////////////////////////////////////////////////////////////////////////
bool Version::operator>=(const Version &other) const {
return std::tie(major, minor, patch) >=
std::tie(other.major, other.minor, other.patch);
}
////////////////////////////////////////////////////////////////////////////////
bool Version::operator==(const Version &other) const {
return std::tie(major, minor, patch) ==
std::tie(other.major, other.minor, other.patch);
}
////////////////////////////////////////////////////////////////////////////////
bool Version::operator!=(const Version &other) const {
std::cout << other;
return std::tie(major, minor, patch) !=
std::tie(other.major, other.minor, other.patch);
}
////////////////////////////////////////////////////////////////////////////////
Version::operator std::string() const {
std::ostringstream output;
if (is_valid()) {
output << major << '.' << minor << '.' << patch;
} else {
output << "(invalid version)";
}
return output.str();
}
////////////////////////////////////////////////////////////////////////////////
std::ostream &operator<<(std::ostream &os, const Version &version) {
os << std::string(version);
return os;
}

View File

@@ -1,6 +1,6 @@
////////////////////////////////////////////////////////////////////////////////
//
// Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez.
// Copyright 2024, Dustin Mitchell.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -23,50 +23,50 @@
// https://www.opensource.org/licenses/mit-license.php
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_TLSCLIENT
#define INCLUDED_TLSCLIENT
#ifdef HAVE_LIBGNUTLS
#ifndef INCLUDED_VERSION
#define INCLUDED_VERSION
#include <string>
#include <gnutls/gnutls.h>
class TLSClient
{
// A utility class for handling Taskwarrior versions.
class Version {
public:
enum trust_level { strict, ignore_hostname, allow_all };
// Parse a version from a string. This must be of the format
// digits.digits.digits.
explicit Version(std::string version);
TLSClient () = default;
~TLSClient ();
void limit (int);
void debug (int);
void trust (const enum trust_level);
void ciphers (const std::string&);
void init (const std::string&, const std::string&, const std::string&);
void connect (const std::string&, const std::string&);
void bye ();
int verify_certificate() const;
// Create an invalid version.
Version() = default;
void send (const std::string&);
void recv (std::string&);
Version(const Version &other) = default;
Version(Version &&other) = default;
Version &operator=(const Version &) = default;
Version &operator=(Version &&) = default;
// Return a version representing the release being built.
static Version Current();
bool is_valid() const;
// Compare versions.
bool operator<(const Version &) const;
bool operator<=(const Version &) const;
bool operator>(const Version &) const;
bool operator>=(const Version &) const;
bool operator==(const Version &) const;
bool operator!=(const Version &) const;
// Convert back to a string.
operator std::string() const;
friend std::ostream& operator<<(std::ostream& os, const Version& version);
private:
std::string _ca {""};
std::string _cert {""};
std::string _key {""};
std::string _ciphers {""};
std::string _host {""};
std::string _port {""};
gnutls_certificate_credentials_t _credentials {};
gnutls_session_t _session {nullptr};
int _socket {0};
int _limit {0};
bool _debug {false};
enum trust_level _trust {strict};
int major = -1;
int minor = -1;
int patch = -1;
};
#endif
#endif
////////////////////////////////////////////////////////////////////////////////

View File

@@ -1,9 +1,11 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/tc
${CMAKE_SOURCE_DIR}/src/commands
${CMAKE_SOURCE_DIR}/src/columns
${CMAKE_SOURCE_DIR}/src/libshared/src
${CMAKE_SOURCE_DIR}/taskchampion/lib
${TASK_INCLUDE_DIRS})
set (columns_SRCS Column.cpp Column.h

View File

@@ -171,7 +171,7 @@ void ColumnDescription::render (
{
for (const auto& i : task.getAnnotations ())
{
Datetime dt (strtol (i.first.substr (11).c_str (), nullptr, 10));
Datetime dt (strtoll (i.first.substr (11).c_str (), nullptr, 10));
description += '\n' + std::string (_indent, ' ') + dt.toString (_dateformat) + ' ' + i.second;
}
}
@@ -200,7 +200,7 @@ void ColumnDescription::render (
{
for (const auto& i : task.getAnnotations ())
{
Datetime dt (strtol (i.first.substr (11).c_str (), nullptr, 10));
Datetime dt (strtoll (i.first.substr (11).c_str (), nullptr, 10));
description += ' ' + dt.toString (_dateformat) + ' ' + i.second;
}
}

View File

@@ -89,7 +89,7 @@ void ColumnTypeDate::measure (Task& task, unsigned int& minimum, unsigned int& m
else if (_style == "countdown")
{
Datetime now;
minimum = maximum = Duration (now - date).formatVague (true).length ();
minimum = maximum = Duration (date - now).formatVague (true).length ();
}
else if (_style == "julian")
{

View File

@@ -241,7 +241,7 @@ void ColumnUDADate::measure (Task& task, unsigned int& minimum, unsigned int& ma
// rc.report.<report>.dateformat
// rc.dateformat.report
// rc.dateformat
Datetime date ((time_t) strtol (value.c_str (), nullptr, 10));
Datetime date (strtoll (value.c_str (), nullptr, 10));
auto format = Context::getContext ().config.get ("report." + _report + ".dateformat");
if (format == "")
format = Context::getContext ().config.get ("dateformat.report");
@@ -287,7 +287,7 @@ void ColumnUDADate::render (
format = Context::getContext ().config.get ("dateformat");
}
renderStringLeft (lines, width, color, Datetime ((time_t) strtol (value.c_str (), nullptr, 10)).toString (format));
renderStringLeft (lines, width, color, Datetime (strtoll (value.c_str (), nullptr, 10)).toString (format));
}
else if (_style == "indicator")
{

View File

@@ -1,9 +1,11 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.22)
include_directories (${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/tc
${CMAKE_SOURCE_DIR}/src/commands
${CMAKE_SOURCE_DIR}/src/columns
${CMAKE_SOURCE_DIR}/src/libshared/src
${CMAKE_SOURCE_DIR}/taskchampion/lib
${TASK_INCLUDE_DIRS})
set (commands_SRCS Command.cpp Command.h

View File

@@ -81,7 +81,7 @@ int CmdCalendar::execute (std::string& output)
// Load the pending tasks.
handleUntil ();
handleRecurrence ();
auto tasks = Context::getContext ().tdb2.pending.get_tasks ();
auto tasks = Context::getContext ().tdb2.pending_tasks ();
Datetime today;
auto getPendingDate = false;
@@ -631,7 +631,7 @@ std::string CmdCalendar::renderMonths (
{
if(task.has("scheduled") && !coloredWithDue) {
std::string scheduled = task.get ("scheduled");
Datetime scheduleddmy (strtol (scheduled.c_str(), nullptr, 10));
Datetime scheduleddmy (strtoll (scheduled.c_str(), nullptr, 10));
if (scheduleddmy.sameDay (date))
{
@@ -640,7 +640,7 @@ std::string CmdCalendar::renderMonths (
}
if(task.has("due")) {
std::string due = task.get ("due");
Datetime duedmy (strtol (due.c_str(), nullptr, 10));
Datetime duedmy (strtoll (due.c_str(), nullptr, 10));
if (duedmy.sameDay (date))
{

View File

@@ -202,7 +202,7 @@ void CmdContext::defineContext (const std::vector <std::string>& words, std::str
// Check if the value is a proper filter by filtering current pending.data
Filter filter;
std::vector <Task> filtered;
auto pending = Context::getContext ().tdb2.pending.get_tasks ();
auto pending = Context::getContext ().tdb2.pending_tasks ();
try
{

View File

@@ -35,6 +35,7 @@
#include <Context.h>
#include <Filter.h>
#include <Lexer.h>
#include <Version.h>
#include <ViewTask.h>
#include <format.h>
#include <shared.h>
@@ -250,24 +251,24 @@ int CmdCustom::execute (std::string& output)
}
// Inform user about the new release highlights if not presented yet
if (Context::getContext ().config.get ("news.version") != "2.6.0")
Version news_version(Context::getContext ().config.get ("news.version"));
Version current_version = Version::Current();
if (news_version != current_version)
{
std::random_device device;
std::mt19937 random_generator(device());
std::uniform_int_distribution<std::mt19937::result_type> twentyfive_percent(1, 4);
std::string NEWS_NOTICE = (
"Recently upgraded to 2.6.0. "
"Please run 'task news' to read highlights about the new release."
);
// 1 in 10 chance to display the message.
if (twentyfive_percent(random_generator) == 4)
{
std::ostringstream notice;
notice << "Recently upgraded to " << current_version << ". "
"Please run 'task news' to read highlights about the new release.";
if (Context::getContext ().verbose ("footnote"))
Context::getContext ().footnote (NEWS_NOTICE);
Context::getContext ().footnote (notice.str());
else if (Context::getContext ().verbose ("header"))
Context::getContext ().header (NEWS_NOTICE);
Context::getContext ().header (notice.str());
}
}

View File

@@ -39,10 +39,6 @@
#include <commit.h>
#endif
#ifdef HAVE_LIBGNUTLS
#include <gnutls/gnutls.h>
#endif
////////////////////////////////////////////////////////////////////////////////
CmdDiagnostics::CmdDiagnostics ()
{
@@ -135,18 +131,6 @@ int CmdDiagnostics::execute (std::string& output)
#endif
<< '\n';
out << " libgnutls: "
#ifdef HAVE_LIBGNUTLS
#ifdef GNUTLS_VERSION
<< GNUTLS_VERSION
#elif defined LIBGNUTLS_VERSION
<< LIBGNUTLS_VERSION
#endif
#else
<< "n/a"
#endif
<< '\n';
out << " Build type: "
#ifdef CMAKE_BUILD_TYPE
<< CMAKE_BUILD_TYPE
@@ -214,82 +198,6 @@ int CmdDiagnostics::execute (std::string& output)
else if ((peditor = getenv ("EDITOR")) != nullptr)
out << " $EDITOR: " << peditor << '\n';
out << " Server: "
<< Context::getContext ().config.get ("taskd.server")
<< '\n';
auto ca_pem = Context::getContext ().config.get ("taskd.ca");
out << " CA: ";
if (ca_pem != "")
{
File file_ca (ca_pem);
if (file_ca.exists ())
out << ca_pem
<< (file_ca.readable () ? ", readable, " : ", not readable, ")
<< file_ca.size ()
<< " bytes\n";
else
out << "not found\n";
}
else
out << "-\n";
auto cert_pem = Context::getContext ().config.get ("taskd.certificate");
out << "Certificate: ";
if (cert_pem != "")
{
File file_cert (cert_pem);
if (file_cert.exists ())
out << cert_pem
<< (file_cert.readable () ? ", readable, " : ", not readable, ")
<< file_cert.size ()
<< " bytes\n";
else
out << "not found\n";
}
else
out << "-\n";
auto key_pem = Context::getContext ().config.get ("taskd.key");
out << " Key: ";
if (key_pem != "")
{
File file_key (key_pem);
if (file_key.exists ())
out << key_pem
<< (file_key.readable () ? ", readable, " : ", not readable, ")
<< file_key.size ()
<< " bytes\n";
else
out << "not found\n";
}
else
out << "-\n";
auto trust_value = Context::getContext ().config.get ("taskd.trust");
if (trust_value == "strict" ||
trust_value == "ignore hostname" ||
trust_value == "allow all")
out << " Trust: " << trust_value << '\n';
else
out << " Trust: Bad value - see 'man taskrc'\n";
out << " Ciphers: "
<< Context::getContext ().config.get ("taskd.ciphers")
<< '\n';
// Get credentials, but mask out the key.
auto credentials = Context::getContext ().config.get ("taskd.credentials");
auto last_slash = credentials.rfind ('/');
if (last_slash != std::string::npos)
credentials = credentials.substr (0, last_slash)
+ '/'
+ std::string (credentials.length () - last_slash - 1, '*');
out << " Creds: "
<< credentials
<< "\n\n";
// Display hook status.
Path hookLocation;
if (Context::getContext ().config.has ("hooks.location"))

View File

@@ -261,7 +261,7 @@ std::string CmdEdit::formatTask (Task task, const std::string& dateformat)
for (auto& anno : task.getAnnotations ())
{
Datetime dt (strtol (anno.first.substr (11).c_str (), nullptr, 10));
Datetime dt (strtoll (anno.first.substr (11).c_str (), nullptr, 10));
before << " Annotation: " << dt.toString (dateformat)
<< " -- " << str_replace (anno.second, "\n", ANNOTATION_EDIT_MARKER) << '\n';
}

View File

@@ -112,15 +112,17 @@ int CmdExport::execute (std::string& output)
}
else
{
// There is a sortOrder, so sorting will take place, which means the initial
// order of sequence is ascending.
// sort_tasks requires the order array initially be identity
for (unsigned int i = 0; i < filtered.size (); ++i)
sequence.push_back (i);
// Sort the tasks.
if (sortOrder.size ()) {
sort_tasks (filtered, sequence, reportSort);
// if no sort order, sort by id
if (!sortOrder.size ()) {
reportSort = "id";
}
// Sort the tasks.
sort_tasks (filtered, sequence, reportSort);
}
// Export == render.

View File

@@ -133,7 +133,7 @@ int CmdImport::import (const std::string& input)
}
// If an exception is caught, then it is because the free-form JSON
// objects/array above failed to parse. This is an indication that the input
// objects/array above failed to parse. This may be an indication that the input
// is an old-style line-by-line set of JSON objects, because both an array of
// objects, and a single object have failed to parse..
//
@@ -142,19 +142,30 @@ int CmdImport::import (const std::string& input)
// { ... }
catch (std::string& e)
{
// Make a very cursory check for the old-style format.
if (input[0] != '{') {
throw e;
}
// Read the entire file, so that errors do not result in a partial import.
std::vector<std::unique_ptr<json::object>> objects;
for (auto& line : split (input, '\n'))
{
if (line.length ())
{
json::value* root = json::parse (line);
if (root)
{
importSingleTask ((json::object*) root);
++count;
delete root;
}
if (root && root->type () == json::j_object)
objects.push_back (std::unique_ptr<json::object> ((json::object *)root));
else
throw format ("Invalid JSON: {1}", line);
}
}
// Import the tasks.
for (auto& root : objects) {
importSingleTask (root.get());
++count;
}
}
return count;

View File

@@ -37,6 +37,7 @@
#include <shared.h>
#include <format.h>
#include <util.h>
#include <Lexer.h>
////////////////////////////////////////////////////////////////////////////////
CmdInfo::CmdInfo ()
@@ -76,11 +77,6 @@ int CmdInfo::execute (std::string& output)
rc = 1;
}
// Get the undo data.
std::vector <std::string> undo;
if (Context::getContext ().config.getBoolean ("journal.info"))
undo = Context::getContext ().tdb2.undo.get_lines ();
// Determine the output date format, which uses a hierarchy of definitions.
// rc.dateformat.info
// rc.dateformat
@@ -244,7 +240,7 @@ int CmdInfo::execute (std::string& output)
auto created = task.get ("entry");
if (created.length ())
{
Datetime dt (strtol (created.c_str (), nullptr, 10));
Datetime dt (strtoll (created.c_str (), nullptr, 10));
age = Duration (now - dt).formatVague ();
}
@@ -373,7 +369,7 @@ int CmdInfo::execute (std::string& output)
// Task::urgency
row = view.addRow ();
view.set (row, 0, "Urgency");
view.set (row, 1, format (task.urgency (), 4, 4));
view.set (row, 1, Lexer::trimLeft (format (task.urgency (), 4, 4)));
// Show any UDAs
auto all = task.all ();
@@ -529,54 +525,6 @@ int CmdInfo::execute (std::string& output)
urgencyDetails.set (row, 5, rightJustify (format (task.urgency (), 4, 4), 6));
}
// Create a third table, containing undo log change details.
Table journal;
setHeaderUnderline (journal);
if (Context::getContext ().config.getBoolean ("obfuscate"))
journal.obfuscate ();
if (Context::getContext ().config.getBoolean ("color"))
journal.forceColor ();
journal.width (Context::getContext ().getWidth ());
journal.add ("Date");
journal.add ("Modification");
if (Context::getContext ().config.getBoolean ("journal.info") &&
undo.size () > 3)
{
// Scan the undo data for entries matching this task, without making
// copies.
unsigned int i = 0;
long last_timestamp = 0;
while (i < undo.size ())
{
int when = i++;
int previous = -1;
if (! undo[i].compare (0, 3, "old", 3))
previous = i++;
int current = i++;
i++; // Separator
if (undo[current].find ("uuid:\"" + uuid) != std::string::npos)
{
if (previous != -1)
{
int row = journal.addRow ();
Datetime timestamp (strtol (undo[when].substr (5).c_str (), nullptr, 10));
journal.set (row, 0, timestamp.toString (dateformat));
Task before (undo[previous].substr (4));
Task after (undo[current].substr (4));
journal.set (row, 1, before.diffForInfo (after, dateformat, last_timestamp, Datetime(after.get("modified")).toEpoch()));
}
}
}
}
out << optionalBlankLine ()
<< view.render ()
<< '\n';
@@ -584,10 +532,6 @@ int CmdInfo::execute (std::string& output)
if (urgencyDetails.rows () > 0)
out << urgencyDetails.render ()
<< '\n';
if (journal.rows () > 0)
out << journal.render ()
<< '\n';
}
output = out.str ();

View File

@@ -38,6 +38,14 @@
#include <util.h>
#include <main.h>
/* Adding a new version:
*
* - Add a new `versionX_Y_Z` method to `NewsItem`, and add news items for the new
* release.
* - Call the new method in `NewsItem.all()`. Calls should be in version order.
* - Test with `task news`.
*/
////////////////////////////////////////////////////////////////////////////////
CmdNews::CmdNews ()
{
@@ -91,6 +99,7 @@ void wait_for_enter ()
// Holds information about single improvement / bug.
//
NewsItem::NewsItem (
Version version,
bool major,
const std::string& title,
const std::string& bg_title,
@@ -100,6 +109,7 @@ NewsItem::NewsItem (
const std::string& reasoning,
const std::string& actions
) {
_version = version;
_major = major;
_title = title;
_bg_title = bg_title;
@@ -127,7 +137,7 @@ void NewsItem::render () {
// TODO: For some reason, bold cannot be blended in 256-color terminals
// Apply this workaround of colorizing twice.
std::cout << bold.colorize (header.colorize (format ("{1}\n", _title)));
std::cout << bold.colorize (header.colorize (format ("{1} ({2})\n", _title, _version)));
if (_background.size ()) {
if (_bg_title.empty ())
_bg_title = "Background";
@@ -138,7 +148,7 @@ void NewsItem::render () {
wait_for_enter ();
std::cout << " " << underline.colorize ("What changed in 2.6.0?\n");
std::cout << " " << underline.colorize (format ("What changed in {1}?\n", _version));
if (_punchline.size ())
std::cout << footnote.colorize (format ("{1}\n", _punchline));
@@ -160,6 +170,13 @@ void NewsItem::render () {
}
}
std::vector<NewsItem> NewsItem::all () {
std::vector<NewsItem> items;
version2_6_0(items);
version3_0_0(items);
return items;
}
////////////////////////////////////////////////////////////////////////////////
// Generate the highlights for the 2.6.0 version.
//
@@ -174,7 +191,8 @@ void NewsItem::render () {
// - The .by attribute modifier
// - Exporting a report
// - Multi-day holidays
void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
void NewsItem::version2_6_0 (std::vector<NewsItem>& items) {
Version version("2.6.0");
/////////////////////////////////////////////////////////////////////////////
// - Writeable context (major)
@@ -234,6 +252,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
" Read more about how to use contexts in CONTEXT section of 'man task'.";
NewsItem writeable_context (
version,
true,
"'Writeable' context",
"Background - what is context?",
@@ -257,7 +276,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
" The currently active context definition is now applied as default modifications\n"
" when creating new tasks using 'task add' and 'task log'.",
" \n"
" Consider following example, using contex 'work' defined as 'project:Work' above:\n"
" Consider following example, using context 'work' defined as 'project:Work' above:\n"
" \n"
" $ task context work\n"
" $ task add Talk to Jeff\n"
@@ -277,6 +296,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - 64-bit datetime support (major)
NewsItem uint64_support (
version,
false,
"Support for 64-bit timestamps and numeric values",
"",
@@ -294,6 +314,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Waiting is a virtual status
NewsItem waiting_status (
version,
true,
"Deprecation of the status:waiting",
"",
@@ -315,6 +336,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Support for environment variables in the taskrc
NewsItem env_vars (
version,
true,
"Environment variables in the taskrc",
"",
@@ -333,6 +355,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Reports outside of context
NewsItem contextless_reports (
version,
true,
"Context-less reports",
"",
@@ -354,6 +377,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Exporting a particular report
NewsItem exportable_reports (
version,
false,
"Exporting a particular report",
"",
@@ -377,6 +401,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Multi-day holidays
NewsItem multi_holidays (
version,
false,
"Multi-day holidays",
"",
@@ -385,7 +410,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
" obtained from our website, holidata.net.",
" Instead of single-day holiday entries only, Taskwarrior now supports holidays\n"
" that span a range of days (i.e. vacation).\n",
" Use a holday.<name>.start and holiday.<name>.end to configure a multi-day holiday:\n"
" Use a holiday.<name>.start and holiday.<name>.end to configure a multi-day holiday:\n"
" \n"
" holiday.sysadmin.name=System Administrator Appreciation Week\n"
" holiday.sysadmin.start=20100730\n"
@@ -399,6 +424,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Unicode 12
NewsItem unicode_12 (
version,
false,
"Extended Unicode support (Unicode 12)",
"",
@@ -406,7 +432,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
" The support for Unicode character set was improved to support Unicode 12.\n"
" This means better support for various language-specific characters - and emojis!",
"",
" Extended unicode support for language specific characters helps non-English users.\n"
" Extended unicode support for language-specific characters helps non-English speakers.\n"
" While most users don't enter emojis as task metadata, automated task creation tools,\n"
" such as bugwarrior, might create tasks with exotic Unicode data.",
" You can try it out - 'task add Prepare for an 👽 invasion!'"
@@ -417,6 +443,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - The .by attribute modifier
NewsItem by_modifier (
version,
false,
"The .by attribute modifier",
"",
@@ -435,6 +462,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Context-specific configuration overrides
NewsItem context_config (
version,
false,
"Context-specific configuration overrides",
"",
@@ -459,6 +487,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - XDG config home support
NewsItem xdg_support (
version,
true,
"Support for XDG Base Directory Specification",
"",
@@ -487,6 +516,7 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
// - Update holiday data
NewsItem holidata_2022 (
version,
false,
"Updated holiday data for 2022",
"",
@@ -500,6 +530,28 @@ void CmdNews::version2_6_0 (std::vector<NewsItem>& items) {
items.push_back(holidata_2022);
}
void NewsItem::version3_0_0 (std::vector<NewsItem>& items) {
Version version("3.0.0");
NewsItem sync {
version,
/*major=*/true,
/*title=*/"New data model and sync backend",
/*bg_title=*/"",
/*background=*/"",
/*punchline=*/
"The sync functionality for Taskwarrior has been rewritten entirely, and no longer\n"
"supports taskserver/taskd. The most robust solution is a cloud-storage backend,\n"
"although a less-mature taskchampion-sync-server is also available. See `task-sync(5)`\n"
"For details. As part of this change, the on-disk storage format has also changed.\n",
/*update=*/
"This is a breaking upgrade: you must export your task database from 2.x and re-import\n"
"it into 3.x. Hooks run during task import, so if you have any hooks defined,\n"
"temporarily disable them for this operation.\n\n"
"See https://taskwarrior.org/docs/upgrade-3/ for information on upgrading to Taskwarrior 3.0.",
};
items.push_back(sync);
}
////////////////////////////////////////////////////////////////////////////////
int CmdNews::execute (std::string& output)
{
@@ -509,11 +561,13 @@ int CmdNews::execute (std::string& output)
// Supress compiler warning about unused argument
output = "";
// TODO: 2.6.0 is the only version with explicit release notes, but in the
// future we need to only execute yet unread release notes
std::vector<NewsItem> items;
std::string version = "2.6.0";
version2_6_0 (items);
std::vector<NewsItem> items = NewsItem::all();
Version news_version(Context::getContext ().config.get ("news.version"));
Version current_version = Version::Current();
// 2.6.0 is the earliest version with news support.
if (!news_version.is_valid())
news_version = Version("2.6.0");
bool full_summary = false;
bool major_items = true;
@@ -538,6 +592,12 @@ int CmdNews::execute (std::string& output)
signal (SIGINT, signal_handler);
// Remove items that have already been shown
items.erase (
std::remove_if (items.begin (), items.end (), [&](const NewsItem& n){return n._version <= news_version;}),
items.end ()
);
// Remove non-major items if displaying a non-full (abbreviated) summary
int total_highlights = items.size ();
if (! full_summary)
@@ -546,23 +606,25 @@ int CmdNews::execute (std::string& output)
items.end ()
);
// Print release notes
Color bold = Color ("bold");
std::cout << bold.colorize (format (
"\n"
"==========================================\n"
"Taskwarrior {1} {2} Release highlights\n"
"==========================================\n",
version,
(full_summary ? "All" : (major_items ? "Major" : "Minor"))
));
if (items.empty ()) {
std::cout << bold.colorize ("You are up to date!\n");
} else {
// Print release notes
std::cout << bold.colorize (format (
"\n"
"================================================\n"
"Taskwarrior {1} through {2} Release Highlights\n"
"================================================\n",
news_version,
current_version));
for (unsigned short i=0; i < items.size (); i++) {
std::cout << format ("\n({1}/{2}) ", i+1, items.size ());
items[i].render ();
for (unsigned short i=0; i < items.size (); i++) {
std::cout << format ("\n({1}/{2}) ", i+1, items.size ());
items[i].render ();
}
std::cout << "Thank you for catching up on the new features!\n";
}
std::cout << "Thank you for catching up on the new features!\n";
wait_for_enter ();
// Display outro
@@ -588,9 +650,9 @@ int CmdNews::execute (std::string& output)
std::cout << outro.str ();
// Set a mark in the config to remember which version's release notes were displayed
if (config.get ("news.version") != "2.6.0")
if (full_summary && news_version != current_version)
{
CmdConfig::setConfigVariable ("news.version", "2.6.0", false);
CmdConfig::setConfigVariable ("news.version", std::string(current_version), false);
// Revert back to default signal handling after displaying the outro
signal (SIGINT, SIG_DFL);
@@ -627,14 +689,15 @@ int CmdNews::execute (std::string& output)
else
wait_for_enter (); // Do not display the outro and footnote at once
if (! full_summary && major_items)
if (! items.empty() && ! full_summary && major_items) {
Context::getContext ().footnote (format (
"Only major highlights were displayed ({1} out of {2} total).\n"
"If you're interested in more release highlights, run 'task news {3} minor'.",
items.size (),
total_highlights,
version
current_version
));
}
return 0;
}

View File

@@ -31,9 +31,11 @@
#include <Command.h>
#include <CmdConfig.h>
#include <CmdContext.h>
#include <Version.h>
class NewsItem {
public:
Version _version;
bool _major = false;
std::string _title;
std::string _bg_title;
@@ -42,7 +44,16 @@ public:
std::string _update;
std::string _reasoning;
std::string _actions;
void render ();
static std::vector<NewsItem> all();
static void version2_6_0 (std::vector<NewsItem>&);
static void version3_0_0 (std::vector<NewsItem>&);
private:
NewsItem (
Version,
bool,
const std::string&,
const std::string& = "",
@@ -52,7 +63,6 @@ public:
const std::string& = "",
const std::string& = ""
);
void render ();
};
class CmdNews : public Command
@@ -60,7 +70,6 @@ class CmdNews : public Command
public:
CmdNews ();
int execute (std::string&);
void version2_6_0 (std::vector<NewsItem>&);
};
#endif

View File

@@ -60,10 +60,10 @@ int CmdProjects::execute (std::string& output)
// Get all the tasks.
handleUntil ();
handleRecurrence ();
auto tasks = Context::getContext ().tdb2.pending.get_tasks ();
auto tasks = Context::getContext ().tdb2.pending_tasks ();
if (Context::getContext ().config.getBoolean ("list.all.projects"))
for (auto& task : Context::getContext ().tdb2.completed.get_tasks ())
for (auto& task : Context::getContext ().tdb2.completed_tasks ())
tasks.push_back (task);
// Apply the filter.
@@ -172,10 +172,10 @@ int CmdCompletionProjects::execute (std::string& output)
// Get all the tasks.
handleUntil ();
handleRecurrence ();
auto tasks = Context::getContext ().tdb2.pending.get_tasks ();
auto tasks = Context::getContext ().tdb2.pending_tasks ();
if (Context::getContext ().config.getBoolean ("list.all.projects"))
for (auto& task : Context::getContext ().tdb2.completed.get_tasks ())
for (auto& task : Context::getContext ().tdb2.completed_tasks ())
tasks.push_back (task);
// Apply the filter.

View File

@@ -27,17 +27,13 @@
#include <cmake.h>
#include <CmdPurge.h>
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <format.h>
#include <shared.h>
////////////////////////////////////////////////////////////////////////////////
CmdPurge::CmdPurge ()
{
_keyword = "purge";
_usage = "task <filter> purge";
_description = "Removes the specified tasks from the data files. Causes permanent loss of data.";
_description = "(deprecated; does nothing)";
_read_only = false;
_displays_id = false;
_needs_confirm = true;
@@ -49,131 +45,12 @@ CmdPurge::CmdPurge ()
_category = Command::Category::operation;
}
////////////////////////////////////////////////////////////////////////////////
// Purges the task, while taking care of:
// - dependencies on this task
// - child tasks
void CmdPurge::purgeTask (Task& task, int& count)
{
Context::getContext ().tdb2.purge (task);
handleDeps (task);
handleChildren (task, count);
count++;
}
////////////////////////////////////////////////////////////////////////////////
// Makes sure that any task having the dependency on the task being purged
// has that dependency removed, to preserve referential integrity.
void CmdPurge::handleDeps (Task& task)
{
std::string uuid = task.get ("uuid");
for (auto& blockedConst: Context::getContext ().tdb2.all_tasks ())
{
Task& blocked = const_cast<Task&>(blockedConst);
if (blocked.hasDependency (uuid))
{
blocked.removeDependency (uuid);
Context::getContext ().tdb2.modify (blocked);
}
}
}
////////////////////////////////////////////////////////////////////////////////
// Makes sure that with any recurrence parent are all the child tasks removed
// as well. If user chooses not to, the whole command is aborted.
void CmdPurge::handleChildren (Task& task, int& count)
{
// If this is not a recurrence parent, we have no job here
if (!task.has ("mask"))
return;
std::string uuid = task.get ("uuid");
std::vector<Task> children;
// Find all child tasks
for (auto& childConst: Context::getContext ().tdb2.all_tasks ())
{
Task& child = const_cast<Task&> (childConst);
if (child.get ("parent") == uuid)
{
if (child.getStatus () != Task::deleted)
// In case any child task is not deleted, bail out
throw format ("Task '{1}' is a recurrence template. Its child task {2} must be deleted before it can be purged.",
task.get ("description"),
child.identifier (true));
else
children.push_back (child);
}
}
// If there are no children, our job is done
if (children.empty ())
return;
// Ask for confirmation to purge them, if needed
std::string question = format ("Task '{1}' is a recurrence template. All its {2} deleted children tasks will be purged as well. Continue?",
task.get ("description"),
children.size ());
if (Context::getContext ().config.getBoolean ("recurrence.confirmation") ||
(Context::getContext ().config.get ("recurrence.confirmation") == "prompt"
&& confirm (question)))
{
for (auto& child: children)
purgeTask (child, count);
}
else
throw std::string ("Purge operation aborted.");
}
////////////////////////////////////////////////////////////////////////////////
int CmdPurge::execute (std::string&)
{
int rc = 0;
int count = 0;
bool matched_deleted = false;
Filter filter;
std::vector <Task> filtered;
// Apply filter.
filter.subset (filtered);
if (filtered.size () == 0)
{
Context::getContext ().footnote ("No tasks specified.");
return 1;
}
for (auto& task : filtered)
{
// Allow purging of deleted tasks only. Hence no need to deal with:
// - unblocked tasks notifications (deleted tasks are not blocking)
// - project changes (deleted tasks not included in progress)
// It also has the nice property of being explicit - users need to
// mark tasks as deleted before purging.
if (task.getStatus () == Task::deleted)
{
// Mark that at least one deleted task matched the filter
matched_deleted = true;
std::string question;
question = format ("Permanently remove task {1} '{2}'?",
task.identifier (true),
task.get ("description"));
if (permission (question, filtered.size ()))
purgeTask (task, count);
}
}
if (filtered.size () > 0 and ! matched_deleted)
Context::getContext ().footnote ("No deleted tasks specified. Maybe you forgot to delete tasks first?");
feedback_affected (count == 1 ? "Purged {1} task." : "Purged {1} tasks.", count);
return rc;
Context::getContext ().footnote ("As of version 3.0, this command has no effect.");
Context::getContext ().footnote ("Deleted tasks are removed from the task list automatically after they expire.");
return 0;
}
////////////////////////////////////////////////////////////////////////////////

View File

@@ -32,10 +32,6 @@
class CmdPurge : public Command
{
private:
void purgeTask (Task& task, int& count);
void handleChildren (Task& task, int& count);
void handleDeps (Task& task);
public:
CmdPurge ();
int execute (std::string&);

View File

@@ -145,7 +145,6 @@ int CmdShow::execute (std::string& output)
" debug"
" debug.hooks"
" debug.parser"
" debug.tls"
" default.command"
" default.due"
" default.project"
@@ -165,6 +164,7 @@ int CmdShow::execute (std::string& output)
" fontunderline"
" gc"
" hooks"
" hooks.location"
" hyphenate"
" indent.annotation"
" indent.report"
@@ -192,14 +192,13 @@ int CmdShow::execute (std::string& output)
" search.case.sensitive"
" sugar"
" summary.all.projects"
" sync.local.server_dir"
" sync.gcp.credential_path"
" sync.gcp.bucket"
" sync.server.client_id"
" sync.encryption_secret"
" sync.server.origin"
" tag.indicator"
" taskd.server"
" taskd.ca"
" taskd.certificate"
" taskd.ciphers"
" taskd.credentials"
" taskd.key"
" taskd.trust"
" undo.style"
" urgency.active.coefficient"
" urgency.scheduled.coefficient"

Some files were not shown because too many files have changed in this diff Show More