Commit graph

6231 commits

Author SHA1 Message Date
Kalle Kietäväinen
2ee5fb287c
Fix suppressing news nag after reading the news (#3817)
The news nag suppression regressed again in 5c67d22. That commit
intended to remove the sponsorship outro from the news, but also removed
the bookkeeping that marks the news as read. This commit reverts that
part back to its previous state.
2025-03-13 20:01:16 -04:00
Dustin J. Mitchell
b792018c00
Updates after 3.4.0 (#3816)
* Cargo update
* Update submodules
2025-03-12 22:27:55 +00:00
Dustin J. Mitchell
063325b052
Release 3.4.0 (#3811) 2025-03-12 17:58:49 -04:00
Ram-Z
f73b42d23f
Allow dur/dur division (#3812)
It is perfectly valid to divide two durations, it is a ratio with no
unit.
2025-03-12 16:48:49 -04:00
Dustin J. Mitchell
5c67d22540 Remove sponsorship outro from 'task news' 2025-03-08 12:22:09 -05:00
Tobias Predel
5814526429
Remove headers (#3807) 2025-03-08 09:04:01 -05:00
Dustin J. Mitchell
74276b400c
Generate valid JSON even with invalid dates (#3801) 2025-03-06 16:59:14 +01:00
Dustin J. Mitchell
3c12c0dfd0
Fix errors finding Rust toolchain (#3802)
* switch to dtolnay/toolchain
* Add .dockerignore to avoid copying target/ into images
* update corrosion
2025-03-06 06:59:04 -05:00
Tobias Predel
1567ea5c06
Remove header files out of CMakeLists (#3797)
It does not make any difference.
2025-03-03 12:14:39 -05:00
Tobias Predel
a3e0dada30
Remove unused includes (#3798) 2025-03-02 11:03:18 -05:00
Tobias Predel
81ca04fc8c
Declare in corresponding header files and dissolve main.h (#3796)
* Declare in corresponding header files and dissolve main.h

Apply include-what-you-use

* Remove further unncessary includes

* Incorporate review comment

* Do not declare static functions and variables in header

* Adapt test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-03-01 14:47:42 -05:00
Tobias Predel
55c02f5420
Remove unused includes (#3795)
* Remove unused include in Variant.h

* Remove unused include in util.h

* Remove unused include directives in util.cpp

* Remove unused include directives in TF2.h

* Remove unused include directives in TF2.cpp

* Remove unused include directive in TDB2.h

* Remove unused include directives in TDB2.cpp

* Remove unused include directives in Task.h

* Remove unused include directive in rules.cpp

* Remove unused include directives in rules.cpp

* Remove unused include directives in nag.cpp

* Remove unused include directive in main.h

* Remove unused include directive in legacy.cpph

* Remove unused include directive in Hooks.cpp

* Remove unused include directive in Filter.h

* Remove unused include directive in Filter.cpp

* Remove unused include directive in feedback.cpp

* Remove unused include directive in Eval.cpp

* Remove unused include directives in dependency.cpp

* Remove unused include directivess in Context.cpp
2025-03-01 10:42:40 -05:00
Dustin J. Mitchell
a701f8fc7d
Open Replica read-only when possible (#3776)
* Open Replica read-only when possible

Specifically, when either
 - the command is read-only; or
 - the command requires GC (including recurrence updates) but GC is disabled by config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-14 10:25:19 +01:00
Dustin J. Mitchell
d6658fe26f
Remove missed handleRecurrence/handleUntil calls (#3771)
These were missed in #3753.
2025-02-06 08:31:33 +01:00
Dustin J. Mitchell
7871617e9c
Only handleRecurrence/handleUntil when rc.gc=1 (#3772) 2025-02-06 08:30:41 +01:00
Dustin J. Mitchell
fdb7e5e020
Test for unusual task data (#3770)
* Test for unusual task data

A task might have any combination of keys and values, but Taskwarrior
often assumes that only valid values can occur, and crashes otherwise.
This is highly inconvenient, as it's often impossible to do anything
with the invalid task -- Taskwarrior just fails without modifying it.

So, this is the beginning of some testing for such invalid tasks, with
the goal of making Taskwarrior due something reasonable. In general, an
invalid attribute value is treated as if it was not set. This is not
exhaustive, and there are likely still bugs of this sort, but as we find
them we can fix and add regression tests to this script.

This introduces a new test-only binary that creates a "bare" task using
TaskChampion, avoiding Taskwarrior's efforts to not create "unusual"
tasks.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-05 08:20:35 -05:00
Dustin J. Mitchell
aeeec16984
Handle 'until' and 'recur' simiar to handling of 'gc' (#3753)
This centralizes updates to recurrence and 'until' in Command, instead
of doing so in each individual command implementation.

This is preparatory to opening the TaskChampion replica in read-only
mode.
2025-01-18 02:20:41 -05:00
Dustin J. Mitchell
1c9dddcae7
Remove unused, undefined method TDB2::dump (#3754) 2025-01-13 08:33:06 -05:00
Dustin J. Mitchell
2e5177aa7c
Update to TaskChampion 2.0.2 (#3746) 2025-01-06 13:29:19 -05:00
Tejada-Omar
3bf0200602
Consider news read if news.version > current version (#3734)
Avoids two installations of taskwarrior with differing versions from
constantly nagging and rewriting `news.version`
2024-12-23 11:34:51 -05:00
Kalle Kietäväinen
1b9353dccc
Fix suppressing news nag after reading the news (#3731) 2024-12-20 13:13:23 +01:00
Dustin J. Mitchell
1ee69ea214
Release 3.3.0 (#3729)
* Release 3.3.0

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-19 16:57:43 +01:00
Dustin J. Mitchell
cc505e4881
Support importing Taskwarrior v2.x data files (#3724)
This should ease the pain of upgrading from v2.x to v3.x.
2024-12-17 01:24:45 +00:00
Dustin J. Mitchell
758ac8f850
Add support for sync to AWS (#3723)
This is closely modeled on support for sync to GCP (#3223), but with
different authentication options to mirror typical usage of AWS.
2024-12-17 01:08:50 +00:00
dependabot[bot]
ddae5c4ba9
Bump taskchampion from 0.9.0 to 1.0.0 (#3722)
* Bump taskchampion from 0.9.0 to 1.0.0

Bumps [taskchampion](https://github.com/GothenburgBitFactory/taskchampion) from 0.9.0 to 1.0.0.
- [Release notes](https://github.com/GothenburgBitFactory/taskchampion/releases)
- [Commits](https://github.com/GothenburgBitFactory/taskchampion/compare/v0.9.0...v1.0.0)

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

* Bump MSRV

* update url to address RUSTSEC-2024-0421

---------

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 <dustin@v.igoro.us>
2024-12-10 13:45:25 +00:00
David Tolnay
dfc36aefcf
Rely on cxx to enforce matching versions (#3713) 2024-12-01 17:12:05 -05:00
Dustin J. Mitchell
c2cb7f36a7
Include cxxbridge-cmd in Cargo.lock, check version consistency (#3712)
This adds cxxbridge-cmd to Cargo.lock per
https://github.com/dtolnay/cxx/issues/1407#issuecomment-2509136343

It adds an MSRV to `src/taskchampion-cpp/Cargo.toml` so that the
version of `Cargo.lock` is stil compatible with the MSRV.

It additionally adds a check of the Cargo metadata for all of the cxx*
versions agreeing, and for the MSRV's agreeing.
2024-12-01 15:22:26 +00:00
Dustin J. Mitchell
e5ab1bc7a5
Update libshared (#3711)
This brings in https://github.com/GothenburgBitFactory/libshared/pull/89
2024-11-29 09:35:21 -05:00
Dustin J. Mitchell
4797c4e17e
Check Datetime addition when performing recurrence (#3708) 2024-11-29 09:12:20 -05:00
Dustin J. Mitchell
a99b6084e8
Only nag to read news when there's news to read (#3699) 2024-11-25 17:48:06 -05:00
geoffpaulsen
066bb3e331
Updating the URL for Migration Documentation (#3694) 2024-11-21 21:19:44 -05:00
Chongyun Lee
8cc4c461d6
Fix compile with libc++ 18 (#3680) 2024-11-13 22:09:08 -05:00
Dustin J. Mitchell
7a092bea03
Release v3.2.0 (#3679) 2024-11-12 14:52:22 -05:00
Dustin J. Mitchell
54a94bd18c
include bubblegum-256.theme in default .taskrc (#3673) 2024-11-08 13:10:04 +01:00
Dustin J. Mitchell
a2f9b92d6c
Better undo output (and remove undo.style config) (#3672) 2024-11-07 14:56:34 -05:00
Dustin J. Mitchell
dcc8a8cdde
bump libshared for bold 256color support (#3670)
In particular, commit 47a750c385.
2024-11-06 07:40:16 -05:00
Dustin J. Mitchell
c9967c20e2
Restore support for task info journal (#3671)
This support was removed before Taskwarrior-3.x, and is now restored,
including the original tests removed in
ddd367232e
2024-11-06 07:39:39 -05:00
Dustin J. Mitchell
7da23aee1c
Run cargo test and fix it (#3663)
run cargo test and fix it
2024-11-05 08:55:10 -05:00
Dustin J. Mitchell
8184226319
Support ENABLE_TLS_NATIVE_ROOTS to use system TLS CAs (#3660) 2024-11-02 11:16:23 +01:00
Dustin J. Mitchell
94c95563ab
Upgrade to TaskChampion 0.9.0 (#3662)
See https://github.com/GothenburgBitFactory/taskchampion/releases/tag/v0.9.0
2024-10-31 12:59:49 +00:00
Dustin J. Mitchell
6ff900f3fc
Use Replica::pending_tasks (#3661)
This replaces a loop over _all_ tasks with one that fetches only pending
tasks, as determined by the working set.

This should be faster for task DB's with large numbers of completed
tasks, although on my medium-sized installation (~5000 total tasks) the
difference is negligible.
2024-10-30 21:49:04 -04:00
Fredrik Lanker
af8c5d58c8
Limit the allowed epoch timestamps (#3651)
The code for parsing epoch timestamps when displaying tasks only
supports values between year 1980 and 9999. Previous to this change, it
was possible to set e.g., the due timestamp to a value outside of these
limits, which would make it impossible to later on show the task.

With this change, we only allow setting values within the same limits
used by the code for displaying tasks.
2024-10-23 19:18:21 -04:00
Dustin J. Mitchell
2db373d631
Update to TaskChampion 0.8.0 (#3648)
* Update to TaskChampion 0.8.0

* Cargo update
2024-10-22 19:37:47 -04:00
Dustin J. Mitchell
96c72f3e06
Issue warnings instead of errors for 'weird' tasks (#3646)
* Issue warnings instead of errors for 'weird' tasks

* Support more comprehensive checks when adding a task
2024-10-22 15:15:51 -04:00
Scott Mcdermott
3e20ad6f6f
Pass rc.weekstart to libshared for ISO8601 weeknum parsing if "monday" (#3654)
* libshared: bump for weekstart, epoch defines, eopww fix

mainly those visible changes, and miscellaneous others

see GothenburgBitFactory/taskwarrior#3623 (weekstart)
see GothenburgBitFactory/taskwarrior#3651 (epoch limit defines)
see GothenburgBitFactory/libshared#73 (eopww fix)

* Initialize libshared's weekstart from user's rc.weekstart config

This enables use of newer libshared code that can parse week numbers
according to ISO8601 instead of existing code which is always using
Sunday-based weeks.  To get ISO behavior, set rc.weekstart=monday.
Default is still Sunday / old algorithm, as before, since Sunday is in
the hardcoded default rcfile.

Weekstart does not yet fix week-relative shortcuts, which will still
always use Monday.

See #3623 for further details.
2024-10-19 16:00:50 -04:00
Dustin J. Mitchell
26c383d615
Restore 'load' timer (#3635)
* Restore 'load' timer

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-10 07:33:02 +02:00
Dustin J. Mitchell
28628e5dca
Add newline in sync error message (#3603) 2024-10-03 18:32:13 -04:00
Dustin J. Mitchell
c95dc9d149
Ignore SIGPIPE (#3627)
This replicates what the Rust runtime does, and matches what Rust code
expects, for example when writing to a socket which is no longer
connected to the remote end.
2024-09-22 18:57:46 -04:00
Gagan Nagaraj
d75ef7f197
Check if end date is being set to a pending task (#3622)
check if end date is being set to a pending task

-throw error if end date is being set to a pending task
- add test for the bug
2024-09-13 12:16:20 -04:00
Gagan Nagaraj
c00c0e941b
Throw error when task config write is unsuccessfully (#3620) 2024-09-11 10:20:22 -04:00