If I don’t Publish a new version of my App, which version of the Dependency will my users see? The newly-Published Dependency? Or the one that was Published at the time I Published my own App?
You’ll get the current published version of the dependency – which means that, in exchange for being the first out of the gate with this feature, the anvil-extras maintainers have solemnly sworn not to break backwards compatibility! Basically, they’re maintaining the same compatibility guarantees as the rest of the Anvil platform.
(This will not be the last step for third-party dependencies – if you’re interested in versioning features, stay tuned!)
I am wondering, though, to what degree does including a dependency to another app (third-party or one of my own) slow down the loading of my apps?
Adding a dependency means that the codebase for that dependency has to be shipped to your browser at startup. That makes the modules within the dependency available for use in your app and will add a small amount of time.
From then on, it’s no different to modules within the Python standard library - if you import them, they execute and take time to do so; if you don’t, they don’t.
Thanks for the reply Owen. I didn’t make myself very clear, let me rephrase more precisely: is the delta between (i) including code directly in my app, and (ii) adding the same code in another app as a dependency, significant? In other words if I am looking to speed up my app should I rather be including code in my app’s codebase rather than having a dependency? I suspect the answer is “really not much” but am curious if you or anyone else knows more. Thanks