Commit graph

6193 commits

Author SHA1 Message Date
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
Gagan Nagaraj
6a24510473
Exclude attributes starting with tag_ (#3619)
* Exclude attributes starting with tag_

* Check only for tag_*
2024-09-09 08:12:19 -04:00
Dustin J. Mitchell
70632b088e
Do not count undo operations in the 'would be reverted..' message (#3598) 2024-08-14 08:35:34 -04:00
Dustin J. Mitchell
4ff63a7960
Use TaskChampion 0.7.0, now via cxx instead of hand-rolled FFI (#3588)
TC 0.7.0 introduces a new `TaskData` type that maps to Taskwarrior's
`Task` type more cleanly. It also introduces the idea of gathering lists
of operations and "committing" them to a replica.

A consequence of this change is that TaskChampion no longer
automatically maintains dependency information, so Taskwarrior must do
so, with its `TDB2::dependency_sync` method. This method does a very
similar thing to what TaskChampion had been doing, so this is a shift of
responsibility but not a major performance difference.

Cxx is .. not great. It is missing a lot of useful things that make a
general-purpose bridge impractical:

 - no support for trait objects
 - no support for `Option<T>` (https://github.com/dtolnay/cxx/issues/87)
 - no support for `Vec<Box<..>>`

As a result, some creativity is required in writing the bridge, for
example returning a `Vec<OptionTaskData>` from `all_task_data` to allow
individual `TaskData` values to be "taken" from the vector.

That said, Cxx is the current state-of-the-art, and does a good job of
ensuring memory safety, at the cost of some slightly awkward APIs.

Subsequent work can remove the "TDB2" layer and allow commands and other
parts of Taskwarrior to interface directly with the `Replica`.
2024-08-11 02:06:00 +00:00
Jan Christian Grünhage
3d30f2ac46
Optionally use system provided corrosion (#3590) 2024-08-09 13:05:19 -04:00
Dustin J. Mitchell
5c6cc3e522
Release 3.1.0 (#3574) 2024-08-04 16:51:11 +00:00
Felix Schurk
93356b39c3 add initial bulk run from pre-commit over all files 2024-07-29 22:34:51 +02:00
Felix Schurk
954d3f5058 add blank line between cmake.h header include to prevent sorting
* add required comment in the line below cmake.h include header
2024-07-29 22:33:17 +02:00
Adrian Sadłocha
9c49863795
Make task news nag configurable and deterministic (#3567)
This patch fixes #3497.
2024-07-26 20:30:54 -04:00
Adrian Sadłocha
9dde68f918
Remove unused variables in task history implementation (#3564) 2024-07-24 19:54:56 -04:00
Adrian Sadłocha
4dc3093b22
Update a comment to match the code (#3565) 2024-07-24 19:52:25 -04:00
Adrian Sadłocha
40ea3f2f54
Fix conversion from TCStatus::Unknown (#3561)
Before this patch, the messsage would be "unknown TCStatus 4294967295"
(i.e. `u32::MAX`) instead of "unknown TCStatus -1".
2024-07-20 06:46:06 -04:00
Adrian Sadłocha
7ea4baed77
Warn if an import contains multiple occurrences of the same UUID (#3560) 2024-07-19 22:27:16 -04:00
Dustin J. Mitchell
7d79b9e516
Rename 'expiration.on-sync' to 'purge.on-sync' (#3556)
Taskwarrior uses "expire" to refer to deletion of tasks past their
"until" date, so let's use `purge` to link this semantically to the
`task purge` command.
2024-07-14 15:45:26 -04:00
Dustin J. Mitchell
1304d6361c
Restore 'task purge' functionality (#3540)
Co-authored-by: ryneeverett <ryneeverett@gmail.com>
2024-07-14 15:59:00 +00:00
Dustin J. Mitchell
d4649dd210
Revert "Do not create recurring tasks before today (#3542)" (#3555)
This reverts commit 6d3519419e.
2024-07-13 19:12:49 -04:00
Dustin J. Mitchell
213b9d3aee
Add support for task expiration (#3546) 2024-07-09 16:39:39 -04:00
Will R S Hansen
2bd609afe3
Export tasks in a deterministic order (#3549)
fix issue #3527
2024-07-09 03:22:14 +00:00
koleesch
847c482c25
Remove duplicate check from task diag (#3545) 2024-07-07 13:19:54 -04:00
Dustin J. Mitchell
6d3519419e
Do not create recurring tasks before today (#3542)
Tasks can be due "today", as `task add foo due:today ..` is a common
form. However, recurrences before that are just not created.

This avoids a lengthy "hang" when recurrences are updated on an old task
database, as many tasks in the past are created.
2024-07-07 08:51:09 -04:00
Hector Dearman
fa5604ea8d
Relax sync.server.origin to allow paths (#3423) 2024-07-04 23:17:52 +00:00
Felix Schurk
eb22036f6b
Update to taskchampion 0.6 (#3531)
* update dependency to taskchampion 0.6
* change from origin to url in remote server
2024-07-04 08:45:11 +02:00
Sebastian Carlos
b70d8ef574
Remove locking config (#3519)
This flag is no longer needed. It was used to control file locking on the *.data files.

Co-authored-by: Sebastian Carlos <sebastiancarlos@gmail.com>
2024-06-28 18:12:10 -04:00
Sebastian Carlos
64609a0407
Consistently exclude WAITING tasks from reports which filter by status (#3525)
Consistently exclude WAITING tasks from reports which filter by status

If I understand correctly, the virtual status "waiting" is deprecated.
This is why some reports include the explicit "-WAITING" filter even
though it is not necessary: The idea is that being explicit will be
needed in the future when the "waiting" status is removed.

But I noticed that some reports do not include the "-WAITING" filter, so
I added it to all reports that filter by status.
2024-06-28 18:02:37 -04:00
Dustin J. Mitchell
9cd1b96e1f
Remove support for the F4 format (#3494)
This was only still used in tests.
2024-06-26 07:33:46 +02:00
Dustin J. Mitchell
e3181aa8d4
Consider all news "major" (#3493)
This has the effect that `task news` will unconditionally update the
config with the new version once news has been shown (assuming the user
does not kill the process first).
2024-06-24 08:14:33 -04:00
Dustin J. Mitchell
5f983a66af
Include version in default-generated .taskrc (#3500)
This will avoid new users being prompted with all the news since
2.5.0.
2024-06-21 08:32:09 -04:00
Hector Dearman
0119867223
Resolve a number of minor warnings (#3495) 2024-06-20 08:29:39 -04:00
Dustin J. Mitchell
24f56b65a9
Only warn about .data files when showing reports (#3473)
* Only warn about .data files when showing reports

This avoids the warning appearing in shell completion, for example.

* Update src/commands/CmdCustom.cpp

Co-authored-by: ryneeverett <ryneeverett@gmail.com>

---------

Co-authored-by: ryneeverett <ryneeverett@gmail.com>
2024-06-19 11:17:14 +02:00
Dustin J. Mitchell
9788798189
Remove unnecessary cbindgen-related Makefile (#3486) 2024-06-19 02:54:46 +00:00
Dustin J. Mitchell
82e645b929
Fix builds with Rust 1.79 (#3487)
* use underscore in taskchampion-lib name

* update to corrosion 0.5.0
2024-06-17 10:15:20 +02:00
Dustin J. Mitchell
161463deec
Fix warning about unused method (#3488)
fix warning about unused method
2024-06-14 22:15:21 -04:00
Dustin J. Mitchell
e9c6c6c846
Be resilient to a missing 'entry' in urgency (#3479)
Any combination of properties is possible - Taskwarrior should make
the best of the tasks it finds, rather than crashing.
2024-06-13 14:17:23 -04:00
Andonome
d775923070
Let task show recognize limit in taskrc (#3466) 2024-05-27 13:50:46 -04:00
Maarten Aertsen
fb16dbf7cf
Test modification of a task by an on-add hook (test case for #3416) (#3443)
* Add test case to cover https://github.com/GothenburgBitFactory/taskwarrior/issues/3416

* Add (builtin) on-add-modify test hook and use it

* TDB2::add() move hook invocation before save (#3416)
2024-05-14 21:47:43 -04:00
Dominik Rehák
0deeeb0a1d
CmdStart: Fix "make this task pending" note for completed tasks (#2769) 2024-05-05 20:04:18 -04:00
Philipp Oberdiek
9d9dde1065
Fix inherited urgency when parent and child have the same urgency (#2941)
Update condition for inheritance value hack

If the parent and child task have the same urgency the parent task also
needs the 0.01 extra urgency to be sorted above the child.
2024-05-05 20:02:12 -04:00
Dustin J. Mitchell
28a46880a2
Treat a nonzero exit status as a failure (#3430)
And fix the test cases that have been failing ,undetected
2024-05-03 13:58:09 +00:00
Felix Schurk
52dbecb515
remove .gitignore files and symbolic links/aliases (#3421)
* remove symbollic links in the src directory as they are no longer
  working with the out-of-source build
* remove .gitignore in the documentation (is build in build folder not
  needed)
* remove CMake folders as they are also no longer present in the source
  directory

Closes #3420.
2024-05-02 20:26:10 -04:00