abderrahim commented on issue #422: URL: https://github.com/apache/buildstream/issues/422#issuecomment-4496829784
I took a look at this at some point. I'll post my notes here in case someone wants to pick it up. The main blocker is that click (the library used to handle the command line) doesn't support more than one set of variable-size positional arguments (I forgot the exact term). `bst shell` supports passing a command to it (which can be more than one argument), trying to make the element support more than one argument can't be handled by click. We can try to do this manually (as in have a single set of position arguments and then have bst split it), but that needs careful consideration. Currently we support: * `bst shell element.bst` * `bst shell` (in a workspace) * `bst shell element.bst command to run` * `bst shell element.bst -- command to run` We need to keep support for these and add support for specifying more than one element. One thing we could consider is not having it as a positional argument, but as a flag. ``` bst shell --with strace.bst element.bst strace command to run ``` We could also make the `--` mandatory if there are more than one element (which probably makes more sense), or try to split based on whether the name ends with `.bst`. Unless we go for the "flag" solution, we need to implement it manually and fight with click to get the help text right. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
