All of a sudden, my app doesn’t work anymore, because it says:
Cannot have two dependencies with the same package name: anvil_extras
Has there been a change in anvil_extras.
If I eliminate anvil_extras as a dependency, all my components will be destroyed.
Have a workshop with the app tomorrow and need urgently a fix.
Cheers Aaron
I’m not seeing any change in my app using anvil_extras. What version do you have the dependency set to? Maybe a screen capture of your dependencies panel would be helpful for informing other investigating.
I have noticed that (more or less) recently the management of dependencies has been improved. For example there are clear messages on version conflicts if you have two dependencies that depend on two different versions of the same dependency.
I have now the new habit of not including dependencies that are already included as dependencies of dependencies. This helps understanding what’s wrong with my dependencies.
I had this exact same issue all morning today. I only noticed it because my co-worker (who was showing the app to a potential client) said it was not working during a demo and came to me. It must have been a change on Anvil’s side, because we hadn’t changed anything in our app since yesterday.
This might have cost us a client.
Apologies for the surprise – we’ve now turned this situation into a warning. To trigger this, it’s not just sufficient that you have two apps in your dependency tree that depend on anvil-extras (that’s normal!) – the problem occurs if you depend on two different apps that both have the package name anvil_extras! Anvil tries to load both of them into the Python module system, but only one of them can be the app you get when you import anvil_extras. This is definitely an “I’m surprised that ever worked!” situation.
However, because you have production apps relying on this behaviour, we are updating have now updated Anvil to turn this from an error into a warning, and arbitrarily choose to ignore one of the dependencies. We’ve also added a bit more information to help you find the conflicting dependencies. You should still heed fix the problem in your apps, as (a) this situation will likely cause errors or unpredictable in your app anyway, as you have code expecting two conflicting implementations of a package, and (b) this will once again become an error when you opt-in to a future update to Anvil. (More on that soon!)