-
Notifications
You must be signed in to change notification settings - Fork 671
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
Reimplement debugger acquisition to use Package Manager #873
Conversation
1. Remove all code related to calling dotnet restore/dotnet publish 2. Remove coreclr-debug directory 3. Add debugger runtime packages to package manifest 4. Add an install.Begin file to the package manager so we can detect that it is in progress 5. Rework the debugger proxy so that it understands the package manager 6. Add knowledge of the dotnet cli on the path to the debugger proxy TODO: 1. Lots and lots of testing 2. Offline package creation
@gregg-miskelly @wesrupert @DustinCampbell I need to test this all over the place and offline package creation is still incoming. |
] | ||
}, | ||
{ | ||
"description": ".NET Core Debugger (OSX / x64)", |
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.
"macOS"? #Pending
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.
I was basing it off omnisharp: "description": "OmniSharp (.NET Core - OSX / x64)",
I'll change it in both places. #Closed
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.
fine be me. I was just working on my own local branch when I wrote "macOS". I don't much care. 😄
export function getBinPath() { | ||
return path.resolve(getExtensionPath(), "bin"); | ||
} | ||
|
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.
I'll be using this again in my next PR. #Pending
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.
I'll put it back. #Closed
return new Promise<void>((resolve, reject) => { | ||
fs.writeFile(getInstallFilePath(type), '', err => { | ||
if (err) { | ||
reject(err); |
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.
I'd return here so that it doesn't carry on to the resolve below. #Pending
|
||
import { CoreClrDebugUtil } from './util'; | ||
import * as fs from 'fs'; | ||
import * as path from 'path'; | ||
import * as fs_extra from 'fs-extra-promise'; |
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.
is this the last reference? Can we remove the dependency from package.json?
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.
not quite, looks like this is used in assets.ts and features/commands.ts
In reply to: 86635042 [](ancestors = 86635042)
return dotnetInfo; | ||
}); | ||
} | ||
|
||
public spawnChildProcess(process: string, args: string[], workingDirectory: string, onStdout?: (data: Buffer) => void, onStderr?: (data: Buffer) => void): Promise<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.
Does spawnChildProcess
in common.ts work for this? #Pending
moreErrors = error.hasMoreErrors ? 'true' : 'false'; | ||
}).then(() => { | ||
// log telemetry and delete install begin file | ||
logTelemetry('Acquisition', { |
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.
Should we move this into main.activate()
?
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.
There is still an open question surrounding how we want to handle telemetry now that we have moved to the package manager.
In reply to: 86636070 [](ancestors = 86636070)
}) | ||
.then(() => { | ||
installationStage = 'deleteBeginFile'; | ||
return util.deleteInstallFile(util.InstallFileType.Begin) |
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.
Should this be in the catch block (or using the temp file stuff) so that we delete the begin file no matter what? #Pending
// We have been activated but it looks like our package was not installed. This is bad. | ||
logger.appendLine("[ERROR]: C# Extension failed to install the debugger package"); | ||
showInstallErrorMessage(); | ||
} else if (!CoreClrDebugUtil.existsSync(_util.installCompleteFilePath())) { |
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.
Since we also have an install complete file for the package manager, I wonder if we should rename some part of this to make the distinction more clear (ex: debugUtil instead of util, or debuggerInstallCompleteFilePath...) #Pending
// This function checks for the presence of dotnet on the path and ensures the Version | ||
// is new enough for us. | ||
// Returns: a promise that returns a DotnetInfo class | ||
// Throws: An CotNetCliError() from the return promise if either dotnet does not exist or is too old. |
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.
CotNetCliError
is wrong #Pending
7c5b01f
to
0797b7e
Compare
0797b7e
to
2480214
Compare
@DustinCampbell I think this is ready to be merged. Can you take another look? |
] | ||
}, | ||
{ | ||
"description": ".NET Core Debugger (OSX / x64)", |
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.
fine be me. I was just working on my own local branch when I wrote "macOS". I don't much care. 😄
@@ -91,7 +91,7 @@ | |||
] | |||
}, | |||
{ | |||
"description": "OmniSharp (.NET Core - OSX / x64)", | |||
"description": "OmniSharp (.NET Core - macOS / x64)", |
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.
Thanks!
it is in progress
TODO: