feat(vscode): diagnostic for bad config.yaml error#4945
Merged
Conversation
11ec037 to
8d996de
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for reporting and filtering diagnostics when a malformed config.yaml is present in a workspace, ensures the YAML parser is available in tests, and includes a new end-to-end test to cover the invalid-config scenario.
- Add
yamldependency and importexecAsyncin tests - Filter LSP diagnostics so only the relevant URI shows the config error
- Track and attach
config.yamlpath toConfigErrorfor accurate error location
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| vscode/extension/tests/broken_project.spec.ts | New test suite for bad config.yaml handling and error display |
| vscode/extension/package.json | Added "yaml": "^2.8.0" dependency for YAML parsing in tests |
| sqlmesh/lsp/main.py | Filter configuration diagnostics by matching the URI value |
| sqlmesh/core/config/loader.py | Record yaml_config_path and pass it as location in ConfigError |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)
vscode/extension/tests/broken_project.spec.ts:316
- The test asserts the error text appears but doesn't verify that the diagnostic is scoped to
config.yaml. Consider adding an assertion on the Problems view entry to confirm the file path or URI, ensuring the diagnostic filtering works as intended.
.isVisible({ timeout: 1_000 })
8d996de to
55f6387
Compare
- return error - filter diagnostics so it doesn't show in wrong place
55f6387 to
b89646a
Compare
themisvaltinos
approved these changes
Jul 9, 2025
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.
Uh oh!
There was an error while loading. Please reload this page.