feat(vscode): print env into terminal#4789
Merged
Conversation
96ee5e4 to
9bc8351
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces functionality to print the SQLMesh environment variables into a VS Code terminal, enhancing debugging and operational transparency.
- Introduces a new function (getSqlmeshEnvironment) that consolidates environment variable configuration.
- Refactors several execution-related functions to use the unified environment from getSqlmeshEnvironment.
- Registers and implements a new printEnvironment command and updates package.json accordingly.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vscode/extension/src/utilities/sqlmesh/sqlmesh.ts | Adds getSqlmeshEnvironment and replaces duplicated env merging logic. |
| vscode/extension/src/lsp/lsp.ts | Removes temporary env workaround to use unified environment configuration. |
| vscode/extension/src/extension.ts | Registers the new printEnvironment command. |
| vscode/extension/src/commands/printEnvironment.ts | Implements a new command to create a terminal displaying environment vars. |
| vscode/extension/package.json | Adds the command entry for printing environment variables. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
themisvaltinos
approved these changes
Jun 23, 2025
| const env = envResult.value | ||
|
|
||
| // Create a new terminal with the SQLMesh environment | ||
| const terminal = vscode.window.createTerminal({ |
Collaborator
There was a problem hiding this comment.
maybe possible future improvement instead of always creating a new terminal to see if one exists already
Contributor
Author
There was a problem hiding this comment.
My hesitation is that the whole point of this is to show what the lsp runs in. If you reuse, you don't quite get that.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.