-
Notifications
You must be signed in to change notification settings - Fork 70
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
Report warning #151
Report warning #151
Conversation
Overall looks good. Might be able to simplify it; the structure of "This specification defines X... to X, perform the following steps..." is a bit strange. But no immediate better idea. But, one thing I think should be addressed is to explain how we don't generally specify exact strings. The proposed algorithm gives the impression that you would pass a string. You could fix this a couple of ways. One would be to explain the above, and maybe add an example of an algorithm that calls this, which says something like
This formulation is basically saying that callers should feed descriptions of message to the algorithm, and not exact strings. Alternately, you could make this pattern more explicit in the definition of the algorithm, e.g. saying "given a description of a message description", and calling Printer with "some implementation-defined string derived from description". |
Agree with @domenic above, this looks mostly good. I also agree that it makes sense to clarify that other specification would be describing something to be logged, not an exact string. |
Yeah that makes sense, my main goal was to point out that basically this is something that's "meant" to be consumed by specs other than Console (and is exported), however that is probably obvious from context; for now I removed it. Ping for re-review! |
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.
LGTM. Also you should update the part of the spec that uses this already to cross-link to it!
optionally reporting a warning to the console indicating that a timer with label label has already been started.
I was actually going to do all of that separately as a part of #134, so stay tuned! |
Closes #57. Not entirely familiar with creating an exportable definition in Bikeshed, but given some examples in whatwg/dom and friends I take it the
export
keyword is sufficient for Bikeshed to pick it up?Also I'm happy to make a
ReportWarning(...)
abstract operation instead of just a dfn that can be given "a generic warning", but I figured I'd go down this route first.Edit: #57 mentions it might be good to make this optionally call Printer(...), but personally I prefer to make it mandatory, and have callers optionally call into our definition. I think this will make their specs more clear.