-
Notifications
You must be signed in to change notification settings - Fork 104
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
feature: exposing headers for libmirsever-internal-dev #3288
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3288 +/- ##
==========================================
+ Coverage 77.33% 77.35% +0.01%
==========================================
Files 1062 1075 +13
Lines 67817 68268 +451
==========================================
+ Hits 52449 52806 +357
- Misses 15368 15462 +94 ☔ View full report in Codecov by Sentry. |
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'm wondering if it would be cleaner to use include/server-internal
for these headers instead of src/include/server
. That keeps all the published stuff in the include
tree.
@RAOF any thoughts?
e5a3919
to
36cde64
Compare
I personally like having them exposed from |
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'd like @RAOF's eyes on too. But ok by me
Why do we want this? Can we do something to make it so that if we're using these internal methods, the linkage indicates it somehow similar to how Qt does it? |
I am unfamiliar with how Qt does it. Do they somehow provide you with a big warning that "you're doing something funky"? |
Also, we want this so that you can gain access to "unforeseen" parts of Mir (e.g. I want access to the |
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'm happy to keep these headers in src/include
.
A question, though: how many of these headers are usable outside of a Mir build? We don't guarantee any of the symbols here get exported, so you might be able to write code that compiles but does not link? Have you tested using these headers?
Qt has a concept of "private APIs" that are explicitly declared as unstable and when something uses them, they get a link-time dependency symbol version of You can see an example of this in This is done with a version script generated by their CMake: https://github.com/qt/qtbase/blob/dev/cmake/QtFlagHandlingHelpers.cmake#L72 Fedora and openSUSE patch this to use the full Qt major.minor: https://src.fedoraproject.org/rpms/qt6-qtbase/blob/rawhide/f/qtbase-tell-the-truth-about-private-API.patch |
👍
I've tested using some, but not all. However, wouldn't |
Since the stuff in |
Oof ok that makes sense to me. I am assuming that this means that we must export those symbols in Mir in another library potentially (e.g. Do you agree @RAOF? |
To capture our private conversation: no, these symbols should be exposed from This would also be a really good time to work out how to generate our symbols list, so we can automatically mark everything in the internal headers as |
f6d60ea
to
c232f13
Compare
Do we really need it to include patch versions too? I feel that's unnecessarily painful. |
@RAOF : Do I need a |
No. The
I don't think it'll be painful for us :) It depends on what ABI stability we want to promise, of course. I don't think that promising not to break internal symbols in a patch release will be arduous for us, so, yeah, it should probably be |
src/server/symbols.map
Outdated
}; | ||
|
||
MIR_SERVER_2.18 { |
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.
These look like they're meant to be the internal symbols?
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.
These are also "INTERNAL" symbols - and should also be in the MIR_SERVER_INTERNAL_2.17
stanza
I agree. But note it isn't just symbols about, we need to track general ABI breakages regardless (for the .soname). There is also the option of an additional |
src/server/symbols.map
Outdated
@@ -1,5 +1,5 @@ | |||
MIR_SERVER_2.17 { |
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.
The following are the "INTERNAL" symbols
src/server/symbols.map
Outdated
}; | ||
|
||
MIR_SERVER_2.18 { |
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.
These are also "INTERNAL" symbols - and should also be in the MIR_SERVER_INTERNAL_2.17
stanza
e39742d
to
0784883
Compare
0784883
to
359aef2
Compare
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.
Looks sensible (apart from .soname needing a bump)
But we will likely wait on parent landing before landing this
Co-authored-by: Alan Griffiths <[email protected]>
71361a6
to
de06804
Compare
I think that I just fixed this using |
fc49064
to
ae3dc53
Compare
ae3dc53
to
948f24a
Compare
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.
Looks reasonable. One naming nit
tools/symbols_map_generator/main.py
Outdated
@@ -104,15 +104,51 @@ def has_vtable(node: clang.cindex.Cursor): | |||
return False | |||
|
|||
|
|||
def derived_virtual_base_class(node: clang.cindex.Cursor): |
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.
def derived_virtual_base_class(node: clang.cindex.Cursor): | |
def has_virtual_base_class(node: clang.cindex.Cursor): |
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.
Done 👍
What's new?
Exposing a new package called
libmirserver-internal-dev
How to use