Compare commits

..
Author SHA1 Message Date
Sean McManus ca5da8db30 Merge pull request #14677 from microsoft/seanmcm/cherryPick98055e0aa86fde5e50995b33fcddeca0d23e54fb
Fix configuration path regex escaping (#14674)
2026-08-13 12:42:40 -07:00
Sean McManus 70a4a89f0b Fix configuration path regex escaping (#14674) 2026-08-13 19:17:36 +00:00
Sean McManus 3fa4cf2ddb Merge pull request #14673 from microsoft/seanmcm/1_33_8_release
Merge for 1.33.8 release
2026-08-12 15:51:57 -07:00
Sean McManus 995752b9e5 Merge branch 'main' into seanmcm/1_33_8_release 2026-08-12 22:18:03 +00:00
3d0c45ff96 Merge for 1.32.2 (release) (#14416)
* Bump picomatch from 2.3.1 to 2.3.2 in /ExtensionPack (#14318)

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump picomatch from 2.3.1 to 2.3.2 in /.github/actions (#14319)

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>

* Bump picomatch from 2.3.1 to 2.3.2 in /Themes (#14323)

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update picomatch. (#14324)

* Update brace-expansion v5. (#14325)

* Bump serialize-javascript from 7.0.4 to 7.0.5 in /.github/actions (#14332)

Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-version: 7.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update brace-expansion and serialize-javascript. (#14328)

* minimize the calls to lm.selectChatModels (#14327)

* Update brace-expansion for other folders (#14333)

* Update brace-expansion for other folders.

* Update changelog for 1.31.4. (#14338)

* Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /Extension (#14340)

Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.11...0.8.12)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.8.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update TPN. (#14343)

* Update npmrc. (#14346)

* Prefer GPT-5-mini for Copilot Hover (#14349)

* Update lodash. (#14350)

* Fix npx @vscode/vsce. (#14354)

* Fix npx @vscode/vsce.

* Fix cg.yml. (#14355)

* UCRTVersion is not required for a developer environment (#14358)

* Update instructions for installing MSVC (#14361)

* Bump axios from 1.13.6 to 1.15.0 in /.github/actions (#14365)

Bumps [axios](https://github.com/axios/axios) from 1.13.6 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.6...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add setting doxygen.generateOnCodeAction. (#14342)

* Run without debugging (#14351)

* Switch to GPT-4o. (#14364)

* Fallback to GPT-5.4-mini and cache the model used. (#14369)

* Fallback to GPT-5.4-mini and cache the model used.

* Add a script to copy language server and debugger binaries to the Extension folder (#14370)

* Add internal silent find-all-references command (#14281)

* Add internal silent find-all-references command

Introduce an internal C_Cpp.FindAllReferences command that issues the existing cpptools/findAllReferences request without joining the workspaceReferences single-flight cancellation path.

Extract the shared request and confirmed-location mapping logic from FindAllReferencesProvider so the existing vscode.executeReferenceProvider flow and the new silent command use the same request translation and cancellation handling for server-side cancel responses.

Keep the interactive provider behavior unchanged: user-invoked references still cancel prior work, reset reference progress state, and update the ReferencesManager UI. The new command resolves the owning client from the target URI and returns locations without progress UI, preview notifications, or references panel updates, enabling concurrent silent callers such as Copilot.

* Add internal quiet definition and call hierarchy commands

Align cpptools with the companion changes that now prefer internal
C_Cpp.* navigation commands over the generic vscode.* provider commands
when running extension-driven symbol queries.

Add C_Cpp.GoToDefinition, C_Cpp.PrepareCallHierarchy,
C_Cpp.CallHierarchyCallsTo, and C_Cpp.CallHierarchyCallsFrom as
internal commands that resolve the owning DefaultClient from the target
URI and send requests directly to cpptools without joining the
workspaceReferences UI and single-flight cancellation path.

Extract shared call hierarchy request and conversion logic from
CallHierarchyProvider so the existing interactive provider flow and the
new silent commands share the same request translation and
server-cancellation handling.

Add a dedicated go-to-definition helper that sends the standard
definition request through the language client and normalizes both
Location and DefinitionLink responses to Location[] so companion callers
can consume a stable result shape.

Keep interactive behavior unchanged: user-invoked providers continue to
use the existing VS Code registrations, progress handling, and
workspaceReferences-driven cancellation semantics, while extension
callers such as the devtools companion can use the new internal command
surface without canceling overlapping work.

* Update changelog for 1.32.0. (#14373)

* Update changelog for 1.32.0.

* Bump follow-redirects from 1.15.11 to 1.16.0 in /.github/actions (#14376)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Set context flag for when C++ language server is activated (#14382)

The primary purpose of this is for this flag to be consumed by the C++ devtools extensions. This way the C++ specific Copilot tools will only appear in tools list and register when the C++ language server is actually activated.

* Update loc for walkthrough.windows.text2. (#14383)

* Fix and lock the loc terms. (#14387)

* Fix and lock the loc terms.

* Fix Reinstalling the Extension.md not being included. (#14390)

* Update changelog for 1.32.1 (#14395)

* Update changelog for 1.32.1.

* Bump uuid from 8.3.2 to 14.0.0 in /.github/actions (#14402)

Bumps [uuid](https://github.com/uuidjs/uuid) from 8.3.2 to 14.0.0.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v8.3.2...v14.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 14.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @xmldom/xmldom from 0.8.12 to 0.8.13 in /Extension (#14403)

Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.12 to 0.8.13.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.12...0.8.13)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.8.13
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>

* clang-analyazer (#14411)

* Adding additional parse checking logic (#14407)

Adding additional parse checking logic to determine if idle state has no pending calls and finished workspace parsing, file parsing, and intellisense updates.

* Update changelog and version for 1.32.2. (#14415)

* Fix diff with ending EOL in package.json.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Luca <[email protected]>
Co-authored-by: Ben McMorran <[email protected]>
Co-authored-by: Bob Brown <[email protected]>
Co-authored-by: Carson Radtke <[email protected]>
Co-authored-by: David Raygoza <[email protected]>
Co-authored-by: Sergio Ramirez II <[email protected]>
2026-04-28 13:50:57 -07:00
Sean McManus 734df7ec71 Fix diff with ending EOL in package.json. 2026-04-28 12:19:29 -07:00
Sean McManus fc37c7091f Merge branch 'main' into seanmcm/1_32_2_release 2026-04-28 12:15:41 -07:00
f6cc1fbd03 Cherry-picks and changelog update for 1.31.5 release (#14393)
* Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /Extension (#14340)

Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.11...0.8.12)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.8.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Set context flag for when C++ language server is activated (#14382)

The primary purpose of this is for this flag to be consumed by the C++ devtools extensions. This way the C++ specific Copilot tools will only appear in tools list and register when the C++ language server is actually activated.

* Update lodash. (#14350)

* Bump picomatch from 2.3.1 to 2.3.2 in /ExtensionPack (#14318)

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump picomatch from 2.3.1 to 2.3.2 in /.github/actions (#14319)

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>

* Bump picomatch from 2.3.1 to 2.3.2 in /Themes (#14323)

Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update picomatch. (#14324)

* Update brace-expansion v5. (#14325)

* Update brace-expansion and serialize-javascript. (#14328)

* Bump serialize-javascript from 7.0.4 to 7.0.5 in /.github/actions (#14332)

Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-version: 7.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update brace-expansion for other folders (#14333)

* Update brace-expansion for other folders.

* Fix Reinstalling the Extension.md not being included. (#14390)

* Update for 1.31.5.

* Fix typo in changelog.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Raygoza <[email protected]>
2026-04-17 13:54:52 -07:00
Sean McManus e0bd199546 Fix typo in changelog. 2026-04-17 13:50:32 -07:00
Sean McManus bc914dc69c Update for 1.31.5. 2026-04-17 13:42:38 -07:00
Sean McManus b2f5c605c4 Fix Reinstalling the Extension.md not being included. (#14390) 2026-04-17 13:33:21 -07:00
Sean McManus d41e14fd86 Update brace-expansion for other folders (#14333)
* Update brace-expansion for other folders.
2026-04-17 13:32:51 -07:00
dependabot[bot] 35c0fd37e2 Bump serialize-javascript from 7.0.4 to 7.0.5 in /.github/actions (#14332)
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: serialize-javascript
  dependency-version: 7.0.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 13:32:27 -07:00
Sean McManus 99259bf194 Update brace-expansion and serialize-javascript. (#14328) 2026-04-17 13:32:04 -07:00
Sean McManus 10c1e1b606 Update brace-expansion v5. (#14325) 2026-04-17 13:31:37 -07:00
Sean McManus fcdb6efbab Update picomatch. (#14324) 2026-04-17 13:31:06 -07:00
dependabot[bot] bd5f6c0462 Bump picomatch from 2.3.1 to 2.3.2 in /Themes (#14323)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 13:30:35 -07:00
dependabot[bot]andSean McManus 9c45e4d2bc Bump picomatch from 2.3.1 to 2.3.2 in /.github/actions (#14319)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean McManus <[email protected]>
2026-04-17 13:30:17 -07:00
dependabot[bot] 31f6b66e6b Bump picomatch from 2.3.1 to 2.3.2 in /ExtensionPack (#14318)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 13:29:57 -07:00
Sean McManus 4404bf76a7 Update lodash. (#14350) 2026-04-17 13:27:28 -07:00
David Raygoza 133896eb4c Set context flag for when C++ language server is activated (#14382)
The primary purpose of this is for this flag to be consumed by the C++ devtools extensions. This way the C++ specific Copilot tools will only appear in tools list and register when the C++ language server is actually activated.
2026-04-17 13:26:21 -07:00
dependabot[bot] 376562ee75 Bump @xmldom/xmldom from 0.8.11 to 0.8.12 in /Extension (#14340)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.8.11...0.8.12)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-version: 0.8.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-17 13:25:03 -07:00
Sean McManusanddependabot[bot] 668b33c1e5 Cherry pick to resolve security warning (#14388)
* Bump axios from 1.13.6 to 1.15.0 in /.github/actions (#14365)

Bumps [axios](https://github.com/axios/axios) from 1.13.6 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.6...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump follow-redirects from 1.15.11 to 1.16.0 in /.github/actions (#14376)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 15:40:35 -07:00
dependabot[bot] 6317e27e45 Bump follow-redirects from 1.15.11 to 1.16.0 in /.github/actions (#14376)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.11 to 1.16.0.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.11...v1.16.0)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-version: 1.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 15:33:53 -07:00
dependabot[bot] 223a3e2cbe Bump axios from 1.13.6 to 1.15.0 in /.github/actions (#14365)
Bumps [axios](https://github.com/axios/axios) from 1.13.6 to 1.15.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.6...v1.15.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.15.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-16 15:33:10 -07:00
Sean McManus 5b000d939b Merge pull request #14339 from microsoft/seanmcm/1_31_4_release
Update changelog for 1.31.4. (#14338)
2026-03-31 15:19:40 -07:00
Sean McManus b6b11027da Update changelog for 1.31.4. (#14338) 2026-03-31 15:18:17 -07:00
Sean McManus e22017f6df Merge pull request #14315 from microsoft/seanmcm/1_31_3_release2
Merge for 1.31.3 (again)
2026-03-23 12:06:23 -07:00
Sean McManus a2f6a72aed Merge branch 'main' into seanmcm/1_31_3_release2 2026-03-23 12:04:48 -07:00
Sean McManus 593ed07c56 Merge pull request #14300 from microsoft/seanmcm/1_31_1_release2
Merge for 1.31.3 (2nd time)
2026-03-19 11:16:39 -07:00
Sean McManus 40f7455acd Merge branch 'main' into seanmcm/1_31_1_release2 2026-03-19 11:03:43 -07:00
Sean McManus adf4681ef8 Merge pull request #14291 from microsoft/seanmcm/1_31_3_release
Merge for 1.31.3
2026-03-17 14:13:30 -07:00
Sean McManus a53dac8bef Merge branch 'main' into seanmcm/1_31_3_release 2026-03-17 13:40:46 -07:00
Sean McManus 04c60c288a Merge branch 'main' into seanmcm/1_31_3_release 2026-03-17 13:06:35 -07:00
Sean McManus fa71378712 Merge pull request #14252 from microsoft/seanmcm/updateRelease_1_31_1
Update release with 1.31.1 (to enable a release build for compliance checks)
2026-03-10 16:02:43 -07:00
Sean McManus 36a78e89e1 Merge branch 'main' into seanmcm/updateRelease_1_31_1 2026-03-10 14:13:04 -07:00
Sean McManus 364ba2789c Change the version to 1.30.5 to block publishing via skip-duplicate 2026-03-09 12:30:41 -07:00
Sean McManus 8d5fc737b1 Merge branch 'main' into seanmcm/updateRelease_1_31_1 2026-03-09 12:09:12 -07:00
Sean McManus 1172405856 Merge pull request #14238 from microsoft/seanmcm/cherryPicka5d00e31230bdad1d171d1fd1421ac97fa77b275
Switch vsix packing to use Nuget.config (#14209)
2026-03-04 16:55:47 -08:00
Sean McManus b013b10b64 Switch vsix packing to use Nuget.config (#14209)
* Add a NuGet.config file
2026-03-04 15:38:01 -08:00
Sean McManus c6ff700da2 Update changelog for 1.30.5 (#14171) (#14172)
* Update changelog for 1.30.5.
2026-02-06 15:13:39 -08:00
Sean McManus 936e7e3b15 Update changelog for 1.30.5 (#14171)
* Update changelog for 1.30.5.
2026-02-06 15:11:58 -08:00
Sean McManus e7e2e3983f Merge pull request #14166 from microsoft/main
Update changelog and version for 1.30.4. (#14165)
2026-02-03 11:28:43 -08:00
Sean McManus 80a6d16f83 Merge pull request #14153 from microsoft/seanmcm/1_30_3_release
Merge for 1.30.3 (release)
2026-01-29 17:55:46 -08:00
Sean McManus e5a976f229 Merge branch 'main' into seanmcm/1_30_3_release 2026-01-29 17:34:25 -08:00
Sean McManus 70fbfd71e1 Merge pull request #14095 from microsoft/seanmcm/1_29_3_release
Cherry-picks for 1.29.3
2025-12-08 16:12:24 -08:00
Sean McManus 5b3b56c694 Update changelog for 1.29.3. (#14093)
* Update changelog for 1.29.3.
2025-12-08 15:22:01 -08:00
Bob Brown 777ff002f1 Don't require NETFXSDKDir for msvc environment test (#14088) 2025-12-08 15:21:24 -08:00
Bob Brown 8de8679b3e Merge pull request #14075 from microsoft/revert-14074-fix/comment-continuation-pattern
Revert "Fix custom comment continuation for multiple follow-up lines"
2025-12-02 18:49:08 +00:00
Bob Brown e02269ba89 Revert "Fix custom comment continuation for multiple follow-up lines (#14074)"
This reverts commit 7852d4587c.
2025-12-02 10:03:40 -08:00
dinhtam2c 7852d4587c Fix custom comment continuation for multiple follow-up lines (#14074) 2025-12-02 09:57:50 -08:00
a1cb1d8bec Merge for 1.29.2 (#14072)
* put standard library file associations in package.json (#14002)

* Fix incorrect comma in settings string. (#14005)

* Update IntelliSense strings (translations are available yet). (#14020)

* Enable setting the VS dev environment without running from Dev Command Prompt (#13571)

* For VS 18.0 and above, use "Insiders" instead of "Preview" (#14022)

* Adding telemetry for devcmd environment usage (#14023)

* Update changelog and version for 1.29.0. (#14028)

* Update changelog and version for 1.29.0.

* Update TPN. (#14029)

* Update changelog (2nd time). (#14032)

* Update IntelliSense loc strings. (#14038)

* Update localization (#14039)

* Localization - Translated Strings

* Some fixes.

* Remove \t.

---------

Co-authored-by: csigs <[email protected]>

* Update the msvc version to 1950. (#14042)

* Retry build files task in cg.yml (#14043)

* Retry build files.

* Update changelog for 1.29.1. (#14058)

* Bump js-yaml from 4.1.0 to 4.1.1 in /Extension (#14060)

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update js-yaml for github actions. (#14061)

* Fix typo "no_suitable_complier" in nativeStrings.json (#14064)

* Update changelog and verison for 1.29.2. (#14070)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Bob Brown <[email protected]>
Co-authored-by: csigs <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dhruvil Shah <[email protected]>
2025-12-01 18:13:44 -08:00
Sean McManus e10273d4a5 Merge branch 'main' into seanmcm/1_29_2_release 2025-12-01 17:21:30 -08:00
Sean McManus 0ae864f1d7 Merge pull request #14003 from microsoft/main
Merge for 1.28.3 (release)
2025-10-15 11:59:21 -07:00
Sean McManus 58e66e8aac Merge pull request #13992 from microsoft/main
Merge for 1.28.2
2025-10-10 11:42:29 -07:00
Sean McManus cf11bb5666 Merge pull request #13944 from microsoft/seanmcm/1_27_7_release
Merge for 1.27.7
2025-09-17 15:54:37 -07:00
Sean McManus 777af10222 Fix bad merge. 2025-09-17 15:39:28 -07:00
Sean McManus ca3dcdbc8f Merge branch 'main' into seanmcm/1_27_7_release 2025-09-17 15:36:38 -07:00
Sean McManus ff2fb7eb65 Merge pull request #13919 from microsoft/seanmcm/1_26_5_release
Cherry-pick for 1.26.5
2025-09-10 09:01:57 -07:00
Sean McManus a1fa61e73f Update changelog and version for 1.26.5. 2025-09-10 08:43:37 -07:00
Dirk Bäumer 42f7302d6b Wait maximum 3 seconds for the Copilot chat extension to activate. (#13918) 2025-09-10 08:36:00 -07:00
Sean McManus af326bd298 Merge pull request #13900 from microsoft/seanmcm/1_26_4_release
1.26.4 release
2025-09-05 16:16:37 -07:00
Sean McManus b50bf604fd Remove / from the message since it seems to cause it to be dropped. (#13899) 2025-09-05 09:56:16 -07:00
Sean McManus f4f3d8ca8b Add more state info to cpptools crash logging. (#13888)
* Add more state info to cpptools crash logging.
2025-09-05 09:55:45 -07:00
Sean McManus 303b838a41 Update changelog and version for 1.26.4 2025-09-05 04:34:59 -07:00
Dirk Bäumer 36cea36784 Register the CPP context provider with Copilot Chat as well. (#13877)
* Register context provider API with copilot chat as well.
2025-09-05 04:34:28 -07:00
Sean McManus e4f859dd56 Merge pull request #13718 from microsoft/main
Merge for 1.26.3 release
2025-06-18 19:14:47 -07:00
Sean McManus 97c5f14bd5 Merge pull request #13563 from microsoft/main
Merge for 1.25.3
2025-04-28 15:03:26 -07:00
Sean McManus c4003c07e8 Merge pull request #13451 from microsoft/main
Merge for 1.24.5 (release)
2025-04-02 12:39:30 -07:00
Sean McManus c27806e763 Merge pull request #13430 from microsoft/main
Merge for 1.24.x (2nd time)
2025-03-26 14:20:24 -07:00
Sean McManus 7cfb2d3316 Merge pull request #13423 from microsoft/seanmcm/1_24_x_release
Merge for 1.24.x
2025-03-26 11:09:49 -07:00
Sean McManus 9a03b747c6 Fix incorrect diffs in the branch. 2025-03-25 17:21:16 -07:00
Sean McManus 989cee4414 Merge branch 'main' into seanmcm/1_24_x_release 2025-03-25 16:59:59 -07:00
Sean McManus c357224407 Merge pull request #13245 from microsoft/seanmcm/1_23_6_release
Cherry-picks for 1.23.6
2025-02-06 11:51:34 -08:00
Sean McManus a636c87f3e Update changelog for 1.23.6 (#13244)
* Update changelog and version.
2025-02-06 11:26:32 -08:00
Garrett Serack 471cdfecf8 don't abort instantly, keep searching (#13243) 2025-02-06 11:25:58 -08:00
Sean McManus 97128122b0 Fix Select IntelliSense Configuration regression. (#13224) 2025-02-06 11:21:39 -08:00
Sean McManus 006ebff619 Merge pull request #13211 from microsoft/seanmcm/1_23_5_release
Merge insiders to release (with cherry-picks from main) for 1.23.5
2025-01-28 13:20:36 -08:00
Sean McManus 1458694ed6 Fix incorrect merge. 2025-01-28 12:09:47 -08:00
Sean McManus 896024ba9c Update changelog and version for 1.23.5. (#13208)
* Update changelog and version for 1.23.5.
2025-01-28 12:07:40 -08:00
Sean McManus 779bb080c1 Fix an undefined access when an edit is done before cpptools starts (#13206)
* Fix an undefined access.
2025-01-28 12:07:29 -08:00
Sean McManus 97df273fc1 Fix Call Hierarchy Calls From. (#13201) 2025-01-28 12:07:18 -08:00
dependabot[bot] 7037b070ce Bump undici from 5.28.4 to 5.28.5 in /.github/actions (#13180)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.4 to 5.28.5.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.28.5)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 12:06:58 -08:00
Sean McManus 205e63772c Merge branch 'insiders' into seanmcm/1_23_5_release 2025-01-28 12:06:48 -08:00
Sean McManus e7dff799fd Merge pull request #13179 from microsoft/seanmcm/1_23_4_cherrypicks2
More cherry picks for 1.23.4
2025-01-21 16:31:21 -08:00
Sean McManus ec41c3e481 Add a changelog entry. (#13177) 2025-01-21 16:30:13 -08:00
[email protected] 71cf89ce70 [Auto] Localization - Translated Strings (#13027) 2025-01-21 16:14:44 -08:00
Sean McManus f7863066f3 Merge pull request #13168 from microsoft/seanmcm/cherryPick1_23_4
Cherry-pick for 1.23.4
2025-01-17 18:21:21 -08:00
Sean McManus 0c2862c379 Update changelog for 1.23.4 (3rd time) (#13164)
* Update changelog (3rd time).
* Minor TPN changes.
2025-01-17 18:13:23 -08:00
Sean McManus 6026c84c6f Merge pull request #13163 from microsoft/main
Merge for 1.23.4 (2nd time)
2025-01-16 10:46:23 -08:00
Sean McManus e3ee2ee76a Merge pull request #13156 from microsoft/main
Merge for 1.23.4 (pre-release)
2025-01-15 15:44:30 -08:00
Sean McManus ff1cd88466 Merge pull request #13136 from microsoft/main
Merge for 1.23.3 (pre-release)
2025-01-08 14:04:36 -08:00
Colen Garoutte-Carson 98696368f4 Merge pull request #13025 from microsoft/main 2024-12-05 12:45:31 -08:00
Sean McManus 99d98afcec Merge pull request #13021 from microsoft/main
Merge to insiders for 1.23.2
2024-12-04 20:04:33 -08:00
Sean McManus 784f1450c0 Merge pull request #12939 from microsoft/main
Update changelog. (#12938)
2024-11-06 13:56:23 -08:00
Sean McManus 7d26dd1c4f Merge pull request #12932 from microsoft/main
Merge for 1.23.1
2024-11-05 17:29:22 -08:00
Sean McManus 37950ffb2d Merge pull request #12930 from microsoft/seanmcm/1_22_11_release
Cherry-pick and version and changelog update for 1.22.11
2024-11-05 15:05:32 -08:00
Sean McManus 23b0672837 Cherry-pick and update version and changelog for 1.22.11. 2024-11-05 14:44:40 -08:00
Colen Garoutte-Carson 7bafd64cfe Fix processing of bools and numbers in editorConfig files (#12923) 2024-11-05 14:35:27 -08:00
Sean McManus 381d69646b Merge pull request #12900 from microsoft/main
Merge for 1.23.0 (2nd time)
2024-10-29 13:02:21 -07:00
Sean McManus bfa36bc662 Merge pull request #12886 from microsoft/main
Merge for 1.23.0 (2nd time)
2024-10-24 16:59:12 -07:00
Sean McManus 5cbe83ec44 Merge pull request #12877 from microsoft/main
Preliminary merge for 1.23.0
2024-10-22 17:02:44 -07:00
Sean McManus dead10ac8a Merge pull request #12870 from microsoft/seanmcm/1_22_10_release
Cherry-picks for 1.22.10
2024-10-21 14:00:18 -07:00
Colen Garoutte-Carson ce20613f24 Update changelog for 1.22.10 (#12852) 2024-10-21 12:51:56 -07:00
Ben McMorran 86c6c10f18 React to lmTools API breaking changes (#12866) 2024-10-21 12:50:06 -07:00
Sean McManus db6e0cb5cf Merge pull request #12839 from microsoft/seanmcm/1_22_9_update
Last minute updates for 1.22.9
2024-10-14 12:09:27 -07:00
Sean McManus f9e067f5d1 Last minute updates for 1.22.9. 2024-10-14 12:05:29 -07:00
Ben McMorran b137df0bcd React to breaking changes in lmTools API (#12838) 2024-10-14 12:04:56 -07:00
Sean McManus 827db55084 Merge pull request #12827 from microsoft/seanmcm/1_22_9_release
Merge for 1.22.9
2024-10-10 11:46:03 -07:00
Sean McManus 8a2324daaa Merge branch 'main' into seanmcm/1_22_9_release 2024-10-09 14:34:08 -07:00
Colen Garoutte-Carson d41ccfd497 Merge pull request #12818 from microsoft/main 2024-10-07 18:05:23 -07:00
Sean McManus bdd3541f28 Merge branch 'main' into seanmcm/1_22_8_release 2024-10-04 15:07:46 -07:00
Sean McManus c8b7f13c1a Merge pull request #12791 from microsoft/main
Merge for 1.22.7
2024-09-30 16:12:32 -07:00
Colen Garoutte-Carson 8d0d3601a7 Merge pull request #12770 from microsoft/main 2024-09-25 15:46:38 -07:00
Sean McManus e9613ae7ad Merge pull request #12764 from microsoft/main
Merge for 1.22.5
2024-09-24 16:55:39 -07:00
Colen Garoutte-Carson 3570705b5c Merge pull request #12742 from microsoft/main 2024-09-19 16:12:27 -07:00
Colen Garoutte-Carson 096b1463a6 Merge pull request #12740 from microsoft/main 2024-09-19 15:32:11 -07:00
Colen Garoutte-Carson 812318163d Merge pull request #12738 from microsoft/main 2024-09-19 15:04:30 -07:00
Colen Garoutte-Carson 225b776d99 Merge pull request #12734 from microsoft/main 2024-09-18 14:30:06 -07:00
Colen Garoutte-Carson 12d95f4708 Merge pull request #12707 from microsoft/main 2024-09-12 12:23:00 -07:00
Sean McManus 317df57496 Merge pull request #12658 from microsoft/main
Merge for 1.22.2
2024-08-29 19:31:09 -07:00
Sean McManus f63c3652f8 Merge pull request #12654 from microsoft/main
Merge for 1.22.1
2024-08-29 13:36:59 -07:00
Sean McManus 5d62607760 Merge pull request #12633 from microsoft/main
Merge for 1.22.0 (2nd time)
2024-08-26 15:23:50 -07:00
Sean McManus 26d0932972 Merge pull request #12610 from microsoft/main
Merge for 1.22.0 (pre-release)
2024-08-21 14:05:26 -07:00
Sean McManus 3cc2650dfa Merge pull request #12538 from microsoft/seanmcm/1_21_6_release
Update changelog and version for 1.21.6
2024-08-05 09:27:22 -07:00
Sean McManus fdf9b5bfe0 Update changelog and version for 1.21.6 2024-08-02 18:31:39 -07:00
Sean McManus fdd71bc963 Merge pull request #12531 from microsoft/seanmcm/1_21_5_release
Update for 1.21.5.
2024-07-30 22:09:55 -07:00
Sean McManus 1d266a9c0e Update for 1.21.5. 2024-07-30 20:09:13 -07:00
Sean McManus f818529a08 Merge pull request #12517 from microsoft/seanmcm/1_21_4_release
Merge for 1.21.4
2024-07-25 15:13:50 -07:00
Sean McManus 41a05a90c8 Update TPN for 1.21.4 2024-07-25 15:09:54 -07:00
Sean McManus e59c6ca759 Go back to supporting VS Code 1.67.0 instead of 1.82.0. 2024-07-25 14:53:37 -07:00
Sean McManus 287ee3961b Merge pull request #12500 from microsoft/seanmcm/1_21_3_release
Update changelog and version for 1.21.3. (#12499)
2024-07-23 19:33:36 -07:00
Sean McManus 8a8fd883ac Update changelog and version for 1.21.3. (#12499) 2024-07-23 19:32:29 -07:00
Sean McManus 4fe56500a9 Merge pull request #12474 from microsoft/seanmcm/1_21_2_release
Merge for 1.21.2
2024-07-17 18:13:02 -07:00
Sean McManus 03911153f9 Update date. 2024-07-17 15:42:14 -07:00
Sean McManus acea31e572 Minor update. 2024-07-12 15:58:18 -07:00
Sean McManus bf21e01764 Update 2024-07-12 12:25:35 -07:00
Sean McManus 30f1361d23 Merge branch 'main' into seanmcm/1_21_2_release 2024-07-12 12:01:21 -07:00
Sean McManus 825033f768 Merge pull request #12467 from microsoft/main
Merge for 1.21.1 (pre-release)
2024-07-12 11:50:25 -07:00
Sean McManus d8426caacc Merge pull request #12389 from microsoft/main
Fix crash from loc message mismatch. (#12388)
2024-06-17 14:36:02 -07:00
Sean McManus 8942530744 Merge pull request #12386 from microsoft/main
Update changelog date. (#12385)
2024-06-17 11:03:29 -07:00
Sean McManus e663939e56 Merge pull request #12374 from microsoft/seanmcm/1_21_0_insiders
Merge for 1.21.0
2024-06-13 19:22:14 -07:00
Sean McManus 1fb5b63ab7 Merge branch 'main' into seanmcm/1_21_0_insiders 2024-06-13 14:47:55 -07:00
Sean McManus 03933b0a74 Merge pull request #12277 from microsoft/seanmcm/1_20_5_release
Merge for 1.20.5
2024-05-07 20:26:45 -07:00
[email protected] fc8eb8632f [Auto] Localization - Translated Strings (#12236) 2024-05-03 16:06:02 -07:00
Sean McManus f6722bc8ff Update version and changelog for 1.20.5 (#12264)
* Update version and changelog for 1.20.5
2024-05-03 15:30:48 -07:00
Sean McManus 894db52405 Fix macOS version check. (#12276) 2024-05-03 15:29:46 -07:00
Sean McManus abf384619d Merge branch 'insiders' into seanmcm/1_20_5_release 2024-05-03 15:29:34 -07:00
Sean McManus fd482d2169 Merge pull request #12274 from microsoft/seanmcm/1_20_4_cherrypick
Updates for 1.20.4 (#12273)
2024-05-02 11:16:42 -07:00
Sean McManus 2fafd831e5 Updates for 1.20.4 (#12273)
* Don't use the crash handler on macOS < 19.
* Update version and changelog.
2024-05-02 10:14:49 -07:00
Sean McManus 1ceae9d4ed Merge pull request #12266 from microsoft/seanmcm/1_20_3_cherryPicks
Cherry-picks for 1.20.3
2024-04-30 16:18:52 -07:00
Sean McManus d4d5d4551f Update version and changelog for 1.20.3 (#12245)
* Update version and changelog for 1.20.3
2024-04-30 13:11:53 -07:00
Sean McManus 0ef77b5616 Improvements to crash call stack logging. (#12247)
* Updates to crash call stack logging.
* Move crash logging to its own channel.
2024-04-30 13:11:10 -07:00
Sean McManus efdc8e90f6 Merge pull request #12235 from microsoft/seanmcm/1_20_2_cherryPicks2
Cherry-picks for 1.20.2
2024-04-19 17:17:01 -07:00
Sean McManus 9f020e9258 Update changelog for 1.20.2 (2nd time) (#12228)
* Update changelog
2024-04-19 16:57:13 -07:00
Bob Brown c058568767 rename the property again (#12233)
* rename the property again

* fail
2024-04-19 16:57:00 -07:00
browntarik 8809e69e91 Remove redundant variable resolution in handleSquiggles and fix error messaging for env and delimited paths under include paths in c_cpp_properties.json (#12188)
* remove redundant variable resolution

* fix lint

* remove resolveVariable redundancies

* change when resolve and split happens

* fix lint

* Resolve error checking for environment vars and delimited paths

* remove "path" from error messaging

* Adjust error messaging

* remove stray comment

* refactor error messaging + minor fix

* resolve lint

* Fix multi path squiggle regression

* Remove resolvedPath redundancies

* Refactor error messaging and squiggling

* Revert and improve error squiggling behavior

* fix linting

* properly proccess glob patterns + minor fixes

* fix comment positions

* Refactor error message + minor fix

* Fix telemetry metric + minor fix
2024-04-19 16:56:46 -07:00
Sean McManus 7af5c40dd0 Handle multiple cpptools-srv crashes. (#12225) 2024-04-19 16:56:33 -07:00
Sean McManus 1d2bd10691 Merge pull request #12223 from microsoft/main
Fix SettingsTracking treating numerical loggingLevel as invalid. (#12…
2024-04-18 15:11:30 -07:00
Sean McManus dac96fe852 Merge pull request #12209 from microsoft/main
Merge for 1.20.2
2024-04-16 18:43:48 -07:00
Sean McManus a1487e5e79 Merge pull request #12185 from microsoft/main
Merge for 1.20.1
2024-04-09 17:07:29 -07:00
Sean McManus 6f19496172 Merge pull request #12138 from microsoft/main
Merge for 1.20.0
2024-03-26 14:12:18 -07:00
Colen Garoutte-Carson ad5d6de4ea Merge pull request #12123 from microsoft/coleng/cherry_pick_1.19.9.x2 2024-03-19 16:40:47 -07:00
Colen Garoutte-Carson 153e232f2d Update changelog for 1.19.9 again (#12122) 2024-03-19 16:16:21 -07:00
Colen Garoutte-Carson bcd4a7f025 Merge pull request #12118 from microsoft/coleng/cherry_pick_1.19.9 2024-03-18 15:00:41 -07:00
Colen Garoutte-Carson 3c3d463a81 Update changelog 1.19.9 (#12117) 2024-03-18 13:22:40 -07:00
Colen Garoutte-Carson 92691929ed Merge pull request #12100 from microsoft/coleng/merge_release_1.19.8.try2 2024-03-13 17:16:25 -07:00
Colen Garoutte-Carson 86a41c9021 Update changelog for 1.19.8 again (#12099) 2024-03-13 17:12:21 -07:00
Colen Garoutte-Carson a71c90c140 Merge pull request #12093 from microsoft/coleng/cherry_pick_1.19.8 2024-03-12 19:16:35 -07:00
Colen Garoutte-Carson 1d28851ef7 Update changelog for 1.19.8 (#12092) 2024-03-12 19:11:20 -07:00
Colen Garoutte-Carson 1aced54699 Merge pull request #12090 from microsoft/coleng/cherry_pick_3_11_2024 2024-03-11 14:17:04 -07:00
Bob Brown a8cf39c8b4 Prevent the status bar from updating too quickly (#12088) 2024-03-11 13:32:50 -07:00
Colen Garoutte-Carson e037b95926 Merge pull request #12087 from microsoft/coleng/cherry_pick_to_release_again 2024-03-08 15:09:53 -08:00
Colen Garoutte-Carson af7f6ce52e Update changelog again for 1.19.7 (#12086) 2024-03-08 15:01:37 -08:00
Colen Garoutte-Carson 9a18982440 Merge pull request #12083 from microsoft/coleng/cherry_pick_release_1.19.7 2024-03-08 11:09:55 -08:00
Colen Garoutte-Carson 35bf4c8b0f Update changelog for 1.19.7 (#12081) 2024-03-08 10:32:50 -08:00
Colen Garoutte-Carson 23446558cf Merge pull request #12065 from microsoft/main 2024-03-05 18:22:19 -08:00
Colen Garoutte-Carson 76ccb791ff Merge pull request #11947 from microsoft/main 2024-02-09 17:16:17 -08:00
Colen Garoutte-Carson a5a5735089 Merge pull request #11942 from microsoft/main 2024-02-08 17:07:45 -08:00
Sean McManus 5077edf585 Merge pull request #11886 from microsoft/main
Merge for 1.19.2 (2nd time)
2024-01-19 18:08:55 -08:00
Colen Garoutte-Carson f38926f8b1 Merge pull request #11874 from microsoft/main 2024-01-16 17:41:23 -08:00
Sean McManus 30de9bcc27 Merge pull request #11725 from microsoft/main
Update for 1.19.1 (#11724)
2023-11-21 17:12:17 -08:00
Sean McManus 100e2e0828 Merge pull request #11699 from microsoft/main
Merge for 1.19.0
2023-11-16 18:39:02 -08:00
Sean McManus e3b41771c6 Merge pull request #11639 from microsoft/main
Merge for 1.18.2 (2nd time)
2023-11-08 12:34:50 -08:00
Sean McManus 3f7f3090f6 Merge pull request #11633 from microsoft/main
Merge for 1.18.2
2023-11-07 15:59:34 -08:00
Sean McManus 4149493f2c Merge pull request #11607 from microsoft/main
Merge for 1.18.1
2023-11-01 17:55:01 -07:00
Sean McManus 43aad3f65c Merge pull request #11528 from microsoft/main
Update changelog (2nd time) (#11527)
2023-10-12 17:21:18 -07:00
Sean McManus bedcacb0a1 Merge pull request #11526 from microsoft/main
Merge for 1.18.0
2023-10-12 14:58:49 -07:00
Sean McManus a5f8f84b43 Merge pull request #11303 from microsoft/main
Merge for 1.17.1
2023-08-08 17:51:04 -07:00
Sean McManus e53b190380 Merge pull request #11253 from microsoft/main
Merge (again) for 1.17.0
2023-07-26 16:56:43 -07:00
Michelle Matias 1846fd4001 Merge pull request #11250 from microsoft/main 2023-07-26 14:15:17 -07:00
Colen Garoutte-Carson 62e09945e3 Merge pull request #11241 from microsoft/main 2023-07-24 17:32:28 -07:00
Michelle Matias c9b0db02fd Merge pull request #11230 from microsoft/main
Merge 1.17.0
2023-07-21 14:08:21 -07:00
Michelle Matias 51da619eec Merge pull request #11099 from microsoft/main
1.16.1 pre-release
2023-06-15 21:19:13 -07:00
Michelle Matias 3eb50568e9 Merge pull request #10986 from microsoft/main
[Auto] Localization - Translated Strings (#10889)
2023-05-22 13:53:52 -07:00
Michelle Matias 866b145645 Merge pull request #10975 from microsoft/main
1.16.0 pre-release
2023-05-19 15:52:02 -07:00
Sean McManus 9762fe5397 Merge pull request #10862 from microsoft/main
Merge for 1.15.3 (2nd time)
2023-04-21 19:00:16 -07:00
Sean McManus 377896c30a Merge pull request #10846 from microsoft/main
Merge for 1.15.3
2023-04-20 18:55:05 -07:00
Michelle Matias 98f13a6f11 Merge pull request #10815 from microsoft/main
Don't put the compiler selection in the global settings if using the …
2023-04-12 17:57:26 -07:00
Michelle Matias 0d85aea687 Merge pull request #10813 from microsoft/main
Revert walkthrough doc links until walkthrough is published (#10812)
2023-04-12 15:51:05 -07:00
Sean McManus 25d2b76514 Merge pull request #10811 from microsoft/main
Merge for 1.15.2
2023-04-12 11:03:43 -07:00
Sean McManus 42dfef3f6b Merge pull request #10728 from microsoft/main
Merge for 1.15.1
2023-03-22 11:43:15 -07:00
Sean McManus 1ce1e9cd71 Merge pull request #10716 from microsoft/main
Update changelog for 1.15.1. (#10708)
2023-03-21 09:53:45 -07:00
Sean McManus 65163966d5 Merge pull request #10679 from microsoft/main
Merge for 1.15.0
2023-03-15 17:17:35 -07:00
Sean McManus edf8e0a155 Merge pull request #10504 from microsoft/main
Merge for 1.14.2 (2nd time)
2023-02-09 16:30:37 -08:00
Sean McManus 4083075476 Merge pull request #10501 from microsoft/main
Merge for 1.14.2
2023-02-09 14:26:59 -08:00
Michelle Matias b745ebc218 Merge pull request #10453 from microsoft/main
1.14.1 pre-release merge
2023-02-01 14:29:00 -08:00
Michelle Matias b69d17a0f5 Merge pull request #10378 from microsoft/seanmcm/1_14_0_insiders
Merge for 1.14.0
2023-01-11 20:00:38 -08:00
Sean McManus be8b6fb693 Merge branch 'main' into seanmcm/1_14_0_insiders 2023-01-11 19:07:54 -08:00
21 changed files with 257 additions and 183 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
uses: github/codeql-action/init@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@@ -91,7 +91,7 @@ jobs:
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
uses: github/codeql-action/analyze@f205ea1c3313d32999d8d6a48b4f6530d4437b38 # v4.37.4
with:
category: "/language:${{matrix.language}}"
@@ -16,6 +16,7 @@ nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFo
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
export class CopilotHoverProvider implements vscode.HoverProvider {
private client: DefaultClient;
private currentDocument: vscode.TextDocument | undefined;
private currentPosition: vscode.Position | undefined;
private currentCancellationToken: vscode.CancellationToken | undefined;
@@ -29,8 +30,8 @@ export class CopilotHoverProvider implements vscode.HoverProvider {
private chatModelId: string | undefined; // Save the selected model ID to avoid trying the same unavailable model repeatedly.
// Flag to avoid querying the LanguageModelChat repeatedly if no model is found
private checkedChatModel: boolean = false;
constructor(private client: DefaultClient) {
constructor(client: DefaultClient) {
this.client = client;
}
public async getCachedChatModel(): Promise<vscode.LanguageModelChat | undefined> {
@@ -170,6 +171,7 @@ export class CopilotHoverProvider implements vscode.HoverProvider {
position: Position.create(position.line, position.character)
};
await this.client.ready;
if (this.currentCancellationToken?.isCancellationRequested) {
throw new vscode.CancellationError();
}
@@ -10,10 +10,11 @@ import { RequestCancelled, ServerCancelled } from '../protocolFilter';
import { CppSettings } from '../settings';
export class HoverProvider implements vscode.HoverProvider {
private client: DefaultClient;
private lastContent: vscode.MarkdownString[] | undefined;
private readonly hasContent = new ManualSignal<boolean>(true);
constructor(private client: DefaultClient) {
constructor(client: DefaultClient) {
this.client = client;
}
public async provideHover(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Promise<vscode.Hover | undefined> {
@@ -35,6 +36,7 @@ export class HoverProvider implements vscode.HoverProvider {
textDocument: { uri: document.uri.toString() },
position: Position.create(position.line, position.character)
};
await this.client.ready;
let hoverResult: vscode.Hover;
try {
hoverResult = await this.client.languageClient.sendRequest(HoverRequest, params, token);
@@ -214,11 +214,15 @@ export async function sendCallHierarchyCallsFromRequest(client: DefaultClient, i
export class CallHierarchyProvider implements vscode.CallHierarchyProvider {
// Indicates whether a request is from an entry root node (e.g. top function in the call tree).
private isEntryRootNodeTelemetry: boolean = false;
private client: DefaultClient;
constructor(private client: DefaultClient) {
constructor(client: DefaultClient) {
this.client = client;
}
public async prepareCallHierarchy(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Promise<vscode.CallHierarchyItem | undefined> {
await this.client.ready;
workspaceReferences.cancelCurrentReferenceRequest(CancellationSender.NewRequest);
workspaceReferences.clearViews();
@@ -257,6 +261,7 @@ export class CallHierarchyProvider implements vscode.CallHierarchyProvider {
}
public async provideCallHierarchyIncomingCalls(item: vscode.CallHierarchyItem, token: vscode.CancellationToken): Promise<vscode.CallHierarchyIncomingCall[] | undefined> {
await this.client.ready;
workspaceReferences.cancelCurrentReferenceRequest(CancellationSender.NewRequest);
const CallHierarchyCallsToEvent: string = "CallHierarchyCallsTo";
@@ -311,6 +316,8 @@ export class CallHierarchyProvider implements vscode.CallHierarchyProvider {
return undefined;
}
await this.client.ready;
const result: vscode.CallHierarchyOutgoingCall[] | undefined =
await sendCallHierarchyCallsFromRequest(this.client, item, token);
if (token.isCancellationRequested || result === undefined) {
@@ -40,7 +40,9 @@ export const GetCodeActionsRequest: RequestType<GetCodeActionsRequestParams, Get
new RequestType<GetCodeActionsRequestParams, GetCodeActionsResult, void>('cpptools/getCodeActions');
export class CodeActionProvider implements vscode.CodeActionProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
private static inlineMacroKind: vscode.CodeActionKind = vscode.CodeActionKind.RefactorInline.append("macro");
@@ -49,6 +51,7 @@ export class CodeActionProvider implements vscode.CodeActionProvider {
public async provideCodeActions(document: vscode.TextDocument, range: vscode.Range | vscode.Selection,
context: vscode.CodeActionContext, token: vscode.CancellationToken): Promise<(vscode.Command | vscode.CodeAction)[]> {
await this.client.ready;
let r: Range;
if (range instanceof vscode.Selection) {
if (range.active.isBefore(range.anchor)) {
@@ -11,7 +11,9 @@ import { CppSettings, OtherSettings } from '../settings';
import { makeVscodeTextEdits } from '../utils';
export class DocumentFormattingEditProvider implements vscode.DocumentFormattingEditProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
public async provideDocumentFormattingEdits(document: vscode.TextDocument, options: vscode.FormattingOptions, token: vscode.CancellationToken): Promise<vscode.TextEdit[]> {
@@ -19,6 +21,7 @@ export class DocumentFormattingEditProvider implements vscode.DocumentFormatting
if (settings.formattingEngine === "disabled") {
return [];
}
await this.client.ready;
const filePath: string = document.uri.fsPath;
if (options.onChanges) {
let insertSpacesSet: boolean = false;
@@ -11,7 +11,9 @@ import { CppSettings } from '../settings';
import { makeVscodeTextEdits } from '../utils';
export class DocumentRangeFormattingEditProvider implements vscode.DocumentRangeFormattingEditProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
public async provideDocumentRangeFormattingEdits(document: vscode.TextDocument, range: vscode.Range,
@@ -20,6 +22,7 @@ export class DocumentRangeFormattingEditProvider implements vscode.DocumentRange
if (settings.formattingEngine === "disabled") {
return [];
}
await this.client.ready;
const filePath: string = document.uri.fsPath;
const useVcFormat: boolean = settings.useVcFormat(document);
const configCallBack = async (editorConfigSettings: any | undefined) => {
@@ -58,12 +58,14 @@ export class DocumentSymbolProvider implements vscode.DocumentSymbolProvider {
public async provideDocumentSymbols(document: vscode.TextDocument, token: vscode.CancellationToken): Promise<vscode.SymbolInformation[] | vscode.DocumentSymbol[]> {
const client: Client = clients.getClientFor(document.uri);
if (client instanceof DefaultClient) {
const defaultClient: DefaultClient = <DefaultClient>client;
await client.ready;
const params: GetDocumentSymbolRequestParams = {
uri: document.uri.toString()
};
let response: GetDocumentSymbolResult;
try {
response = await client.languageClient.sendRequest(GetDocumentSymbolRequest, params, token);
response = await defaultClient.languageClient.sendRequest(GetDocumentSymbolRequest, params, token);
} catch (e: any) {
if (e instanceof ResponseError && (e.code === RequestCancelled || e.code === ServerCancelled)) {
throw new vscode.CancellationError();
@@ -56,10 +56,14 @@ export async function sendFindAllReferencesRequest(client: DefaultClient, uri: v
}
export class FindAllReferencesProvider implements vscode.ReferenceProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
public async provideReferences(document: vscode.TextDocument, position: vscode.Position, context: vscode.ReferenceContext, token: vscode.CancellationToken): Promise<vscode.Location[] | undefined> {
await this.client.ready;
workspaceReferences.cancelCurrentReferenceRequest(CancellationSender.NewRequest);
// Listen to a cancellation for this request. When this request is cancelled,
@@ -14,6 +14,7 @@ interface FoldingRangeRequestInfo {
}
export class FoldingRangeProvider implements vscode.FoldingRangeProvider {
private client: DefaultClient;
public onDidChangeFoldingRangesEvent = new vscode.EventEmitter<void>();
public onDidChangeFoldingRanges?: vscode.Event<void>;
@@ -21,11 +22,12 @@ export class FoldingRangeProvider implements vscode.FoldingRangeProvider {
// for the same file without waiting for the prior request to complete or cancelling them.
private pendingRequests: Map<string, FoldingRangeRequestInfo> = new Map<string, FoldingRangeRequestInfo>();
constructor(private client: DefaultClient) {
constructor(client: DefaultClient) {
this.client = client;
this.onDidChangeFoldingRanges = this.onDidChangeFoldingRangesEvent.event;
}
async provideFoldingRanges(document: vscode.TextDocument, context: vscode.FoldingContext, token: vscode.CancellationToken): Promise<vscode.FoldingRange[] | undefined> {
await this.client.ready;
const settings: CppSettings = new CppSettings();
if (!settings.codeFolding) {
return [];
@@ -11,7 +11,9 @@ import { CppSettings } from '../settings';
import { makeVscodeTextEdits } from '../utils';
export class OnTypeFormattingEditProvider implements vscode.OnTypeFormattingEditProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
public async provideOnTypeFormattingEdits(document: vscode.TextDocument, position: vscode.Position, ch: string, options: vscode.FormattingOptions, token: vscode.CancellationToken): Promise<vscode.TextEdit[]> {
@@ -19,6 +21,7 @@ export class OnTypeFormattingEditProvider implements vscode.OnTypeFormattingEdit
if (settings.formattingEngine === "disabled") {
return [];
}
await this.client.ready;
const filePath: string = document.uri.fsPath;
const useVcFormat: boolean = settings.useVcFormat(document);
const configCallBack = async (editorConfigSettings: any | undefined) => {
@@ -18,10 +18,14 @@ const RenameRequest: RequestType<ReferencesParams, ReferencesResult, void> =
new RequestType<ReferencesParams, ReferencesResult, void>('cpptools/rename');
export class RenameProvider implements vscode.RenameProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
public async provideRenameEdits(document: vscode.TextDocument, position: vscode.Position, newName: string, _token: vscode.CancellationToken): Promise<vscode.WorkspaceEdit | undefined> {
await this.client.ready;
workspaceReferences.cancelCurrentReferenceRequest(CancellationSender.NewRequest);
const settings: CppSettings = new CppSettings();
@@ -5,7 +5,8 @@
import * as vscode from 'vscode';
import { ManualPromise } from '../../Utility/Async/manualPromise';
interface FileData {
interface FileData
{
version: number;
promise: ManualPromise<vscode.SemanticTokens>;
tokenBuilder: vscode.SemanticTokensBuilder;
@@ -10,7 +10,9 @@ import { RequestCancelled, ServerCancelled } from '../protocolFilter';
import { makeVscodeLocation } from '../utils';
export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
constructor(private client: DefaultClient) {
private client: DefaultClient;
constructor(client: DefaultClient) {
this.client = client;
}
public async provideWorkspaceSymbols(query: string, token: vscode.CancellationToken): Promise<vscode.SymbolInformation[]> {
+182 -66
View File
@@ -23,16 +23,19 @@ import { WorkspaceSymbolProvider } from './Providers/workspaceSymbolProvider';
// End provider imports
import { CodeSnippet, Trait } from '@github/copilot-language-server';
import { ok } from 'assert';
import * as fs from 'fs';
import * as os from 'os';
import { SourceFileConfiguration, SourceFileConfigurationItem, Version, WorkspaceBrowseConfiguration } from 'vscode-cpptools';
import { IntelliSenseStatus, Status } from 'vscode-cpptools/out/testApi';
import { CloseAction, DidOpenTextDocumentParams, ErrorAction, NotificationType, Position, Range, RequestType, ResponseError, TextDocumentIdentifier, TextDocumentPositionParams } from 'vscode-languageclient';
import * as rpc from 'vscode-languageclient/node';
import { CloseAction, DidOpenTextDocumentParams, ErrorAction, LanguageClientOptions, NotificationType, Position, Range, RequestType, ResponseError, TextDocumentIdentifier, TextDocumentPositionParams } from 'vscode-languageclient';
import { LanguageClient, ServerOptions } from 'vscode-languageclient/node';
import * as nls from 'vscode-nls';
import { DebugConfigurationProvider } from '../Debugger/configurationProvider';
import { ManualPromise } from '../Utility/Async/manualPromise';
import { ManualSignal } from '../Utility/Async/manualSignal';
import { logAndReturn } from '../Utility/Async/returns';
import { is } from '../Utility/System/guards';
import * as util from '../common';
import { isWindows } from '../constants';
import { instrument, isInstrumentationEnabled } from '../instrumentation';
@@ -57,7 +60,6 @@ import { CustomConfigurationProvider1, getCustomConfigProviders, isSameProviderE
import { DataBinding } from './dataBinding';
import { cachedEditorConfigSettings, getEditorConfigSettings } from './editorConfig';
import { CppSourceStr, clients, configPrefix, initializeIntervalTimer, isWritingCrashCallStack, updateLanguageConfigurations, usesCrashHandler, watchForCrashes } from './extension';
import { LanguageClient } from './languageClient';
import { LocalizeStringParams, getLocaleId, getLocalizedString } from './localization';
import { PersistentFolderState, PersistentState, PersistentWorkspaceState } from './persistentState';
import { RequestCancelled, ServerCancelled, createProtocolFilter } from './protocolFilter';
@@ -86,7 +88,7 @@ export function hasTrustedCompilerPaths(): boolean {
}
// Data shared by all clients.
const languageClient: LanguageClient = new LanguageClient();
let languageClient: LanguageClient;
let firstClientStarted: Promise<{ wasShutdown: boolean }>;
let languageClientHasCrashed: boolean = false;
let languageClientCrashedNeedsRestart: boolean = false;
@@ -219,16 +221,9 @@ interface FileChangedParams extends WorkspaceFolderParams {
uri: string;
}
interface InputLineRange {
startLine: number;
endLine: number;
}
interface InputRegion {
startLine: number;
startColumn: number;
endLine: number;
endColumn: number;
}
interface DecorationRangesPair {
@@ -379,7 +374,7 @@ export enum FoldingRangeKind {
export interface CppFoldingRange {
kind: FoldingRangeKind;
range: InputLineRange;
range: InputRegion;
}
export interface GetFoldingRangesResult {
@@ -786,6 +781,7 @@ class ClientModel {
export interface Client {
readonly ready: Promise<void>;
enqueue<T>(task: () => Promise<T>): Promise<T>;
InitializingWorkspaceChanged: vscode.Event<boolean>;
IndexingWorkspaceChanged: vscode.Event<boolean>;
ParsingWorkspaceChanged: vscode.Event<boolean>;
@@ -897,6 +893,7 @@ export function createNullClient(): Client {
}
export class DefaultClient implements Client {
private innerLanguageClient?: LanguageClient; // The "client" that launches and communicates with our language "server" process.
private disposables: vscode.Disposable[] = [];
private documentFormattingProviderDisposable: vscode.Disposable | undefined;
private formattingRangeProviderDisposable: vscode.Disposable | undefined;
@@ -912,6 +909,7 @@ export class DefaultClient implements Client {
private rootRealPath: string;
private workspaceStoragePath: string;
private trackedDocuments = new Map<string, vscode.TextDocument>();
private isSupported: boolean = true;
private inactiveRegionsDecorations = new Map<string, DecorationRangesPair>();
private settingsTracker: SettingsTracker;
private loggingLevel: number = 1;
@@ -936,6 +934,20 @@ export class DefaultClient implements Client {
private showConfigureIntelliSenseButton: boolean = false;
private pendingTagParsingCalls: PendingTagParsingCall[] = [];
/** A queue of asynchronous tasks that need to be processed befofe ready is considered active. */
private static queue = new Array<[ManualPromise<unknown>, () => Promise<unknown>] | [ManualPromise<unknown>]>();
/** returns a promise that waits initialization and/or a change to configuration to complete (i.e. language client is ready-to-use) */
private static readonly isStarted = new ManualSignal<void>(true);
/**
* Indicates if the blocking task dispatcher is currently running
*
* This will be in the Set state when the dispatcher is not running (i.e. if you await this it will be resolved immediately)
* If the dispatcher is running, this will be in the Reset state (i.e. if you await this it will be resolved when the dispatcher is done)
*/
private static readonly dispatching = new ManualSignal<void>();
// The "model" that is displayed via the UI (status bar).
private model: ClientModel = new ClientModel();
@@ -952,7 +964,7 @@ export class DefaultClient implements Client {
public get ReferencesCommandModeChanged(): vscode.Event<refs.ReferencesCommandMode> { return this.model.referencesCommandMode.ValueChanged; }
public get TagParserStatusChanged(): vscode.Event<string> { return this.model.parsingWorkspaceStatus.ValueChanged; }
public get ActiveConfigChanged(): vscode.Event<string> { return this.model.activeConfigName.ValueChanged; }
public isInitialized(): boolean { return this.languageClient.isInitialized; }
public isInitialized(): boolean { return this.innerLanguageClient !== undefined; }
public getShowConfigureIntelliSenseButton(): boolean { return this.showConfigureIntelliSenseButton; }
public setShowConfigureIntelliSenseButton(show: boolean): void { this.showConfigureIntelliSenseButton = show; }
@@ -987,7 +999,10 @@ export class DefaultClient implements Client {
}
public get languageClient(): LanguageClient {
return languageClient;
if (!this.innerLanguageClient) {
throw new Error("Attempting to use languageClient before initialized");
}
return this.innerLanguageClient;
}
public get configuration(): configs.CppProperties {
@@ -1361,18 +1376,19 @@ export class DefaultClient implements Client {
if (firstClientStarted === undefined || languageClientCrashedNeedsRestart) {
if (languageClientCrashedNeedsRestart) {
languageClientCrashedNeedsRestart = false;
// if we're recovering, the isStarted needs to be reset
// if we're recovering, the isStarted needs to be reset.
// because we're starting the first client again.
this.languageClient.isStarted = false;
this.languageClient.setLanguageClient(undefined);
DefaultClient.isStarted.reset();
}
firstClientStarted = this.createLanguageClient();
util.setProgress(util.getProgressExecutableStarted());
isFirstClient = true;
}
void this.init(rootUri, isFirstClient).catch(logAndReturn.undefined);
} catch (errJS) {
const err: NodeJS.ErrnoException = errJS as NodeJS.ErrnoException;
this.isSupported = false; // Running on an OS we don't support yet.
if (!failureMessageShown) {
failureMessageShown = true;
let additionalInfo: string;
@@ -1392,7 +1408,8 @@ export class DefaultClient implements Client {
ui = getUI();
ui.bind(this);
if ((await firstClientStarted).wasShutdown) {
this.languageClient.isStarted = true;
this.isSupported = false;
DefaultClient.isStarted.resolve();
return;
}
@@ -1404,10 +1421,7 @@ export class DefaultClient implements Client {
this.innerConfiguration.CompileCommandsChanged((e) => this.onCompileCommandsChanged(e));
this.disposables.push(this.innerConfiguration);
// Ideally this would be set earlier, but the task provider expects it to also mean that `this.innerConfiguration` is set.
this.languageClient.isStarted = true;
compilerDefaults = await this.requestCompiler();
this.innerLanguageClient = languageClient;
telemetry.logLanguageServerEvent("NonDefaultInitialCppSettings", this.settingsTracker.getUserModifiedSettings());
failureMessageShown = false;
@@ -1474,6 +1488,7 @@ export class DefaultClient implements Client {
});
// The configurations will not be sent to the language server until the default include paths and frameworks have been set.
// The event handlers must be set before this happens.
compilerDefaults = await this.requestCompiler();
DefaultClient.updateClientConfigurations();
clients.forEach(client => {
if (client instanceof DefaultClient) {
@@ -1483,11 +1498,14 @@ export class DefaultClient implements Client {
});
}
} catch (err) {
this.isSupported = false; // Running on an OS we don't support yet.
if (!failureMessageShown) {
failureMessageShown = true;
void vscode.window.showErrorMessage(localize("unable.to.start", "Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: {0}", String(err)));
}
}
DefaultClient.isStarted.resolve();
}
private getWorkspaceFolderSettings(workspaceFolderUri: vscode.Uri | undefined, workspaceFolder: vscode.WorkspaceFolder | undefined, settings: CppSettings, otherSettings: OtherSettings): WorkspaceFolderSettingsParams {
@@ -1675,7 +1693,7 @@ export class DefaultClient implements Client {
// from a sanitizer build to files in that directory (see getSanitizerServerEnv). This is
// undefined -- i.e. the environment is inherited unchanged -- for normal builds.
const sanitizerServerEnv: NodeJS.ProcessEnv | undefined = getSanitizerServerEnv();
const serverOptions: rpc.ServerOptions = {
const serverOptions: ServerOptions = {
run: { command: serverModule, options: { detached: false, cwd: util.getExtensionFilePath("bin"), env: sanitizerServerEnv } },
debug: { command: serverModule, args: [serverName], options: { detached: true, cwd: util.getExtensionFilePath("bin"), env: sanitizerServerEnv } }
};
@@ -1738,7 +1756,7 @@ export class DefaultClient implements Client {
loggingLevel: this.loggingLevel
};
const clientOptions: rpc.LanguageClientOptions = {
const clientOptions: LanguageClientOptions = {
documentSelector: [
{ scheme: 'file', language: 'c' },
{ scheme: 'file', language: 'cpp' },
@@ -1818,40 +1836,34 @@ export class DefaultClient implements Client {
// Refresh initializing state in UI.
this.model.isInitializingWorkspace.Value = true;
// Create the language client that spawns cpptools and configures RPC over stdin/stdout.
// This is the ONLY place outside of the LanguageClient wrapper where the VS Code LanguageClient class should be used directly.
// All other code should use the LanguageClient wrapper class.
const client = new rpc.LanguageClient(`cpptools`, serverOptions, clientOptions);
client.onNotification(DebugProtocolNotification, logDebugProtocol);
client.onNotification(DebugLogNotification, logLocalized);
client.onNotification(LogTelemetryNotification, (e) => void this.logTelemetry(e));
client.onNotification(ShowMessageWindowNotification, showMessageWindow);
client.registerProposedFeatures();
await client.start();
// Create the language client
languageClient = new LanguageClient(`cpptools`, serverOptions, clientOptions);
languageClient.onNotification(DebugProtocolNotification, logDebugProtocol);
languageClient.onNotification(DebugLogNotification, logLocalized);
languageClient.onNotification(LogTelemetryNotification, (e) => void this.logTelemetry(e));
languageClient.onNotification(ShowMessageWindowNotification, showMessageWindow);
languageClient.registerProposedFeatures();
await languageClient.start();
if (usesCrashHandler()) {
watchForCrashes(await client.sendRequest(PreInitializationRequest, null));
watchForCrashes(await languageClient.sendRequest(PreInitializationRequest, null));
} else if (os.platform() === "win32") {
const settings: CppSettings = new CppSettings();
if ((settings.windowsErrorReportingMode === "default" && !languageClientHasCrashed) ||
settings.windowsErrorReportingMode === "enabled") {
await client.sendRequest(PreInitializationRequest, null);
await languageClient.sendRequest(PreInitializationRequest, null);
}
}
// Move initialization to a separate message, so we can see log output from it.
// A request is used in order to wait for completion and ensure that no subsequent
// higher priority message may be processed before the Initialization request.
const initializeResult = await client.sendRequest(InitializationRequest, cppInitializationParams);
const initializeResult = await languageClient.sendRequest(InitializationRequest, cppInitializationParams);
// If the server requested shutdown, then reload with the failsafe (null) client.
if (initializeResult.shouldShutdown) {
await client.stop();
await languageClient.stop();
await clients.recreateClients(true);
} else {
// Don't set the inner language client on the wrapper until after initialization is complete.
// This ensures the order of the initialization messages.
languageClient.setLanguageClient(client);
}
return { wasShutdown: initializeResult.shouldShutdown };
@@ -1859,6 +1871,7 @@ export class DefaultClient implements Client {
public async sendDidChangeSettings(): Promise<void> {
// Send settings json to native side.
await this.ready;
await this.languageClient.sendNotification(DidChangeSettingsNotification, this.getAllSettings());
}
@@ -2198,6 +2211,7 @@ export class DefaultClient implements Client {
}
public async logDiagnostics(): Promise<void> {
await this.ready;
const response: GetDiagnosticsResult = await this.languageClient.sendRequest(GetDiagnosticsRequest, null);
const diagnosticsChannel: vscode.OutputChannel = getDiagnosticsChannel();
diagnosticsChannel.clear();
@@ -2265,12 +2279,16 @@ export class DefaultClient implements Client {
diagnosticsChannel.show(false);
}
public rescanFolder(): Promise<void> {
public async rescanFolder(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(RescanFolderNotification);
}
public async provideCustomConfigurations(docUris: vscode.Uri[], batchId: number): Promise<void> {
let isProviderRegistered: boolean = false;
const onFinished: () => void = () => {
void this.languageClient.sendNotification(FinishedRequestCustomConfig, { batchId, isProviderRegistered });
};
try {
const providerId: string | undefined = this.configurationProvider;
if (!providerId) {
@@ -2284,7 +2302,7 @@ export class DefaultClient implements Client {
const resultCode = await this.provideCustomConfigurationAsync(docUris, provider);
telemetry.logLanguageServerEvent('provideCustomConfigurations', { providerId, resultCode });
} finally {
void this.languageClient.sendNotification(FinishedRequestCustomConfig, { batchId, isProviderRegistered });
onFinished();
}
}
@@ -2504,8 +2522,9 @@ export class DefaultClient implements Client {
* the UI results and always re-requests (no caching).
*/
public getIncludes(uri: vscode.Uri, maxDepth: number): Promise<GetIncludesResult> {
public async getIncludes(uri: vscode.Uri, maxDepth: number): Promise<GetIncludesResult> {
const params: GetIncludesParams = { fileUri: uri.toString(), maxDepth };
await this.ready;
return this.languageClient.sendRequest(IncludesRequest, params);
}
@@ -2526,11 +2545,82 @@ export class DefaultClient implements Client {
}
/**
* A Promise that can be awaited to know when the language client (cpptools) is up and running.
* It also implies that `this.innerConfiguration` is set.
* a Promise that can be awaited to know when it's ok to proceed.
*
* This is a lighter-weight complement to `enqueue()`
*
* Use `await <client>.ready` when you need to ensure that the client is initialized, and to run in order
* Use `enqueue()` when you want to ensure that subsequent calls are blocked until a critical bit of code is run.
*
* This is lightweight, because if the queue is empty, then the only thing to wait for is the client itself to be initialized
*/
get ready(): Promise<void> {
return this.languageClient.ready;
if (!DefaultClient.dispatching.isCompleted || DefaultClient.queue.length) {
// if the dispatcher has stuff going on, then we need to stick in a promise into the queue so we can
// be notified when it's our turn
const p = new ManualPromise<void>();
DefaultClient.queue.push([p as ManualPromise<unknown>]);
return p;
}
// otherwise, we're only waiting for the client to be in an initialized state, in which case just wait for that.
return DefaultClient.isStarted;
}
/**
* Enqueue a task to ensure that the order is maintained. The tasks are executed sequentially after the client is ready.
*
* this is a bit more expensive than `.ready` - this ensures the task is absolutely finished executing before allowing
* the dispatcher to move forward.
*
* Use `enqueue()` when you want to ensure that subsequent calls are blocked until a critical bit of code is run.
* Use `await <client>.ready` when you need to ensure that the client is initialized, and still run in order.
*/
enqueue<T>(task: () => Promise<T>) {
ok(this.isSupported, localize("unsupported.client", "Unsupported client"));
// create a placeholder promise that is resolved when the task is complete.
const result = new ManualPromise<unknown>();
// add the task to the queue
DefaultClient.queue.push([result, task]);
// if we're not already dispatching, start
if (DefaultClient.dispatching.isSet) {
// start dispatching
void DefaultClient.dispatch();
}
// return the placeholder promise to the caller.
return result as Promise<T>;
}
/**
* The dispatch loop asynchronously processes items in the async queue in order, and ensures that tasks are dispatched in the
* order they were inserted.
*/
private static async dispatch() {
// reset the promise for the dispatcher
DefaultClient.dispatching.reset();
do {
// ensure that this is OK to start working
await this.isStarted;
// pick items up off the queue and run then one at a time until the queue is empty
const [promise, task] = DefaultClient.queue.shift() ?? [];
if (is.promise(promise)) {
try {
promise.resolve(task ? await task() : undefined);
} catch (e) {
console.log(e);
promise.reject(e);
}
}
} while (DefaultClient.queue.length);
// unblock anything that is waiting for the dispatcher to empty
this.dispatching.resolve();
}
private static async withLspCancellationHandling<T>(task: () => Promise<T>, token: vscode.CancellationToken): Promise<T> {
@@ -2582,7 +2672,7 @@ export class DefaultClient implements Client {
* listen for notifications from the language server.
*/
private registerNotifications(): void {
console.assert(this.languageClient.isInitialized, "This method must not be called until the language client is initialized.");
console.assert(this.languageClient !== undefined, "This method must not be called until this.languageClient is set in \"onReady\"");
this.languageClient.onNotification(ReloadWindowNotification, () => void util.promptForReloadWindowDueToSettingsChange());
this.languageClient.onNotification(UpdateTrustedCompilersNotification, (e) => void this.addTrustedCompiler(e.compilerPath));
@@ -2691,7 +2781,7 @@ export class DefaultClient implements Client {
* listen for file created/deleted events under the ${workspaceFolder} folder
*/
private registerFileWatcher(): void {
console.assert(this.languageClient.isInitialized, "This method must not be called until the language client is initialized.");
console.assert(this.languageClient !== undefined, "This method must not be called until this.languageClient is set in \"onReady\"");
if (this.rootFolder) {
// WARNING: The default limit on Linux is 8k, so for big directories, this can cause file watching to fail.
@@ -2964,8 +3054,7 @@ export class DefaultClient implements Client {
this.inactiveRegionsDecorations.set(uriString, currentSet);
}
Array.prototype.push.apply(currentSet.ranges, inactiveRegions.map(element =>
new vscode.Range(element.startLine, element.startColumn, element.endLine, element.endColumn)));
Array.prototype.push.apply(currentSet.ranges, inactiveRegions.map(element => new vscode.Range(element.startLine, 0, element.endLine, 0)));
// Apply the decorations to all *visible* text editors
const editors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => e.document.uri.toString() === uriString);
@@ -3053,16 +3142,18 @@ export class DefaultClient implements Client {
switchHeaderSourceFileName: fileName,
workspaceFolderUri: rootUri.toString()
};
// Don't use withLspCancellationHandling() or withCancellation() here. If the switch target is already known,
// the caller should still be able to use it even if the progress notification was just cancelled.
try {
return await this.languageClient.sendRequest(SwitchHeaderSourceRequest, params, token);
} catch (e: any) {
if (e instanceof ResponseError && (e.code === RequestCancelled || e.code === ServerCancelled)) {
throw new vscode.CancellationError();
return this.enqueue(async () => {
// Don't use withLspCancellationHandling() or withCancellation() here. If the switch target is already known,
// the caller should still be able to use it even if the progress notification was just cancelled.
try {
return await this.languageClient.sendRequest(SwitchHeaderSourceRequest, params, token);
} catch (e: any) {
if (e instanceof ResponseError && (e.code === RequestCancelled || e.code === ServerCancelled)) {
throw new vscode.CancellationError();
}
throw e;
}
throw e;
}
});
}
public async requestCompiler(newCompilerPath?: string): Promise<configs.CompilerDefaults> {
@@ -3142,6 +3233,7 @@ export class DefaultClient implements Client {
* send notifications to the language server to restart IntelliSense for the selected file.
*/
public async restartIntelliSenseForFile(document: vscode.TextDocument): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(RestartIntelliSenseForFileNotification, this.languageClient.code2ProtocolConverter.asTextDocumentIdentifier(document)).catch(logAndReturn.undefined);
}
@@ -3158,6 +3250,7 @@ export class DefaultClient implements Client {
}
public async resetDatabase(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(ResetDatabaseNotification);
}
@@ -3169,24 +3262,29 @@ export class DefaultClient implements Client {
}
public async pauseParsing(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(PauseParsingNotification);
}
public async resumeParsing(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(ResumeParsingNotification);
}
public async PauseCodeAnalysis(): Promise<void> {
await this.ready;
this.model.isCodeAnalysisPaused.Value = true;
return this.languageClient.sendNotification(PauseCodeAnalysisNotification);
}
public async ResumeCodeAnalysis(): Promise<void> {
await this.ready;
this.model.isCodeAnalysisPaused.Value = false;
return this.languageClient.sendNotification(ResumeCodeAnalysisNotification);
}
public async CancelCodeAnalysis(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(CancelCodeAnalysisNotification);
}
@@ -3321,6 +3419,7 @@ export class DefaultClient implements Client {
currentConfiguration: index,
workspaceFolderUri: this.RootUri?.toString()
};
await this.ready;
await this.languageClient.sendNotification(ChangeSelectedSettingNotification, params);
let configName: string = "";
@@ -3336,6 +3435,7 @@ export class DefaultClient implements Client {
uri: vscode.Uri.file(path).toString(),
workspaceFolderUri: this.RootUri?.toString()
};
await this.ready;
return this.languageClient.sendNotification(ChangeCompileCommandsNotification, params);
}
@@ -3521,6 +3621,7 @@ export class DefaultClient implements Client {
const params: WorkspaceFolderParams = {
workspaceFolderUri: this.RootUri?.toString()
};
await this.ready;
return this.languageClient.sendNotification(ClearCustomConfigurationsNotification, params);
}
@@ -3529,6 +3630,7 @@ export class DefaultClient implements Client {
const params: WorkspaceFolderParams = {
workspaceFolderUri: this.RootUri?.toString()
};
await this.ready;
return this.languageClient.sendNotification(ClearCustomBrowseConfigurationNotification, params);
}
@@ -3615,6 +3717,7 @@ export class DefaultClient implements Client {
position: editor.selection.active,
next: next
};
await this.ready;
const response: Position | undefined = await this.languageClient.sendRequest(GoToDirectiveInGroupRequest, params);
if (response) {
const p: vscode.Position = new vscode.Position(response.line, response.character);
@@ -3647,6 +3750,7 @@ export class DefaultClient implements Client {
isCodeAction: codeActionArguments !== undefined,
isCursorAboveSignatureLine: codeActionArguments?.isCursorAboveSignatureLine
};
await this.ready;
const currentFileVersion: number | undefined = openFileVersions.get(params.uri);
if (currentFileVersion === undefined) {
return;
@@ -3692,19 +3796,23 @@ export class DefaultClient implements Client {
}
}
public handleRunCodeAnalysisOnActiveFile(): Promise<void> {
public async handleRunCodeAnalysisOnActiveFile(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(CodeAnalysisNotification, { scope: CodeAnalysisScope.ActiveFile });
}
public handleRunCodeAnalysisOnOpenFiles(): Promise<void> {
public async handleRunCodeAnalysisOnOpenFiles(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(CodeAnalysisNotification, { scope: CodeAnalysisScope.OpenFiles });
}
public handleRunCodeAnalysisOnAllFiles(): Promise<void> {
public async handleRunCodeAnalysisOnAllFiles(): Promise<void> {
await this.ready;
return this.languageClient.sendNotification(CodeAnalysisNotification, { scope: CodeAnalysisScope.AllFiles });
}
public async handleRemoveAllCodeAnalysisProblems(): Promise<void> {
await this.ready;
if (removeAllCodeAnalysisProblems()) {
return this.languageClient.sendNotification(CodeAnalysisNotification, { scope: CodeAnalysisScope.ClearSquiggles });
}
@@ -3735,6 +3843,8 @@ export class DefaultClient implements Client {
}
public async handleRemoveCodeAnalysisProblems(refreshSquigglesOnSave: boolean, identifiersAndUris: CodeAnalysisDiagnosticIdentifiersAndUri[]): Promise<void> {
await this.ready;
// A deep copy is needed because the call to identifiers.splice below can
// remove elements in identifiersAndUris[...].identifiers.
const identifiersAndUrisCopy: CodeAnalysisDiagnosticIdentifiersAndUri[] = [];
@@ -4214,8 +4324,9 @@ export class DefaultClient implements Client {
}
public onInterval(): void {
// These events can be discarded until the language client is ready. Don't queue them up.
if (this.languageClient.isInitialized && this.configuration !== undefined) {
// These events can be discarded until the language client is ready.
// Don't queue them up with this.notifyWhenLanguageClientReady calls.
if (this.innerLanguageClient !== undefined && this.configuration !== undefined) {
void this.languageClient.sendNotification(IntervalTimerNotification).catch(logAndReturn.undefined);
this.configuration.checkCppProperties();
this.configuration.checkCompileCommands();
@@ -4261,6 +4372,8 @@ export class DefaultClient implements Client {
}
public async handleReferencesIcon(): Promise<void> {
await this.ready;
workspaceReferences.UpdateProgressUICounter(this.model.referencesCommandMode.Value);
// If the search is find all references, preview partial results.
@@ -4394,6 +4507,9 @@ class NullClient implements Client {
readonly ready: Promise<void> = Promise.resolve();
async enqueue<T>(task: () => Promise<T>) {
return task();
}
public get InitializingWorkspaceChanged(): vscode.Event<boolean> { return this.booleanEvent.event; }
public get IndexingWorkspaceChanged(): vscode.Event<boolean> { return this.booleanEvent.event; }
public get ParsingWorkspaceChanged(): vscode.Event<boolean> { return this.booleanEvent.event; }
@@ -121,6 +121,7 @@ export class ClientCollection {
const client: cpptools.Client = pair[1];
const newClient: cpptools.Client = this.createClient(client.RootFolder, true);
await newClient.ready;
for (const document of client.TrackedDocuments.values()) {
this.transferOwnership(document, client);
await newClient.sendDidOpen(document);
+1 -2
View File
@@ -4,11 +4,10 @@
* ------------------------------------------------------------------------------------------ */
'use strict';
import * as vscode from 'vscode';
import { NotificationType, Range } from 'vscode-languageclient';
import { LanguageClient, NotificationType, Range } from 'vscode-languageclient/node';
import * as nls from 'vscode-nls';
import { Location, WorkspaceEdit } from './commonTypes';
import { CppSourceStr } from './extension';
import { LanguageClient } from './languageClient';
import { LocalizeStringParams, getLocalizedString } from './localization';
import { CppSettings } from './settings';
import { makeVscodeLocation, makeVscodeRange, makeVscodeTextEdits, rangeEquals } from './utils';
@@ -136,7 +136,7 @@ export interface CompilerDefaults {
trustedCompilerFound: boolean;
}
export class CppProperties implements vscode.Disposable {
export class CppProperties {
private client: DefaultClient;
private rootUri: vscode.Uri | undefined;
private propertiesFile: vscode.Uri | undefined | null = undefined; // undefined and null values are handled differently
+12 -4
View File
@@ -185,11 +185,11 @@ export async function activate(): Promise<void> {
disposables.push(vscode.workspace.onDidOpenTextDocument(onDidOpenTextDocument));
disposables.push(vscode.workspace.onDidChangeConfiguration(onDidChangeSettings));
disposables.push(vscode.window.onDidChangeTextEditorVisibleRanges(e => onDidChangeTextEditorVisibleRanges(e)));
disposables.push(vscode.window.onDidChangeActiveTextEditor(e => onDidChangeActiveTextEditor(e)));
disposables.push(vscode.window.onDidChangeTextEditorVisibleRanges((e) => clients.ActiveClient.enqueue(async () => onDidChangeTextEditorVisibleRanges(e))));
disposables.push(vscode.window.onDidChangeActiveTextEditor((e) => clients.ActiveClient.enqueue(async () => onDidChangeActiveTextEditor(e))));
ui.didChangeActiveEditor(); // Handle already active documents (for non-cpp files that we don't register didOpen).
disposables.push(vscode.window.onDidChangeTextEditorSelection(e => onDidChangeTextEditorSelection(e)));
disposables.push(vscode.window.onDidChangeVisibleTextEditors(e => onDidChangeVisibleTextEditors(e)));
disposables.push(vscode.window.onDidChangeTextEditorSelection((e) => clients.ActiveClient.enqueue(async () => onDidChangeTextEditorSelection(e))));
disposables.push(vscode.window.onDidChangeVisibleTextEditors((e) => clients.ActiveClient.enqueue(async () => onDidChangeVisibleTextEditors(e))));
updateLanguageConfigurations();
reportMacCrashes();
@@ -565,10 +565,12 @@ async function selectClient(): Promise<Client> {
}
async function onResetDatabase(): Promise<void> {
await clients.ActiveClient.ready;
return clients.ActiveClient.resetDatabase();
}
async function onRescanCompilers(sender?: any): Promise<void> {
await clients.ActiveClient.ready;
return clients.ActiveClient.rescanCompilers(sender);
}
@@ -577,6 +579,7 @@ async function onAddMissingInclude(): Promise<void> {
}
async function selectIntelliSenseConfiguration(sender?: any): Promise<void> {
await clients.ActiveClient.ready;
return clients.ActiveClient.promptSelectIntelliSenseConfiguration(sender);
}
@@ -874,6 +877,7 @@ async function onFindAllReferences(uri: vscode.Uri, position: vscode.Position, t
return undefined;
}
await client.ready;
const result = await sendFindAllReferencesRequest(client, uri, position, token ?? CancellationToken.None);
return result?.locations;
}
@@ -888,6 +892,7 @@ async function onGoToDefinition(uri: vscode.Uri, position: vscode.Position, toke
return undefined;
}
await client.ready;
return sendGoToDefinitionRequest(client, uri, position, token ?? CancellationToken.None);
}
@@ -901,6 +906,7 @@ async function onPrepareCallHierarchy(uri: vscode.Uri, position: vscode.Position
return undefined;
}
await client.ready;
return sendPrepareCallHierarchyRequest(client, uri, position, token ?? CancellationToken.None);
}
@@ -914,6 +920,7 @@ async function onCallHierarchyCallsTo(item: vscode.CallHierarchyItem, token?: vs
return undefined;
}
await client.ready;
return sendCallHierarchyCallsToRequest(client, item, token ?? CancellationToken.None);
}
@@ -927,6 +934,7 @@ async function onCallHierarchyCallsFrom(item: vscode.CallHierarchyItem, token?:
return undefined;
}
await client.ready;
return sendCallHierarchyCallsFromRequest(client, item, token ?? CancellationToken.None);
}
@@ -1,90 +0,0 @@
/* --------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
'use strict';
import { Disposable } from 'vscode';
import { CancellationToken, NotificationHandler, NotificationType, RequestType } from 'vscode-languageclient';
import * as rpc from 'vscode-languageclient/node';
import { ManualSignal } from '../Utility/Async/manualSignal';
export class LanguageClient {
private _rpcClient?: rpc.LanguageClient;
private readonly _started = new ManualSignal<void>(true);
/**
* Returns a promise that waits for the RPC connection to be ready.
*/
public get ready(): Promise<void> {
return this._started;
}
/**
* Set the initialization state of the underlying RPC client.
* This is used to indicate that the underlying RPC client has been initialized and is ready to send requests.
* If resetting the RPC client, set this to false.
*/
public set isStarted(value: boolean) {
if (value) {
this._started.resolve();
} else {
this._started.reset();
}
}
/**
* Returns true if the underlying RPC client has been initialized.
* Used in cases where a quick check of the initialization state is desired instead of waiting on the `ready` promise.
*/
public get isInitialized(): boolean {
return !!this._rpcClient;
}
/**
* Set the underlying RPC client.
* This should only be called once during initialization.
*/
public setLanguageClient(languageClient?: rpc.LanguageClient): void {
this._rpcClient = languageClient;
}
/**
* Validate and return the underlying RPC client.
* Strips away the `undefined` type from `this._rpcClient`.
*/
private get rpcClient(): rpc.LanguageClient {
if (!this._rpcClient) {
throw new Error("Attempting to use languageClient before initialized");
}
return this._rpcClient;
}
public get protocol2CodeConverter(): rpc.LanguageClient["protocol2CodeConverter"] {
return this.rpcClient.protocol2CodeConverter;
}
public get code2ProtocolConverter(): rpc.LanguageClient["code2ProtocolConverter"] {
return this.rpcClient.code2ProtocolConverter;
}
public async sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken): Promise<R> {
await this.ready;
return this.rpcClient.sendRequest(type, params, token);
}
public async sendNotification<P>(type: NotificationType<P>, params?: P): Promise<void> {
await this.ready;
return this.rpcClient.sendNotification(type, params);
}
public onNotification<P>(type: NotificationType<P>, handler: NotificationHandler<P>): Disposable {
// These messages are received from cpptools, and therefore it is not needed to await the ready signal.
return this.rpcClient.onNotification(type, handler);
}
public stop(): Promise<void> {
return this._rpcClient?.stop() ?? Promise.resolve();
}
}
@@ -45,8 +45,10 @@ export function createProtocolFilter(): Middleware {
// client.takeOwnership() will call client.TrackedDocuments.add() again, but that's ok. It's a Set.
client.takeOwnership(document);
void sendMessage(document);
const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
void client.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined);
client.ready.then(() => {
const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
client.onDidChangeVisibleTextEditors(cppEditors).catch(logAndReturn.undefined);
}).catch(logAndReturn.undefined);
}
}
},