About Development/Published dependency management

I had a problem with the management of dependencies: sometimes an app would stop working because on its dependency graph another app would appear twice, once with the Development and once with the Published version. When that happened I had to start digging on all the dependencies and their dependencies and make sure they were using the correct version.

I finally decided to follow this guidelines with the management of dependencies and the problem disappeared: every time I publish an app that can be used as a dependency I follow these steps:

  • Set all its dependencies to Published
  • Publish
  • Set all its dependencies to Development

This guarantees that when I work on an app, whether that is at the top, middle or bottom of the dependency chain, I will never bother any app, whether it is published or not.

So my question is: why am I free to set the version of the dependencies? Why is it not automatically set to Development while I work on it and to Published when I publish?

I think this should be a feature request, but I might be missing some use case where the current flexibility is required.

I would like to hear opinions from both Anvil users and Anvil creators.

I can confirm that we’re looking at refining this versioning system, because I agree that this is a workflow that makes it a little too easy to shoot yourself in the foot :slight_smile:

I think the particular feature you’re describing could also lead to unpleasant surprises, though - I want my app to behave the same in dev and published modes, so I can debug it in the editor! Automatically switching which dependency version we use would be rather unhelpful.

Our current thoughts envision more complex versioning schemes, which would allow you to track more than just “development” or “production”. This would allow (eg) dependencies with a “v1” and a “v2” API, without creating separate dependency apps. We’ll keep you posted!

1 Like