-
Notifications
You must be signed in to change notification settings - Fork 0
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
Disable log on autocomplete/eager-eval #17
Comments
There's an ownKeys handler: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys Might be able to find a solution to #14 that complements this one |
What if simply getting Only makes sense if we've already figured out how to disable autocomplete Breaks most trivial usage of Echo, which could lead to confusion |
DevTools doesn't use the ownKeys handler, it hooks into v8 to inspect the object directly :/
|
It does not, and afaict adding side-effects to the internal Echo function causes no change in functionality |
It looks like autocomplete decides whether something has side effects based solely on the token types: https://github.com/ChromeDevTools/devtools-frontend/blob/e43879a5a25ec7bfaaedeb1e4d860181db696d09/front_end/formatter_worker/FormatterWorker.js#L463 Autocomplete is aborted if the expression contains anything that is not one of the "safe" types |
It looks like throwing an error could abort autocomplete -- is there a way to throw an error during the get handler without disrupting functionality? |
Oh god now new versions of Node (I'm playing with 14.15) do autocomplete too and it's so much worse in a CLI |
Does Chrome even still eager-eval Echo? What about giving the original (internal) Echo function side effects? It should never be called. Would that prevent autocomplete as well?
Autocomplete seems to stop after a construct (potentially also a call) -- or does it? Maybe there's a way to take advantage of that?
Is it worth it to specialize for Chrome's devtools?
The text was updated successfully, but these errors were encountered: