You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the MS SQL Server extension in Visual Studio Code, there is a problem with error reporting in Goose migration scripts. Specifically, the extension incorrectly highlights errors when the migration scripts contain multiple stored procedure definitions. The Goose migration scripts use special directives like -- +goose StatementBegin and -- +goose StatementEnd to handle multiple SQL statements, but the extension does not recognize these directives, leading to false error reports.
Steps to Reproduce:
Install the SQLTools Microsoft SQL Server/Azure extension in VS Code.
Create a Goose migration script with the following content:
-- +goose Down
-- +goose StatementBegin
CREATE PROCEDURE [dbo].[FirstProcedure]
AS
BEGIN
-- Sample procedure logic
END
-- +goose StatementEnd
-- +goose StatementBegin
CREATE PROCEDURE [dbo].[SecondProcedure]
AS
BEGIN
-- Sample procedure logic
END
-- +goose StatementEnd
Open the script in VS Code and observe the error reporting and syntax highlighting.
Expected Result: The extension should recognize the -- +goose directives as valid comments and not report errors for having multiple stored procedure definitions in the same file. The syntax highlighting should be accurate and not show errors for valid SQL code.
Actual Result: The extension reports errors due to the presence of multiple stored procedure definitions, even though the Goose directives (-- +goose StatementBegin, -- +goose StatementEnd) are meant to handle such cases. As a result, there are false error highlights throughout the script, which makes it difficult to edit the migration files.
Workaround: Using GO as a batch separator between stored procedure definitions helps reduce the false errors, but this workaround is not ideal as GO is not officially supported by Goose.
Suggested Solution: Add support for recognizing Goose migration directives (-- +goose StatementBegin, -- +goose StatementEnd, etc.) as valid comments in SQL scripts to avoid false error reporting.
Extension version: 0.4.3
VS Code version: Code 1.94.0 (Universal) (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Darwin x64 23.6.0
Modes:
System Info
Item
Value
CPUs
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
Type: Bug
When using the MS SQL Server extension in Visual Studio Code, there is a problem with error reporting in Goose migration scripts. Specifically, the extension incorrectly highlights errors when the migration scripts contain multiple stored procedure definitions. The Goose migration scripts use special directives like -- +goose StatementBegin and -- +goose StatementEnd to handle multiple SQL statements, but the extension does not recognize these directives, leading to false error reports.
Steps to Reproduce:
Install the SQLTools Microsoft SQL Server/Azure extension in VS Code.
Create a Goose migration script with the following content:
-- +goose Down
-- +goose StatementBegin
CREATE PROCEDURE [dbo].[FirstProcedure]
AS
BEGIN
-- Sample procedure logic
END
-- +goose StatementEnd
-- +goose StatementBegin
CREATE PROCEDURE [dbo].[SecondProcedure]
AS
BEGIN
-- Sample procedure logic
END
-- +goose StatementEnd
Open the script in VS Code and observe the error reporting and syntax highlighting.
Expected Result: The extension should recognize the -- +goose directives as valid comments and not report errors for having multiple stored procedure definitions in the same file. The syntax highlighting should be accurate and not show errors for valid SQL code.
Actual Result: The extension reports errors due to the presence of multiple stored procedure definitions, even though the Goose directives (-- +goose StatementBegin, -- +goose StatementEnd) are meant to handle such cases. As a result, there are false error highlights throughout the script, which makes it difficult to edit the migration files.
Workaround: Using GO as a batch separator between stored procedure definitions helps reduce the false errors, but this workaround is not ideal as GO is not officially supported by Goose.
Suggested Solution: Add support for recognizing Goose migration directives (-- +goose StatementBegin, -- +goose StatementEnd, etc.) as valid comments in SQL scripts to avoid false error reporting.
Extension version: 0.4.3
VS Code version: Code 1.94.0 (Universal) (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z)
OS version: Darwin x64 23.6.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: