-
Notifications
You must be signed in to change notification settings - Fork 291
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
refactor: Don't expose Tox_System in the public API #2741
Conversation
208d3e7
to
331381d
Compare
It makes no sense to include it in the public API as clients can't make any meaningful use of it via public API, it can only be used if one also includes other internal/private headers that we don't install. It's used only in the testing code, which has access to the internal headers. Fixes #2739, at least to some degree. I decided against moving things to a separate `tox_testing.h` and leaving only things in `tox_private.h` that we are fine with clients using, as otherwise `tox_lock()` / `tox_unlock()` would have to be moved out of `tox_private.h` to somewhere else, but `tox_private.h` actually sounds like the right place for them, naming-wise. So perhaps it's fine if we have things in `tox_private.h` that we don't want clients to use.
Not sure if this should be marked as API break since we haven't made a release with |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2741 +/- ##
==========================================
+ Coverage 73.04% 73.09% +0.05%
==========================================
Files 149 149
Lines 30516 30533 +17
==========================================
+ Hits 22290 22319 +29
+ Misses 8226 8214 -12 ☔ View full report in Codecov by Sentry. |
This is not exactly true, system is supposed to be publicly/privately accessible. |
@Green-Sky I'm just stating the fact that it is currently used only in the testing code. I did a grep for "tox_options_set_operating_system" and that's the only code that used that function. (If you search for Also, see #2739 (comment) - there is no way for any external code to use It would indeed be nice for clients to be able to provide their own |
Yea that's bad, I had to include
Fine. |
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.
sprint to release
It makes no sense to include it in the public API as clients can't make any meaningful use of it via public API, it can only be used if one also includes other internal/private headers that we don't install.
It's used only in the testing code, which has access to the internal headers.
Fixes #2739, at least to some degree. I decided against moving things to a separate
tox_testing.h
and leaving only things intox_private.h
that we are fine with clients using, as otherwisetox_lock()
/tox_unlock()
would have to be moved out oftox_private.h
to somewhere else, buttox_private.h
actually sounds like the right place for them, naming-wise. So perhaps it's fine if we have things intox_private.h
that we don't want clients to use.This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)