Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

upgrade to okhttp3 #220

Merged
merged 4 commits into from Oct 24, 2017
Merged

upgrade to okhttp3 #220

merged 4 commits into from Oct 24, 2017

Conversation

honnix
Copy link

@honnix honnix commented Oct 19, 2017

also upgrade okio

okhttp 2.x is obsolete, and according to https://github.com/square/okhttp/blob/master/CHANGELOG.md#version-300-rc1
there should be no risk to upgrade.

@codecov-io
Copy link

codecov-io commented Oct 19, 2017

Codecov Report

Merging #220 into master will increase coverage by 0.01%.
The diff coverage is 94.11%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #220      +/-   ##
============================================
+ Coverage     71.24%   71.26%   +0.01%     
  Complexity      724      724              
============================================
  Files           148      148              
  Lines          3071     3073       +2     
  Branches        176      176              
============================================
+ Hits           2188     2190       +2     
  Misses          837      837              
  Partials         46       46
Impacted Files Coverage Δ Complexity Δ
...m/spotify/apollo/http/client/HttpClientModule.java 100% <ø> (ø) 5 <0> (ø) ⬇️
...otify/apollo/http/client/OkHttpClientProvider.java 100% <100%> (ø) 7 <6> (ø) ⬇️
...otify/apollo/http/client/TransformingCallback.java 96.42% <100%> (ø) 10 <1> (ø) ⬇️
...ava/com/spotify/apollo/http/client/HttpClient.java 93.33% <80%> (+0.22%) 9 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1412a2e...098d779. Read the comment docs.

@honnix honnix mentioned this pull request Oct 19, 2017
@honnix
Copy link
Author

honnix commented Oct 20, 2017

@martina-if Does this makes sense? Or you have tried but found some big issue?

Copy link
Member

@mattnworb mattnworb left a comment

Choose a reason for hiding this comment

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

👍 but is there a CHANGELOG for the project where you could make note of this change?

Since okhttp3 uses a different groupId and a different package name, it's possible for you to have (or use) both okhttp3 and okhttp2 on the classpath at the same time - so a user of apollo's http-client module might still be referencing okhttp2 code in their code after upgrading to this version (if for some reason they used okhttp-client but still had a need to refer to some okhttp-specific code).

@honnix
Copy link
Author

honnix commented Oct 20, 2017

@mattnworb that makes perfect sense! not sure how this kind of change has been tracked usually in this project. I'm not a frequent committer here. :D

@danielnorberg
Copy link
Contributor

@mattnworb Projects that access okhttp2 directly should declare the direct dependency on okhttp2 instead of relying on the indirect dependency through apollo. Projects that do not declare a direct dependency might get a compilation error when they upgrade apollo and they can then either add the direct dependency or (preferably) also switch to using okhttp3. This seems fair to me. Am I missing something? Wdyt?

@mattnworb
Copy link
Member

mattnworb commented Oct 23, 2017

Right, they should declare a direct dependency. My question was just if there is a way to document this change to help make it obvious at upgrade-time, especially for anyone who doesn't do the right thing.

I don't see a CHANGELOG in the repo but seems like the main maintainers have been able to document each release on the releases page just fine without one, so perhaps it isn't that important.

@honnix
Copy link
Author

honnix commented Oct 23, 2017

So ok to merge? @pettermahlen

@danielnorberg
Copy link
Contributor

@mattnworb Yeah, ideally maven would be a bit more helpful in these situations. To digress a little bit, I guess java modules would have prevented this situation to begin with. Anyway, I guess we should at least mention the okhttp change on the releases page.

@martina-if
Copy link
Contributor

martina-if commented Oct 24, 2017

@honnix Thank you for the PR! Master branch is for apollo 2.0 version. We don't have that release planned in the near future, did you mean to have it for the next 1.x release? In that case you should duplicate the PR against branch 1.x. Sorry for the inconvenience, I know it's not obvious.

Regarding the compilation errors. I think that since they are compilation errors this is reasonable. It doesn't really change the apollo API in any way and it's better than runtime missing links.

@honnix
Copy link
Author

honnix commented Oct 24, 2017

This can be for both 2.0 and 1.x I think. How about getting it into 2.0 and back port to 1.x next release?

@martina-if
Copy link
Contributor

@honnix Yes, please, duplicate it to the other branch. I'll merge this one.

@martina-if martina-if merged commit 9b39e1e into spotify:master Oct 24, 2017
@honnix honnix deleted the okhttp3 branch January 9, 2018 15:54
@honnix honnix mentioned this pull request Jan 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants