Wing CLI shows announcement message when any action is used, if applicable
#1.254 aberto em 25 de jan. de 2023
Métricas do repositório
- Stars
- (5.385 stars)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
Description
Community Note
Please vote by adding a 👍 reaction to the issue to help us prioritize. If you are interested to work on this issue, please leave a comment.
Feature Spec
The wing CLI now outputs an announcement message to the console if it is applicable. While applicable, the message should appear once a day, to prevent spamming the CLI console.
Use Cases
We recently had a p0 issue where users who installed wing npm package from our github private package had to take some action to switch to use npm. It would have been great if these users would simply see a message with the instructions or a link to a webpage with the instructions.
For example:
> wing compile program.w
!Caution If you were in our closed alpha and haven't upgraded to install wing from npm directly, please follow the instructions on https://docs.winglang.io/getting-started/installation
Another use case (added for clarification): We want a way to show a message read from an external URL.
The use case is if a future version of Wing accidentally breaks the CLI, and the only way for the user around this is to download a new version of the CLI. In that case, we would like to post an announcement requesting the user to update if his CLI version is affected by the error.
Implementation Notes
We should test if there are any applicable announcement messages - probably ok to do it async, so it doesn't slow down the CLI. If there is an announcement, we should check if it is applicable - for start we could simply use a date range, but we're open to other simple conditions if that's easy to implement.
Component
Development Environment