-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Activating extension 'vscodevim.vim' failed: Invalid regular expression #3522
Comments
I get this in normal mode on windows, not even in extension development mode. Developer tools dumps a stack btw:
|
afaict the error is with the anyways, I don't think positive look-behind exists in all versions of emca |
@jkillian, can you take a look? |
Thanks for ping everyone. [Positive lookbehinds are part of ES2018] and in the spec. Of course, that doesn't really matter much if it's not implemented anywhere, does it? 😄 Luckily for us, lookbehind regexs shipped unflagged with Node v9. VSCode 1.31 upgrade from Node 8 -> Node 10. @jshap70 could you let me know what version of VSCode you're using? I suspect you're just using an old version. @tetchel looks like you're using VSCode 1.30.2, which also is a version too old. Can you try upgrading and confirming that the issue goes away? If people are stuck with old versions of VSCode because of corporate controls or something like that, I see three solutions:
Okay, just joking on that third option 😄but @jshap70 / @tetchel please do let me know if you can upgrade! @jpoon are you able to see any metrics or anything on what versions of VSCode this extension is used on? Curious to know how many people this would actually impact. |
Okay, for what it's worth, my recommendation is that we just create a simpler version of the regex (simply by deleting the lookbehind groups) that is used on older versions of VSCode. I think it's worth fixing this because it seems like a fair number of people could be impacted. Deleting the lookbehind groups doesn't mess things up too much: With the lookbehinds you get this: So everything still works pretty well, you just lose the correct behavior in a few edge cases (like where the code says I don't have time to write a PR for this tonight, but anyone is welcome to if they have the time. Instead of doing regex creation based off VSCode version number (which may work), we could also just try to create the more complicated version of the regex, catch any errors, and create the simpler one if the first try failed. |
@jkillian yeah it's not up to date apparently, it's 1.30.2 same as OP. The whole thing was caused by me mixing my arch vscode config into my windows one, and since it's managed by pacman it has I was actually just playing around with the regex without the lookbehinds, and yeah there's about 3 test cases where the behavior would change without them. That said, seeing as it was just an out of date issue it seems like you can either just close as not a bug or just version guard like you mentioned. |
I did end up having time to make a quick PR, just to help users on old versions of VSCode: #3525 I didn't get a chance to test it myself on an older version of VSCode though |
Confirmed vim works again after upgrading to 1.31.1. Turns out my updates were broken too, this fixed it. Thanks for figuring that out JKillian |
As I'm trying to adhere to https://twitter.com/jasonthepoon/status/1091840637421314048, I'd opt for doing the least amount of work possible which means asking users to update to the latest VSCode. |
Yep I think this is an appropriate fix. I'm good to close this if you all are. |
As the workaround for users is to upgrade to Code v.1.31 (Feb), closing this issue. |
Describe the bug
When I launch VS Code in Extension Development Host mode, I get an error popup (newlines added by me) saying the following:
My condolences to whoever has to work on anything to do with that regex 😨!
To Reproduce
I can't get the error to pop up when not using Extension Development Host mode. In addition, I tried launching the EDH with two different extensions I work on, and both had the same activation failure message appear, so I don't think it's related to either of my extensions.
Expected behavior
I expect the extension to activate without failing :P
Screenshots
Environment (please complete the following information):
Additional context
I just started noticing this error today. I have been using your extension to develop my own extension for ~6 months so this seems to be a new issue.
Here are my settings, they haven't changed in a long time though so I don't think they are the cause.
The text was updated successfully, but these errors were encountered: