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

0.3.0 fails to build with kapt #48

Open
ZacSweers opened this issue May 18, 2020 · 12 comments
Open

0.3.0 fails to build with kapt #48

ZacSweers opened this issue May 18, 2020 · 12 comments
Assignees
Labels
bug Something isn't working module:processor Label to mark all discussions about scabbard's annotation processor needs investigation Needs investigation to determine course of action
Milestone

Comments

@ZacSweers
Copy link
Contributor

> 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.
@arunkumar9t2 arunkumar9t2 added bug Something isn't working module:processor Label to mark all discussions about scabbard's annotation processor needs investigation Needs investigation to determine course of action labels May 19, 2020
@arunkumar9t2
Copy link
Owner

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.

@ZacSweers
Copy link
Contributor Author

Yeah that's with it enabled, and the dagger argument is set to ERROR

@arunkumar9t2
Copy link
Owner

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.

@ZacSweers
Copy link
Contributor Author

ZacSweers commented May 21, 2020 via email

@ZacSweers
Copy link
Contributor Author

ZacSweers commented May 21, 2020 via email

@arunkumar9t2
Copy link
Owner

arunkumar9t2 commented May 21, 2020

Thanks. Any luck with setting qualifiedNames to true?

@ZacSweers
Copy link
Contributor Author

Still fails with that set to true as well :/

@arunkumar9t2 arunkumar9t2 self-assigned this May 21, 2020
@arunkumar9t2
Copy link
Owner

Thanks, I will investigate. Just to confirm scabbard's fullBindingGraphValidation is set to false right?

@ZacSweers
Copy link
Contributor Author

ZacSweers commented May 21, 2020 via email

@ultraon
Copy link

ultraon commented May 26, 2020

@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"
}

@Morteza-Rastgoo
Copy link

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.

@arunkumar9t2
Copy link
Owner

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.

@arunkumar9t2 arunkumar9t2 added this to the 0.4.1 milestone Jun 21, 2020
@arunkumar9t2 arunkumar9t2 modified the milestones: 0.4.1, 0.5.1 Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:processor Label to mark all discussions about scabbard's annotation processor needs investigation Needs investigation to determine course of action
Projects
None yet
Development

No branches or pull requests

4 participants