Closed PrzemyslawKlys closed 5 years ago
First of all, I wanted to apologize. I know I am reporting a lot of issues and it may be just me, or the way I do modules or the way I set up folders, symlinks, Onedrives, so feel free to tell me to stop and I'll go and sob in the corner with no hard feelings.
No problem. Keep the issue reports coming. Hopefully you don't get too discouraged with the slow progress getting your issues sorted out. The first step is getting repro's on our end. Fortunately I was able to repro the Problems window issue on my machine. I'll be looking into that one shortly.
I know things take time, and repro is a must. Considering each dev has different needs, and does stuff differently. I don't expect anything instantly. I have my share of issues with my projects so I know how hard it can be to help a user.
@PrzemyslawKlys We really want to fix your issues, especially since they are likely to be a fairly common scenario (and are a good litmus test of our setup).
We just need to get around to it.
@PrzemyslawKlys I'm also going to dupe this to #1232. Formatting as a whole needs some perf work. We will work as hard as possible to get to this.
Hello, Working on dbatools in VS Code gives a similar problem of infinite formatting. It'd say solid formatting works about 25% of the time.
In our module, in order to speed up importing, we compile all commands into allcommands.ps1, and it's constantly in this file finding issues and potentially formatting.
If specific larger files are causing problems is there a way to ignore the larger files until the performance gets fixed?
Thanks much
Can you update to PSScriptAnalyzer 1.18 and see if this issue still persists? PSSA provides the script formatting features for the extension. 1.18 was released a few days ago and significantly improves perf. You can install it like so Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
. If formatting issues persist, please file an issue in the PSSA repo - https://github.com/powershell/scriptanalyzer/issues
I did update that but it brings some formatting problems - https://github.com/PowerShell/PSScriptAnalyzer/issues/1187
I had to uninstall to not break my current formatting. Hopefully, with new VSCode, this will be addressed.
Thanks for submitting that issue to the PSSA repo! I'm going to leave this issue closed because, as I mentioned, PSSA provides all the formatting features for this extension.
System Details
System Details Output
Issue Description
First of all, I wanted to apologize. I know I am reporting a lot of issues and it may be just me, or the way I do modules or the way I set up folders, symlinks, Onedrives, so feel free to tell me to stop and I'll go and sob in the corner with no hard feelings.
I am experiencing a problem with... infinite formatting of the entire document. Whatever I do on this project of mine it seems to take ages to format document if it ever does.
This is this module: https://github.com/EvotecIT/PSSharedGoods
Feel free to copy it and play with it for longer while if needed. Basically, it's my "put all module" where I create a new file, function and just put it there for use. It seems like when formatting happens it's like scanning all the data in that module (at least I've noticed formating takes less time on smaller modules and quite a lot of time on larger ones).
What more is that it ignores any timeouts for formatting.
I've made movie for you. Whether I run (it will format on F5), whether I press CTRL+S to save or whether I choose an option to format document it bahaves the same way.
Expected Behaviour
1-2 seconds max.
Actual Behaviour
126 seconds, and not formatted document
Attached Logs
Follow the instructions in the troubleshooting docs about capturing and sending logs.
1541537110-ac4928e4-2369-454e-b50b-6c4546c25f521541496923691.zip