trilogy-data / trilogy-data/pytrilogy

Better Parsing Errors

Open
#12 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue
Dominant language
Python
Stars
61
Forks
3
Avg merge
7h 18m
Merged PRs (30d)
43

Description

Problem Statement

Improve parsing errors beyond the current wrappers around lark.

This issue is vague, but let's take Rust errors as an inspiration.

https://imgur.com/0yA5LnD

Proposed Solution

Add better error messages.

  • General wrapper for syntax errors, hide underlying Lark Exception
  • Specific error handling for certain failures
    -- [ ] select 1; <- missing aliases should have a better error, etc

Alternatives Considered

Please briefly describe which alternatives, if any, have been considered, including merits of alternate approaches and
tradeoffs being made.

Additional Context

Please provide any other information that may be relevant.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the current parser and its wrappers around Lark exceptions, then review the proposed missing-alias case and the Rust error example. Done would require an agreed error design, general syntax-error handling, and specific messages for identified failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sql
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.