Display richer error message
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 43/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- rust, vim
調査の方向性
Start by locating rust.vim's makeprg and errorformat configuration, then check how its diagnostics are parsed. The report suggests using Cargo's human message format for richer multiline details, but leaves open whether to change the command format or parser. Done means location list entries show the useful diagnostic context from the example; test against the provided Cargo errors.
索引モデルが issue の本文から書いたものです。
説明
Tested with vim 8.2 and nvim 0.5.0-dev on fedora 30, with the current master of rust.vim (9e6836f44528312171b21a78d9228c88615f63ae) and the current master branch of syntastic (b3e2d8470fddc7f2b598f09023ebc5045a3fb1fd)
Steps to reproduce:
Type some rust code and wait for the error to be displayed in the location list (or open it manually with :lopen)
Currently the location list windows looks like this:
lib/dice_system.rs|34 col 5 error| struct is not supported in `trait`s or `impl`s
lib/dice_system.rs|41 col 5 error| associated type in `impl` without body
lib/dice_system.rs|41 col 23 error| bounds on `type`s in `impl`s have no effect
lib/dice_system.rs|53 col 5 error| associated function in `impl` without body
lib/dice_system.rs|54 col 5 error| associated function in `impl` without body
This is the same output that if you do manually (in command mode):
set makeprg=cargo\ check\ --message-format=short
make
copen
If I do change it to
set makeprg=cargo\ check\ --message-format=human
I get much nicer details
|| Checking pyrite v0.1.0 (/home/rmoussu/perso/brolisteam/pyrite)
lib/dice_system.rs|34 col 5 error| struct is not supported in `trait`s or `impl`s
|| |
|| 34 | struct DiceInformation {
|| | ^^^^^^^^^^^^^^^^^^^^^^
lib/dice_system.rs|41 col 5 error| associated type in `impl` without body
|| |
|| 41 | type DiceDisplay: Display;
|| | ^^^^^^^^^^^^^^^^^^^^^^^^^-
|| | |
|| | help: provide a definition for the type: `= <type>;`
lib/dice_system.rs|41 col 23 error| bounds on `type`s in `impl`s have no effect
|| |
|| 41 | type DiceDisplay: Display;
|| | ^^^^^^^
I didn't found a way to specify the --message-format used by rust.vim It is possible? I am willing to do a PR, but I don't know where to look. I can also modify the errorformat used by rust.vim to correctly parse the multiline error but I don't know either where to look.
Using rust.vim + syntastic is much nicer that calling :make by hand since you have instant feedback, and it also works even if you have autochdir set.
I assume it's not possible to add colors (I don't think it's possible to display ANSI colors in vim – I have no idea if it's possible for neovim). If it was possible, then ideally --message-format=json-diagnostic-rendered-ansi should be used.
- 主要言語
- Vim Script
- スター
- 4.2k
- フォーク
- 323
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rust-lang/rust.vim のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
-
It's Dead, Jim!オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
-
Remove hard coded edition fallback対応中かも @alerque が 230 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 55/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
rust-lang/rust.vim の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
cqframework/vscode-cql#198 ·
-
bug documentation good first issue help wanted testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Show evidence time and supersede warnings in the memory inspector対応中かも @Sinchanak-212 が今日担当しました。 オープンarea: ux good first issue priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
rohit746/pdf-view.nvim#109 ·
メンテナーはふだん 1 日以内に返信