Describe the bug
Following panic occurs in LSP:
[Info - 7:45:32 AM] Full compilation complete - 339ms
thread 'tokio-runtime-worker' panicked at crates\dbt-tasks\src\utils.rs:626:24:
byte index 4152 is out of bounds of `-- funcsign: (string) -> string
{% macro resolve_model_name(input_model_name) %}
{{ return(adapter.dispatch('resolve_model_name', 'dbt')(input_model_name)) }}
{% endmacro %}
-- funcsign: (string) -> string
{%- macro default__resolve_model_name(input_m`[...]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
What version of dbt Fusion is this bug in? (find out by running dbt --version)
dbt Extension v0.21.4
LSP v2.0.0-preview.56
on Snowflake
Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.
To Reproduce
create a model:
-- model.sql
WITH cte AS (
SELECT
1 AS foo
)
SELECT * FROM cte
- Preview model with ctrl+enter or click "Preview CTE"
- edit model to:
-- model.sql
WITH cte AS (
SELECT
1 AS foo
, 2 AS bar
)
SELECT * FROM cte
- save model, observe panic
Expected behavior
LSP does not panic
Operating System and CPU Type (please complete the following information):
Windows x86