0.3.0 fails to build with kapt
ZacSweers opened this issue · 12 comments
> Task :log-sync:kaptReleaseKotlin FAILED
[WARN] Issue detected with dagger.internal.codegen.ComponentProcessor. Expected 1 originating source file when generating /Users/zsweers/dev/slack/slack-android-ng/log-sync/build/tmp/kapt3/classes/release/scabbard/full_slack.logsync.di.LogSyncBaseModule.svg, but detected 0: [].
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
error: cannot access Metrics
class file for slack.telemetry.Metrics not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for slack.telemetry.Metrics not found
> Task :tooling:flipper:plugins:ms-event:plugin:kaptReleaseKotlin
[WARN] Issue detected with dagger.internal.codegen.ComponentProcessor. Expected 1 originating source file when generating /Users/zsweers/dev/slack/slack-android-ng/tooling/flipper/plugins/ms-event/plugin/build/tmp/kapt3/classes/release/scabbard/full_slack.tooling.flipper.plugins.msevent.plugin.MsEventFlipperPluginModule.dot, but detected 0: [].
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Task :model:kaptReleaseKotlin
warning: The following options were not recognized by any processor: '[scabbard.failOnError, scabbard.outputFormat, kapt.kotlin.generated, dagger.fullBindingGraphValidation]'
FAILURE: Build failed with an exception.
Thank you for reporting, I am working on a minimal project to try and reproduce this - will report back if I need more details.
May I know if you have fullBindingGraphValidation
enabled? Please let me know the dagger version and if it works without full graph validation as well. Thanks.
Yeah that's with it enabled, and the dagger argument is set to ERROR
So it works without full graph validation?
By any chance LogSyncBaseModule
has a binding exposed utilizing slack.telemetry.Metrics
but that class is in a different module/transitive dep of another module?
Seems related to google/dagger#970. The only place I access raw Types
apart from already parsed dagger ones in when I try to parse simple names. I will try to confirm this with a sample when I get time. Meanwhile could you let me know if setting qualifiedNames true
in scabbard block works?
I'll work on a gradle task to export info for issues to avoid back and forth in the future.
Thanks. Any luck with setting qualifiedNames
to true?
Still fails with that set to true as well :/
Thanks, I will investigate. Just to confirm scabbard's fullBindingGraphValidation
is set to false
right?
@arunkumar9t2 I have similar issue related to SLF4J binding:
Caused by: java.lang.RuntimeException: Stub!
at android.util.Log.e(Log.java:175)
at pl.brightinventions.slf4android.LogcatHandler.publish(LogcatHandler.java:55)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:78)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:445)
... 26 more
I completely removed dependency to pl.brightinventions.slf4android...
from my project, but the result is still the same.
I use scabbard configuration as follows:
plugins {
id "scabbard.gradle" version "0.3.0"
}
scabbard {
enabled true
outputFormat "svg"
}
Same issue here...
[WARN] Issue detected with dagger.internal.codegen.ComponentProcessor. Expected 1 originating source file when generating /Users/morteza/AndroidStudioProjects/asdf/app/build/tmp/kapt3/classes/debug/scabbard/com.asdf.app.di.component.AppComponent.dot, but detected 0: [].
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Will look into this soon, @Morteza-Rastgoo, could you please run the build with ./gradlew <yourbuildcommand> --stacktrace
and let me know the stack trace?
@ultraon From a cursory look, seems unrelated to this issue. I will create a separate issue for that log4j error.