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

Do not merge: show API diffs since 4.9.3 #7116

Closed
wants to merge 1 commit into from

Conversation

swankjesse
Copy link
Member

No description provided.

@swankjesse
Copy link
Member Author

⚠️ This is a backwards PR!

  • additions on the right-side are removals since 4.9.3
  • removals on the left side are additions since 4.9.3

@@ -21,6 +21,7 @@ public final class okhttp3/mockwebserver/MockResponse : java/lang/Cloneable {
public fun clone ()Lokhttp3/mockwebserver/MockResponse;
public final fun getBody ()Lokio/Buffer;
public final fun getBodyDelay (Ljava/util/concurrent/TimeUnit;)J
public final fun getDuplexResponseBody ()Lokhttp3/mockwebserver/internal/duplex/DuplexResponseBody;
Copy link
Member Author

Choose a reason for hiding this comment

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

green = removal since 4.9.3

@@ -74,17 +77,12 @@ public final class okhttp3/mockwebserver/MockWebServer : org/junit/rules/Externa
public fun close ()V
public final fun enqueue (Lokhttp3/mockwebserver/MockResponse;)V
public final fun getBodyLimit ()J
public static fun getBodyLimit$delegate (Lokhttp3/mockwebserver/MockWebServer;)Ljava/lang/Object;
public final fun getDelegate ()Lmockwebserver3/MockWebServer;
Copy link
Member Author

Choose a reason for hiding this comment

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

These are new since 4.9.3

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be nice if we could remove some of these, for example methods with $ or -. Would give a much clearer idea of the API.

public fun <init> ()V
public fun dispatch (Lokhttp3/mockwebserver/RecordedRequest;)Lokhttp3/mockwebserver/MockResponse;
public final fun enqueueResponse (Lokhttp3/mockwebserver/MockResponse;)V
public fun enqueueResponse (Lokhttp3/mockwebserver/MockResponse;)V
Copy link
Member Author

Choose a reason for hiding this comment

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

this API is made final since 4.9.3

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you point out the diff where this happened?

public final fun setFailFast (Lokhttp3/mockwebserver/MockResponse;)V
public final fun setFailFast (Z)V
public fun setFailFast (Lokhttp3/mockwebserver/MockResponse;)V
public fun setFailFast (Z)V
Copy link
Member Author

Choose a reason for hiding this comment

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

these also made final

@@ -176,3 +178,22 @@ public final class okhttp3/mockwebserver/SocketPolicy : java/lang/Enum {
public static fun values ()[Lokhttp3/mockwebserver/SocketPolicy;
}

public abstract interface class okhttp3/mockwebserver/internal/duplex/DuplexResponseBody {
Copy link
Member Author

Choose a reason for hiding this comment

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

please disregard internal I didn’t prune these

@@ -103,11 +102,8 @@ public final class okhttp3/CacheControl$Builder {
public final fun build ()Lokhttp3/CacheControl;
public final fun immutable ()Lokhttp3/CacheControl$Builder;
public final fun maxAge (ILjava/util/concurrent/TimeUnit;)Lokhttp3/CacheControl$Builder;
public final fun maxAge (ILkotlin/time/DurationUnit;)Lokhttp3/CacheControl$Builder;
Copy link
Member Author

Choose a reason for hiding this comment

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

New! And expected

@swankjesse
Copy link
Member Author

Diffs all look good as far as I’m concerned.

@@ -739,6 +735,7 @@ public final class okhttp3/MediaType {
public static final field Companion Lokhttp3/MediaType$Companion;
public final fun -deprecated_subtype ()Ljava/lang/String;
public final fun -deprecated_type ()Ljava/lang/String;
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting, these look like a compiler bug Kotlin/binary-compatibility-validator#73

public final fun followRedirects ()Z
public final fun followSslRedirects ()Z
public final fun getRouteDatabase ()Lokhttp3/internal/connection/RouteDatabase;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice #7017

@@ -975,7 +970,6 @@ public final class okhttp3/Request {
public final fun -deprecated_url ()Lokhttp3/HttpUrl;
public final fun body ()Lokhttp3/RequestBody;
public final fun cacheControl ()Lokhttp3/CacheControl;
public final fun getTags ()Ljava/util/Map;
Copy link
Collaborator

Choose a reason for hiding this comment

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

you flagged this elsewhere.

@swankjesse swankjesse closed this Feb 27, 2022
@swankjesse
Copy link
Member Author

Thanks for the close reading of it.

@swankjesse swankjesse deleted the jwilson.0226.api_diffs branch December 24, 2022 18:44
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.

None yet

2 participants