-
Notifications
You must be signed in to change notification settings - Fork 257
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
Deprecate intermixed spin up and trigger args in favor of spin up [args] -- [trigger args]
#1214
Comments
Thanks @cardoso. This seems like a sensible pattern to consider. Curious to get input from @itowlson and @calebschoepp. As you've mentioned, if we continue to allow intermixed up opts and trigger opts, it appears we're tied to clap 3.x, at least pending the upstream issue mentioned in #1198 (comment). This will apply to the anticipated |
I would disregard that clap issue. It's super low priority and the motivation wouldn't be allowing this. Seems like a good time to think about removing the rough edges in these commands. The cool thing is Clap 4's derive should remove a lot of the CLI code that's just in the way of the good stuff |
I'm a big fan of this change. This was my initial assumption of how trigger args worked until I dug into the code. My only real concern is backwards compatibility. Perhaps we could try to get this change in before 1.0? Not sure that we have enough time to do that though. @melissaklein24 might have a better sense if that is realistic time wise. |
From the user point of view, they shouldn't need to care that the trigger is a separate process or has separate arguments. (And especially that half our common To me, this is not like |
That said, the current convention is inherited behaviour from when triggers ran in-process. We tried to keep it the same when we moved triggers out of process; but the abstraction does leak, and, as @cardoso notes, it blocks other UI changes such as flagless app source. So there is certainly grounds for reviewing it. I'd be reluctant to make such a significant breaking change when we don't have much time to prepare users for it before stabilisation though... |
@itowlson that could work if spin up itself had no args and the triggers have all the args, with some effort, but I feel I'm starting to lack context to provide a fully educated opinion beyond personal preference and what seems to play well with other CLI tools. Particularly, I'm not a big fan of running a command without knowing that it delegates to some other process which could invalidate whatever property I set or expected of the first one. I'm sure I could explain it better, but it would be a long rant around nodejs, npm, etc... |
As means to unblock #1198 + taking inspiration from #1155 and #1207
Since the trigger args in
spin up
aren't known ahead of time, and actually meant to be forwarded to aspin trigger [...]
command, allowing them to be intermixed with spin up args is not conventional. It appears the expected pattern is "cmd [args] -- [next args]"Compare with
cargo run
which is analogous:This avoids any kind of ambiquity with future spin up args and makes parsing
easierpossible in clap 4.The text was updated successfully, but these errors were encountered: