How to Evolve the Libraries that you Publish

Our recommended approach to this is to use the Dependencies dialog to make your in-development, next-generation app depend on the development version of the library, rather than the published one. (The published version of your app can carry on depending on the published version of the library!) This enables you to develop your library and app in sync, until you’re ready to publish both:

For the avoidance of doubt, the choice of which apps to depend on, and which versions, is versioned along with the rest of your app. (If you check out your app onto your machine with Git, you’ll find dependencies specified in anvil.yaml.)

So either of your strategies work: You can have your in-development app depending on your in-development library, and publish them both at once (your “option 1”), or you can set up a new library with a new API and have your new app depend on that instead (your “option 2”). Anvil is flexible enough for both!

We do have some ideas for the future of versioning, so stay tuned (and if you want to take out a support contract and influence the queue, drop us a line at support@anvil.works!)

1 Like