geldata / geldata/gel-cli

Better handling of error spans from schema objects

Open
#1,606 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
175
Forks
32
PR merge metrics
No merged PRs in 30d

Description

```
warning: QueryError
┌─ <895e407e-2614-11f0-8abe-7f96c9e30a51 expr>:2:45

2 │ __scope_0_defaultcurrentUser := (GLOBAL default::currentUser)
│ ╭─────────────────────────────────────────────^
3 │ │ SELECT __scope_0_defaultcurrentUser {
│ ╰─────────────────────────────^ possibly more than one element returned by an expression in a FILTER clause
```

Here, `<895e407e-2614-11f0-8abe-7f96c9e30a51 expr>` is indicating that the source of the error span is from the `expr` field of the schema object with id `895e407e-2614-11f0-8abe-7f96c9e30a51`, and *not* from the base query itself.

We should avoid highlighting in the query itself in that case, and *maybe* could eventually consider querying the schema to get source?

Oh, or maybe we should extend the protocol to know how to collect those sources and bundle them?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.