Third-Party Dependencies

** New Feature **

As well as being able to depend on your own apps, you can now depend on third-party apps.


To add a third-party dependency you’ll need to:

  • go to dependencies from the :gear: icon
  • select Third Party
  • paste in the dependency token
  • hit enter
  • select the Published or Development branch to depend on.
  • :boom: Your app will now always be up to date with the third-party dependency.


This should take the hassle out of updating your clone any time a dependency author releases a new feature or implements an important bug fix :grinning_face_with_smiling_eyes: .


Our first supported Third-Party Dependency is, of course, anvil-extras, which you can add using the code: C6ZZPAPN4YYF5NVJ

Enjoy!

16 Likes

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!)

6 Likes

Nice one Centurion, like it, like it!

Is your tabulator control available like this?

1 Like

This is great news! Versioning of dependencies will take it to the level I need to rely on this in my work.

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?

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.

1 Like

No, that’s not one of the components currently available within anvil-extras.

1 Like

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

1 Like

No, it won’t make a difference! (It all comes out of the same cache :slight_smile: )

3 Likes

Just came across this while adding HashRouting to a new app. This is amazing!

Also for this quote from Meredydd, I’m very excited…

1 Like

A post was split to a new topic: Dependency Component Display