Error message sanitizer is a house of cards about to fall down
- Linguagem predominante
- Haskell
- Estrelas
- 1.3k
- Forks
- 201
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
The error message sanitizer is currently a series of plain regular expression replacements that is run on all output at either compile or runtime. This is clearly wrong! Some obvious improvements would include:
1. Distinguishing between compile-time and runtime output, and applying only the appropriate sanitizations to each.
2. Distinguishing, at runtime, between error messages from base:Prelude.error (which have call stacks and such), and those that come from a user (which don't), and stop trying to sanitize the latter.
3. Separate different compiler diagnostics, and don't match sections of text that span multiple.
4. Write a real parser that is more powerful than regular expressions; for example, it can understand only to sanitize stack trace lines when in a stack trace, and things like that.
5. Get some code reuse, so that for instance the pattern for a possibly-qualified module name could be defined once and reused in several bigger patterns.
There have already been several bugs where unexpected compiler output accidentally matches some regular expressions in dumb ways and gets mangled.
Guia de contribuição
Direção de pesquisa
Comece localizando o sanitizador de mensagens de erro e rastreando onde ele processa a saída de compilação e de runtime. Compare as melhorias propostas de análise e reutilização com as substituições existentes por expressões regulares; o trabalho estará concluído quando os diagnósticos e os stack traces forem sanitizados nos contextos corretos sem que saídas não relacionadas sejam alteradas.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- haskell
- Domínio
- compilers
- Tipo de issue
- Refatoração
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Precisa de esclarecimento
- Facilidade para iniciantes
- 25/100