Closed timqian closed 3 years ago
@medikoo That's right, thanks for pointing it out, I have updated the PR. Now it only affects users in China.
We decided to show Chinese help command to users in China earlier cc @ole3021 @ac360 , but I agree it will affect users using v1 version in China (although the interactive init command sls
already creating a "Component").
So I bring another PR for serverless. Which shows a hint about sls --help-components
in Chinese. Guess that will be a safer solution. What do you think @ole3021 @ac360
regular framework users ~in China~ (wherever they are
Goal: Optimize the CLI framework (plugin feature) commands for users in China, as it is not really working(out of supporting as well) with Tencent and in English.
Yes, the reason I like to replace Framework help with Components helps for Users from China is because:
To give users a consistent user experience and make it easier for users to start using serverless with Tencent. I like to
Users can't really do much in non-serverless folders, but get a glance at the commands that to interact with serverless.
- Use components help command as the default commands help info. (This will make users keep focusing on components features, also no need for users to understand the difference and switch between framework & components.)
If we make the changes above, There are the following things that need to be considered:
SERVERLESS_PLATFORM_VENDOR=aws
to switch the non-serverless folder default help commands. (with vendor set to AWS, show the framework commands instead. But remind by Tim, the SERVERLESS_PLATFORM_VENDOR
is designed for components, and it is abuse here in this case. ) create
command to create a framework (plugin feature) project, and interact with framework commands under that folder. (With this, users in China who like to use framework features with AWS still have a way to start.)Please let me know how you think about this, @medikoo @ac360
@ole3021 I think best approach, is to go with solution proposed here: https://github.com/serverless/serverless/pull/9145
So on sls --help
in Components v2 folder show Components help. in any other folder show regular Framework help but with first line in chinese, directing users to rely on sls --help-components
for Components help output.
Thing is that Framework offers many commands dedicated to not work in service context, so it'll be a clear degradation to suddenly not show any Framework related help in such scenario (also afaik Components help does not provide any hint on how to deal with such situation, e.g. how to show Framework related help, as currently is done in Framework help output)
Additionally it'll be good to start thinking on how to totally separate Components CLI from Framework, as both CLI's just harm each other (1) Components CLI, delays start up of Framework CLI by 0.4s (2) Framework CLI confuses Tencent users with non Tencent help output by default.
I believe the only right solution to problems we're facing is to serve both as two different CLI programs (e.g. keep framework as serverless
, and port Components CLI as e.g. sc
).
Framework CLI confuses Tencent users with non Tencent help output
Ok, got that, and let hold on changing about this replacement, and I will plan the seperate solution. Thanks for the info.
cc: @timqian
After a discussion with Tencent and Austen. We confirmed that we won't create a new CLI for Tencent as the serverless brand is quite important and it should not be changed to any other commands. For the traditional CLI experience, Tencent will cooperate with us to make it work for users in China. and we just need to do translation after is ready for users to use.
will close this PR. @medikoo @timqian
https://app.asana.com/0/1200011502754281/1200052298048317