question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wildcard assisted parameters regression in 2.3.7

See original GitHub issue

The following snippet in 2.3.7 now fails

class AmiActionsMediaGalleryBinder @AssistedInject constructor(
  @Assisted private val attachCallback: (MediaTabContract.View) -> Unit
) : SKListCustomViewBinder {

  // ...

  @AssistedFactory
  interface Factory {
    fun create(attachCallback: (MediaTabContract.View) -> Unit): AmiActionsMediaGalleryBinder
  }
}

With a message like so

e: com.squareup.anvil.compiler.api.AnvilCompilationException: Back-end (JVM) Internal error: The parameters in the factory method must match the @Assisted parameters in slack.app.ui.advancedmessageinput.amiActions.AmiActionsMediaGalleryBinder.
File being compiled: (35,3) in /mnt/buildkite-agent/builds/mbr-buildkite-agent-android-iad-5ik6-1/slack/android-pull-request/apps/app-legacy/src/main/java/slack/app/ui/advancedmessageinput/amiActions/AmiActionsMediaGalleryBinder.kt
 
	at com.squareup.anvil.compiler.codegen.dagger.AssistedFactoryGenerator.generateFactoryClass(AssistedFactoryGenerator.kt:166)
	at com.squareup.anvil.compiler.codegen.dagger.AssistedFactoryGenerator.generateCodePrivate(AssistedFactoryGenerator.kt:88)
	at com.squareup.anvil.compiler.codegen.PrivateCodeGenerator.generateCode(PrivateCodeGenerator.kt:21)
	at com.squareup.anvil.compiler.codegen.CodeGenerationExtension.analysisCompleted$generateCode(CodeGenerationExtension.kt:92)
	at com.squareup.anvil.compiler.codegen.CodeGenerationExtension.analysisCompleted(CodeGenerationExtension.kt:113)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ZacSweerscommented, Oct 28, 2021

Confirmed this now works in the latest snapshot. Thanks @RBusarow!

0reactions
RBusarowcommented, Oct 28, 2021

Thanks for the report and the confirmation. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression in Scala 2.13.7 - cannot use wildcard for ... - GitHub
This is somehow caused by the OptManifest argument to the Ref constructor. If I remove that implicit argument, it compiles again. The text...
Read more >
PuppetDB release notes
PuppetDB 4.3.2 is a bugfix release to fix a report storage performance regression in versions 4.2.4, 4.2.5, 4.3.0, and 4.3.1.
Read more >
Chapter 2. OpenShift Container Platform 3.5 Release Notes
In OpenShift Container Platform 3.5, there is the added ability to see the subdomain wildcard routes added in OpenShift Container Platform 3.4, create...
Read more >
Use wildcards in queries and parameters in Access
Use wildcards in queries and parameters in Access · Match all characters anywhere in your data · Match a character within a pattern...
Read more >
Chapter 7: Correlation and Simple Linear Regression
Plot 1 shows little linear relationship between x and y variables. Plot 2 shows a strong non-linear relationship. Pearson's linear correlation coefficient only ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found