Debugger accept array of sourcefiles (rather than string) (#2236)

Summary:
Release Notes: Landed Nuclide change to pass sourcefiles as array instead of string. Updating receiving behavior here to match.
Pull Request resolved: https://github.com/facebook/prepack/pull/2236

Differential Revision: D8837329

Pulled By: caiismyname

fbshipit-source-id: 85fea894b5293746249f6feb5bbaa9e476736fc0
This commit is contained in:
David Cai 2018-07-13 10:24:05 -07:00 committed by Facebook Github Bot
parent ba9b2281fd
commit 912384679b
3 changed files with 3 additions and 4 deletions

View File

@ -114,10 +114,9 @@ class PrepackDebugSession extends DebugSession {
let adapterChannel = new AdapterChannel(inFilePath, outFilePath);
this._adapterChannel = adapterChannel;
this._registerMessageCallbacks();
let separatedSourceFiles = args.sourceFile.trim().split(/\s+/g); // Split on all whitespace
let launchArgs: PrepackLaunchArguments = {
kind: "launch",
sourceFiles: separatedSourceFiles,
sourceFiles: args.sourceFiles,
prepackRuntime: args.prepackRuntime,
prepackArguments: args.prepackArguments,
debugInFilePath: inFilePath,

View File

@ -162,7 +162,7 @@ export type EvaluateResult = {
export type LaunchRequestArguments = {
...DebugProtocol.LaunchRequestArguments,
noDebug?: boolean,
sourceFile: string,
sourceFiles: Array<string>,
prepackRuntime: string,
prepackArguments: Array<string>,
};

View File

@ -157,7 +157,7 @@ export class UISession {
_processInitializeResponse(response: DebugProtocol.InitializeResponse) {
let launchArgs: LaunchRequestArguments = {
prepackRuntime: this._prepackRuntime,
sourceFile: this._sourceFiles.join(" "),
sourceFiles: this._sourceFiles,
prepackArguments: this._prepackArguments,
};
this._sendLaunchRequest(launchArgs);