Commit graph

6165 commits

Author SHA1 Message Date
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
Dustin J. Mitchell
94b3e301d1
Remove taskchampion source from this repo (#3427)
* move taskchampion-lib to src/tc/lib, remove the rest
* update references to taskchampion
* Use a top-level Cargo.toml so everything is consistent
* apply comments from ryneeverett
2024-05-02 02:45:11 +00:00
sleepy_nols
7dba5e7695
update '.data' warning message to '*.data' for better readability (#3409)
TDB2: update '.data' warning to '*.data' for better readability, closes #3406
2024-04-28 15:24:42 -04:00
Dustin J. Mitchell
9b35ab37aa
Remove debug print (#3389) 2024-04-22 20:01:26 -04: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
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
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
ryneeverett
587f8910ef sync: Point to manpage if unconfigured
See #3340.
2024-04-05 10:35:15 -04: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
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
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
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
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
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
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]
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
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
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:🆕: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
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
Dustin J. Mitchell
75e10676ce Use ffizz_header to generate taskchampion.h 2023-06-19 13:36:17 -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