Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor transpile error for LSP #1382

Open
wants to merge 13 commits into
base: feature/multiplexer/transpile-using-lsp
Choose a base branch
from

Conversation

ericvergnaud
Copy link
Contributor

@ericvergnaud ericvergnaud commented Dec 19, 2024

Our current implementation of transpile errors relies on error types i.e. ParseError and ValidationError.
This will not work with LSP because LSP cannot convey such class hierarchy, rather it conveys flat structures named Diagnostics.
This PR aligns our implementation with LSP Diagnostics by:

  • dropping ParseError and ValidationError in favor of their base class TranspileError
  • adding a mandatory error code
  • adding a mandatory error kind (with 4 kinds instead of 2)
  • adding a mandatory error severity
  • adding an optional code range to which the error applies

This is in preparation of #1301

…ultiplexer/display-lsp-diagnositics-in-console

* feature/multiplexer/transpile-using-lsp:
  formatting
  fix failing tests
  formatting

# Conflicts:
#	src/databricks/labs/remorph/transpiler/execute.py
@ericvergnaud ericvergnaud requested a review from a team as a code owner December 19, 2024 18:28
@ericvergnaud ericvergnaud changed the base branch from main to feature/multiplexer/transpile-using-lsp December 19, 2024 18:28
Copy link

github-actions bot commented Dec 19, 2024

Coverage tests results

506 tests  ±0   468 ✅ ±0   5s ⏱️ ±0s
  7 suites ±0    38 💤 ±0 
  7 files   ±0     0 ❌ ±0 

Results for commit 6564429. ± Comparison against base commit 934328f.

♻️ This comment has been updated with latest results.

@ericvergnaud ericvergnaud changed the title Feature/multiplexer/refactor transpile error Refactor transpile error for LSP Dec 19, 2024
…ultiplexer/refactor-transpile-error

* feature/multiplexer/transpile-using-lsp:
  Create launcher from cli (#1315)
  fix issue where unit tests would create files not ignored by git (#1381)
…anspile

* main:
  Simplify transpiler api (#1361)

# Conflicts:
#	src/databricks/labs/remorph/config.py
#	src/databricks/labs/remorph/transpiler/execute.py
#	src/databricks/labs/remorph/transpiler/lsp/lsp_engine.py
#	src/databricks/labs/remorph/transpiler/sqlglot/sqlglot_engine.py
#	src/databricks/labs/remorph/transpiler/transpile_engine.py
…to feature/multiplexer/refactor-transpile-error

* feature/multiplexer/perform-checks-within-transpile:
  fix merge issues
  Simplify transpiler api (#1361)
…ultiplexer/refactor-transpile-error

* feature/multiplexer/transpile-using-lsp:
  Perform checks during transpile (#1364)

# Conflicts:
#	src/databricks/labs/remorph/transpiler/execute.py
#	src/databricks/labs/remorph/transpiler/sqlglot/sqlglot_engine.py
…ultiplexer/refactor-transpile-error

* feature/multiplexer/transpile-using-lsp:
  formatting

# Conflicts:
#	src/databricks/labs/remorph/transpiler/execute.py
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.

1 participant