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

[Question] How to debug missing autoValueConfigurations? #945

Open
dbworku opened this issue Apr 23, 2021 · 0 comments
Open

[Question] How to debug missing autoValueConfigurations? #945

dbworku opened this issue Apr 23, 2021 · 0 comments

Comments

@dbworku
Copy link
Contributor

dbworku commented Apr 23, 2021

Is there some sort of debugging flag that I can add to better understand why my okbuck tasks are failing with autoValueConfigurations should be present if adding autoValue dependencies?

I believe that I've predefined the autovalue extensions in okbuck to match the reported failure. Obviously, I'm missing something subtle that the failure message doesn't highlight.

Gradle file setup

Here's what I've added to the root build.gradle

if ((providers.systemProperty('okbuck.wrapper').forUseAtConfigurationTime().orNull ?: 'false').toBoolean()) {
    apply plugin: 'com.uber.okbuck'

    okbuck {
        externalDependencies {
            autoValueConfigurations = [
                "autoValue",
                "autoValueGson",
                "autoValueParcel",
            ]
        }
    }

    def autoValueDeps = ["com.google.auto.value:auto-value:1.6.5"]
    def autoValueGsonDeps = autoValueDeps + ["com.ryanharter.auto.value:auto-value-gson:0.6.0"]
    def autoValueParcelDeps = autoValueDeps + ["com.ryanharter.auto.value:auto-value-parcel:0.2.6"]

    afterEvaluate {
        dependencies {
            autoValue autoValueDeps
            autoValueGson autoValueGsonDeps
            autoValueParcel autoValueParcelDeps
        }
    }
}

Also, if you're curious here's an excerpt the dependencies of one of the gradle files for a submodule that produces the failure.

    implementation Dependencies.autoValueAnnotations
    kapt Dependencies.autoValue
    kapt Dependencies.autoValueGson
    kapt Dependencies.autoValueParcel
    implementation Dependencies.autoValueGsonAnnotations

Buck failure

./gradlew :RootModule:okbuck -Dokbuck.wrapper=true
...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':RootModule:some-submodule:okbuck'.>
> autoValueConfigurations should be present if adding autoValue dependencies. missing: [DefaultExternalModuleDependency{group='com.google.auto.value', name='auto-value', version='1.6.5', configuration='default'}, DefaultExternalModuleDependency{group='com.ryanharter.auto.value', name='auto-value-gson', version='0.6.0', configuration='default'}, DefaultExternalModuleDependency{group='com.ryanharter.auto.value', name='auto-value-parcel', version='0.2.6', configuration='default'}]

What I tried

My presume that my situation is similar to #883 #896. However, the suggestions in those cases didn't help. Specifically, I tired to:

  1. Use auto-value-annotations instead of auto-value. (This is what was listed in the okbuck V0.48.2 release notes)
 okbuck {
        externalDependencies {
            autoValueConfigurations = [
                "autoValueAnnotations",
                "autoValueGson",
                "autoValueParcel",
            ]
        }
    }
    def autoValueDeps = ["com.google.auto.value:auto-value:1.6.5", "com.google.auto.value:auto-value-annotations:1.6.5"]
    def autoValueGsonDeps = autoValueDeps + ["com.ryanharter.auto.value:auto-value-gson:0.6.0"]
    def autoValueParcelDeps = autoValueDeps + ["com.ryanharter.auto.value:auto-value-parcel:0.2.6"]

    afterEvaluate {
        dependencies {
            autoValueAnnotations autoValueDeps
            autoValueGson autoValueGsonDeps
            autoValueParcel autoValueParcelDeps
        }
    }
  1. Add auto-value-annotations and auto-value to the autoValueConfigurations
 okbuck {
        externalDependencies {
            autoValueConfigurations = [
                "autoValue",
                "autoValueAnnotations",
                "autoValueGson",
                "autoValueParcel",
            ]
        }
    }
    def autoValueDeps = ['com.google.auto.value:auto-value:1.6.5']
    def autoValueAnnotationsDeps = autoValueDeps + ['com.google.auto.value:auto-value-annotations:1.6.5']
    def autoValueGsonDeps = autoValueDeps + ["com.ryanharter.auto.value:auto-value-gson:0.6.0"]
    def autoValueParcelDeps = autoValueDeps + ["com.ryanharter.auto.value:auto-value-parcel:0.2.6"]

    afterEvaluate {
        dependencies {
            autoValue autoValueDeps
            autoValueAnnotations autoValueAnnotationsDeps
            autoValueGson autoValueGsonDeps
            autoValueParcel autoValueParcelDeps
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant