-
Notifications
You must be signed in to change notification settings - Fork 7
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
Should "show source" be part of this proposal? #42
Comments
I did, but I don't think it fully addresses this use case. In several implementations like Hermes the source is simply not available by default. At the same time, there are legitimate situations where the source of a selected few functions is needed at runtime. So, implementations have to come up with custom and potentially differing solutions for this. That is fine, or perhaps a new and separate proposal is the best way to address this. But given how closely related it would to the this current proposal, I thought it makes sense to bring it up. In some sense it would be strange to have one proposal adding "hide source" and a second one adding "show source" :-) |
To be clear, I am not insisting that this be included, but I feel that it is a more common use case than is commonly assumed, so I am just testing the water what people think. As I understand it, since we are not at stage 3 yet, this is the last opportunity to do it. |
@tmikov Implementations are allowed to have their own implementation-defined directives. Hemes can add such a directive, as long as it is not in violation of the spec (not that they care about conformance, apparently). So, for example, they could have a |
@michaelficarra for the record, we do care about conformance a lot. That is precisely why I am filing this question and why we are attending TC39 meetings. My point is that there are currently multiple engines running from bytecode with this same issue and they seem to be gaining popularity outside of web. However the use case may not be as visible to people focusing on web or they may (incorrectly) assume that those engine don't care about spec conformance. I think it would be a disappointing if every such engine implemented a different solution to this when we have a chance to unify it. |
I'm using Related facebook/hermes#114 (comment) |
Hermes (and probably Moddable, QuickJS, etc?) doesn't preserve the source by default since everything is compiled to bytecode in advance. In other words "hide source" is the default. It seems that such implementations are becoming more widespread recently.
So, in Hermes we are planning to add a "show source" (or "preserve source", etc) directive for the few cases where the source must be available at runtime.
The question is, does it make sense to consider adding it to this proposal, since it is technically relevant?
The text was updated successfully, but these errors were encountered: