Open kalgiz opened 6 years ago
@kalgiz This is interesting because I have the same version of Ubuntu and using PowerShell Core version is 6.0.2
this did not happen at first, but when I upgraded to 6.1.0-preview.1
it started to happen. I was wondering a few days ago if we should run CI also against the preview of PSCore and this might be good idea to have at least a PR for it to be alerted about upcoming issues. I ran the test suite locally on 6.1.0-preview1
and there were only the 9 known failures btw. I opened PR 974 for that.
It would be good to also see the stack trace. If it is an error that bubbles up to PowerShell, then you can get more details e.g. via $error[0] | select *
, otherwise you need to attach the debugger (and possibly change the exception settings to break on any exception). I suspect that this could also be one of the known concurrency issues that are mostly due to the static members in the Helper
class. I tagged other issues with the new Issue -Concurrency
label so that you can have a look at them as well. I think there are a couple of underlying problems in the code that cause those exceptions. To give you some background: PSSA spawns a new thread for each rule.
@kalgiz To add more details: this also happens for pwsh 6.1.0.-preview.1
on Windows as well (but not on 6.0.2 or 5.1). The good news is that this happens only with the currently released version of PSSA but not the latest development version (I re-tested on Windows and Ubuntu). Can you confirm that this does bug does not happen when building PSSA using the latest version of PSSA? I think we could close it then.
Steps to reproduce
Expected behavior
Triggers PSUseDeclaredVarsMoreThanAssignments rule.
Actual behavior
Environment data