Hello,
I am trying to compile the AdsLib as a shared library on windows and having a hard time dealing with this. There are some things that are missing like the export/import decorators but that is not really the reason why i made this ticket.
To maintain API and ABI compatibility implementation details should be hidden from the public API definition. Exposing internal data structures, class layouts, or implementation-specific types increases dependency between a specific version of AdsLib and the consumer application. This makes it so that any changes made to AdsLib are very likely to break existing code specially if you are compiling AdsLib as a shared library (in any platform).
My suggesting would be to only expose a stable public interfaces by using opaque types and/or the PIMPL pattern (whenever possible) and keeping implementation details private. This way the internals of AdsLib can change and be refactored without affecting users of the API and keeping both source compatibility and in the case of shared library keeping binary compatibility and avoid the need to recompile the application to get a bug fix.
I can help with these changes and we can try to keep as much of the source compatibility with the current interfaces as possible, but I cant guarantee that everything will just "stay the same" since this update will require multiple changes and multiple reviews. Long-term wise I think this will be better than the current approach.
Hello,
I am trying to compile the AdsLib as a shared library on windows and having a hard time dealing with this. There are some things that are missing like the export/import decorators but that is not really the reason why i made this ticket.
To maintain API and ABI compatibility implementation details should be hidden from the public API definition. Exposing internal data structures, class layouts, or implementation-specific types increases dependency between a specific version of AdsLib and the consumer application. This makes it so that any changes made to AdsLib are very likely to break existing code specially if you are compiling AdsLib as a shared library (in any platform).
My suggesting would be to only expose a stable public interfaces by using opaque types and/or the PIMPL pattern (whenever possible) and keeping implementation details private. This way the internals of AdsLib can change and be refactored without affecting users of the API and keeping both source compatibility and in the case of shared library keeping binary compatibility and avoid the need to recompile the application to get a bug fix.
I can help with these changes and we can try to keep as much of the source compatibility with the current interfaces as possible, but I cant guarantee that everything will just "stay the same" since this update will require multiple changes and multiple reviews. Long-term wise I think this will be better than the current approach.