-
Notifications
You must be signed in to change notification settings - Fork 134
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
Create a RunningAzureFunctions class to handle multiple function tasks in one workspace #4320
Conversation
src/funcCoreTools/funcHostTask.ts
Outdated
|
||
const workspaceFolder = buildPathToWorkspaceFolderMap.get(debugSession.configuration.launchServiceData.buildPath) | ||
if (workspaceFolder === undefined) { | ||
throw Error() |
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.
nit: I wasn't sure if throwing here is correct.
Maybe a vscode.window.showWarningMessage('Unable to find workspaceFolder for debugConfiguration.buildPath");
+ however its localized
src/commands/pickFuncProcess.ts
Outdated
|
||
const funcTask = new vscode.Task({ type: `func ${buildPath}` }, | ||
workspaceFolder, | ||
hostStartTaskName, `func`, |
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.
nit: place on next line since its another argument
src/commands/startFunctionApp.ts
Outdated
const client: SiteClient = await node.site.createClient(context); | ||
await startFuncProcessFromApi(`${workspace.workspaceFolders![0].uri.path}/bin/Debug/net8.0`, [], {}); |
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.
remove?
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.
Yep, will do. Was from testing 😅
workspaceFolder = { | ||
uri: vscode.Uri.parse(buildPath), | ||
name: buildPath, | ||
index: -1 |
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'm also not sure if the consequences of using index: -1 if VS Code actually looks at this 😓
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.
Approving for now so as not to block. Ping if you need review again later
Previously, there was a limitation of only being able to run one task per workspace. This would make it impossible to run and manage multiple tasks in subfolders which was blocking a scenario for the C# Dev Kit team.
These changes make the workspace folder a key to the map, but we are storing it in an array. The array contains the cwd of the subpath for the project. This will allow us to run multiple projects in different folders simultaneously which should hopefully get us one step closer to monorepo support.