Opened 21 months ago
Closed 7 months ago
#17256 closed task (fixed)
Make libshared symbols hidden
|Reported by:||waddlesplash||Owned by:||waddlesplash|
This should be done before beta4 so that package rebuilds do not make use of them.
Change History (6)
comment:1 by , 21 months ago
|Status:||new → assigned|
comment:2 by , 12 months ago
comment:3 by , 8 months ago
comment:4 by , 8 months ago
Please do not comment on tickets just for the sake of asking how they are going. I am well aware of the beta4 milestone and what needs to be done with it.
comment:5 by , 8 months ago
Well the ticket definitely deserves more explanation about the problem and consequences. Maybe it's clear in your mind, but not everyone may have followed the problems that lead to this.
So, here's the context for anyone curious about it.
libshared is a library with various experimental features in Haiku. Initially it was meant for internal use only by apps included in Haiku. However, several developers wanted to use these in apps outside Haiku too, so we had to provide some solution for them. The "right" solution would be to finalize these features and make sure the API and ABI is stable for them. But this takes a lot of time and effort, so it never gets done.
Eventually people found their own way, for example by copy-pasting code from libshared into their applications, creating more versions of that code and making everyone work harder. So we made libshared available for 3rd party apps. It is built as a static library, that means each app will have its own copy of the code bundled at compile time, and if the code in Haiku changes, it is not a problem. At least in theory.
But then we started using libshared more and more, and eventually some of Haiku libraries started to use it too, for example libtracker now depends on libshared. This is bad, because now the code that is supposed to be available only in libshared, and bundled into apps, is also available by linking to libtracker, and then it works without needing to bundle it into apps.
So we now have several apps that access this code for example through libtracker. And now when we try to change something in libshared, it breaks these apps and they have to be recompiled. This defeats the purpose of libshared.
The fix for this is making libshared use "hidden symbols", that means, it can be used for example in libtracker, but then apps using libtracker won't get access to the libshared code in this way. It restores the safety boundary between the applications and libraries they use.
That's why we want to do this before R1, and before people start writing too many apps that will break with libshared changes. Can it be moved to a later version? Yes, maybe. But not to R1, that will be too late. If no one has time to handle this in beta4, we will move it to beta5. But that means more apps will hit the problem, and more work to track and rebuild all these apps later. So it's best to spend a bit on time on it now, and not have all the apsp to fix later.
comment:6 by , 7 months ago
|Status:||assigned → closed|
Done in hrev56577.
Also at the same time we should drop the deprecated libnetapi APIs.