-
Notifications
You must be signed in to change notification settings - Fork 142
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
Avoid having all integrations in the same package #49
Comments
This is needed because one of the benefits of the segment is as a portal to all CRMs. Maybe cloud mode doesn't need this, but not device mode. |
Installation via Dart Code
Just seen the MoEngage PR and I was also looking into integrating Adjust, this is a repeating problem. @danielgomezrico Sorry for the delay. I have been thinking about this a lot and how we would architect it. I believe we have these issues to address: Architecture:I had the idea that we would need the following:
I got stuck trying to work out how we could build a registry... until I watched a talk on federated plugins at Droidcon 2022, and I realised that the FlutterFire plugin has a similar set-up. We could copy that pattern by filling in our registry. I will use iOS as an example to highlight how this would work, but there are Android and other platforms. If we look at the core package:
We could potentially get away with something like this on the native side if we can get access to the config object, native setup of the firebase integration:
The Integrations Plugin would do this code. I have started a small proof of concept with Melos but will try to get something working to show how this could work. It would mean we could house multiple packages in this Repo and publish them separately. And if someone wanted another repo they could create their own that wraps the native implementation, we could then do federated plugins. Other non-related issues that we should considerI can separate these into other issues if needed, but I wanted to raise this here to see what you thought MelosMove to use Melos or something to help with multi-package repos, it could also help us structure and have a concise release log, etc. This would mean we could have a mono repo with some of the packages and be able to release them separately. E.g. see the FlutterFire repo. That is not to say we couldn't have federated plugins or something similar. PigeonMove to use Pigeon for inter-language mapping. Still determining how much of this we will be doing, but if we start to get more, we should consider adopting Pigeon. Integration setupWe should move away from using a bool to enable plugins Newer native segment packagesFrom researching, I noticed that we depend on analytics-ios, last updated 05 Oct 2021, over a year ago 😬. They also mention migrating over in their docs Sorry for the long post but I wanted to get this out of my head 🤯😂 WDYT? |
Thanks for those ideas @b099l3, this is an excellent starting point to resolve the issue. We are sorry but as a company this month this got a low priority, and we need to ultra focus on other things, we will come back in a month or so to continue with it :) |
Current
We add integration with things like amplitude, firebase and so on and that requires that the dependency is added on each platform like this:
PRs related to this:
This makes that the effort made by the Segment team to avoid having a big library and instead adding the dependencies you need on your project pretty bad.
Expected
Somehow if I should be able to include the dependencies I need for each platform and just those.
The text was updated successfully, but these errors were encountered: