Explore tree-sitter based structured editing

Aberta
#25 3 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
20/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
go
Domínio
devtools

Direção de pesquisa

Start by reading the existing tree-sitter parsing and dependency graph code, then inspect how Stacklit builds and exposes stacklit.json. The issue proposes several possible editing approaches and leaves key design questions open, with no files or tests identified. Done means defining a concrete scope and deciding how node edits and cross-file updates should work.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

enhancement feature help wanted

From discussion #19 by @yunfan.

Stacklit already parses codebases with tree-sitter and builds dependency graphs. The next logical step is using those same parsed trees for structured code editing, locating a node by its tree-sitter path and replacing it with generated code.

What this could look like:

  • Target a specific function/type/export by its tree-sitter path
  • Replace or patch that node while preserving surrounding code
  • Use stacklit's dependency graph to find cross-file call sites that need updating

Open questions:

  • Tree-sitter gives syntax, not semantics. Cross-file renames need the dependency layer too.
  • How to handle edits that change the tree structure (adding params, changing return types)
  • Could work as a separate companion tool that reads stacklit.json for the graph

No timeline. Scoping for now.

Linguagem predominante
Go
Estrelas
114
Forks
9
Merge médio
19h 38min
PRs com merge (30d)
30

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de glincker/stacklit

Todas as issues de glincker/stacklit

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.