dataform icon indicating copy to clipboard operation
dataform copied to clipboard

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

Open moker-spaghetti opened this issue 1 year ago • 2 comments

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

moker-spaghetti avatar Jul 07 '24 02:07 moker-spaghetti

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.

ashish10alex avatar Jul 09 '24 16:07 ashish10alex

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

Ekrekr avatar Aug 16 '24 11:08 Ekrekr