Opened 3 years ago

Closed 2 years ago

Last modified 12 months ago

#17256 closed task (fixed)

Make libshared symbols hidden

Reported by: waddlesplash Owned by: waddlesplash
Priority: blocker Milestone: R1/beta4
Component: Build System Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This should be done before beta4 so that package rebuilds do not make use of them.

Change History (6)

comment:1 by waddlesplash, 3 years ago

Owner: changed from bonefish to waddlesplash
Status: newassigned

comment:2 by waddlesplash, 2 years ago

Also at the same time we should drop the deprecated libnetapi APIs.

comment:3 by bruno, 2 years ago

I do not understand this bug/blocker If Haiku becomes more stable or better it should be in the Beta, if not it could be included in R1?

Version 0, edited 2 years ago by bruno (next)

comment:4 by waddlesplash, 2 years 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 pulkomandy, 2 years 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 waddlesplash, 2 years ago

Resolution: fixed
Status: assignedclosed

Done in hrev56577.

Note: See TracTickets for help on using tickets.