ashish10alex / vscode-dataform-tools

Dataform tools - a vscode extension
https://marketplace.visualstudio.com/items?itemName=ashishalex.dataform-lsp-vscode
MIT License
20 stars 4 forks source link

Support for dataform core >3.0 - dataform.json deprecated #32

Closed pvoo closed 1 week ago

pvoo commented 1 month ago

Description:

I am encountering an issue with the VSCode Dataform Tools extension when working on a Dataform project. we are on version >3 where dataform.json is deprecated

Environment:

Setup:

Problem: When attempting to use the VSCode Dataform Tools extension, the following error occurs:

Error compiling Dataform: Dataform encountered an error: c:\Users\PaulvanOorschot\Ubuntu\repos\dataform does not appear to be a dataform directory (missing dataform.json file).
Error: ~\dataform does not appear to be a dataform directory (missing dataform.json file).

This suggests that the extension is expecting a dataform.json file that is no longer required or used in dataform >3

Request: Can i configure the VSCode Dataform Tools extension to work with the new workflow_settings.yaml format, or do you expect to provide support for this version in the future?

Steps to Reproduce:

  1. Set up a Dataform project using workflow_settings.yaml (without dataform.json).
  2. Install Dataform Core 3.0.2 and Dataform CLI 3.0.4.
  3. Open the project in VSCode.
  4. Attempt to use the VSCode Dataform Tools extension.
  5. Observe the error indicating the missing dataform.json file.

Thanks!

ashish10alex commented 1 month ago

Hi @pvoo , Thanks for creating the detailed issue. the extension supports both major versions (2.x, 3.x) of Dataform. It is very likely that you do not have dataform cli version 3 or higher installed in global scope npm i -g @dataform/cli@3.0.4. Can you please put a screenshot of dataform --version when you have the folder open in VSCode workspace ?


If installing cli in global scope does not work can you please try to reproduce the same issue with with this sample repo and do the following

  1. dataform --version
  2. dataform compile
  3. Screenshot of output when you open the project in vsocde and save the document

I expect you to get the following output

CleanShot 2024-10-11 at 15 58 36@2x

pvoo commented 1 week ago

Thanks @ashish10alex , after a resetup of my local environment and packages it works. I suspect it might have been related to my use of WSL2, for other users with this issue, please double check your vscode is correctly connected to the WSL2 remote environment.

pvoo commented 1 week ago

closed