-
Notifications
You must be signed in to change notification settings - Fork 71
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
Formalize warnings #57
Comments
I like this idea, but wouldn't know where to begin in integrating it here. |
So if you search through https://html.spec.whatwg.org/ (not the multipage version) for "developer console", it comes up a few times:
(and several similar phrases in various points)
(although that section will be going away soon per whatwg/html#1207)
I guess maybe you'd want to define a term like "optionally warn in the developer console" which is something like "Optionally, call Printer with Then all the call sites could cross-link to these terms. It wouldn't be much different than today, but it would kind of emphasize that things all tie together---HTML's "developer console" and the console discussed in the Console Standard. |
I should note that true warnings are impossible for Node.js to implement. We only have two channels available, Currently warnings in Node.js go to |
Well, I'm not sure "impossible to implement" is quite the right term. You can implement the Printer however you please. E.g. you could prepend the logLevel before writing out the string, or use different colors, or whatever. (Or do nothing different between warn and error.) There's no requirement involving POSIX output streams in the spec. |
Right, I meant in the regard to having them be a) just the output that user provided, and b) differentiable. Perhaps the spec does/will not require those points? |
Yeah, if you read the spec I linked to, you can see no such requirements. |
This seems like a good idea and the more we reference vague hand-wavy warning-reporting things in the standard the more I want to do this. I propose we move forward with this by creating a It should be an easy enough change that I'm happy to take on. Looks like it'll provide a good ROI when we and other specs want to handle warning-reporting things, especially if you do it a lot (this should keep things DRY). |
We should probably leave the actual warning undefined. Instead the algorithm can say that it should be something appropriate and localized for the occasion. And it needs to be optional of course. |
Indeed, summarizing IRC: Callers can provide something generic (kinda like the warning we provide in time()), but don't have to provide anything. And as you said we should make it clear that:
|
Ugh, finishing this off soon I promise, got blocked up with a bunch of stuff all at once. |
@domfarolino How can I help? |
Will be requesting review soon on a small PR to take care of this, would be great to get feedback; in Seattle this week so things are a tad hectic. |
Often specifications want to give hints at things that can be reported to a developer console, if there is any. Should we formalize that in the Console Standard?
(I was looking at fixing whatwg/fetch#259 and then I wondered whether we should have some shared mechanism across specifications.)
The text was updated successfully, but these errors were encountered: