dataform-co / dataform

Dataform is a framework for managing SQL based data operations in BigQuery
https://cloud.google.com/dataform/docs
Apache License 2.0
853 stars 165 forks source link

VSCode ref jump feature does not work when dataform project is located under the subdirectory #1779

Open moker-spaghetti opened 4 months ago

moker-spaghetti commented 4 months ago

Expected Behavior

VSCode ref jump feature should work on dataform projects located under the subdirectories, if successfully compiled. (To compile, project location should be specified in the first element of the vscode config dataform.copmilerOptions, added in #1639)

Current Behavior

You can click ${ref(...)}, but it opens a file not existed since it ignores root dir of dataform project.

Possible Solution

Most simple solution would be adding a configuration or gettting the current project location on the ref click feature. It would be nice if we could support multiple dataform projects in subdirectories or multi-root workspace at the same time.

Environment

OS: Win11 dataformCoreVersion: 3.0.0 Dataform CLI version: 3.0.0 VSCode extension version: 0.0.14

ashish10alex commented 4 months ago

I have attempted to build subdirectory support in my own VSCode extension (see these lines) by searching for the first instance where I can find workflow_settings.yaml going backward from the current directory of the active editor. Although this solution works for go to definition & compilation etc. This will slow down things by a few milliseconds.

Ekrekr commented 3 months ago

I think this may have been fixed by https://github.com/dataform-co/dataform/pull/1769 - I'll ping @GJMcGowan to publish a new version when he's back