-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[mono] Add headers for unstable APIs #33869
[mono] Add headers for unstable APIs #33869
Conversation
We have functions that are de-facto part of the Mono embedding API that are used by Xamarin.iOS or Xamarin.Android that are not in a state where we want to commit to supporting them forever in their current form. Nonetheless, we would like to make sure that the symbols for these functions are visible even if we otherwise compile the runtime with `-fvisisibility=hidden`, and we would like to discourage declaring the functions in the embedder's own headers. The functions that go into the `mono/{utils,metadata,jit}/mono-private-unstable.h` headers will all be marked with `MONO_API MONO_RT_EXTERNAL_ONLY` but we will not guarantee that the functions will be there from one release to the next or that they will not change their signatures or their behaviors.
Attn: @vargaz @migueldeicaza |
An example where we might want to use this header is for From that PR:
|
FYI @jkotas |
This comment has been minimized.
This comment has been minimized.
Perhaps this set should be extern "C++" (with a C++ wrapper even), so that signature changes are fatal. I understand the implications -- each platform/architecture gets different names. |
0d8fd42
to
34c3ceb
Compare
Problem is that some embedders like
yea that's an interesting idea. I would say changing the semantics should also require a name change (though that may be harder to catch). Maybe just bumping some numeric suffic on each function name. Nothing says unstable like |
I understand the dlsym part, but that is not insurmountable. |
We have functions that are de-facto part of the Mono embedding API that are
used by Xamarin.iOS or Xamarin.Android that are not in a state where we want to
commit to supporting them forever in their current form.
Nonetheless, we would like to make sure that the symbols for these functions
are visible even if we otherwise compile the runtime with
-fvisisibility=hidden
, and we would like to discourage declaring thefunctions in the embedder's own headers.
The functions that go into the
mono/{utils,metadata,jit}/mono-private-unstable.h
headers will all be markedwith
MONO_API MONO_RT_EXTERNAL_ONLY
but we will not guarantee that thefunctions will be there from one release to the next or that they will not
change their signatures or their behaviors.