-
Notifications
You must be signed in to change notification settings - Fork 82
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
Add testing of protocol features to CI #1889
Comments
💯 |
A bit more on this issue: Both approaches have pros and cons, and the way I see it is the following: Protocol features pros:
Protocol features cons:
Branch pros:
Branch cons:
I personally think that protocol features bring quite a bit complexity to the project (mainly, because it's harder to follow the logic in the code, but maybe we adopt some kind of simple rules, e.g. styling code as following): // Main function doesn't contain branching logic makes it easier to follow
fn some_func() {
...
do_stuff(params);
...
}
// Function with just branching logic
fn do_stuff(params) {
#[cfg(feature = "version_lt_23")]
do_stuff_p22(params);
#[cfg(feature = "version_gte_23")]
do_stuff_p23(params);
}
// Functions that performs the task, only for one protocol version
#[cfg(feature = "version_lt_23")]
fn do_stuff_p22(params) {
...
}
do_stuff_p23(params) {
...
} Any suggestions are welcome |
What problem does your feature solve?
We currently don't test protocol features (
version_ge_23
) in CIWhat would you like to see?
Adding tests to CI
What alternatives are there?
Alternatively, we could use a separate branch for future releases. In this case we wouldn't need to maintain protocol features
The text was updated successfully, but these errors were encountered: