-
Notifications
You must be signed in to change notification settings - Fork 937
VsCode Tasks PR3: Leveraging vscode tasks and github copilot integration into SQL database projects #26303
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
Conversation
…lude tasks.json from sqlproj
extensions/sql-database-projects/src/controllers/projectController.ts
Outdated
Show resolved
Hide resolved
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.
Pull Request Overview
This PR integrates VS Code tasks into SQL Database Projects by adding a “Build With Code Analysis” command, enabling default task configuration during project creation, and refining file path utilities.
- Added a new
sqlDatabaseProjects.buildWithCodeAnalysis
command and wired it throughMainController
to run as a VS Code task - Introduced a
configureDefaultBuild
flag in project creation APIs and atasksTemplate.json
template for setting the build task as default - Refactored path‐quoting utilities in
utils.ts
and updated related tests to align with the new build‐argument format
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/tools/buildHelper.ts | Dropped explicit build <path> prefix and appended verbose flag via constants.detailedVerbose |
src/test/buildHelper.test.ts | Updated tests to match the new constructBuildArguments format |
resources/templates/tasksTemplate.json | Added placeholder @@ConfigureDefaultBuild@@ for default task |
src/controllers/projectController.ts | Added createVsCodeTask method and configureDefaultBuild support |
src/common/utils.ts | Split quoted vs non‐quoted path helpers (getNonQuotedPath ) |
src/common/constants.ts | Introduced new constants for task type, problem matcher, and CLI flags |
Comments suppressed due to low confidence (1)
extensions/sql-database-projects/src/test/buildHelper.test.ts:21
- The test now only checks the prefix of the flags and no longer verifies that the project path is correctly included and quoted. Consider adding back an assertion for the full argument string to ensure path quoting remains correct.
should(resultArg).startWith('/p:NetCoreBuild=true /p:NETCoreTargetsPath="dummy\\dll path" /p:SystemDacpacsLocation="dummy\\dll path"');
extensions/sql-database-projects/src/controllers/projectController.ts
Outdated
Show resolved
Hide resolved
…g after netcore verifiaction fails
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.
Pull Request Overview
This pull request enhances SQL Database Project build configurations by adding a new “Build With Code Analysis” command, supports default build task configuration during project creation, and improves file path handling utilities.
- Introduces new task templates and commands in package.json and constants
- Updates project creation workflows to include a configureDefaultBuild option
- Refactors methods in controllers and tools to integrate VS Code tasks for build and code analysis
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
netcoreTool.ts | Refactored .NET Core installation verification into a dedicated method |
buildHelper.ts | Modified build argument construction to include detailed verbose output |
templates.test.ts, buildHelper.test.ts, projectController.test.ts, publishDatabaseDialog.test.ts | Updated tests to cover new default build task and adjusted expected values |
projectProvider.ts, projectController.ts, createProjectFromDatabaseQuickpick.ts | Added and propagated the configureDefaultBuild parameter throughout project creation and build workflows |
mainController.ts | Registered the new buildWithCodeAnalysis command |
utils.ts | Updated file path utility functions to return non-quoted values |
constants.ts, tasksTemplate.json, package.json, package.nls.json | Added new constants, task definitions, and localized strings to support build configuration changes |
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.
Pull Request Overview
This pull request integrates VS Code task support for SQL project builds, enhances build configurations including a new “Build With Code Analysis” command, and improves file path utility functions. Key changes include:
- Refactoring build and project creation workflows to incorporate a configurable default build task.
- Adding a new tasksTemplate.json and updating command registrations and test cases.
- Updating utility functions and constants to support the new VS Code task-based build approach.
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
extensions/sql-database-projects/src/tools/netcoreTool.ts | Refactored .NET Core installation checks using verifyNetCoreInstallation. |
extensions/sql-database-projects/src/tools/buildHelper.ts | Updated build argument strings to align with the new VS Code tasks mechanism. |
extensions/sql-database-projects/src/test/templates.test.ts | Updated expected template count to reflect the new tasks.json template addition. |
extensions/sql-database-projects/src/test/projectController.test.ts | Added tests to verify creation of a default build tasks file when configureDefaultBuild is true. |
extensions/sql-database-projects/src/test/dialogs/publishDatabaseDialog.test.ts | Updated project creation tests to include the new configuration flag. |
extensions/sql-database-projects/src/test/buildHelper.test.ts | Adjusted build argument tests to the revised command string format. |
extensions/sql-database-projects/src/templates/templates.ts | Included the tasks.json template in the list of project templates. |
extensions/sql-database-projects/src/projectProvider/projectProvider.ts | Propagated the new configureDefaultBuild parameter to project creation. |
extensions/sql-database-projects/src/dialogs/createProjectFromDatabaseQuickpick.ts | Added a quick pick prompt to configure default build configuration during project creation. |
extensions/sql-database-projects/src/controllers/projectController.ts | Major update: integrates tasks file creation, VS Code task creation for build & code analysis, and flag usage. |
extensions/sql-database-projects/src/controllers/mainController.ts | Registered the new buildWithCodeAnalysis command alongside the standard build command. |
extensions/sql-database-projects/src/common/utils.ts | Revised file path quoting functions and introduced non-quoted variants. |
extensions/sql-database-projects/src/common/constants.ts | Introduced new constants for task definitions, problem matcher, and build-related parameters. |
extensions/sql-database-projects/resources/templates/tasksTemplate.json | New tasks template file to define the default build task with configurable default flag. |
extensions/sql-database-projects/package.json and package.nls.json | Registered new commands, updated menus, and added task definitions and problem matcher for SQL projects. |
This pull request introduces changes to enhance SQL project build configurations, add support for code analysis during builds, and improve the handling of file paths. The key updates include adding a new "Build With Code Analysis" command, modifying project creation workflows to allow configuration of default build tasks, and refactoring file path handling utilities.
Enhancements to SQL Project Build Configurations:
sqlDatabaseProjects.buildWithCodeAnalysis
for building SQL projects with code analysis, including updates topackage.json
for command registration, context menus, and task definitions. [1] [2] [3]tasksTemplate.json
file to define default build tasks with an optionalConfigureDefaultBuild
property.Updates to Project Creation Workflow:
createProject
method inIWorkspaceService
andWorkspaceService
to include aconfigureDefaultBuild
parameter for setting default build configurations. [1] [2]NewProjectDialog
andNewProjectQuickpick
workflows to prompt users about configuring the default build task. [1] [2] [3]Improvements to File Path Handling:
Localization and Constants:
confirmCreateProjectWithBuildTaskDialogName
andbuildWithCodeAnalysisTaskName
.Miscellaneous:
sqlproj-problem-matcher
for better error and warning tracking during builds.This pull request introduces several enhancements and new features for SQL project management, including support for configuring default build tasks, adding a "Build With Code Analysis" command, and improving file path handling. The changes span across constants, interfaces, dialogs, services, and package configurations, ensuring a more robust and user-friendly experience.Enhancements to SQL Project Build Configuration:
configureDefaultBuild
parameter to thecreateProject
method inIWorkspaceService
and its implementations, allowing users to set a default build task during project creation (interfaces.ts
,workspaceService.ts
). [1] [2]newProjectQuickpick.ts
to prompt users for configuring SQL project builds as default, enhancing interactivity during project creation.tasksTemplate.json
file to define a default build task with a problem matcher for SQL projects.New "Build With Code Analysis" Feature:
buildWithCodeAnalysis
command to thepackage.json
file, enabling users to build SQL projects with code analysis. [1] [2]mainController.ts
to register thebuildWithCodeAnalysis
command and pass a flag to the build method for this functionality.Improvements in File Path Handling:
utils.ts
to provide non-quoted path handling for better compatibility with command-line arguments.Updates to Constants:
Package Configuration Enhancements:
package.json
to support SQL project builds and code analysis. This PR introduces task-based integration for SQL Database Projects in Azure Data Studio, enabling users to run build and Build with code analysis, publish(yet to run through the tasks) operations through VS Code tasks. These tasks now stream output directly to the terminal, improving visibility, consistency, and developer experience.Below are the two parts(watch one after the other to understand the process) of complete testing video that involves, build, build with code analysis, dotnet build and dotnet publish, using tasks to run the build and build and code analysis and github copilot problem matcher usage.

