-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Normalize paths when generating pipe names #8504
Conversation
CC @dotnet/roslyn-compiler |
@dotnet/roslyn-compiler please review. Small change. Promise :) |
internal static string GetBasePipeName(string compilerExeDirectory) | ||
{ | ||
// Normalize away trailing slashes. File APIs include / exclude this with no | ||
// discernable pattern. Easiest to normalize it here vs. auditing every inputt |
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.
Typo at input
. But perhaps change to every caller of this method
instead.
cb884a9
to
62ebaae
Compare
Updated to address feedback |
LGTM |
👍 |
[Fact] | ||
public void GetBasePipeNameSlashes() | ||
{ | ||
var path = @"q:\the\path"; |
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.
What about separators here?
It turns out APIs are very inconsistent in whether they leave a trailing directory separator on path names. This caused the client and server code to generate different pipe names for the same file location. Hence VbcsCompiler -shutdown was failing because it used the wrong pipe name. Fix this by normalizing path names.
Normalize paths when generating pipe names
It turns out APIs are very inconsistent in whether they leave a trailing directory separator on path names. This caused the client and server code to generate different pipe names for the same file location. Hence VbcsCompiler -shutdown was failing because it used the wrong pipe name. Fix this by normalizing path names.