-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove javascript.builtins.Error.cause.displayed_in_console
#26001
base: main
Are you sure you want to change the base?
Conversation
I think it's very important to note to developers which parts of the error are displayed, as that's basically the sole purpose of The way I think about it is this: BCD is documentation. It's just a part of content that's browser-specific, extracted to a more structured form—that's it. Automated checking is cool, but we can't take a set of automatically derived data and call that BCD, because its goal is to be developer-facing, and developers care about whether they can use a feature in a way it's intended to be used. If a part of the error doesn't show up in the developer tools, then it's by definition useless. |
For additional context, over in web-features I'm trying to tag the last few remaining compat keys for JavaScript (see the description and discussion on web-platform-dx/web-features#2564 and this file in another PR). We've manually sorted and reviewed over 13,500 keys and this is the first one that I've contemplated omitting completely. This key appears to be unique amongst all the JS keys (and perhaps all of BCD) in representing a UI distinction between browsers that is completely invisible and uninspectable within the document. It's also the only key I've encountered that hinges support on any developer tools whatsoever, which are known to vary widely between browsers.
I don't think this is supported by the original proposal for try {
await doJob();
} catch (e) {
console.log(e);
console.log('Caused by', e.cause);
}
// Error: Upload job result failed
// Caused by TypeError: Failed to fetch Searching for Moreover, if printing a
Of course it is. There was a time I was the primary maintainer of this project. I'm not suggesting we ignore this difference. I think this information deserves to be in a note. |
It is not partial implementation because the implementation follows the spec faithfully. It is a sub feature because developers are interested in knowing whether they can log an error and automatically see its cause. The proposal does not demonstrate dev tools because that would implicitly place a normative requirement on that behavior, but it can't; and if browsers ship The only other way I can think of is to have an implementation note for every initial implementation saying "not shown in the console", and a separate implementation without the note, but I fail to see how that would be different semantically. |
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.
Agree with OP, makes sense to me to no longer track this as a subfeature.
If "subfeature" strictly means "something dictated by the spec", then please add an implementation note to every initial release saying they don't display it in console, because that's the actual information deciding whether users can use it. |
Summary
javascript.builtins.Error.cause.displayed_in_console
can never be incompatible because the contents of the console aren't inspectable.Test results and supporting details
This is a weird thing. The appearance of the console is implementation-defined by specification. Arguably, the console output can look however a vendor wants it to look and it'd be standard behavior.
But unlike, say, the default stylesheet or a sensitive feature's permissions UI, the output of the console is not inspectable by a web page in any browser in any case. That is to say, there are no methods to read the console, only to write to it. You could never build a web application that depends on the output of the console. It's definitionally compatible because no browser exposes it to developer code or ordinary users (e.g., there's no way to trigger the appearance of the console).
That said, lots of stuff can be up to the implementer and still "incompatible" for developers, if they're too divergent. I get this. I think it's worth noting that Safari is alone in failing to print this information, so I've moved that information into the parent feature's notes.
Related issues