Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue a warning if .data files remain #3321

Merged
merged 3 commits into from
Mar 31, 2024

Conversation

djmitche
Copy link
Collaborator

This will help users realize that they have updated to an incompatible version and must export and import their tasks.

This will help users realize that they have updated to an incompatible
version and must export and import their tasks.
@djmitche djmitche linked an issue Mar 31, 2024 that may be closed by this pull request
src/TDB2.cpp Outdated
format ("Found existing '.data' files in {1}", location)) << "\n";
std::cout << " Taskwarrior's storage format changed in 3.0.\n";
std::cout << " See https://github.com/GothenburgBitFactory/taskwarrior/releases.\n";
std::cout << " Remove the files to silence this warning.\n\n";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
std::cout << " Remove the files to silence this warning.\n\n";

I wouldn't make this suggestion in a warning message because a user might delete these files without exporting first. Really they should probably move them elsewhere for a temporary backup but IMO just pointing them towards longer form documentation is all a warning message should aspire to do.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good advice!

src/TDB2.cpp Outdated
Color warning = Color (Context::getContext ().config.get ("color.warning"));
std::cout << warning.colorize (
format ("Found existing '.data' files in {1}", location)) << "\n";
std::cout << " Taskwarrior's storage format changed in 3.0.\n";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not in love with this wording but I feel like some kind of "call to action" other than (implicitly) "delete your .data files" would be good.

Suggested change
std::cout << " Taskwarrior's storage format changed in 3.0.\n";
std::cout << " Taskwarrior's storage format changed in 3.0, requiring a manual migration.\n";

@djmitche djmitche merged commit 8a0a98d into GothenburgBitFactory:develop Mar 31, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warn if .data files exist
2 participants