forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
947 stars 405 forks source link

The "force data soql query" command has been deprecated #4766

Closed randi274 closed 7 months ago

randi274 commented 1 year ago

Summary

The CLI has deprecated the command sfdx force:data:soql:query and displays a warning: "The force data soql query command has been deprecated. Use "data query" instead."

Steps To Reproduce:

  1. Use the command SFDX: Execute SOQL Query
  2. Just under where the query is executed, the warning message will appear.

Expected result

No warning appears.

Actual result

We upgrade to use "data query" as well. Also ensure backwards compatibility remains for older versions of the CLI.

Additional information

Salesforce Extension Version in VS Code: v57.7.0

SFDX CLI Version: seen on version 7.185.0

OS and version: Windows

git2gus[bot] commented 1 year ago

This issue has been linked to a new work item: W-12784730

kaustubhdapurkar commented 1 year ago

Hi @randi274 , is this issue being actively worked upon by anyone in the team? If not, I would like to try to fix this bug.

kaustubhdapurkar commented 1 year ago

Hi @randi274 , I made a few changes to some files to add this new command (just replaced some lines of code in the existing command builder files to understand how this is working). When I build and run the command with the changes, I get this error

image

I have the latest sf version installed and I also tried running the same command manually from the terminal and it works. Could you please help me with this issue?

image

One interesting thing that I observed is if I run org open command, since I have changed the command to use from sfdx to sf, it runs the sf command and successfully opens the org in my browser. Does this mean I am making a mistake in the forceDataSoqlQuery.ts file which builds the command?

image

Following are my changes (please ignore typos/best practices/implementation design, just some rough code to get started) -

image

image

image

image

image

randi274 commented 1 year ago

Hey @kaustubhdapurkar - we have not had a chance to look at this one, and we always welcome contributions! We haven't switched over any of our commands yet to use sf instead of sfdx, so I'm expecting this is actually a larger issue that we'll need to address (and also we'll need to ensure backwards compatibility while we can). If you're able to put up a draft branch for review, I'd be happy to take a look and see what issues you might be running into 👍

daphne-sfdc commented 7 months ago

Closing this issue as it was fixed in https://github.com/forcedotcom/salesforcedx-vscode/pull/5072.