-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
repl: Don’t complete non-simple expressions #6192
repl: Don’t complete non-simple expressions #6192
Conversation
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it. Previously, in terms like `a().b.`, `b.` would be a partial match. This meant that completion would evaluate `b` and either fail with a `ReferenceError` or, if `b` was some global, return the properties of the global `b` object.
LGTM pending CI |
LGTM. This is not a fix for #6181, is it? |
Yep, I’m pretty sure that’s unrelated. |
CI is green. Landed in 0b66b8f. Thanks! |
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it. Previously, in terms like `a().b.`, `b.` would be a partial match. This meant that completion would evaluate `b` and either fail with a `ReferenceError` or, if `b` was some global, return the properties of the global `b` object. PR-URL: #6192 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it. Previously, in terms like `a().b.`, `b.` would be a partial match. This meant that completion would evaluate `b` and either fail with a `ReferenceError` or, if `b` was some global, return the properties of the global `b` object. PR-URL: #6192 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it. Previously, in terms like `a().b.`, `b.` would be a partial match. This meant that completion would evaluate `b` and either fail with a `ReferenceError` or, if `b` was some global, return the properties of the global `b` object. PR-URL: #6192 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it. Previously, in terms like `a().b.`, `b.` would be a partial match. This meant that completion would evaluate `b` and either fail with a `ReferenceError` or, if `b` was some global, return the properties of the global `b` object. PR-URL: #6192 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Removing the lts-watch-v4.x label, that can be reconsidered when #6325 is resolved |
I'm going to back this out of v5.11.0-proposal due to this regression |
Hope I’m doing this right by tagging this PR as dont-land-on-5.x, because the best fix for this problem seems to be a semver-major one. |
@addaleax that makes sense then. Thanks for taking the time! |
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it. Previously, in terms like `a().b.`, `b.` would be a partial match. This meant that completion would evaluate `b` and either fail with a `ReferenceError` or, if `b` was some global, return the properties of the global `b` object. PR-URL: #6192 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Checklist
Affected core subsystem(s)
repl
Description of change
Change the regular expression that recognizes “simple” JS expressions to requiring that the full line needs to match it.
Previously, in terms like
a().b.
,b.
would be a partial match. This meant that completion would evaluateb
and either fail with aReferenceError
or, ifb
was some global, return the properties of the globalb
object.