GothenburgBitFactory / GothenburgBitFactory/taskwarrior

`task export` incorrectly formats numeric values if they are not actually numeric

Open
#3,330 12 comments 0 reactions 1 assignee Claimed by @tbabej View on GitHub
type:bug
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

The basic process and the error message is thus:
```
$ task export > all-tasks.json
$ pacman -Syu task
... installs task 3.0.0 ...
$ task import all-tasks.json
Importing 'all-tasks.json'
Error: missing ']' at position 1
```

Output of `task diag`:

```
task 2.6.2
Platform: Linux

Compiler
Version: 12.2.1 20230201
Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
Compliance: C++17

Build Features
Commit: 7400e6ed6
CMake: 3.26.0
libuuid: libuuid + uuid_unparse_lower
libgnutls: 3.8.0
Build type: release

Configuration
File: /home/hearth/.taskrc (found), 4753 bytes, mode 100644
Data: /home/hearth/.task (found), dir, mode 40777
Locking: Enabled
GC: Enabled
Server:
CA: -
Certificate: -
Key: -
Trust: strict
Ciphers: NORMAL
Creds:

Hooks
System: Enabled
Location: /home/hearth/.task/hooks
(-none-)

Tests
Terminal: 302x51
Dups: Scanned 4850 tasks for duplicate UUIDs:
No duplicates found
Broken ref: Scanned 4850 tasks for broken references:
No broken references found
```

So... I see in another git issue here that it was surprising Arch was upgrading people with no warning. It seems that, actually, something else is going on?

I note that the PKBUILD in the Arch /extra/ repository _looks_ fine to me: https://gitlab.archlinux.org/archlinux/packaging/packages/task/-/blob/main/PKGBUILD?ref_type=heads

So I am not sure what is up here!

I also don't know if this is actually the cause of my issue - it could be something entirely unrelated to the upgrade. I mean, if I am indeed on 2.6.2, import should work as expected for 2.6.2!

My package manager upgraded me without me being aware of breaking changes. So I was actually on whatever the Arch repositories says is 3.0.0 for a while. I didn't notice any breakages whatsoever. Given it seems that 3.0.0 is actually 2.6.2 here, that is probably why...

Current plan of action: build task 3.0.0 myself, and see if task import works without a hitch.

The question I have in case it doesn't, I guess, would be if there's some obvious regex to someone familiar with the relevant .json structure I can run to catch any breakages in the .json. Probably it would be easy to spot with a small file, but I have just shy of 5,000 lines.

Thank you for your work!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.