Unable to use problemMatcher with GNU make and relative folder

オープン
#7,031 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
c, vscode

調査の方向性

説明されているプロジェクトレイアウト、Makefile、tasks.json、および相対パスをビルドフォルダーから使用する $gcc problemMatcher で問題を再現してください。まず、タスクの出力が ../ のソースパスをどのように解決するかを追跡します。コンパイルエラーをクリックして正しいソースファイルが開けば完了です。issue では実装ファイルもテストも特定されていません。

索引モデルが issue の本文から書いたものです。

説明

bug investigate: repro Language Service tasks/build/debug

Type: LanguageService

Describe the bug

  • OS and Version: Linux Opensuse Tumbleweed
  • VS Code Version: 1.53.2
  • C/C++ Extension Version:1.2.2
  • Other extensions you installed (and if the issue persists after disabling them):N/A
  • Does this issue involve using SSH remote to run the extension on a remote machine?:No

In my project, i have :

PROJECT/
    Makefile
    folder1/source.c
    folder2/source.c
    ...
    build/

The Makefile process the compilation steps (ie mainly gcc calls) and stores the results in the build subfolder.

I configured a tasks.json :

    {
      "label": "Relase x64",
      "type": "shell",
      "command": "make -f Makefile config=release_linux64",
      "options": {
        "cwd": "${workspaceFolder}"
      },
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "presentation": {
        "reveal": "always"
      },
      "problemMatcher": [ {
          "base": "$gcc",
          "fileLocation": ["relative", "${workspaceFolder}/build/"]
        }
      ]
    },

The compilation task is working properly, but it cannot parse/open the files in case of errors :
image

Please note that i tried with custom patterns, etc, etc : always the same result, the file is never properly parsed.

Steps to reproduce

1 - Setup a project kile the one above.
2 - Create a makefile with compilation in a subfolder
3 - When source files have reltive path with ../ it does not work

Expected behavior
When clicking in a file with a compilation error, it should jump to it.

主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/vscode-cpptools のほかの issue

microsoft/vscode-cpptools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。