-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
3.3.0 is binary-incompatible with 3.2.0 #466
Comments
Btw, I haven't formalized it yet, but it would be possible to use my plugin to get a snapshot of your ABI at any given moment, and you could use that to compare across versions. You'd run |
I think some information is missing. These are constructors from chucker/library/src/main/java/com/chuckerteam/chucker/api/ChuckerInterceptor.kt Lines 39 to 65 in a6ed2d4
public final class com.chuckerteam.chucker.api.ChuckerInterceptor implements okhttp3.Interceptor {
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set<java.lang.String>);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, com.chuckerteam.chucker.internal.support.FileFactory, java.util.Set<java.lang.String>);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, com.chuckerteam.chucker.internal.support.FileFactory, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker);
} Same for chucker/library/src/main/java/com/chuckerteam/chucker/api/ChuckerInterceptor.kt Lines 44 to 81 in 24f873b
public final class com.chuckerteam.chucker.api.ChuckerInterceptor implements okhttp3.Interceptor {
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set<java.lang.String>);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set<java.lang.String>, boolean);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, com.chuckerteam.chucker.internal.support.CacheDirectoryProvider, boolean, java.util.Set<java.lang.String>);
public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, com.chuckerteam.chucker.internal.support.CacheDirectoryProvider, boolean, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker);
} It doesn't look to me like there ever was + public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set<java.lang.String>, boolean);
- public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set, int, kotlin.jvm.internal.DefaultConstructorMarker);
+ public com.chuckerteam.chucker.api.ChuckerInterceptor(android.content.Context, com.chuckerteam.chucker.api.ChuckerCollector, long, java.util.Set, boolean, int, kotlin.jvm.internal.DefaultConstructorMarker); There is one additional constructor which is not a problem. The last one is problematic as it adds an additional @autonomousapps Is the library that's causing issues public? Can you maybe link it? Because I'm curious about the signature it reports. |
Oh, and the cause is obvious. It's #443. But this shows that we need another mechanism for creating the interceptor if we want to have an extensible API. |
Thanks for reporting @autonomousapps This case also shows that we should add more tools to do automatic analysis for each PR to avoid such unintended consequences. I had some in my drafts for other purposes, like size changes, etc., but compatibility is definitely something to add and put up in the list of priorities. Also thanks for suggesting your plugin - I tried it just a month ago on another project and it worked well. The case you described is quite specific and we will try to safe-guard from such cases with tools in future as well as implement the suggestion from @MiSikora. More details to reproduce the case will be helpful. For now I would suggest to update that other library you mentioned to use |
Thanks for investigating @MiSikora. I've already did a quick run with japicmp and the result is the same: Seems like we never had a As it was already suggested in #462, we should definitely get rid of
This would be a great plus. As a rule of thumb, we can just make sure to run |
tl;dr both the library and the consuming app are private, but I will try to create a reproducer. For more context, my team has two main repos. One is an SDK that we use for communicating with our API, among other things. We both use this internally in our own apps and make it available to partners for their own integrations. The source is obfuscated. The app that I primarily work on is the one that triggered the error that led to this ticket. It has a couple of independent APIs that aren't part of the SDK. Therefore both the SDK and app use Chucker, for better debug logging. When the consuming app bumped to 3.3.0, the SDK still had 3.2.0. The app tried to instantiate something that created a ChuckerInterceptor instance and 💥 It may also relate to how the app uses the SDK. The SDK provides its own dagger modules, and these tend to be written in Kotlin. The app also has dagger, of course, and incorporates these modules into its graph. The app's modules tend to be written in Java, if that matters. |
Looks like we can close this one thanks to #509 |
✍️ Describe the bug
I have a project that uses Chucker, which also uses a library that uses Chucker. The library is still using 3.2.0, and when I updated my app to 3.3.0 and ran it, it crashed at runtime with this error:
According to @cortinico,
💣 Steps to reproduce
🔧 Expected behavior
App should not crash.
📄 Additional context
Adding the missing constructor will make it easier to migrate to Chucker 3.3.0.
The text was updated successfully, but these errors were encountered: