{"action":"created","issue":{"url":"https://api.github.com/repos/google/dagger/issues/1253","repository_url":"https://api.github.com/repos/google/dagger","labels_url":"https://api.github.com/repos/google/dagger/issues/1253/labels{/name}","comments_url":"https://api.github.com/repos/google/dagger/issues/1253/comments","events_url":"https://api.github.com/repos/google/dagger/issues/1253/events","html_url":"https://github.com/google/dagger/issues/1253","id":350010630,"node_id":"MDU6SXNzdWUzNTAwMTA2MzA=","number":1253,"title":"Codegeneration error with Dagger 2.17 and Auto factory","user":{"login":"emartynov","id":295424,"node_id":"MDQ6VXNlcjI5NTQyNA==","avatar_url":"https://avatars1.githubusercontent.com/u/295424?v=4","gravatar_id":"","url":"https://api.github.com/users/emartynov","html_url":"https://github.com/emartynov","followers_url":"https://api.github.com/users/emartynov/followers","following_url":"https://api.github.com/users/emartynov/following{/other_user}","gists_url":"https://api.github.com/users/emartynov/gists{/gist_id}","starred_url":"https://api.github.com/users/emartynov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emartynov/subscriptions","organizations_url":"https://api.github.com/users/emartynov/orgs","repos_url":"https://api.github.com/users/emartynov/repos","events_url":"https://api.github.com/users/emartynov/events{/privacy}","received_events_url":"https://api.github.com/users/emartynov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-13T12:34:19Z","updated_at":"2018-08-13T15:54:44Z","closed_at":null,"author_association":"NONE","body":"We use the auto factory in the project (1.0-beta5). I'm trying to update Dagger version in the project from 2.16 to 2.17 and I'm getting a build error:\r\n\r\n```Failed to process @AutoFactory annotations:\r\n  java.lang.ClassCastException: com.sun.tools.javac.code.Symtab$4 cannot be cast to javax.lang.model.element.TypeElement\r\n        at com.squareup.javapoet.ClassName.get(ClassName.java:215)\r\n        at com.squareup.javapoet.TypeName$1.visitDeclared(TypeName.java:273)\r\n        at com.squareup.javapoet.TypeName$1.visitError(TypeName.java:295)\r\n        at com.squareup.javapoet.TypeName$1.visitError(TypeName.java:248)\r\n        at com.sun.tools.javac.code.Type$ErrorType.accept(Type.java:1855)\r\n        at com.squareup.javapoet.TypeName.get(TypeName.java:248)\r\n        at com.squareup.javapoet.TypeName.get(TypeName.java:243)\r\n        at com.google.auto.factory.processor.FactoryWriter.addConstructorAndProviderFields(FactoryWriter.java:103)\r\n        at com.google.auto.factory.processor.FactoryWriter.writeFactory(FactoryWriter.java:83)\r\n        at com.google.auto.factory.processor.AutoFactoryProcessor.doProcess(AutoFactoryProcessor.java:162)\r\n        at com.google.auto.factory.processor.AutoFactoryProcessor.process(AutoFactoryProcessor.java:87)\r\n        at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:99)\r\n        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)\r\n        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)\r\n        at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)\r\n        at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)\r\n        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)\r\n        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)\r\n        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)\r\n        at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:55)\r\n        at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:27)\r\n        at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:50)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.jetbrains.kotlin.gradle.internal.KaptExecution.run(KaptWithoutKotlincTask.kt:112)\r\n        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:39)\r\n        at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:46)\r\n        at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:30)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:101)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:498)\r\n        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)\r\n        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)\r\n        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)\r\n        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)\r\n        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)\r\n        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)\r\n        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\r\n        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)\r\n        at java.lang.Thread.run(Thread.java:745)/\r\n```\r\n\r\nUnfortunately, the output is not clear to get exactly the location of error. I have couple of candidates but it is always hard with combination of kapt+dagger+data binding.\r\n\r\nWe use \r\n Kotlin 1.2.60\r\n Gradle 4.9"},"comment":{"url":"https://api.github.com/repos/google/dagger/issues/comments/412567736","html_url":"https://github.com/google/dagger/issues/1253#issuecomment-412567736","issue_url":"https://api.github.com/repos/google/dagger/issues/1253","id":412567736,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU2NzczNg==","user":{"login":"emartynov","id":295424,"node_id":"MDQ6VXNlcjI5NTQyNA==","avatar_url":"https://avatars1.githubusercontent.com/u/295424?v=4","gravatar_id":"","url":"https://api.github.com/users/emartynov","html_url":"https://github.com/emartynov","followers_url":"https://api.github.com/users/emartynov/followers","following_url":"https://api.github.com/users/emartynov/following{/other_user}","gists_url":"https://api.github.com/users/emartynov/gists{/gist_id}","starred_url":"https://api.github.com/users/emartynov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emartynov/subscriptions","organizations_url":"https://api.github.com/users/emartynov/orgs","repos_url":"https://api.github.com/users/emartynov/repos","events_url":"https://api.github.com/users/emartynov/events{/privacy}","received_events_url":"https://api.github.com/users/emartynov/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T15:54:44Z","updated_at":"2018-08-13T15:54:44Z","author_association":"NONE","body":"Hi David, not really. \r\n\r\nThere is a bunch of complaints about `can not find symbol` (which comes from databinding) and then this error and after a bunch of complaints about `ComponentProcessor was unable to process this class` (that comes from Dagger).\r\n\r\nI think it is one of the classes that AS shows me red because something is wrong with Generics (but command line compiles fine) and then this class is used as `@Provided` dependency in the class annotated with `@AutoFactory`"}}
{"actor":{"display_login":"emartynov"}}