lspitzner / lspitzner/brittany

Make output validity check compare pre- and post-transformation syntax trees

Open
#69 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Haskell
Stars
686
Forks
69
PR merge metrics
No merged PRs in 30d

Description

As demonstrated by #67, there still are cases where brittany fails without triggering the current failsafe, because the output while (syntactically) changed still is syntactically valid.

The comparison would need to ignore any location data present in the syntax trees and mostly compare just the structure (and things like identifiers). This might be a bit of a challenge due to how interwoven location information is. Trees-that-grow might make this much easier, but that's not out yet.

Contributor guide

No contributing guide indexed for this repository

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

Start by examining brittany's current output validity failsafe and the failure described in issue #67. Investigate how its syntax trees represent location data and whether trees-that-grow is relevant. Done means detecting structurally changed, syntactically valid output while ignoring source locations and comparing identifiers and other meaningful syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.