Error message sanitizer is a house of cards about to fall down
- 主要語言
- Haskell
- 星號
- 1.3k
- 分支
- 201
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
研究方向
先定位錯誤訊息清理器,並追蹤它處理編譯時與執行時輸出的位置。將提議的解析與重用改進和現有的正規表示式替換進行比較;完成的標準應是:診斷資訊與堆疊追蹤在正確的情境中經過清理,同時不會篡改無關的輸出。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- haskell
- 領域
- compilers
- Issue 類型
- 重構
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100