This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 473
glean/experiments: Hard dependency on lib-httpurlconnection #6660
Comments
pocmo
added
⌨️ code
Technical debt, code clean up, small API change ..
<glean>
Component: service-glean (New telemetry SDK)
<experiments>
labels
Apr 15, 2020
Sorry we missed this getting filed. I filed Bug 1634068 in Bugzilla so that this will be triaged in our next meeting. |
Glean does actively depend on Both want to provide a default, so users don't need to care about it (but can still change it). @pocmo: What do you propose as the way forward if a hard dependency on |
I think we should avoid having a default inside |
badboy
added a commit
to badboy/android-components
that referenced
this issue
May 5, 2020
We still test with it, so we keep it around. There is no change for users: * If they configure an HTTP client it will be used * If they don't, the default of Glean proper will be used (which is a small shim around java.net.HttpURLConnection itself) Fixes mozilla-mobile#6660 (at least partly)
4 tasks
badboy
added a commit
to badboy/android-components
that referenced
this issue
May 6, 2020
We still test with it, so we keep it around. *BREAKING CHANGE*: Users will need to supply a configuration with a ping uploader to Glean now. A default lib-fetch-httpurlconnection implementation can be used like this: ```kotlin import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient; import mozilla.components.service.glean.config.Configuration; import mozilla.components.service.glean.net.ConceptFetchHttpUploader; val config = Configuration(httpClient = ConceptFetchHttpUploader(lazy { HttpURLConnectionClient() })) Glean.initialize(context, true, config) ``` For Java this becomes: ```java import mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient; import mozilla.components.service.glean.config.Configuration; import mozilla.components.service.glean.net.ConceptFetchHttpUploader; ConceptFetchHttpUploader httpClient = ConceptFetchHttpUploader.fromClient(new HttpURLConnectionClient()); Configuration config = new Configuration(httpClient); Glean.INSTANCE.initialize(context, true, config); ``` Fixes mozilla-mobile#6660 (at least partly)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I was investigating why we still see (I think unused) fragments of
lib-httpurlconnection
in Fenix APKs. I noticed thatservice-glean
as well asservice-experiments
have a hard (non-test) dependency onlib-httpurlconnection
.android-components/components/service/glean/build.gradle
Line 56 in 7b25cd7
android-components/components/service/experiments/build.gradle
Line 33 in 7b25cd7
My assumption is that we can get rid of that dependency and instead always enforce passing in a
lib-fetch
implementation.┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: