Open aaronclong opened 3 months ago
There doesn't seem to any appetite by the maintainers for addressing these issues (totally fair).
For people struggling with this, I've noticed some over lap with Issue #18.
Likewise, there seems to be an alternative extension, vscode-dbt-power-user, that might better resolve these issues for the time being. However, it doesn't seem to be a true linter
Here are some discussions I found around the issue here:
https://github.com/AltimateAI/vscode-dbt-power-user/issues/3#issuecomment-747652228
https://github.com/AltimateAI/vscode-dbt-power-user/issues/3#issuecomment-747671447
Background
Hard coding executable paths into
settings.json
makes the config completely unportable. People will have different operating systems, and even different folder structures depending how things are installed.Defining a path variable would also be cumbersome.
It should be noted that different repos might even use different versions, further complicating this practice.
This all came from Issue 133.
Suggestion
It would be nice if the config could specify a
dependencyManager
and directory. The extension could load this.settings.json
Then the linter provider could spawn a child process and get exec from there.
With poetry, you can dynamically fetch the path from this
poetry run which sqlfluff
.In addition, this extension could talk to the Microsoft Python extension and get the virtual environment.
It is defiantly more complex. However, it allows for easy changes to the environment.
https://github.com/microsoft/vscode-python/blob/main/src/client/api.ts#L150C9-L150C21 https://stackoverflow.com/questions/50058517/how-to-communicate-between-vscode-extensions/50068416#50068416