-
Notifications
You must be signed in to change notification settings - Fork 3
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
Prevent Rust feature bleed #81
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@mordamax you are fine with maintaining this? My eyes bleed again a little bit after seeing this bash script. |
BTW, there also exist this pr: paritytech/diener#19 |
I guess it's @paritytech-ci who maintain it in this case. but my opinion is that it's okay as long as it's relevantly simple, <=~100 lines, otherwise it should be some more maintainable/readable language like ts/python/rust the existing stuff like check-dependent should be killed 100% |
Co-authored-by: Bastian Köcher <info@kchr.de>
Interesting... I dont think parsing I am not happy with this as long-term solution, but for now it should prevent obvious blunders which can take a while to find otherwise. Recently I saw https://github.com/guppy-rs/guppy which is used by Diem and think could be a fit. |
You download the deps to the local cargo registry. So, this should work.
I think I read about this somewhere before, but if that could be a fit, it would be nice. |
Okay then lets use this to get rid of some obvious errors and then make a long-term strategy? |
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
# This case just means that the pallet does not support the | ||
# requested feature which is fine. | ||
PASSED=$((PASSED+1)) | ||
elif echo "$OUTPUT" | grep -qF "feature \"$STAYS_DISABLED\""; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see three different approaches to checking return code here.
This one, inside if
, then RET=0; command || RET=$?
, and IS_NOT_SUPPORTED=$(command || echo $?)
.
Maybe put all of them into if
's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of wanted to keep the lines short, but I guess I can break it into multiple like this as well 👍
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anyway, much more readable and maintainable now, thank you!
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
See paritytech/substrate#12341 for a description of the new script.
Currently working in Substrate: success case and error case.