-
Notifications
You must be signed in to change notification settings - Fork 3
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
Clarity for commands vs global options #8
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not sure about this MUST. It's a requirement we're imposing on this specification so runtime authors know what to expect, and not a requirement that we're imposing on the runtime. On the other hand, I think folks will generally get the idea even if we don't get this quite right ;). Do you have a feeling for which way would be right?
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.
I think this works. You're not saying someone can't do something like a command with a hyphenated global option. You're say, instead, that the spec has certain commands that are not hyphenated and they follow the global options.
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.
On Mon, Dec 07, 2015 at 03:34:01PM -0800, Mike Brown wrote:
Right, so what's MUST about it? There's no way runtime implementors
could get that wrong, since it's a requirement we're making of the
spec itself. See also my suggested test-case criterion 1.
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.
You're saying '-START' is not the same as 'START' wrt compliance. Rather
-START path
in front of the command START would be a global option. You're also limiting the spec writers from muddying commands and global options. You're forcing them to have a command on every invoke.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.
On Mon, Dec 07, 2015 at 03:54:55PM -0800, Mike Brown wrote:
No, I'm saying:
The only commands we define now are ‘version’, ‘start’, ‘exec’,
‘pause’, ‘resume’, and ‘signal’. We may release a future version of
this spec with a command like ‘checkpoint’, but will not release any
future versions of this spec with a command like ‘-checkpoint’.
Without a pattern like “commands will not start with a hyphen” it
would be harder to distinguish unrecognized commands from unrecognized
options, and we're requiring runtimes to fail-fast for unrecognized
commands.
I agree that ‘-start’ and ‘start’ are not the same, but I think that's
clear without this sentence.
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.
On Mon, Dec 07, 2015 at 04:52:47PM -0800, Mike Brown wrote:
Works for me. Even if we don't change the spec text, I think it's
worth being very explicit about the rationale and our intentions in
the commit message. That way we don't have to rehash the reasoning if
we do decide that the spec needs clarification later. Can you update
the commit message with something to cover the points made in [1,2]?
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.
Good point done :-)
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.
On Mon, Dec 07, 2015 at 09:30:38PM -0800, Mike Brown wrote:
But not force-pushed? I'm still seeing d67df10 anyway.
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.
Yeah I just put it in the PR comment. I refreshed the commit. Not used to putting long winded commit messages in. Cheers.
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.
On Mon, Dec 07, 2015 at 10:13:31PM -0800, Mike Brown wrote:
2b084a3 LGTM. I'm fine with it landing as is, but here are a few
notes on the commit message:
Discussed and worked on wording with @wking via private IRC.
This^ isn't important enough to include in the commit message. Folks
reading this will care about what changed, what our motivation was,
and why we implemented it the way we did. They don't care who we were
(except for copyright ownership, and Git's Author: covers that) or
what channel we used for the discussion. I'll my Reviewed-by when
this lands, so folks will know that I signed-off on it (and we'll add
Reviewed-by tags for anyone else that LGTMs it too).
"distinguish unrecognized commands…
This^ is missing a closing quote.
[1]
https…No need to escape these^ references (e.g. see 3606bcf). Git's command
line tools don't markup the message, and GitHub links URLs but doesn't
render Markdown in the messages.
For motivating long-winded commit messages, see [1,2]. I like them
because you can go straight from ‘git blame’ to notes motivating that
line, instead of going blame → commit hash → GitHub PR → some comment
in that discussion. And I have a local mirror of the commits (thanks
Git :), but I don't keep a local mirror of the GitHub PR discussion.