microsoft / microsoft/vscode-cpptools
Unable to use problemMatcher with GNU make and relative folder
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
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 :

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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il problema con la struttura del progetto descritta, il Makefile, tasks.json e il problemMatcher $gcc usando percorsi relativi dalla cartella di build. Inizia tracciando il modo in cui l'output dell'attività risolve i percorsi dei sorgenti ../; il lavoro è completato quando facendo clic su un errore di compilazione si apre il file sorgente corretto. Nell'issue non sono identificati file di implementazione né test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, vscode
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100