microsoft / microsoft/vscode-makefile-tools
Find source files referenced via wildcards in the makefile so that IntelliSense works for them too
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 242
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
Bug type: Language Service
Describe the bug
- OS and Version: Windows Server 2012 R2 standard
- VS Code Version: 1.55.2
- C/C++ Extension Version: 1.3.1
- Other extensions you installed (and if the issue persists after disabling them): Make File Tools 0.2.0
- If using SSH remote, specify OS of remote machine: N/A
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
I have only one very small c project loaded into VScode. It worked well at the beginning.
But from some time on, it could not go to the 'Reference' or 'Definition' or 'Declaration' of any method.
Then later, some more serious problem happened: I found in the 'Problem' view that any opened c code was reported there showing error message "command-line error: language modes specified are incompatible"
BTW, the 'Build' runs well successfully. That means the c codes have no problem.
Steps to reproduce
- Click on one c program and open it in the Editor.
- Go to the 'Problem' view, you will see that it shows error "command-line error: language modes specified are incompatible" which directs you to the first line of the code.
Expected behavior
I would like to be able to go to a method referencing places, definition and declaration places. Also there should not be such errors "command-line error: language modes specified are incompatible".
Code sample and logs
-
Configurations in
c_cpp_properties.json
There is no such file. -
content in 'settings.json'
{
"C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools"
}
- content in 'configurationCache.log'
{"buildTargets":["all","bin/GenerateLicense.exe","bin/inv_check.exe","bin/license_decode.exe","clean","copylibs","setup"],"launchTargets":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\bin>GenerateLicense.exe()","\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\bin>inv_check.exe()","\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\bin>license_decode.exe()"],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include","\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src"],"compilerArgs":["-g","-Wall","-c","-o obj/xml_routines.o"],"compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","standard":"c11"},"fileIndex":[["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\base_64.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\base_64.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/base_64.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/base_64.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\base_license.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\base_license.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/base_license.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/base_license.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\fileops.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\fileops.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/fileops.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/fileops.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\GenerateLicense.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\GenerateLicense.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/GenerateLicense.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/GenerateLicense.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\generation.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\generation.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/generation.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/generation.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\inv_check.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\inv_check.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/inv_check.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/inv_check.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\ldklib.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\ldklib.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/ldklib.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/ldklib.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\license_decode.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\license_decode.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/license_decode.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/license_decode.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\license_gen.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\license_gen.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/license_gen.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/license_gen.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\license_routines.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\license_routines.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/license_routines.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/license_routines.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\lic_gen_parms.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\lic_gen_parms.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/lic_gen_parms.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/lic_gen_parms.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\modify_license.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\modify_license.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/modify_license.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/modify_license.o"]}}],["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\xml_routines.c",{"uri":{"$mid":1,"fsPath":"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src\\xml_routines.c","_sep":1,"path":"/c/Users/jamie/vscode-projects/zdt-ldk-generator/src/xml_routines.c","scheme":"file"},"configuration":{"defines":[],"standard":"c11","includePath":["\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include"],"forcedInclude":[],"intelliSenseMode":"gcc-x64","compilerPath":"C:\\msys64\\mingw32\\bin\\gcc.exe","compilerArgs":["-g","-Wall","-c","-o obj/xml_routines.o"]}}]]}}
- Logs from running
C/C++: Log Diagnosticsfrom the VS Code command palette
-------- Diagnostics - 4/23/2021, 1:58:20 PM
Version: 1.3.1
Current Configuration:
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\\msys64\\mingw32\\bin\\gcc.exe",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "windows-gcc-x86",
"compilerArgs": [],
"intelliSenseModeIsExplicit": true,
"cStandardIsExplicit": true,
"cppStandardIsExplicit": true,
"compilerPathIsExplicit": true,
"configurationProvider": "ms-vscode.makefile-tools",
"browse": {
"path": [
"${workspaceFolder}/**"
],
"limitSymbolsToIncludedHeaders": true
}
}
Custom browse configuration:
{
"browsePath": [
"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\include",
"\\c\\Users\\jamie\\vscode-projects\\zdt-ldk-generator\\src"
],
"compilerArgs": [
"-g",
"-Wall",
"-c",
"-o obj/xml_routines.o"
],
"compilerPath": "C:\\msys64\\mingw32\\bin\\gcc.exe",
"standard": "c11"
}
Translation Unit Mappings:
[ C:\Users\jamie\vscode-projects\zdt-ldk-generator\src\generation.c ]:
C:\USERS\JAMIE\VSCODE-PROJECTS\ZDT-LDK-GENERATOR\SRC\GENERATION.C
Translation Unit Configurations:
[ C:\Users\jamie\vscode-projects\zdt-ldk-generator\src\generation.c ]:
Process ID: 692
Memory Usage: 7 MB
Compiler Path: C:\msys64\mingw32\bin\gcc.exe
Includes:
C:\MSYS64\MINGW32\LIB\GCC\I686-W64-MINGW32\10.2.0\INCLUDE
C:\MSYS64\MINGW32\INCLUDE
C:\MSYS64\MINGW32\LIB\GCC\I686-W64-MINGW32\10.2.0\INCLUDE-FIXED
C:\MSYS64\MINGW32\I686-W64-MINGW32\INCLUDE
Standard Version: c++17
IntelliSense Mode: windows-gcc-x86
Other Flags:
--gcc
--gnu_version=100200
Total Memory Usage: 7 MB
------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 3218
- Logs from the language server logging
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the reported Makefile project and inspect configurationCache.log, c_cpp_properties.json, and the C/C++ Log Diagnostics output. Trace how Makefile Tools discovers source files referenced by wildcard patterns and verify that those files receive usable IntelliSense configurations without the incompatible language-mode error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100