Skip to content

Commit 0ac4744

Browse files
authored
Merge pull request #1950 from Microsoft/master
Merge master -> release
2 parents 88a0494 + 7ea6122 commit 0ac4744

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2377
-886
lines changed

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@ script:
3131
# Build and then run tests
3232
- cd Extension
3333
- npm install
34-
- npm run tslint
3534
- npm run compile
35+
- npm run tslint
36+
# pr-check needs to run before test. test modifies package.json.
37+
- npm run pr-check
3638
- npm run test
37-
38-
after_failure:
39-
- find ~ -name "integrationTests.log" -type f -exec cat {} \;
40-
41-
after_success:
39+
# Dump integrationTest.log output
4240
- find ~ -name "integrationTests.log" -type f -exec cat {} \;
4341

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Contribution Steps
44

5-
* [Build and debug the extension](Documentation/Getting%20started.md#build-and-debug-the-cpptools-extension).
5+
* [Build and debug the extension](Documentation/Building%20the%20Extension.md).
66
* File an [issue](https://github.com/Microsoft/vscode-cpptools/issues) and a [pull request](https://github.com/Microsoft/vscode-cpptools/pulls) with the change and we will review it.
77
* If the change affects functionality, add a line describing the change to [**CHANGELOG.md**](Extension/CHANGELOG.md).
88
* Try and add a test in [**test/extension.test.ts**](Extension/test/unitTests/extension.test.ts).

Documentation/LanguageServer/MinGW.md

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,51 @@
11
For developers using MinGW on Windows, we recommend you start with the following **c_cpp_properties.json** template. Select "C/Cpp: Edit Configurations" from the command palette to create this file if you haven't already.
22

3-
Note that you may have to change the MinGW version number to match what you have installed. Eg. `C:/MinGW/lib/gcc/mingw32/5.3.0/` instead of `C:/MinGW/lib/gcc/mingw32/6.3.0/`.
3+
## With extension version 0.16.1 and higher:
4+
5+
Starting with version 0.16.1, if you set the `compilerPath` property and change `intelliSenseMode` to `clang-x64`, you no longer need to copy the system include path or defines to `includePath` and `defines` to enable IntelliSense to work properly. However, `browse.path` still needs to be updated manually to add the system include paths to enable code browsing for system headers. For example:
46

57
```json
68
{
79
"configurations": [
810
{
9-
"name": "Win32",
11+
"name": "MinGW",
12+
"intelliSenseMode": "clang-x64",
13+
"compilerPath": "C:/MinGW/bin/gcc.exe",
14+
"includePath": [
15+
"${workspaceFolder}"
16+
],
17+
"defines": [
18+
"_DEBUG"
19+
],
20+
"browse": {
21+
"path": [
22+
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
23+
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
24+
"C:/MinGW/include/*",
25+
"${workspaceFolder}"
26+
],
27+
"limitSymbolsToIncludedHeaders": true,
28+
"databaseFilename": ""
29+
},
30+
"cStandard": "c11",
31+
"cppStandard": "c++17"
32+
}
33+
],
34+
"version": 3
35+
}
36+
```
37+
38+
Note that the `browse.path` setting is not automatically updated at this time and you may have to change the MinGW version number to match what you have installed. If you are using a different MinGW distribution, the values for `compilerPath` and `browse.path` will likely be different than what is written here.
39+
40+
## With extension version 0.16.0 and earlier:
41+
42+
In earlier versions of the extension, the `includePath` and a some system defines need to be set in order for IntelliSense to work properly. Note that you may have to change the MinGW version number to match what you have installed. Eg. `C:/MinGW/lib/gcc/mingw32/5.3.0/` instead of `C:/MinGW/lib/gcc/mingw32/6.3.0/`.
43+
44+
```json
45+
{
46+
"configurations": [
47+
{
48+
"name": "MinGW",
1049
"intelliSenseMode": "clang-x64",
1150
"includePath": [
1251
"${workspaceRoot}",
@@ -19,15 +58,15 @@ Note that you may have to change the MinGW version number to match what you have
1958
],
2059
"defines": [
2160
"_DEBUG",
22-
"UNICODE",
2361
"__GNUC__=6",
2462
"__cdecl=__attribute__((__cdecl__))"
2563
],
2664
"browse": {
2765
"path": [
2866
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
2967
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
30-
"C:/MinGW/include/*"
68+
"C:/MinGW/include/*",
69+
"${workspaceRoot}"
3170
],
3271
"limitSymbolsToIncludedHeaders": true,
3372
"databaseFilename": ""
@@ -37,15 +76,15 @@ Note that you may have to change the MinGW version number to match what you have
3776
}
3877
```
3978

40-
The `includePath` above includes the system header paths that gcc uses in version 6.3.0 for C++ projects and matches the output of `gcc -v -E -x c++ -`. The `intelliSenseMode` should be set to **"clang-x64"** to get MinGW projects to work properly with IntelliSense. The `__GNUC__=#` define should match the major version of the toolchain in your installation (6 in this example).
79+
The `includePath` above includes the system header paths that gcc uses in version 6.3.0 for C++ projects and matches the output of `"gcc -v -E -x c++ nul"`. The `intelliSenseMode` should be set to **"clang-x64"** to get MinGW projects to work properly with IntelliSense. The `__GNUC__=#` define should match the major version of the toolchain in your installation (6 in this example).
4180

4281
For C projects, simply remove the C++ lines:
4382

4483
```json
4584
{
4685
"configurations": [
4786
{
48-
"name": "Win32",
87+
"name": "MinGW",
4988
"intelliSenseMode": "clang-x64",
5089
"includePath": [
5190
"${workspaceRoot}",
@@ -55,15 +94,15 @@ For C projects, simply remove the C++ lines:
5594
],
5695
"defines": [
5796
"_DEBUG",
58-
"UNICODE",
5997
"__GNUC__=6",
6098
"__cdecl=__attribute__((__cdecl__))"
6199
],
62100
"browse": {
63101
"path": [
64102
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
65103
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
66-
"C:/MinGW/include/*"
104+
"C:/MinGW/include/*",
105+
"${workspaceRoot}"
67106
],
68107
"limitSymbolsToIncludedHeaders": true,
69108
"databaseFilename": ""
@@ -72,5 +111,3 @@ For C projects, simply remove the C++ lines:
72111
]
73112
}
74113
```
75-
76-
With these configurations, you should be all set up to use the new IntelliSense engine for linting, memberlist autocomplete, and quick info (tooltips). Add `"C_Cpp.intelliSenseEngine": "Default"` to your **settings.json** file to try out the new IntelliSense engine.

Documentation/LanguageServer/c_cpp_properties.json.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
This list of paths will be used by the Tag Parser to search for headers included by your source files. The Tag Parser will automatically search all subfolders in these paths unless the path ends with a `/*` or `\*`. For example, `/usr/include` directs the Tag Parser to search the `include` folder and its subfolders for headers while `/usr/include/*` directs the Tag Parser not to look in any subfolders of `/usr/include`.
7979

8080
* #### `limitSymbolsToIncludedHeaders`
81-
When true, the Tag Parser will only parse code files that have been directly or indirectly included by a source file in `${workspaceRoot}`. When false, the Tag Parser will parse all code files found in the paths specified in the **path** list.
81+
When true, the Tag Parser will only parse code files that have been directly or indirectly included by a source file in `${workspaceFolder}`. When false, the Tag Parser will parse all code files found in the paths specified in the **path** list.
8282

8383
* #### `databaseFilename`
84-
When set, this instructs the extension to save the Tag Parser's symbol database somewhere other than the workspace's default storage location. If a relative path is specified, it will be made relative to the workspace's default storage location, not the workspace folder itself. The `${workspaceRoot}` variable can be used to specify a path relative to the workspace folder (e.g. `$[workspaceRoot}/.vscode/browse.vc.db`)
84+
When set, this instructs the extension to save the Tag Parser's symbol database somewhere other than the workspace's default storage location. If a relative path is specified, it will be made relative to the workspace's default storage location, not the workspace folder itself. The `${workspaceFolder}` variable can be used to specify a path relative to the workspace folder (e.g. `${workspaceFolder}/.vscode/browse.vc.db`)

Extension/.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"outFiles": [
1616
"${workspaceFolder}/out/**/*.js"
1717
],
18-
"preLaunchTask": "npm"
18+
"preLaunchTask": "compile",
1919
},
2020
{
2121
"name": "Launch Tests",
@@ -31,7 +31,7 @@
3131
"outFiles": [
3232
"${workspaceFolder}/out/test/**/*.js"
3333
],
34-
"preLaunchTask": "npm"
34+
"preLaunchTask": "compile"
3535
},
3636
{
3737
"name": "Node Attach",

Extension/.vscode/tasks.json

Lines changed: 58 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,60 @@
1-
// Available variables which can be used inside of strings.
2-
// ${workspaceRoot}: the root folder of the team
3-
// ${file}: the current opened file
4-
// ${fileBasename}: the current opened file's basename
5-
// ${fileDirname}: the current opened file's dirname
6-
// ${fileExtname}: the current opened file's extension
7-
// ${cwd}: the current working directory of the spawned process
8-
9-
// A task runner that calls a custom npm script that compiles the extension.
101
{
11-
"version": "0.1.0",
12-
13-
// we want to run npm
14-
"command": "npm",
15-
16-
// the command is a shell script
17-
"isShellCommand": true,
18-
19-
// show the output window only if unrecognized errors occur.
20-
"showOutput": "silent",
21-
22-
// we run the custom script "compile" as defined in package.json
23-
"args": ["run", "compile", "--loglevel", "silent"],
24-
25-
// The tsc compiler is started in watching mode
26-
"isWatching": true,
27-
28-
// use the standard tsc in watch mode problem matcher to find compile problems in the output.
29-
"problemMatcher": "$tsc-watch"
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "TypeScript Compile",
8+
"identifier": "compile",
9+
"group": {
10+
"kind": "build",
11+
"isDefault": true
12+
},
13+
"isBackground": true,
14+
"type": "shell",
15+
"presentation": {
16+
"echo": true,
17+
"reveal": "silent",
18+
"focus": false,
19+
"panel": "shared"
20+
},
21+
"command": "npm",
22+
"args": [
23+
"run",
24+
"compile",
25+
"--loglevel",
26+
"silent"
27+
],
28+
"problemMatcher": "$tsc-watch"
29+
},
30+
{
31+
"label": "TypeScript Lint",
32+
"identifier": "tslint",
33+
"group": "build",
34+
"isBackground": false,
35+
"type": "shell",
36+
"command": "npm",
37+
"args": [
38+
"run",
39+
"tslint"
40+
],
41+
"problemMatcher": {
42+
"fileLocation": "absolute",
43+
"source": "tslint",
44+
"pattern": [
45+
{
46+
"regexp": "(ERROR:) ([a-zA-Z/:\\-\\.]*)\\[(\\d+), (\\d+)\\]: (.*)",
47+
"severity": 1,
48+
"file": 2,
49+
"line": 3,
50+
"column": 4,
51+
"message": 5
52+
}
53+
]
54+
},
55+
"dependsOn": [
56+
"compile"
57+
]
58+
}
59+
]
3060
}

