-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
ci: add cargo-check-external-types
check
#4914
ci: add cargo-check-external-types
check
#4914
Conversation
It looks like the |
Well, I guess the bad news is we have leaked some For example: pub type uid_t = i32;
pub type gid_t = u32;
pub type pid_t = i32; This isn't 100% correct as it looks like |
Created #4916 to discuss and track removing the |
Also, since we have Windows-specific APIs, it would probably make sense to do this check for Windows as well. |
It looks like the Tokio Windows features have a raw pointer in the public API, which I hadn't added support for yet since we haven't used them in our projects. I'm going to take a pass on all the |
@jdisanti: I just opened smithy-lang/smithy-rs#1643 to support raw ptr |
I released version 1.3 of |
Thanks! |
Motivation
This PR adds
cargo-check-external-types
to CI for #4902.Solution
A new
check-external-types
CI step is added which pulls down a pinned nightly version of Rust, installscargo-check-external-types
, and then runs it against anexternal-types.toml
config file which allow-lists types that are currently exposed in Tokio's public API.If a PR exposes additional types that aren't listed in the config, then the CI job will output an error. To illustrate what this looks like, the following is the output if the
libc
entries are removed fromexternal-types.toml
: