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.
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.
* 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.
* 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>
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.
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`.
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.
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.
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.
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).
* 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>
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.
* 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.