-
Notifications
You must be signed in to change notification settings - Fork 344
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
fix feature break from October VSCode insider #87
Conversation
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
src/configurationProvider.ts
Outdated
import TelemetryReporter from "vscode-extension-telemetry"; | ||
import * as commands from "./commands"; | ||
|
||
export class JavaConfigurationProvider implements vscode.DebugConfigurationProvider { |
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.
JavaDebugConfigurationProvider
} | ||
|
||
// Try to add all missing attributes to the debug configuration being launched. | ||
public resolveDebugConfiguration(folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): |
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.
This method is not marked async yet call async meethods
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.
This is VSCode API built-in methods. No need to change it to async. because the result vscode.ProviderResult<vscode.DebugConfiguration>
could be T
or Thenable<T>
.
Besides, changing the method declaration to async will ask us to modify the return value to Promise<T>
, too.
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.
That's the point. If you mark as async, then the caller will know how to deal with it. If you don't provide the same behavior as method signature, the behavior will be undefined in some cases.
src/configurationProvider.ts
Outdated
// Try to add all missing attributes to the debug configuration being launched. | ||
public resolveDebugConfiguration(folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, token?: vscode.CancellationToken): | ||
vscode.ProviderResult<vscode.DebugConfiguration> { | ||
return this.guessAndValidateDebugConfiguration(folder, config); |
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.
Normally in this sitation, we will call method heuristic....
VSCode will drop these debug config items in the following October milestone: |
config.classPaths = await resolveClasspath(config.mainClass, config.projectName); | ||
} | ||
if (!config.classPaths || !Array.isArray(config.classPaths) || !config.classPaths.length) { | ||
vscode.window.showErrorMessage("Cannot resolve the classpaths automatically, please specify the value in the launch.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.
log error?
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
…ow exception for Object Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang jinbwan@microsoft.com
#82