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

Limit internal termios API to pub(crate) #1235

Merged
merged 1 commit into from
Jun 5, 2020
Merged

Conversation

Susurrus
Copy link
Contributor

Fixes #1115

@Susurrus
Copy link
Contributor Author

Needs a release note, but let's see how it goes through review and CI then I'll add one.

@asomers
Copy link
Member

asomers commented May 12, 2020

Just like integration tests, I don't think that doc tests are allowed to access private methods. That's why the tests are failing.

@Susurrus Susurrus force-pushed the termios_constructor branch 2 times, most recently from 9ddca59 to d698b90 Compare June 5, 2020 01:54
@Susurrus
Copy link
Contributor Author

Susurrus commented Jun 5, 2020

Just removed it entirely replacing it with a mem::zerod() call. Not a great solution, but considering the use case is just for documentation examples, I'm fine with it. Also added a CHANGELOG entry, so we should be good to go here.

Random thought: I just realized that we don't put the update libc version in the CHANGELOG even though it's part of our public API. We should probably add that as a Changed entry when we do releases.

@asomers
Copy link
Member

asomers commented Jun 5, 2020

Just removed it entirely replacing it with a mem::zerod() call. Not a great solution, but considering the use case is just for documentation examples, I'm fine with it. Also added a CHANGELOG entry, so we should be good to go here.

Random thought: I just realized that we don't put the update libc version in the CHANGELOG even though it's part of our public API. We should probably add that as a Changed entry when we do releases.

Is the libc version really part of the public API? A consuming crate can always pull in multiple versions of libc if it needs to.

@Susurrus
Copy link
Contributor Author

Susurrus commented Jun 5, 2020

Is the libc version really part of the public API? A consuming crate can always pull in multiple versions of libc if it needs to.

I'm not certain if we directly expose libc types in any of our functions or structs anymore, but we do re-export the entire library, so it's part of our API. So while downstream can use their own libc, their code may still break if libc changes underneath us and they use the version we re-export. I don't think this is a big deal for us, but I think because of it we should list the libc version for every nix release.

@Susurrus Susurrus merged commit 93af76f into master Jun 5, 2020
@Susurrus Susurrus deleted the termios_constructor branch June 5, 2020 04:36
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.

Termios needs a safe constructor
2 participants