-
Notifications
You must be signed in to change notification settings - Fork 494
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
Language Features still stops working after a while and never recovers #2627
Comments
Honestly, at this point, the problem has to be deep in PowerShell Editor Services's handling of the PowerShell runspace. I've tried to avoid diving into that as it will take a lot of time and will involve coordinating with @daxian-dbw on PSReadLine but unfortunately that's where we're at. I'll need more people to bother @SteveL-MSFT here and on Twitter to treat this as a priority. |
@TylerLeonhardt I experienced this once yesterday. I commented here as #2522 is now closed. |
I also experienced the same with PowerShell extension 2020.3.0 with PowerShell 7.0. Basically, intellisense stops working after a while. Then, if you run a command in the integrated console, it doesn’t get executed, but instead the command prompt will be displayed immediately, and after that things starts to work again. But the same will happen after a while again. |
Maybe related: #2364 |
@daxian-dbw the Preview extention has a bunch of work in it to prevent this... But this issue claims it isn't completely fixed. |
I'm seeing a similar issue and I never started a debug session. I'm on preview 2020.4.2 (VSCode 1.44.2) and here's my log zip. I'm not seeing anything obvious here. BTW it is cool that cancel requests indicate the message number they're cancelling. I just wish the original LSP msgs displayed their request number. |
OK, my PSIC is completely unresponsive which would explain why completions aren't working. :-) Now, why is PSIC wedged? |
Weirdly enough when I deleted PS extension and reinstalled it everything seemed snappier. But it came back to being slow after a while. I restart PS Extension about 3 times per hour now. |
I still find myself having to kill the extension multiple times every day. I think things have improved for sure, but it's still basically reliable. Ironically, I tend to keep my modules a single huge files in part because the extension is unreliable, which in turn seems to make the extension less reliable. I get that working in a 10K LoC module file is not the common case for a PS user, but I don't think it's completely crazy/unreasonable. |
I use multifile, multifolder modules. But its random. I can open fresh session and even on very small codebase it chuckles on Get-content parameters. |
Issue seems worse in v2020.4.0... stops working after 3-5 minutes. |
@bspach when completions stop working, is your PS integrated console also unresponsive? |
Integrated console works fine; Ctrl+Space immediately pops up all available cmdlet arguments in PSIC. Edit: I let Code sit idle for about 15 minutes (afer loading a PS script into the editor) and now intellisense is working quickly/responsively, only a 1-3 second pause before the available options pop up when hitting Ctrl+Space or typing a "-". Edit 2: Works inconsistently... stopped working again after a few minutes. |
I have the same thing. Also F8 will stop working but PSIC is still responding when used directly |
I've updated to newest preview and the issue is still there. It's pretty much unstable. Formatting stops working, so does IntelliSense. This issue kills so much productivity. |
@PrzemyslawKlys do you think it's gotten worse or is about the same? |
@TylerLeonhardt Between last 2 versions, same. But i am in situation where I have to restart 5 times in an hour to get formatting/intellisense. |
Just so you know, I am working on this, though not directly writing code just yet.
So things are happening... I've not given up on this. |
Anyway, this should be a new issue though. Let's start a "Workaround when a module takes too long to run Get-Help" @PrzemyslawKlys can you do that and include your logs? |
I've just uninstalled it (as I said, I don't use it), but I guess this could be a good feature, and I can open it up for the sake of getting things done :) The thing is - how do we know what's causing issues? If you don't automate the detection of that stuff most people will ignore your "work" on the new feature. |
Yeah we can possibly detect how long it takes and recommend ignoring a module... |
Ok I'm going to close this issue now! Let me know if anyone feels otherwise... |
What about my issue with non-existing functions that cause IntelliSense to stop working? Should I open new issue? |
Does that still repro after uninstalling the AWS module? Because this discussion spawned from those logs. |
It does not! I thought it's not related. That's cool! thnx |
@PrzemyslawKlys |
Just a quick question - would it make sense to ask PowerShellGallery to take out that number of cmdlets limit and then ask ASWPowerShell to fix it? Or is it an internal PowerShell limit that prevents this? Because the only reason they do this is because of PowerShellGallery right? |
@PrzemyslawKlys might be a good thing to bring up on the PowerShell repo. Though I would say they should probably look at reducing the number of commands they export in a single module. |
Let me follow up internally. |
@SeeminglyScience They already solved for that by breaking the main AWSPowerShell module down into the service specific AWS.Tools.* modules. @PrzemyslawKlys - if you haven't switched yet and have the option to do so, I highly recommend. |
@scrthq well they didn't fix it. They should use the meta module because a lot of people still use the old one, and they will have the same problems as I did. It has 500k downloads per version. Can you try to ask them to just meta it? |
@PrzemyslawKlys if they did that they'd be back to square one. If a module imports other modules but does not export the commands then nothing is exported. If they do export the commands from the nested modules, they are back to exporting 4k commands in a single module. @scrthq awesome! Thanks for the update 🙂 |
@SeeminglyScience the way Azure module does it is you have meta module that downloads other modules, which have exported commands? I would guess this doesn't impact performance at all? Meta module simply is there so if user asks for AWSPowerShell it gets downloaded all 200 modules with proper commands? Edit. removed azure links as they seem to have changed something. |
To be fair, if |
You see that I don't get. If a module is a proper module with all cmdlet/functions/aliases described doesn't that mean ultimately any get-help/get-command doesn't need to do any heavy searching but has this widely available? So if you bundle 50 of those modules as a meta module which has a single purpose of being "download this modules which have proper psd1 file" purpose it would solve the issue no? |
It's explicitly importing all of it's nested modules into the global scope.
It's not really something I'd ever recommend folks to do. |
So let me get this straight:
Since AWSPowerShell, basically does now what 50+ properly modules does together, I would assume that if they create a meta module with required modules defined for all 50 modules it means that:
And I would guess if you put AWSPowerShell into RequiredModules of something else it will work too. Module X defines RequiredModules AWSPowerShell, AWSPowerShell defines AWS.Tools and nesting works as far as I remember up to 5. When you download module X it will auto download all other stuff, and I guess Import-Module of module X will properly work, as if the commands from AWS.Tools will be required those will be imported on demand? What I am not understanding here? Keeping AWSPowerShell module as is, has huge impact that can be at least somewhat minimalized? I'm not expecting AWSPowerShell to continue being used, but if someone does Import-Module AWSPowerShell it will work - I have similar meta modules for projects I have integrated into other modules and they do work, so not sure I understand what I did wrong or how this could be worse than what we have now? |
I gave some reasons why I don't personally recommend the practice in my comment above. That said, feel free to pitch it to the AWS team, they very well may disagree. |
I just wanted to note that I went a few days without having any issues with the 5.1-CI.54138 build, and it looks like I just got updated to 6.0. I'm very hopeful all the issues that caused me so much frustration are now a thing of the past. A huge thank you to @TylerLeonhardt @daxian-dbw @david-driscoll and anyone else who played a part in this fix that I missed! 👍 |
Thank you all for your quick responses and helping us help you ❤️ |
I'm just glad to hear things are working well without any issues! For a time there I thought I was going to have to back to the drawing board and just start from scratch. 😄 |
Thank you for your comment, but please note that this issue has been closed for over a week. For better visibility, consider opening a new issue with a link to this instead. |
Issue Description
I am experiencing a problem with...IntelliSense not working after a while.
I am aware of a recent fix and other closed issues:
But I still experience issues, far less but still.
Attached Logs
1586591887-8aec1d54-a22f-4e9a-9d5a-026cf95b0ba11586539769772.zip
Follow the instructions in the README about
capturing and sending logs.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
The text was updated successfully, but these errors were encountered: