Skip to content

Conversation

@LukasPaczos
Copy link

No description provided.

@LukasPaczos LukasPaczos requested review from a team as code owners April 3, 2024 09:37
We are introducing build system modularization to enable customization of Mapbox SDKs with minimal binary size overhead and to increase the overall separation of responsibilities across SDKs. The goal is to enable swapping SDK modules during compilation instead of exposing runtime configuration options and relying on third-party tools to remove unused code.

We streamline independent units of code as much as possible into SDK modules, described by transparent contracts (interfaces). For example, Mapbox SDKs typically have a networking module where the default implementation is OkHttp. The developer can replace the default implementation with a custom implementation without resulting in the SDK bundling unnecessary code, i.e., code for the default implementation is removed.
We streamline independent units of code as much as possible into SDK modules, described by transparent contracts (interfaces). For example, Mapbox SDKs typically have a native lib loading module with its default implementation. The developer can replace the default implementation with a custom implementation without resulting in the SDK bundling unnecessary code, i.e., code for the default implementation is removed.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit hard for me to believe that the user could replace native lib loading with custom implementation and something will work... It was rather clear with replacing networking module (at least for me) but what's the sense of replacing LibraryLoader?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just an example of how the concept works, not necessarily a suggestion that it should be replaced. What can actually be replaced should be documented by each SDK independently.

@LukasPaczos LukasPaczos merged commit ae7bc0c into master Apr 3, 2024
@LukasPaczos LukasPaczos deleted the lp/remove-okhttp-module branch April 3, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants