-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
This error specifically happens when the reports destination has been set and a report is attempted to be created for a provider factory where "provider-factory-$factoryFqName" exceeds the file name length. We run into this in instances where we've generated a binding container from a custom-annotated inner class of another class, but it could also occur with a source file with sufficiently long package + class name combination.
Self-contained Reproducer
PR coming shortly with a test to cover this and incremental fix, but here's an example that causes the failure:
package com.squareup.feature.featureflags
interface FeatureFlag
object RealProductionLoremIpsumFunctionalityFeatureFlagWrapper {
@ContributesFeatureFlag
object AllowLoremIpsumFunctionalitySemiLongNameFeatureFlag : FeatureFlag
}
package anvil.register.featureflags.com.squareup.feature.featureflags
// In this example, this binding container would normally be Anvil- or KSP-generated code based on the above feature flag and a custom contribution annotation
@BindingContainer
@ContributesTo(scope = AppScope::class)
public object RealProductionLoremIpsumFunctionalityFeatureFlagWrapper_AllowLoremIpsumFunctionalitySemiLongNameFeatureFlag {
@Provides
@IntoSet
public fun providesAllowLoremIpsumFunctionalitySemiLongNameFeatureFlag(): FeatureFlag = RealProductionLoremIpsumFunctionalityFeatureFlagWrapper.AllowLoremIpsumFunctionalitySemiLongNameFeatureFlag
}
Metro version
0.7.2
Context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working