Skip to content
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

[4.x] Update Okio to 3.2.0 #7358

Closed
wants to merge 1 commit into from
Closed

[4.x] Update Okio to 3.2.0 #7358

wants to merge 1 commit into from

Conversation

swankjesse
Copy link
Collaborator

This version does the right thing for Kotlin Multiplatform
and Maven.

This version does the right thing for Kotlin Multiplatform
and Maven.
@swankjesse
Copy link
Collaborator Author

Note that this is on the 4.x branch

@honnix
Copy link

honnix commented Jun 27, 2022

Just to confirm, this will end up with depending on okio, not okio-jvm, right?

@swankjesse
Copy link
Collaborator Author

@honnix with this change the new pom.xml for OkHttp is:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- This module was also published with a richer model, Gradle metadata,  -->
  <!-- which should be used instead. Do not delete the following line which  -->
  <!-- is to indicate to Gradle or any Gradle module metadata file consumer  -->
  <!-- that they should prefer consuming it instead. -->
  <!-- do_not_remove: published-with-gradle-metadata -->
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.squareup.okhttp3</groupId>
  <artifactId>okhttp</artifactId>
  <version>4.11.0-SNAPSHOT</version>
  <name>okhttp</name>
  <description>Square’s meticulous HTTP client for Java and Kotlin.</description>
  <url>https://square.github.io/okhttp/</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Square, Inc.</name>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:https://github.com/square/okhttp.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/square/okhttp.git</developerConnection>
    <url>https://github.com/square/okhttp</url>
  </scm>
  <dependencies>
    <dependency>
      <groupId>com.squareup.okio</groupId>
      <artifactId>okio-jvm</artifactId>
      <version>3.2.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
      <version>1.6.20</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>

If you have anything else in your project that depends on com.squareup.okio:okio:3.2.0, that transitively depends on com.squareup.okio:okio-jvm:3.2.0 which is where all the code is.

There’s one hazard remaining, which is if your code depends on com.squareup.okio:okio:2.x.y directly, since those 2.x (and 1.x) artifacts contain code. We could try to find a way for this to depend on com.squareup.okio:okio:3.2.0 to force everything to the latest. Hmm...

@swankjesse
Copy link
Collaborator Author

@yschimke any thoughts on forcing a non -jvm dependency for Maven users? I think it’s probably worth the trouble so Maven users get the right artifacts no matter what transitive deps they have.

  <dependencies>
    <dependency>
      <groupId>com.squareup.okio</groupId>
      <artifactId>okio</artifactId>
      <version>3.2.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

@honnix
Copy link

honnix commented Jun 27, 2022

@yschimke any thoughts on forcing a non -jvm dependency for Maven users? I think it’s probably worth the trouble so Maven users get the right artifacts no matter what transitive deps they have.

  <dependencies>
    <dependency>
      <groupId>com.squareup.okio</groupId>
      <artifactId>okio</artifactId>
      <version>3.2.0</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

Yeah that would be great!

@yschimke
Copy link
Collaborator

I don't think I understand the effects half as well as you. Your call.

@honnix
Copy link

honnix commented Jun 27, 2022

The idea I think is, as long as okhttp depends on okio (non -jvm one), no matter what okio version user explicitly depends on, it would still be the same artifact and it's up to user to decide which version to choose (usually done by maven enforcer). If we merge this as is, users will need to upgrade to okio 3.2.0 as well.

@swankjesse
Copy link
Collaborator Author

@honnix yeah good call. Lemme add that before merging this.

@yschimke yschimke changed the title Update Okio to 3.2.0 [4.x] Update Okio to 3.2.0 Jul 3, 2022
@yschimke
Copy link
Collaborator

yschimke commented Jul 3, 2022

related #7351

@yschimke
Copy link
Collaborator

@swankjesse What's the status of this, if we need a newer okio, does that also bump Kotlin to 1.7.10 for 4.11.0?

@yschimke yschimke closed this Dec 30, 2022
@yschimke yschimke deleted the jwilson.0627.mvn branch April 1, 2023 12:25
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.

4 participants