-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Compilation fails because of an IllegalArgumentException when upgrading to Dagger 2.26 #1735
Comments
duplicate or derivative of #1665 ? |
@trevjonez I wouldn't say it's duplicate. While it is true that this error would benefits from better logging, the fact that it worked in 2.25.4 but it doesn't in 2.26 means there's a problem |
Either way, I would recommend debugging in to find your root cause so that you can provide a repro example. Otherwise more info in the crash is all they could do |
How can I debug something like this? I tried with --stacktrace and --info but it doesn't give me anything meaningful |
First we need to make sure the compiler sources are available in the IDE so we can easily set breakpoints. if you don't have a
in that build.gradle add the dagger compiler to the impl configuration. repositories {
jcenter()
}
dependencies {
implementation "com.google.dagger:dagger-compiler:2.26"
} re-import/sync the project with the IDE. open create a debug config in the ide using the now we update the gradle jvmargs to instruct the kotlin plugin to run its compilers in-process by adding
next I like to stop all the current gradle daemons just so I know I am in a clean state. (probably not required) now we can run gradle with a debug flag so that it waits for a debugger to attach, as well as the kapt task or one that depends on it.
that will hang until you attach your debugger. once attached the build will run and you should land on the point of failure with enough information in scope to figure out what code is triggering the failure. |
Looks like in the project there's a class containing a companion object with a member annotated with |
Duplicate of #1665, I'll close this one to keep the discussion on 1665. |
After upgrading to Dagger 2.26, the build of my app fails with the following stacktrace.
I can confirm everything was working perfectly on 2.25.4
The text was updated successfully, but these errors were encountered: