-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cannot activate rust-analyzer server: e.replace is not a function #13442
Comments
Could you please give the full error with stacktrace? |
This issue is all kinds of bizarre. It only occurs when both rust-analyzer and the As for the matter of an error log, I was unable to locate any stack trace in any of the output logs, so not Rust Analyzer Client. nor the Extension Host / Remote Extension Host logs. |
Pre-release makes sense as its most likely a problem with #13426. I just installed the python extension and r-a starts up fine for me though. mind sharing your rust-analyzer related settings? Without a stack trace or repro this is unfortunately not debuggable at all 😕 |
Oh, we aren't rethrowing the error anymore so that's why we don't have a stack trace ... will fix that one. |
It seems to depend on which extension boots first. Try to reload vscode with a python file open. weirdness.mov |
Can't seem to trigger that myself, #13444 should fix the stacktrace being hidden. I'll kick off another nightly once thats merged. |
Logs for you:
|
Im' sorry but what? Does the python extension overwrite the
Edit: Ye looks like they are fiddling with the prototypes of things https://github.com/microsoft/vscode-python/blob/23eb4ca14139d745cc985ca6d6b6adea52a77656/src/client/common/extensions.ts#L105-L119 |
Today, with I also have However, I'm running |
The python extension is patching String, and that's interfering with other extensions? (I wonder if other |
So the problem seems to be the This is defined as interface String {
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
*/
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
/**
* Replace all instances of a substring in a string, using a regular expression or search string.
* @param searchValue A string to search for.
* @param replacer A function that returns the replacement text.
*/
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
} by the typescript node module. So the prototype fiddling by them seems to change the method resolution here... |
So, I don't think there is an alternative for |
I concur, maybe we should open an issue on that extension... |
I don't think it's a method resolution issue, the polyfill they're using doesn't support the |
I'll be happy to try and whip up a PR if no one wants to claim it first :) |
Feel free to :) |
Why do they need to polyfill tho? Vscode runs a new v8/chromium version. Is the polyfill like not even needed? |
That's what I was thinking, but maybe the extensions are built to possibly be run on https://vscode.dev ? It's definitely worth opening an issue about it on their end. Even just using a truly compatible pollyfill will be an improvement. |
@Veykril can you kick a new nightly build? |
done |
I can confirm the issue is resolved on latest pre-release on my end. |
Thanks again, I also fixed the stack overflow in the logs (surprised the extension works even with that overflow happening) |
rust-analyzer version: rust-analyzer version: 0.4.1251-standalone
rustc version: rustc 1.66.0-nightly (6b6610b8b 2022-10-06)
relevant settings:
Let me know what you else might be needed, and how I can help debug this.
The text was updated successfully, but these errors were encountered: