-
Notifications
You must be signed in to change notification settings - Fork 722
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
fix(api/unstable): make all api methods visible #4015
Conversation
the simplify part is using the headers copied from s2n-tls to the lib directory.
I really just need to add this as a commit hook
bindings/rust/s2n-tls-sys/Cargo.toml
Outdated
crl = [] | ||
fingerprint = [] | ||
internal = [] | ||
npn = [] |
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.
For the unstable features I think we want to prefix them with unstable-
, similar to s2n-quic: https://github.com/aws/s2n-quic/blob/21a82e5944465565cc11a53637a127110b6a81e8/quic/s2n-quic/Cargo.toml#L50.
Ideally, we'd have a similar check: https://github.com/aws/s2n-quic/blob/21a82e5944465565cc11a53637a127110b6a81e8/quic/s2n-quic/src/lib.rs#L75-L103
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 added the unstable prefix, but are we sure that we want to add the unstable flag requirement? I've personally always found it very irritating to work with, and think that the unstable prefix should do a sufficient job of warning customers?
* regex dependency unused * constants have static lifetime by default
* add appropriate includes so that all api methods are visible when s2n-tls is compiled as a shared object * autogenerate bindings for all api methods and test the visibility to prevent a regression
Resolved issues:
resolves #4012
Description of changes:
cargo test --all-features
to avoid the multiple builds incurred by different feature flagsThe "external build" test for the Rust bindings CI is a very effective test for api visibility, so I
This gives us coverage over all of the unstable functions, and as such we can conclude that all of the functions in unstable headers will be visible after this commit.
Since the bindings are now autogenerated for ever header in the unstable folder, this will hopefully prevent the problem from occuring in the future.
The methods that weren't actually visible were
Testing:
Passing CI should be sufficient, but I also rebased my JA-3 PR #4009 on top of this PR and made sure that everything built and all tests passed.
I also confirmed that the same number of tests ran (because of the changed type allowlisting thing) and there is actually one test that apparently we were accidentally denylisting, because now 221 tests run instead of 220.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.