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

Anvil 2.4.5 does not pick up new files with Multibindings #710

Closed
matejdro opened this issue May 23, 2023 · 10 comments
Closed

Anvil 2.4.5 does not pick up new files with Multibindings #710

matejdro opened this issue May 23, 2023 · 10 comments

Comments

@matejdro
Copy link

matejdro commented May 23, 2023

Steps to reproduce:

  1. Download and open Project.zip
  2. Run project
  3. Note that logs/activity will print two entries (as it should)
  4. Completely delete LibraryMultibinds.kt
  5. Run again and check logs/activity
  6. Logs/activity will now show only a single entry, as it should
  7. Re-add LibraryMultibinds.kt
  8. Run project
  9. Note that Logs/activity still show only a single entry. Clean build fixes the issue.

This seems similar to the #693, however, I believe it is a different issue:

  • Not related to the annotations changes, it happens when adding completely new files from scratch
  • kaptGenerateStubsDebugKotlin gets executed normally in step 8, so it is not UP-TO-DATE issue
  • It happens regardless of the kotlin.incremental.useClasspathSnapshot flag setting
  • This seems to be a regression with Anvil 2.4.5 (or more likely Kotlin 1.8.2X)
  • None of the workarounds from the Compiler doesn't pick incremental changes to multibindings in some circumstances #693 thread seem to work

This is pretty serious issue since it requires clean build when every single new file using multibindings is added to the project.

Might be related to the #707 and #708

@tujhex
Copy link

tujhex commented May 26, 2023

I have this problem on my project, seems that it's related directly to Anvil, because when I downgraded anvil to 2.4.4 all works fine again. PS: also I disabled new IR backend with kapt.use.jvm.ir=false, because it breaks dagger in strange manner

@tujhex
Copy link

tujhex commented May 26, 2023

A little note: with Anvil 2.4.5/2.4.6, kotlin 1.8.21 and kapt.use.jvm.ir=false it's broken (dagger components not generated)

@ZacSweers
Copy link
Collaborator

This is a dupe of #693

@matejdro
Copy link
Author

matejdro commented Jun 1, 2023

Can you explain why this is a dupe? I've made a list in the ticket on why I believe this is not a dupe.

@ZacSweers
Copy link
Collaborator

The IC issue is not dependent on the new IC being enabled, it's just exacerbated by it. I think it's a distraction to treat all these IC related issues as independent and better to combine their details in one place (where someone that works on it is already active).

@matejdro
Copy link
Author

matejdro commented Jun 1, 2023

I would agree if those issues had seemingly same cause, but while they are all related to IC (and have similar outcomes), it seems that this one has a completely different cause because it happens in completely different circumstances.

@matejdro
Copy link
Author

matejdro commented Jun 2, 2023

Here is a reproducing branch instead of a zip file: https://github.com/matejdro/issues/tree/anvil-ic-new-file

@matejdro
Copy link
Author

matejdro commented Feb 16, 2024

This seems fixed by v2.5.0-beta01 with trackSourceFiles on 🎉

@JoelWilcox
Copy link
Member

Thanks for updating @matejdro ! It's helpful to get confirmation that things are working while we're testing out the new changes :)

@RBusarow
Copy link
Collaborator

Excellent!

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

5 participants