nimbella / nimbella-cli

Your cloud. Beautiful.
https://nimbella.com
Apache License 2.0
10 stars 12 forks source link

nim project create shouldn't offer languages that the backend doesn't support #218

Closed joshuaauerbachwatson closed 2 years ago

joshuaauerbachwatson commented 2 years ago

Currently, there is a hard-coded list of languages in 'nim project create'. All languages in the list are accepted when specified, and all are listed in the usage help. There is no check of the backend's runtime repertoire, so, some of these languages may turn out to be unsupported at deploy time.

If there is a current API host defined, then

If there is not a current API host defined, then this check cannot be carried out. There should probably be a warning that support for the chosen language may depend on what backend you end up deploying to.

joshuaauerbachwatson commented 2 years ago

Unfortunately, interrogating the controller is an asynchronous exchange, whereas the context of presenting usage help does not allow for asynchrony. So, the fix will only reject unsupported languages when you attempt to create. To lower the level of confusion, the languages will no longer be enumerated in the help. Instead, there is a generic statement in the extended description suggesting that the developer should use nim info --runtimes to see what is supported.

joshuaauerbachwatson commented 2 years ago

Fixed by PR #219