-
Notifications
You must be signed in to change notification settings - Fork 27
chore: check external types in CI #643
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -50,6 +50,7 @@ rustls-aws-lc-rs = ["rustls", "aws-lc-rs"] | |||
| # Don't rely on these whatsoever. They may disappear at any time. | ||||
|
|
||||
| __rustls-post-quantum-test = [] | ||||
| __all_without_fips = ["arbitrary", "aws-lc-rs", "rustls", "ring", "platform-verifier", "rustls-log", "qlog", "bench", "bloom", "tracing-log"] | ||||
|
|
||||
| [dependencies] | ||||
| aes-gcm = { workspace = true, optional = true } | ||||
|
|
@@ -107,4 +108,15 @@ workspace = true | |||
|
|
||||
| [package.metadata.docs.rs] | ||||
| # all non-default features except fips (cannot build on docs.rs environment) | ||||
| features = ["aws-lc-rs", "rustls", "ring", "platform-verifier", "rustls-log", "qlog", "bench"] | ||||
| features = ["__all_without_fips"] | ||||
|
|
||||
| [package.metadata.cargo_check_external_types] | ||||
| allowed_external_types = [ | ||||
| "arbitrary::Arbitrary", # gated behind `arbitrary` feature | ||||
| "criterion::Criterion", # gated behind `bench` feature | ||||
| "identity_hash::IdentityHashable", | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does this show up in our API?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
noq/noq-proto/src/connection/paths.rs Line 35 in 6a114f5
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Goodness that's miserable. Why can't we keep impls like that private?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can with another newtype.. #646
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. heh, I was just complaining about rust. Wasn't asking for a solution 😄 |
||||
| "bytes::*", | ||||
| "rustls", | ||||
| "rustls::*", | ||||
| "rustls_pki_types::*", | ||||
| ] | ||||
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.
Is it worth not including those and not enabling those features for the check instead? Or is that more effort than it is worth it? I guess the odds of those accidentally ending up in our real API are pretty small.
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.
Yeah, we can also list the features manually instead. Wasn't sure which way was "safer" for us.
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.
Not entirely sure but I think I'd prefer keeping
Arbitrarylisted and running the check with all features enabled. Otherwise we could still sneak in new types under feature flags.Note that I didn't use
--all-featuresbut a new__all_without_fipsfeature, because the FIPS feature of aws-lc-rs fails to build on my machine because my GCC apparently is too new. YMMV. Can switch to--all-featuresbut would have to check first if our CI runners can build the FIPS feature.