-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
.github: run gen_header.sh in CI environment #2488
Conversation
25e8f55
to
305b48d
Compare
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.
Thanks so much for fixing this! I noticed a change in the output that I'd like to figure out before merging, commented inline.
5861524
to
5b0ee76
Compare
Clean up the script so that any unexpected error terminates the script, and stop suppressing errors that may contain useful information (for example, that you are using the stable version but need to use the nightly). This is useful because if hyper.h is not up to date going forward the CI should flag it. As is, there are a bunch of changes to hyper.h that have not been checked in (or were generated by a newer version of the cbindgen script.) Fixes hyperium#2483.
Note I just pushed some additional changes to make the diff clearer when cbindgen fails and to add a header to the top of hyper.h. |
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.
Superb, thanks so much!
if ! output=$(cargo rustc -- -Z unstable-options --pretty=expanded 2>&1 > expanded.rs); then | ||
# As of April 2021 the script above prints a lot of warnings/errors, and | ||
# exits with a nonzero return code, but hyper.h still gets generated. | ||
echo "$output" |
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've noticed that all PRs now get Github Actions Annotations with the warnings from this script, and I suspect it's automatically doing it from this output. Do you think it'd be horrible if we silence this if --verify
was passed?
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.
No that's alright
Clean up the script so that any unexpected error terminates the script, and stop suppressing errors that may contain useful information (for example, that you are using the stable version but need to use the nightly). This is useful because if hyper.h is not up to date going forward the CI should flag it. As is, there are a bunch of changes to hyper.h that have not been checked in (or were generated by a newer version of the cbindgen script.) Fixes hyperium#2483.
Clean up the script so that any unexpected error terminates the
script, and stop suppressing errors that may contain useful
information (for example, that you are using the stable version but
need to use the nightly).
This is useful because if hyper.h is not up to date going forward the
CI should flag it. As is, there are a bunch of changes to hyper.h that
have not been checked in (or were generated by a newer version of the
cbindgen script.)
Fixes #2483.