Skip to content

fix(lsp): return context error in case it failed#4787

Merged
benfdking merged 1 commit intomainfrom
improve_showing_error
Jun 23, 2025
Merged

fix(lsp): return context error in case it failed#4787
benfdking merged 1 commit intomainfrom
improve_showing_error

Conversation

@benfdking
Copy link
Copy Markdown
Contributor

  • adds the context state to the lsp
  • adds only partially working tests to extension where
    assertions need to be readded in the future

@benfdking benfdking requested review from Copilot and themisvaltinos and removed request for Copilot June 23, 2025 13:08
Comment thread sqlmesh/lsp/main.py
context: t.Optional[Context] = None


ContextState = Union[NoContext, ContextLoaded, ContextFailed]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im wondering whether this is the best approach since now since only ContextLoaded has the lsp_context we would need to have either type guards or assertions in quite a lot of places

@benfdking benfdking force-pushed the improve_showing_error branch from af92129 to 118b698 Compare June 23, 2025 14:46
- adds the context state to the lsp
- adds only partially working tests to extension where
  assertions need to be readded in the future
@benfdking benfdking force-pushed the improve_showing_error branch from 118b698 to 8932b6c Compare June 23, 2025 14:48
@benfdking benfdking merged commit 28127d4 into main Jun 23, 2025
25 checks passed
@benfdking benfdking deleted the improve_showing_error branch June 23, 2025 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants