-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove temp project path from tool install warnings and errors. #8734
Remove temp project path from tool install warnings and errors. #8734
Conversation
line = line ?? ""; | ||
|
||
// Remove the temp project prefix if present | ||
if (line.StartsWith($"{project.Value} : ", StringComparison.CurrentCultureIgnoreCase)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// Remove the temp project prefix if present | ||
if (line.StartsWith($"{project.Value} : ", StringComparison.CurrentCultureIgnoreCase)) | ||
{ | ||
line = line.Substring(project.Value.Length + 3); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
command = command | ||
.OnOutputLine((line) => _reporter.WriteLine(line)) | ||
.OnErrorLine((line) => _reporter.WriteLine(line)); | ||
.OnOutputLine(line => WriteLine(_reporter ?? Reporter.Output, line, project)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than reporter could be null. But it does not worth blocking
This commit attempts to filter the diagnostic messages emitted during tool installation. The diagnostic messages may be prefixed with the temporary project; since this is an implementation detail that only causes confusion and clutter in the diagnostic messages, the prefix is removed if present. Fixes #8707.
The RHEL failure occurred again (from the I still need to setup a RHEL VM to see if I can manually reproduce the failure with what I suspect the issue to be. |
Oh right, the broken mock implementation on Windows when using TempRoot. Let me fix that. |
This commit fixes the ToolPackageInstaller tests so that they no longer modify the current working directory. The directory being set is now being properly passed in as an argument to override the default of the current working directory. Additionally, this commit also changes the package root to a temp location rather than based off of the current working directory.
I tracked down the Windows failure to I first attempted to fix the mock file system to try to normalize all the path interactions, but this was a more invasive change that impacted other tests. I decided to just normalize the use of @nguerrera @wli3 can you review the second commit that was pushed? Hopefully it will bring some stability to the tool package installer tests. |
Second commit looks good. Thanks. |
ack, let me check |
Good to go, but not perfect. 52478e8#diff-514fdb6bf1ab21b1a21adfd2ccf82145R121 is a test induced design damage. And the test is just testing the nuget flag. I do think use a test to lock nuget's behavior that we depend on is important since they are in rapid development. A regression is very likely. But adding another optional just for test making it further away from production. Let me also see if there is other alternative. One way is to make is closer to real. Find a better mock library. Or make is less dependent on file system state. |
I mean please checkin. I'll keep digging on my own |
Agreed, an option just for testing purposes is not ideal. Let's work out a proper solution after this change. |
This commit attempts to filter the diagnostic messages emitted during tool
installation. The diagnostic messages may be prefixed with the temporary
project; since this is an implementation detail that only causes confusion and
clutter in the diagnostic messages, the prefix is removed if present.
Fixes #8707.