-
Notifications
You must be signed in to change notification settings - Fork 292
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
Tox_Options.operating_system is not clear about it being an experimental option #2739
Comments
I think we can rename it. Nothing external uses it, it's only used in events (and maybe somewhere else inside toxcore). |
Huh, this is weirder than I thought. Now that I look into it, there is no way for clients to use
Lines 508 to 515 in ad4921d
Lines 762 to 764 in ad4921d
Similar thing is happening in c-toxcore/toxcore/tox_private.h Lines 19 to 34 in ad4921d
A client at most has access to the following headers (taken from the docker-windows-mingw CI):
A client has no definitions for (Please correct me if I'm wrong and we actually assume that if a client has access to It looks like If there is no way for a client to use |
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.
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.
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.
There is an experimental section at the bottom of
Tox_Options
:c-toxcore/toxcore/tox.h
Lines 662 to 692 in ad4921d
It starts with a comment that says:
This sounds like all the options below that comment must be marked as "experimental" since they are all experimental.
Below we see
experimental_groups_persistence
andexperimental_thread_safety
, so by "marked experimental" I assume it means having theexperimental_
prefix.However, the
operating_systems
option is not prefixed withexperimental_
. Its naming goes against what the comment says -- that all options below the comment are experimental and thus are marked as experimental.Due to (3), one might think that perhaps it was experimental at some point but has became a part of the supported API since it's not marked as experimental and someone just forgot to move it above the experimental section of
Tox_Options
. But apparently it is in fact an experimental option #2735 (comment).So I'm left very confused as what is going on with the experimental section. It's not coherent and contradicts itself. Something needs to be done to clear this up before the .19 release as this might be API breaking change depending on how it's handled, e.g. if we end up renaming
operating_systems
toexperimental_operating_systems
, along with the get/set functions.The text was updated successfully, but these errors were encountered: