Closed itowlson closed 1 year ago
Thanks for pointing it out @itowlson. I will look into adding tags for v0.7 and v0.8.
@itowlson Quick question regarding this. Would it be okay for the same commit to be tagged for both v0.7 and v0.8?
Absolutely. If the same version of the template is compatible with both - which in this case is very likely - then that would definitely be the way to go.
commits have been tagged for templates
When a user runs
spin templates install --git https://github.com/fermyon/spin-js-sdk
, Spin looks in the repo for a Git tag of the formspin/templates/vX.Y
matching the major-minor version of Spin.If that tag is found, Spin installs the version of the template at that tag. This means that if a SDK makes potentially breaking changes (for example, referring to new host components), old Spin versions still install templates with compatible SDK versions.
If no tag is found, Spin 'falls forward' and installs from
main
. This could cause Spin to pick up a template that references a SDK version that imports host services that aren't in the user's version of Spin, which would result in errors at runtime.It would be good to start tagging the JS SDK repo with template version compatibility tags. We probably don't need to do older versions of Spin but maybe v0.7 and v0.8 tags so that users of those versions get stable versions of the templates?
Here is an example from the Spin repo itself: