-
Notifications
You must be signed in to change notification settings - Fork 99
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
Revert "Upgraded to JUnit5 (#536)" #694
Conversation
I don't quite remember the changes I have made in #536, but pull request comment indicates that if early upgrade to okhttp 5 causes trouble, replacing mockwebserver would be an option. I had some plans in this direction. I had to stop working on WDTK for lack of time, but perhaps I could take a quick look at this. Making lots of edits and then reverting them wastes a lot of effort. It also propagates the problem from broken to healthy components (from okhttp to junit in this case) instead of fixing the problem at the source. BTW, I am not aware of WDTK referencing multiple versions of okhttp as you say in #600. Can you show me where this is done? |
Sure, I do not particularly enjoy reverting this commit and solving all the associated merge conflicts. If you have other ways to solve this issue I am happy to hear them. You can see that we rely on multiple version of okhttp by running
In this output, notice that we have both |
I see. The bug was actually introduced by later okhttp upgrades. Since alpha 4, there are two artifacts: okhttp and okhttp-jvm. WDTK now depends on okhttp-jvm 5, which allows maven to include okhttp 3 as well. This will be a problem in the future anyway, regardless of whether okhttp 5 is adopted first by WDTK or by dependent projects. Merely downgrading to okhttp 3 will not solve the problem. I am starting to think that using okhttp in a library requires bundling it under renamed package, but this can create new problems. I should probably create issue in okhttp asking for recommended solution. |
I do not think bundling it under a renamed package would make much difference in this case since that is not a conflict between our version of OkHTTP and our users', it is our own dependencies that are inconsistent… |
I wouldn't worry about okhttp-signpost. Okhttp is still backward compatible, so okhttp-signpost will work with okhttp 5. Merely using maven's The problem will however come back when some dependent project uses okhttp 3/4. Or conversely, if WDTK downgrades, dependent projects using okhttp 5 will run into the same problem. I have asked okhttp devs about this: square/okhttp#7339 I nevertheless share the sentiment of avoiding alpha dependencies when stable version is available. I will look into mockwebserver alternatives. |
Merging for the sake of having a release where this problem is fixed. Very happy for this merge to be reverted whenever we have a better solution to this problem. |
Upgrading to JUnit5 requires upgrading OkHTTP to a newer version, but our okhttp-signpost dependency still relies on an earlier version. This means that at the moment we depend on two different versions of the same library, causing #600.
This closes #600.
This reverts commit 522abd4.
This is a temporary workaround. We should then consider:
Also, I propose we only migrate to OkHTTP 5 once we have a stable release of that library (so that we do not depend on an alpha version as currently).