suborbital / subo

The Suborbital CLI
Apache License 2.0
81 stars 24 forks source link

refactor: runnable-templates, fix create project #360

Closed flaki closed 1 year ago

flaki commented 1 year ago

Even after @cohix's fixes subo was completely broken with create project failing with a Template parsing error. Turns out it tried to deserialize .AtmoVersion in the helloworld project template and threw a fit when it couldn't find the data. This parameter got renamed to .DeltavVersion earlier, but I actually ended up changit it here to .RuntimeVersion, so that we rely less on branding across serialization boundaries to avoid issues like this in the future.

Still, that wasn't all, DeltaV ditches headless mode completely (as it is "by default headless"), so the setting got factored out in subo which was also breaking templates.

Note that this PR relies on these two updates on the runnable-templates vmain branch: version, headless

In the future we should consider better errors and potentially backwards-compatibility considerations for things like the templates, especially when people start creating their own templates, this sort of breakage won't go down well...