-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support setting aribtrary k/v's in a task #348
Comments
As per the discussion here I can take this one, if that's okay! 😄 |
all yours :D |
@miguelpduarte how is this going? |
The idea is that some users of the taskchampion library may want to call match k {
"description" => t.set_description(v),
"status" => t.set_status(v),
...
}
No, the underlying keys and values are always strings. So
No, quite the opposite -- this is a lower-level operation than
Indeed,
In Rust, the unit tests are typically in the same file as the code they test, enclosed in #[cfg(test)]
mod test { .. } and indeed, you'll see lots of unit tests in I don't think there's any reason to add an integration test for this. Integration tests should be used sparingly for issues that cannot be checked by unit tests (such as whether two high-level components integrate correctly). |
Currently, the only way to modify a task is to call a purpose-specific method like
set_description()
orset_status()
. This is a nice high-level interface, but people like low-level stuff, too. In particular, TaskWarrior operates deeply at the k/v level, parsing or generating string values at the very "outside" of the application. So, it will want to have something liketask.set_value(k, v)
. This should be documented as a "low-level" interface.The text was updated successfully, but these errors were encountered: