Closed lostmsu closed 9 months ago
Hello @lostmsu, An environment variable was created to customize the execution time of the dotnet --info command and the default time was also changed to 10 seconds.
v6.0.0 - Adding the DOTNET_INFO_WAIT_TIME environment variable
v6.0.2 - Changing to 10 seconds.
If the problem still persists, please open a new issue.
This is the same issue as #125 , except now the problem is
dotnet --info
sometimes does not make it in 4 seconds (I am running a lot of concurrent analyzers). See hardcoded timeout in https://github.com/daveaglick/Buildalyzer/blob/da88770a2952f7894c05cd0866ef9d766f78aaea/src/Buildalyzer/Environment/DotnetPathResolver.cs#L63I have 3 options for solving/improving it:
CancellationToken
and let the caller handle timeout conditions.WaitForExit
with timeout in a loop. Continue looping if during the last 4 secondsdotnet --info
added some output.Additionally, it is not clear to me right now why the output of
dotnet --info
can not be cached after the first run (per dotnet path). Environment variables for that call are hardcoded, and the only thing that's changing is the current directory, which can only affect result in a narrow case: running on Windows (or on *nix withPATH
env var containing.
), and there's adotnet.exe
next to the project file.