-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace task macro with trait #3
Conversation
While the macro provided good ergonomics, it hardcoded configuration parameters and hid a lot of how a task is actually created. It was also possible to create tasks from anywhere in the dependency tree without control of the PXROS application developer. With the task trait, all configurations are user accessible and task creation is done in one single point.
A builder allows more ergonomic overriding of single parts of the configuration without providing many combinations of override methods. The current implementation prevents accidentally overriding the same configuration twice, thus making it more user-friendly and misuse-resistant. --------- Co-authored-by: vE5li <ve5li@tuta.io>
Very nice! 👍 |
Please wait my review also! |
This should be implemented by trait implementations
The comments should be addressed now. I would like to add some tests, at least for the task creation config and builder. The tests are kinda blocked by |
Very good! |
The task trait allows users to modify all aspects of task configuration and creation. By using a trait, we also enable easy task re-use and sharing, thus allowing users to share tasks in crates.
This also removes the possibility of defining a PXROS task anywhere in the dependency tree in favor of a central point to define all tasks. This improves clarity and transparency for users.