Create a RunningAzureFunctions class to handle multiple function tasks in one workspace#4320
Merged
Create a RunningAzureFunctions class to handle multiple function tasks in one workspace#4320
Conversation
WardenGnaw
reviewed
Nov 8, 2024
|
|
||
| const workspaceFolder = buildPathToWorkspaceFolderMap.get(debugSession.configuration.launchServiceData.buildPath) | ||
| if (workspaceFolder === undefined) { | ||
| throw Error() |
Member
There was a problem hiding this comment.
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
WardenGnaw
approved these changes
Nov 8, 2024
|
|
||
| const funcTask = new vscode.Task({ type: `func ${buildPath}` }, | ||
| workspaceFolder, | ||
| hostStartTaskName, `func`, |
Member
There was a problem hiding this comment.
nit: place on next line since its another argument
|
|
||
|
|
||
| const client: SiteClient = await node.site.createClient(context); | ||
| await startFuncProcessFromApi(`${workspace.workspaceFolders![0].uri.path}/bin/Debug/net8.0`, [], {}); |
Member
Author
There was a problem hiding this comment.
Yep, will do. Was from testing 😅
| workspaceFolder = { | ||
| uri: vscode.Uri.parse(buildPath), | ||
| name: buildPath, | ||
| index: -1 |
Member
There was a problem hiding this comment.
I'm also not sure if the consequences of using index: -1 if VS Code actually looks at this 😓
MicroFish91
previously approved these changes
Nov 8, 2024
MicroFish91
approved these changes
Nov 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back 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.