-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Console] Add more examples for lazy commands #18664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Théo!
Minor note to mergers: use double backticks in code while merging.
Open to finalize this PR @theofidry ? |
8ffe408
to
c1dc758
Compare
@OskarStark updated |
Can we merge this into the |
@xabbuh I do not know if all of that applies to 5.4, if that's the case sure |
@chalasr do you know if 5.4 would be the right branch? |
ping @chalasr (upon his request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 modulo Oskar's comment
9366238
to
5f063a2
Compare
Thank you Théo. |
I think the current doc is a bit confusing regarding the laziness of commands:
LazyCommand
which is quite important to make a command lazy in a way it still works with thelist
command which is used a lot.list
doc regarding instantiating the commands is a bit too absolute. Technically it is not wrong but there is also more subtleties to it. Indeed what it will really do is instantiate the command and then try to get the name and description. Which also means if the underlying command/factory can still not be instantiated (either by tweakingCommand
or usingLazyCommand
). This is unlike another command like the auto-complete or help which will try to get the input definition in which case even aLazyCommand
will call its command factory.I am not sure which branch it should target however and I am sure there is a lot to say about the phrasing used.