-
Notifications
You must be signed in to change notification settings - Fork 510
Switch to named pipes #1327
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
Switch to named pipes #1327
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,15 +26,9 @@ export function getPipePath(pipeName: string) { | |
if (os.platform() === "win32") { | ||
return "\\\\.\\pipe\\" + pipeName; | ||
} else { | ||
// On UNIX platforms the pipe will live under the temp path | ||
// For details on how this path is computed, see the corefx | ||
// source for System.IO.Pipes.PipeStream: | ||
// tslint:disable-next-line:max-line-length | ||
// https://github.com/dotnet/corefx/blob/d0dc5fc099946adc1035b34a8b1f6042eddb0c75/src/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs#L340 | ||
return path.resolve( | ||
os.tmpdir(), | ||
".dotnet", "corefx", "pipe", | ||
pipeName); | ||
// Windows uses NamedPipes where non-Windows platforms use Unix Domain Sockets. | ||
// This requires connecting to the pipe file in different locations on Windows vs non-Windows. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically the name difference is just .NET Core being strange, rather than the use of domain sockets, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nah the location is different too. Named Pipes are in:
domain sockets are in:
Even the Named Pipes on Windows using .NET Standard instead are placed here:
|
||
return path.join(os.tmpdir(), `CoreFxPipe_${pipeName}`); | ||
} | ||
} | ||
|
||
|
@@ -46,6 +40,8 @@ export interface IEditorServicesSessionDetails { | |
channel: string; | ||
languageServicePort: number; | ||
debugServicePort: number; | ||
languageServicePipeName: string; | ||
debugServicePipeName: string; | ||
} | ||
|
||
export type IReadSessionFileCallback = (details: IEditorServicesSessionDetails) => void; | ||
|
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.
Thoughts on using ordinary strings where no interpolation is needed vs consistency? Not opinionated either way.
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.
for here, I just kept it consistent with the rest of the string concat