Skip to content
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

Merged
merged 1 commit into from Apr 6, 2021

Conversation

kevinburke
Copy link
Contributor

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.

@kevinburke kevinburke force-pushed the gen-header branch 2 times, most recently from 25e8f55 to 305b48d Compare April 6, 2021 18:22
Copy link
Member

@seanmonstar seanmonstar left a 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.

capi/include/hyper.h Show resolved Hide resolved
@kevinburke kevinburke force-pushed the gen-header branch 2 times, most recently from 5861524 to 5b0ee76 Compare April 6, 2021 20:20
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.
@kevinburke
Copy link
Contributor Author

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.

Copy link
Member

@seanmonstar seanmonstar left a 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!

@seanmonstar seanmonstar merged commit a5464f7 into hyperium:master Apr 6, 2021
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"
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that's alright

@kevinburke kevinburke deleted the gen-header branch April 16, 2021 03:15
BenxiangGe pushed a commit to BenxiangGe/hyper that referenced this pull request Jul 26, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors running gen_header.sh
2 participants