Extension/.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ CMakeLists.txt
1111
debugAdapters/install.lock*
1212
out/src/Debugger/copyScript.js
1313
tools/**
14+
out/tools/**
1415
notices/**

Extension/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# C/C++ for Visual Studio Code Change Log
22

3+
## Version 0.17.0: May 7, 2018
4+
* Auto-complete for headers after typing `#include`. [#802](https://github.com/Microsoft/vscode-cpptools/issues/802)
5+
* Add support for recursive `includePath`, e.g. `${workspaceFolder}/**`. [#897](https://github.com/Microsoft/vscode-cpptools/issues/897)
6+
* Configuration improvements. [#1338](https://github.com/Microsoft/vscode-cpptools/issues/1338)
7+
* Potentially addresses: [#368](https://github.com/Microsoft/vscode-cpptools/issues/368), [#410](https://github.com/Microsoft/vscode-cpptools/issues/410), [#1229](https://github.com/Microsoft/vscode-cpptools/issues/1229), [#1270](https://github.com/Microsoft/vscode-cpptools/issues/1270), [#1404](https://github.com/Microsoft/vscode-cpptools/issues/1404)
8+
* Add support for querying system includes/defines from WSL and Cygwin compilers. [#1845](https://github.com/Microsoft/vscode-cpptools/issues/1845), [#1736](https://github.com/Microsoft/vscode-cpptools/issues/1736)
9+
* Fix IntelliSense for WSL projects in Windows builds 17110 and greater. [#1694](https://github.com/Microsoft/vscode-cpptools/issues/1694)
10+
* Add snippets. [PR #1823](https://github.com/Microsoft/vscode-cpptools/pull/1823)
11+
* Add support for vcpkg. [PR #1886](https://github.com/Microsoft/vscode-cpptools/pull/1886)
12+
* Stop automatically adding `/usr/include` to the `includePath`. [#1819](https://github.com/Microsoft/vscode-cpptools/issues/1819)
13+
* Fix wrong configuration being used if there are four or more. [#1599](https://github.com/Microsoft/vscode-cpptools/issues/1599)
14+
* Fix `c_cpp_properties.json` requiring write access. [#1790](https://github.com/Microsoft/vscode-cpptools/issues/1790)
15+
* Change file not found in `compile_commands.json` message from an error to a warning. [#1783](https://github.com/Microsoft/vscode-cpptools/issues/1783)
16+
* Fix an IntelliSense crash during completion requests. [#1782](https://github.com/Microsoft/vscode-cpptools/issues/1782)
17+
* Update the installed clang-format to 6.0.
18+
* Fix bug with `compile_commands.json` when "arguments" have both a switch and a value in the arg. [#1890](https://github.com/Microsoft/vscode-cpptools/issues/1890)
19+
* Fix bug with garbage data appearing in tooltips on Linux/Mac. [#1577](https://github.com/Microsoft/vscode-cpptools/issues/1577)
20+
321
## Version 0.16.1: March 30, 2018
422
* Fix random deadlock caused by logging code on Linux/Mac. [#1759](https://github.com/Microsoft/vscode-cpptools/issues/1759)
523
* Fix compiler from `compileCommands` not being queried for includes/defines if `compilerPath` isn't set on Windows. [#1754](https://github.com/Microsoft/vscode-cpptools/issues/1754)

0 commit comments

Comments
 (0)