microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.54k stars 898 forks source link

ADS Not Parsing :error in SQLCMD t-sql script #20325

Open DigitalDuquette opened 2 years ago

DigitalDuquette commented 2 years ago

Steps to Reproduce:

  1. Use the following script the :error sqlcmd causes failure of script with error
    
    USE [edw]; 
    GO 
    :setvar ExecPath "/Users/jaredduquette/GitHub/PADNOS-data-warehouse/miscellany/sqlcmd/"
    :setvar Error "errors.txt"

:error "/Users/jaredduquette/GitHub/PADNOS-data-warehouse/miscellany/sqlcmd/tsql-script/errors.txt" !!:GO


3. Same script files used to test as in issue #20119 
4. ADS in Windows and macOS both stable and insiders gives error: 
<img width="412" alt="Screen Shot 2022-08-12 at 11 31 15 AM" src="https://user-images.githubusercontent.com/47231954/184388832-f7bca8f6-0049-4b89-bc4d-b78ffd5f32a7.png">

**Windows SSMS (working)**
![Screen Shot 2022-08-12 at 11 24 49 AM](https://user-images.githubusercontent.com/47231954/184388957-1fa9a6a6-0c38-43ea-a759-fd5ab70a46e5.png)

**Windows ADS (not working)**
![Screen Shot 2022-08-12 at 11 25 57 AM](https://user-images.githubusercontent.com/47231954/184388980-70df1f49-b498-4ec3-80f7-2068e38752b1.png)

**macOS ADS (not working)**
<img width="1060" alt="Screen Shot 2022-08-12 at 11 24 35 AM" src="https://user-images.githubusercontent.com/47231954/184389006-6817555c-bbf2-4493-acb0-83422b1ae272.png">

<!-- 🔧 Launch with `azuredatastudio --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No
Yes. 

<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
alanrenmsft commented 2 years ago

I looked into the code and looks like the error command is explicitly marked as not supported in ADS. I have to dig more into the commit history/pr descriptions to find out why.

alanrenmsft commented 1 year ago

Didn't find anything useful in the commit history, it is not mentioned why the :error is not implemented. I'll put it in backlog and let our PM @erinstellato-ms to decide the priority of this task.