Compare commits

...
145 Commits
Author SHA1 Message Date
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 21ef2e36d6 Fix SettingsTracking treating numerical loggingLevel as invalid. (#12216)
* Fix SettingsTracking treating numerical loggingLevel as invalid.
* Fix numeric loggingLevels.
* Return -1 numerical value on invalid levels.
2024-04-18 12:44:22 -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 b955eeb013 Update version and changelog for 1.20.2 (#12208) 2024-04-16 17:31:16 -07:00
Sean McManus 3e6b99925b Crash handler update (#12190)
* Minor update to watchForCrashes.
* Add preinitialize message.
2024-04-16 15:36:28 -07:00
Bob Brown f06f689488 rename telemetry property (#12202) 2024-04-15 17:05:48 -07:00
Bob Brown fec0d8854e Log more info with the configuration provider telemetry (#12193) 2024-04-13 09:01:53 -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
Bob Brown 4650cfeeb9 Update CHANGELOG.md (#12186) 2024-04-09 14:43:42 -07:00
Sean McManus 35cda7ebb0 Update changelog for 1.20.1 (#12182)
* Update changelog for 1.20.1
2024-04-09 13:09:25 -07:00
Sean McManus 92a0494796 Update for libexecinfo crash handler change. (#12158)
* Update for libexecinfo crash handler change.
* Update ThirdPartyNotices.txt
2024-04-08 16:13:36 -07:00
Bob Brown d2bd18acf1 don't strip underscores when demangling (#12159) 2024-04-01 14:04:46 -07:00
Bob Brown f3cbf1237d clean up the pipeline runs (#12151) 2024-03-27 17:32:41 -07:00
Bob Brown 76509d6a0c Component Governance pipeline for vscode-cpptools (#12148) 2024-03-27 14:07:28 -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
Sean McManus 32ead756bb Update changelog and version for 1.20.0. 2024-03-25 16:17:37 -07:00
Colen Garoutte-Carson 976a1ba8e8 Update to clang-tidy 18.1.2 (#12135) 2024-03-22 18:14:30 -07:00
Garrett Serack 1c4292d8f5 remove unnecessary null (#12133) 2024-03-22 11:22:26 -07:00
Garrett Serack 1ab766bc5c Add setting to support max search results (#12131) 2024-03-21 11:17:24 -07:00
Colen Garoutte-Carson 127588ba57 Update changelog for 1.19.9 again (#12122) 2024-03-19 16:15:31 -07:00
Colen Garoutte-Carson ccd80fedb1 Update changelog 1.19.9 (#12117) 2024-03-18 13:21:27 -07:00
dependabot[bot]andSean McManus 1fc8731c2b Bump follow-redirects from 1.15.5 to 1.15.6 in /Extension (#12112)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  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]>
2024-03-18 12:31:43 -07:00
dependabot[bot]andSean McManus b6deaf9fa0 Bump follow-redirects from 1.15.4 to 1.15.6 in /.github/actions (#12111)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  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]>
2024-03-18 12:24:09 -07:00
browntarik a6eff82854 Add internal formatting support for Copy Declaration/Definition (#12055)
* Add text formatting for CopyDD

* fix lint issues

* Plumb up editor settings msg

* add vcFormat param

* Add formatParams to CDD + rollback changes

* fix lint issue

* update defaults

* Reafctor formatParams correctly for vcFormat and .editor_config

* populate editorConfigSettings

* minor fix

* minor fix
2024-03-18 11:08:11 -07:00
Luca 751fd74113 Add a command to fetch the includes graph for a TU (#12085) 2024-03-14 16:54:37 -07:00
Colen Garoutte-Carson 3dfa607685 Revert "Address multiple-init scenario"
This reverts commit b2c06a57c9.
2024-03-14 12:55:19 -07:00
Colen Garoutte-Carson b2c06a57c9 Address multiple-init scenario 2024-03-14 12:54:14 -07:00
Colen Garoutte-Carson a97a334eb0 Update changelog for 1.19.8 again (#12099) 2024-03-13 17:11:41 -07:00
browntarik 3d8180141f Eliminate squiggle from all glob configurations (#12072)
* Fix glob coverage

* resolve and split paths before validation

* expand glob patterns and do not expand incorrect paths

* Do not squiggle paths that need to be expanded

* revert change

* squiggle paths that end with *

* Do not squiggle paths that end with *

* properly squiggle glob paths with recursive includes

* correctly report squiggles with glob paths

* move check for asterisk to outer check

* fix lint issues
2024-03-13 17:13:31 +00:00
Colen Garoutte-Carson 74ab0e7ba5 Update changelog for 1.19.8 (#12092) 2024-03-12 19:10:13 -07:00
Sean McManus 8dfeccd935 Fix Add Configuration with snippets disabled. (#12080) 2024-03-11 16:45:35 -07:00
Bob Brown c144fe2408 Prevent the status bar from updating too quickly (#12088) 2024-03-11 13:29:52 -07:00
Colen Garoutte-Carson 3bbc6716ad Update changelog again for 1.19.7 (#12086) 2024-03-08 15:00:40 -08:00
Colen Garoutte-Carson 75ed1b5ec3 Update changelog for 1.19.7 (#12081) 2024-03-08 10:29:55 -08:00
browntarik 699b3d52c5 Resolve userHome variable in c_cpp_properties.json (#12071)
* Add userHome envrionment variable

* Resolve userHome to os.homedir

* revert change

* fix lint issues

* Rework resolving variables + minor change

* Minor fixes
2024-03-07 10:59:30 -08:00
Colen Garoutte-Carson ae8c4aca58 Update edge json files for FI (#12074) 2024-03-06 19:47:10 -08:00
Colen Garoutte-Carson 79d0c06951 Update edge loc strings (#12073) 2024-03-06 18:58:33 -08:00
Colen Garoutte-Carson a877c6f1ae Fix forced include resolution (#12035) 2024-03-06 14:15:22 -08:00
Colen Garoutte-Carson 6ccc588d69 Merge branch 'release' into main 2024-03-05 17:13:14 -08:00
Colen Garoutte-Carson 81071ba4f5 Update changelog for 1.19.6 (#12064) 2024-03-05 17:12:32 -08:00
Sean McManus e12c7c28d1 Merge pull request #12054 from microsoft/main
Update changelog (again) (#12053)
2024-03-04 12:57:53 -08:00
Sean McManus 724b47922e Update changelog (again) (#12053) 2024-03-04 12:56:08 -08:00
Sean McManus b3911bf88a Merge pull request #12046 from microsoft/main
Update date (#12045)
2024-03-01 18:41:51 -08:00
Sean McManus 802f94560d Update date (#12045)
* Update date.
2024-03-01 13:50:12 -08:00
Sean McManus 5573667b95 Merge pull request #12038 from microsoft/main
Update changelog. (#12037)
2024-02-29 17:14:10 -08:00
Sean McManus dd5d161991 Update changelog. (#12037) 2024-02-29 17:12:48 -08:00
Colen Garoutte-Carson a005307a60 Merge pull request #12034 from microsoft/main 2024-02-28 13:38:45 -08:00
Colen Garoutte-Carson dcb4b8501d Merge branch 'release' into main 2024-02-28 12:53:08 -08:00
Colen Garoutte-Carson 1e65cbf65d Update changelog for 1.19.5 (#12033) 2024-02-28 12:52:03 -08:00
Sean McManus cdc9dd8584 Fix inlay hint tests. And reapply inlay hint settings if they're changed (#12014)
* Fix inlay hint tests. And reapply inlay hint settings if they're changed.
* Make updating work without scrolling.
2024-02-27 14:45:19 -08:00
Sean McManus 93f4337576 Fix error handling when HostName is not available (#12022)
* Fix error handling when the HostName isn't available.
2024-02-27 14:26:19 -08:00
Colen Garoutte-Carson 69338b814b Update cppbuild task behavior for args and command fields to match VS Code's shell task type (#12026) 2024-02-27 13:07:40 -08:00
dependabot[bot] af6287f1ca Bump es5-ext from 0.10.62 to 0.10.64 in /Extension (#12028)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64.
- [Release notes](https://github.com/medikoo/es5-ext/releases)
- [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/es5-ext/compare/v0.10.62...v0.10.64)

---
updated-dependencies:
- dependency-name: es5-ext
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 10:37:23 -08:00
Colen Garoutte-Carson 1868f99cad Merge pull request #11996 from microsoft/main 2024-02-21 12:32:11 -08:00
Colen Garoutte-Carson ef3472d8f5 Merge branch 'release' into main 2024-02-21 12:08:28 -08:00
Sean McManus 347a1fac67 Update changelog for 1.19.4 (#11976)
* Update changelog for 1.19.4
2024-02-21 19:47:55 +00:00
[email protected] 239d6a036b [Auto] Localization - Translated Strings (#11948) 2024-02-21 11:47:00 -08:00
dependabot[bot] d1da368537 Bump ip from 2.0.0 to 2.0.1 in /.github/actions (#11990)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-20 19:36:49 -08:00
browntarik 38c16a5888 Update shell quote E2E test (#11977)
* resolve e2e test
2024-02-20 16:04:46 -08:00
Trond Einar Snekvik 8b9960c603 Silence console.logs (#11973)
Removes the console.log messages that show up during normal execution.
Leaves console.logs in exception handlers the way they are.

Signed-off-by: Trond Einar Snekvik <[email protected]>
2024-02-16 18:05:33 -08:00
jogo- 0c937511c7 Fix typo in CHANGELOG.md (#11968) 2024-02-15 13:42:23 -08:00
browntarik 36ea516731 Fix E2E Shell Quoting Test (#11975)
* resolve e2e test

* Resolve prompt regression and tests

* Fix lint issue

* resolve e2e test

* add double quotes

* only escape baskslash

* resolve e2e test

* Add backslash
2024-02-15 11:40:42 -08:00
browntarik 54314feab5 Fix shell quoting e2e test (#11969)
* resolve e2e test

* Resolve prompt regression and tests

* Fix lint issue

* resolve e2e test

* add double quotes

* only escape baskslash
2024-02-14 15:27:10 -08:00
browntarik 286a5c590a Resolve prompt regression + fix e2e tests (#11964)
* resolve e2e test

* Resolve prompt regression and tests

* Fix lint issue
2024-02-13 15:01:59 -08:00
browntarik ce202f3549 resolve e2e test (#11961) 2024-02-13 12:08:42 -08:00
Colen Garoutte-Carson 76ccb791ff Merge pull request #11947 from microsoft/main 2024-02-09 17:16:17 -08:00
Colen Garoutte-Carson c7882e941c Update changelog for 1.19.3, to mention C_Cpp.experimentalFeatures (#11946) 2024-02-09 15:43:18 -08:00
[email protected] c5da16771a [Auto] Localization - Translated Strings (#11635) 2024-02-09 15:38:30 -08:00
browntarik 98c6222154 change ping interval to 14 days and close interval to 30 (#11943) 2024-02-09 09:17:53 -08:00
Colen Garoutte-Carson a5a5735089 Merge pull request #11942 from microsoft/main 2024-02-08 17:07:45 -08:00
Colen Garoutte-Carson 33dce288dd Update changelog and version for 1.19.3 (#11941) 2024-02-08 16:50:48 -08:00
Sean McManus 406f1d62df Update TPN. (#11940) 2024-02-08 15:48:18 -08:00
Garrett SerackandSean McManus 674148fb07 Perf-boost - fast query symbols (#11785)
* Perf-boost - fast query symbols

* Rebased, updated (moved to node 18.15.0+)

* quick cleanup

* remove unused linter directive

* Delete Extension/cpp.hint

That wasn't supposed to be here.

* restore file

---------

Co-authored-by: Sean McManus <[email protected]>
2024-02-08 14:37:29 -08:00
browntarik aa5601041c Remove whitespace if the includePath exists + minor fix (#11911)
* Remove whitespace if the includePath exists + minor fix

* fix lint issues

* Move includePath validation to config.ts

* fix lint issues

* small fixes

* fix lint issues
2024-02-05 16:15:01 -08:00
Colen Garoutte-Carson 62d167aeb3 Change default intelliSenseUpdateDelay to 1s (#11932) 2024-02-05 15:44:59 -08:00
browntarik b742a191ee Validate Compiler Paths Against PATH Environment Variable in Configuration UI (#11913)
* resolve compiler against envrionment variables

* fix lint issue
2024-02-01 13:36:09 -08:00
Sean McManus 9229952cd9 Update TPN for musl (#11912) 2024-01-31 18:01:57 -08:00
Sean McManus 389cfdd583 Improve crash logging (#11899)
* Improve crash logging.
2024-01-26 13:01:06 -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
Sean McManus 3f1e851152 Log cpptools crash call stacks. (#11858)
* Log cpptools crash call stacks.
2024-01-19 17:51:01 -08:00
Colen Garoutte-Carson 6b1fe63294 Update changelog for 1.19.2 (#11885) 2024-01-19 15:30:00 -08:00
browntarik 821fbb3566 update changelog (#11878) 2024-01-19 15:03:15 -08:00
Sean McManus 3670564712 Fix broken edtior.wordBasedSuggestions setting. (#11773) 2024-01-18 10:29:43 -08:00
Colen Garoutte-Carson f38926f8b1 Merge pull request #11874 from microsoft/main 2024-01-16 17:41:23 -08:00
Sean McManus ced402ad5d Update ThirdPartyNotices.txt (#11873) 2024-01-16 17:29:06 -08:00
Colen Garoutte-Carson 5f8d072b86 Update CHANGELOG for 1.19.2 (#11871) 2024-01-16 17:22:55 -08:00
Sean McManus f84f285db3 Fix EACCES error when using include wildcards. (#11870) 2024-01-16 16:41:16 -08:00
Tobias Obermayer 44194c000d fix german translation for RunCodeAnalysis (#11845) 2024-01-16 15:49:38 -08:00
dependabot[bot]andSean McManus c61bd07bb5 Bump follow-redirects from 1.15.1 to 1.15.4 in /.github/actions (#11849)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.1 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.1...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  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]>
2024-01-09 10:36:24 -08:00
dependabot[bot] 3df0a0f796 Bump follow-redirects from 1.15.3 to 1.15.4 in /Extension (#11850)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 10:30:20 -08:00
Colen Garoutte-Carson f16dfc92b2 Add permissions field to bot actions (#11847) 2024-01-08 16:40:51 -08:00
Bob Brown 96faf18d96 Address issues reported by compliance tooling (#11841) 2024-01-08 16:14:54 -08:00
browntarik 6393210a31 update shell quote baseline (#11827) 2024-01-03 10:48:29 -08:00
Sean McManus 7151847d1f Fix C_Cpp.autocomplete description. (#11816) 2023-12-29 14:33:57 -08:00
Sean McManus d5ffbd86f3 Fix extract to function formatting. (#11804)
* Fix extract to function formatting.
2023-12-27 15:04:04 -08:00
Sean McManus ab8b90b187 Stop clearing code analysis problems in updateCustomConfigurations. (#11798) 2023-12-21 17:35:51 -08:00
Sean McManus 8d42c49b77 Fix configuration provider handling with intelliSenseEngine "disabled". (#11797) 2023-12-21 12:27:41 -08:00
Colen Garoutte-Carson 0e24296f67 Enable progressive IntelliSense updates (#11735) 2023-12-19 18:24:05 -08:00
browntarik 7f87dc49f8 Fix shell quoting for command line arguments (#11734)
* Add shell quoting for command line arguments

* add shell escape logic from native

* resolve lint issues

* Refactor quoteArgument and getTask

* Add os specific shell quoting

* Correctly apply shell-quotes on Unix

* Fix lint

* fix lint

* Refactor quoteArgument logic
2023-11-30 10:01:19 -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 cc4177b096 Update for 1.19.1 (#11724) 2023-11-21 14:58:42 -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 a25b309ac7 Update for 1.19.0 (#11688)
* Update for 1.19.0
2023-11-16 17:01:15 -08:00
Sean McManus e7cb0a7c6a Merge pull request #11698 from microsoft/main
Merge for 1.18.5
2023-11-16 16:55:09 -08:00
Sean McManus b6f48cd1fe Update changelog and version for 1.18.5 (#11697) 2023-11-16 16:39:31 -08:00
Sean McManus ea391a3a17 Fix default Linux cache path. (#11696) 2023-11-16 15:46:03 -08:00
Sean McManus 4ba260c486 Merge pull request #11687 from microsoft/main
Merge for 1.18.4
2023-11-14 17:25:29 -08:00
Sean McManus 7cb9f88f6c Switch to a static import. Add telemetry. (#11686)
* Switch to a static import. Add telemetry.
2023-11-14 16:39:18 -08:00
Sean McManus 203823a6af Fix 'Extract to function' header selection state. (#11677)
* Fix 'Extract to function' header selection state.
* Update changelog.
2023-11-14 14:58:42 -08:00
Sean McManus 10564f909a Update changelog. 2023-11-14 14:41:00 -08:00
Sean McManus 383579dba3 Fix fetch call for VS Code before 1.82.0. (#11683) 2023-11-14 14:29:52 -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
107 changed files with 50001 additions and 47829 deletions
+6 -6
View File
@@ -3915,9 +3915,9 @@
"dev": true
},
"node_modules/follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
"version": "1.15.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
"funding": [
{
"type": "individual",
@@ -4200,9 +4200,9 @@
"dev": true
},
"node_modules/ip": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
"integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz",
"integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==",
"dev": true
},
"node_modules/is-binary-path": {
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v3
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v3
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
@@ -22,7 +24,7 @@ jobs:
readonly: ${{ github.event.inputs.readonly }}
labels: more info needed
ignoreLabels: debugger,internal
closeDays: 60
closeDays: 30
closeComment: "This issue has been closed because it needs more information and has not had recent activity."
pingDays: 80
pingDays: 14
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
+2
View File
@@ -11,6 +11,8 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@v2
+95
View File
@@ -0,0 +1,95 @@
name: $(date:yyyyMMdd)$(rev:.r)
trigger:
branches:
include:
- main
- release
schedules:
- cron: 30 5 * * 0
branches:
include:
- main
always: true
resources:
repositories:
- repository: MicroBuildTemplate
type: git
name: 1ESPipelineTemplates/MicroBuildTemplate
ref: refs/tags/release
extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
pool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
sdl:
sourceAnalysisPool:
name: AzurePipelines-EO
image: AzurePipelinesWindows2022compliantGPT
os: windows
tsa:
enabled: false
featureFlags:
autoBaseline: false
stages:
- stage: build
jobs:
- job: Phase_1
displayName: Build cpptools.vsix
timeoutInMinutes: 60
cancelTimeoutInMinutes: 1
templateContext:
outputs:
- output: pipelineArtifact
displayName: 'cpptools.vsix'
condition: succeeded()
targetPath: $(Build.ArtifactStagingDirectory)\Extension
artifactName: cpptools.vsix
steps:
- checkout: self
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: Use Yarn 1.x
- task: UseNode@1
displayName: Use Node 16.x
inputs:
version: 16.x
- task: CmdLine@2
displayName: Delete .npmrc if it exists
inputs:
script: IF EXIST %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc del %SYSTEMDRIVE%\Users\%USERNAME%\.npmrc
- task: Npm@0
name: NpmInstall_2
displayName: Install vsce
inputs:
arguments: --global @vscode/vsce
- task: CmdLine@1
name: ProcessRunner_11
displayName: Create Extension Staging Directory
inputs:
filename: mkdir
arguments: $(Build.ArtifactStagingDirectory)\Extension
- task: CmdLine@1
name: ProcessRunner_12
displayName: Run VSCE to package vsix
inputs:
filename: vsce
arguments: package --yarn -o $(Build.ArtifactStagingDirectory)\Extension\cpptools.vsix
workingFolder: $(Build.SourcesDirectory)\Extension
- task: Npm@0
displayName: Uninstall vsce
inputs:
command: uninstall
arguments: --global @vscode/vsce
+2 -2
View File
@@ -41,8 +41,8 @@
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
"source.fixAll.eslint": "explicit",
"source.organizeImports": "explicit"
},
},
"eslint.format.enable": true,
+171 -16
View File
@@ -1,5 +1,161 @@
# C/C++ for Visual Studio Code Changelog
## Version 1.20.3: April 30, 2024
### Enhancement
* Log `cpptools` and `cpptool-srv` crash call stacks in the 'C/C++ Crash Call Stacks' Output channel for bug reporting (on x64 Linux and x64/arm64 Mac).
### Bug Fixes
* Fix directories being incorrectly recursively traversed in certain cases. [#11993](https://github.com/microsoft/vscode-cpptools/issues/11993)
* Fix a crash during startup. [#12237](https://github.com/microsoft/vscode-cpptools/issues/12237)
* Fix IntelliSense configuration on Windows ARM64. [#12253](https://github.com/microsoft/vscode-cpptools/issues/12253)
## Version 1.20.2: April 22, 2024
### Bug Fixes
* Fix non-existent relative path variables not showing a warning in `c_cpp_properties.json` (and other related issues). [#12089](https://github.com/microsoft/vscode-cpptools/issues/12089)
* Fix duplicate URIs in calls to provideConfigurations. [#12177](https://github.com/microsoft/vscode-cpptools/issues/12177)
* Fix a crash and deadlock with a high `C_Cpp.loggingLevel`. [#12194](https://github.com/microsoft/vscode-cpptools/issues/12194)
* Fix handling of `-iquote` for code analysis and `#include` completions. [#12198](https://github.com/microsoft/vscode-cpptools/issues/12198)
## Version 1.20.1: April 9, 2024
### Bug Fixes
* Fix 'Add #include' code actions for code scoped by a namespace or class. [#11541](https://github.com/microsoft/vscode-cpptools/issues/11541)
* Fix the IntelliSense server not starting when a completion, signature help, or document highlight occurs from external commands. [#12143](https://github.com/microsoft/vscode-cpptools/issues/12143)
* Fix the IntelliSense configuration not falling back to the `c_cpp_properties.json` configuration for a file not handled by a configuration provider. [#12144](https://github.com/microsoft/vscode-cpptools/issues/12144)
## Version 1.20.0: March 26, 2024
### Enhancements
* Add support for C++ modules IFC version 0.43. [#10843](https://github.com/microsoft/vscode-cpptools/issues/10843)
* Add support for `${userHome}` in `c_cpp_properties.json`. [#11756](https://github.com/microsoft/vscode-cpptools/issues/11756)
* Reduce the default max workspace symbol search results and add `C_Cpp.maxSymbolSearchResults`. [PR #12131](https://github.com/microsoft/vscode-cpptools/pull/12131)
* Update `clang-format`/`clang-tidy` to 18.1.2. [PR #12135](https://github.com/microsoft/vscode-cpptools/pull/12135)
* Increase the fuzzy symbol character limit from 16 to 28.
* Update the IntelliSense engine.
### Bug Fixes
* Fix an IntelliSense parsing issue. [#6183](https://github.com/microsoft/vscode-cpptools/issues/6183)
* Fix 'Copy Declaration / Definition' code not being formatted. [#10956](https://github.com/microsoft/vscode-cpptools/issues/10956)
* Fix semantic colorization of certain macro arguments. [#11416](https://github.com/microsoft/vscode-cpptools/issues/11416)
* Fix 'Create Declaration / Definition' not working if the cursor isn't on the function name. [#11834](https://github.com/microsoft/vscode-cpptools/issues/11834)
* Fix duplicate 'Add #include' code actions. [#11989](https://github.com/microsoft/vscode-cpptools/issues/11989)
* Fix `forcedInclude` resolution for relative paths. [PR #12035](https://github.com/microsoft/vscode-cpptools/pull/12035)
* Fix 'Add Configuration...' in `launch.json` when `editor.suggest.showSnippets` is `false`. [#12059](https://github.com/microsoft/vscode-cpptools/issues/12059)
* Fix `c_cpp_properties.json` warnings for `includePath`s with `**` wildcard glob patterns. [#12070](https://github.com/microsoft/vscode-cpptools/issues/12070)
* Fix call stacks for `cpptools` and `cpptools-srv` not being available on Linux. [#12091](https://github.com/microsoft/vscode-cpptools/issues/12091)
* Fix IntelliSense processes shutting down immediately if not enough memory is detected. [#12126](https://github.com/microsoft/vscode-cpptools/issues/12126)
* Fix code analysis aborting after encountering an excluded file (instead of just skipping it). [#12127](https://github.com/microsoft/vscode-cpptools/issues/12127)
* Fix `"Cannot open source"` errors on missing includes not appearing if `C_Cpp.errorSquiggles` is `enabled`. [#12134](https://github.com/microsoft/vscode-cpptools/issues/12134)
* Fix a `cpptools` process crash and deadlock during shutdown.
## Version 1.19.9: March 20, 2024
### Bug Fixes
* Fix an issue with Cygwin system headers not being properly detected. [#12113](https://github.com/microsoft/vscode-cpptools/issues/12113)
* Fix a crash in cpptools-srv when low on memory. [#12121](https://github.com/microsoft/vscode-cpptools/issues/12121)
* Fix an issue preventing cpptools-srv from being relaunched after a crash.
## Version 1.19.8: March 13, 2024
### Bug Fixes
* Fix an issue with applying the proper working directory from a `compile_commands.json` when a `compilePath` is also set. [#12024](https://github.com/microsoft/vscode-cpptools/issues/12024)
* Fix a deadlock. [#12051](https://github.com/microsoft/vscode-cpptools/issues/12051)
* Fix a crash that could occur when failing to query clang-cl.
* Fix an issue with handling of `winsysroot` args for clang-cl.
* Fix an issue with processing relative include paths returned by clang-cl.
## Version 1.19.7: March 11, 2024
### Bug Fixes
* Fix some potential deadlocks. [#12051](https://github.com/microsoft/vscode-cpptools/issues/12051)
* Fix a crash related to parsing concepts. [#12060](https://github.com/microsoft/vscode-cpptools/issues/12060)
* Fix flickering status updates in the language status bar. [#12084](https://github.com/microsoft/vscode-cpptools/issues/12084)
* Fix a cpptools crash that can occur if cpptools-srv crashes on initialization.
## Version 1.19.6: March 6, 2024
### Enhancement
* Performance improvement.
## Version 1.19.5: March 4, 2024
### Enhancements
* Change how `args` and `command` fields are handled in `cppbuild` tasks, to match the behavior of VS Code `shell` build tasks, including explicit `quoting` support. [#12001](https://github.com/microsoft/vscode-cpptools/issues/12001)
* Enable C23 IntelliSense support, and add support for `clatest` `std` value for MSVC. [#12020](https://github.com/microsoft/vscode-cpptools/issues/12020)
### Bug Fixes
* Fix the IntelliSense cache not being pruned. [#11925](https://github.com/microsoft/vscode-cpptools/issues/11925)
* Fix an issue with duplicate `Add #include` code actions appearing if the same header name exists in multiple locations. [#11989](https://github.com/microsoft/vscode-cpptools/issues/11989)
* Fix compiler querying with a `-index-store-path` argument. [#12012](https://github.com/microsoft/vscode-cpptools/issues/12012)
* Fix an issue with changes to `C_Cpp.inlayHints` settings not taking effect immediately. [#12013](https://github.com/microsoft/vscode-cpptools/issues/12013)
* Fix an issue with how Doxygen `brief` and `param` are displayed on hover. [#12015](https://github.com/microsoft/vscode-cpptools/issues/12015)
* Fix an issue preventing the extension from functioning if installed via snap on Linux. [#12021](https://github.com/microsoft/vscode-cpptools/issues/12021)
* Fix compiler querying with a `-Xclang -mllvm` argument. [#12024](https://github.com/microsoft/vscode-cpptools/issues/12024)
* Fix the include graph lookup not occurring for source files. [#12036](https://github.com/microsoft/vscode-cpptools/issues/12036)
* Fix exclusions not applying to dependent headers with recursive includes. [#12042](https://github.com/microsoft/vscode-cpptools/issues/12042)
* Fix a potential cpptools process hang on shutdown.
## Version 1.19.4: February 21, 2024
### Enhancements
* Enable support for fuzzy symbol searches. [#2751](https://github.com/microsoft/vscode-cpptools/issues/2751)
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `enabled`.
* Implement progressive population of IntelliSense results. [#7759](https://github.com/microsoft/vscode-cpptools/issues/7759)
* Improve performance of symbol searches. [#7908](https://github.com/microsoft/vscode-cpptools/issues/7908), [#7914](https://github.com/microsoft/vscode-cpptools/issues/7914), [#11557](https://github.com/microsoft/vscode-cpptools/issues/11557)
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `enabled`.
* Support insert mode for auto-complete. [#10613](https://github.com/microsoft/vscode-cpptools/issues/10613)
* Use the `"[cpp]": { "editor.suggest.insertMode": "insert" } ` and `"[c]": { "editor.suggest.insertMode": "insert" } ` settings to override the extension's defaults.
* Improve memory efficiency by using token parsing in the 'Add #include' feature. [#11515](https://github.com/microsoft/vscode-cpptools/issues/11515)
* Change the default setting value for `C_Cpp.intelliSenseUpdateDelay` from 2s to 1s. [PR #11932](https://github.com/microsoft/vscode-cpptools/pull/11932)
* Improve the types supported for the 'Add #include' code action.
* Various performance improvements.
### Bug Fixes
* Fix IntelliSense bug with type deduction using concepts. [#8132](https://github.com/microsoft/vscode-cpptools/issues/8132)
* Fix clang-format error messages not being logged. [#8944](https://github.com/microsoft/vscode-cpptools/issues/8944)
* Fix indentation missing in markdown fenced code blocks. [#11379](https://github.com/microsoft/vscode-cpptools/issues/11379)
* Fix shell escaping for `cppbuild` task command line arguments. [#11422](https://github.com/microsoft/vscode-cpptools/issues/11422)
* Fix IntelliSense not updating when a `#include` is added from a refactor command. [#11549](https://github.com/microsoft/vscode-cpptools/issues/11549)
* Fix 'Add '#include' code actions for Mac frameworks. [#11579](https://github.com/microsoft/vscode-cpptools/issues/11579)
* Fix the parent path of the source file in `compile_commands.json` not being added to the browse.path. [#11631](https://github.com/microsoft/vscode-cpptools/issues/11631)
* Fix the database not getting updated in certain cases when switching configurations. [#11649](https://github.com/microsoft/vscode-cpptools/issues/11649)
* Fix a cpptools crash with certain projects. [#11674](https://github.com/microsoft/vscode-cpptools/issues/11674)
* Fix snippet and include completion. [#11715](https://github.com/microsoft/vscode-cpptools/issues/11715), [#11720](https://github.com/microsoft/vscode-cpptools/issues/11720)
* Fix formatting not working in headers after using 'Extract to Function'. [#11729](https://github.com/microsoft/vscode-cpptools/issues/11729)
* Fix document symbol requests not checking for cancellation. [#11750](https://github.com/microsoft/vscode-cpptools/issues/11750)
* Fix the default `editor.wordBasedSuggestions` setting for VS Code versions 1.85 or newer. [PR #11773](https://github.com/microsoft/vscode-cpptools/pull/11773)
* This change doesn't work with VS Code versions 1.84 or older, due to [Microsoft/vscode#200685](https://github.com/microsoft/vscode/issues/200685)
* Fix code analysis results getting cleared after there's a configuration update. [#11790](https://github.com/microsoft/vscode-cpptools/issues/11790)
* Fix an exception getting thrown if IntelliSense is disabled but a configuration provider is registered. [#11795](https://github.com/microsoft/vscode-cpptools/issues/11795)
* Fix an EACCES error when using include wildcards with system includes. [#11833](https://github.com/microsoft/vscode-cpptools/issues/11833)
* Fix German code analysis translations. [PR #11845](https://github.com/microsoft/vscode-cpptools/pull/11845)
* Thank you for the contribution. [@Sir2B (Tobias Obermayer)](https://github.com/Sir2B)
* Trim trailing spaces from include paths in the configuration UI. [#11862](https://github.com/microsoft/vscode-cpptools/issues/11862)
* Fix comma delimited lists in `@param` Doxygen parameters. [#11868](https://github.com/microsoft/vscode-cpptools/issues/11868)
* Fix incorrect errors for `compilerPath` in the configuration UI for compilers that can be found in PATH. [#11903](https://github.com/microsoft/vscode-cpptools/issues/11903)
* Fix an issue with include sorting when formatting with clang-format. [#11914](https://github.com/microsoft/vscode-cpptools/issues/11914)
* Fix the `-include` arg of `-Xarg_<arg1>` getting filtered out, leading to a failed compiler query. [#11965](https://github.com/microsoft/vscode-cpptools/issues/11965)
* Fix the `-arch` flag overwriting the `-target` flag's value when it shouldn't. [#11971](https://github.com/microsoft/vscode-cpptools/issues/11971)
* Fix an issue in which the directory specified in a `compile_commands.json` was not being used as the current directory when querying the specified compiler path.
* Fix an issue with configuring IntelliSense for a header file after having chosen an associated source file in which inclusion of the header is disabled or removed.
* Fix an issue where use of an explicit `compilerPath` to override the compiler in a `compile_commands.json` will also throw out the compiler arguments.
* Fix IntelliSense passes occurring while a user is still typing, instead of honoring the `C_Cpp.intelliSenseUpdateDelay` setting.
* Fix issues related to support for C++ modules and parsing of related compiler arguments.
* Fix issues with the tag parsing status sometimes not being accurately reflected in the UI.
* Fix document and workspace symbol requests being blocked by an IntelliSense request.
* Remove the requirement that a file be open in the editor from various LSP requests.
* Fix a crash if `compile_commands.json` doesn't have an array at the root.
* Fix a call hierarchy bug leading to use of header-only TU's unnecessarily.
* Fix an issue that could result in the Outline pane not being populated.
* Fix a bug that could lead to missing TU source file candidates.
* Address multiple issues with compiler querying of clang-cl.
* Fix a potential crash when using 'Find All References'.
* Fix a "random" IntelliSense crash during completion.
* Fix a crash if access to `/dev/urandom` is restricted.
* Fix some crashes reported by crash telemetry.
* Lots of other minor fixes.
## Version 1.18.5: November 16, 2023
### Bug Fix
* Fix `~/vscode-cpptools` being used as the cache folder instead of `~/.cache/vscode-cpptools` on Linux. [#11693](https://github.com/microsoft/vscode-cpptools/issues/11693)
## Version 1.18.4: November 14, 2023
### Bug Fixes:
* Fix 'Extract to function' not scrolling to and selecting the added header declaration. [#11676](https://github.com/microsoft/vscode-cpptools/issues/11676)
* Fix the extension sometimes failing to activate with VS Code versions less than 1.85. [#11680](https://github.com/microsoft/vscode-cpptools/issues/11680)
## Version 1.18.3: November 13, 2023
### New Features
* Add an 'Extract to function' (or member function) code action after selecting code. [#1162](https://github.com/microsoft/vscode-cpptools/issues/1162)
@@ -8,7 +164,7 @@
### Enhancements
* Add keyboard support for 'Inline Macro'. [#11260](https://github.com/microsoft/vscode-cpptools/issues/11260)
* Add setting `C_Cpp.refactoring.includeHeader` to customize whether or not to add an include header when doing a refactoring code action. [#11271](https://github.com/microsoft/vscode-cpptools/issues/11271)
* Add setting `C_Cpp.refactoring.includeHeader` to customize whether or not to add an include header when doing a refactoring code action. [#11271](https://github.com/microsoft/vscode-cpptools/issues/11271)
* Improve the walkthrough wording. [#11320](https://github.com/microsoft/vscode-cpptools/issues/11320)
* Update clang-format and clang-tidy to 17. [PR #11491](https://github.com/microsoft/vscode-cpptools/pull/11491)
* Add a pre-release available notification. [PR #11569](https://github.com/microsoft/vscode-cpptools/pull/11569)
@@ -68,9 +224,9 @@
* Fix the parameter format of call hierarchy items. [#11247](https://github.com/microsoft/vscode-cpptools/issues/11247)
* Remove the vcpkg code action from the missing includes code action list. [#11252](https://github.com/microsoft/vscode-cpptools/issues/11252)
* Fix the file path info of call hierarchy items to display the relative path to a workspace folder. [#11254](https://github.com/microsoft/vscode-cpptools/issues/11254)
* Fix colorization for macro expansions in macro arguments. [#11256](https://github.com/microsoft/vscode-cpptools/issues/11256)
* Fix a crash for CUDA projects with '>' in the command line. [#11289](https://github.com/microsoft/vscode-cpptools/issues/11289)
* Increase the default standard for the 'Build and Debug Active File' feature to c++14 on macOS. [#11292](https://github.com/microsoft/vscode-cpptools/issues/11292)
* Fix colorization for macro expansions in macro arguments. [#11256](https://github.com/microsoft/vscode-cpptools/issues/11256)
* Fix a crash for CUDA projects with '>' in the command line. [#11289](https://github.com/microsoft/vscode-cpptools/issues/11289)
* Increase the default standard for the 'Build and Debug Active File' feature to c++14 on macOS. [#11292](https://github.com/microsoft/vscode-cpptools/issues/11292)
* Fix an issue with the compiler currently configured for use with IntelliSense being listed last in the task creation popup. [PR #11299](https://github.com/microsoft/vscode-cpptools/pull/11299)
* Fix an IPCH issue on Linux due to the Position Independent Executable (PIE) option not being set since 1.17.0.
* Fix Rank > 1 Display Strings for Natvis. [PR MIEngine#1406](https://github.com/microsoft/MIEngine/pull/1406)
@@ -207,7 +363,7 @@
### New Features
* Add recursive macro expansion on hover. [#3579](https://github.com/microsoft/vscode-cpptools/issues/3579)
* Move status bar items to the language status UI. [#8405](https://github.com/microsoft/vscode-cpptools/issues/8405)
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `true`.
* This may not be enabled for all users unless `C_Cpp.experimentalFeatures` is `enabled`.
* Add the 'Select Default Compiler' command that lets you choose a default compiler to configure IntelliSense. [#10027](https://github.com/microsoft/vscode-cpptools/issues/10027)
### Enhancements
@@ -402,12 +558,12 @@
* Fix IntelliSense with gcc vector extension types. [#6890](https://github.com/microsoft/vscode-cpptools/issues/6890)
* Fix doc comments for macros and typedefs. [#8320](https://github.com/microsoft/vscode-cpptools/issues/8320)
* Fix issue with CUDA configuration when using a custom config provider and no config is available for the file. [#8483](https://github.com/microsoft/vscode-cpptools/issues/8483)
* Fix missing logging when `C_Cpp.intelliSenseEngine` is set to `"Disabled"`. [#9277](https://github.com/microsoft/vscode-cpptools/issues/9277)
* Fix missing logging when `C_Cpp.intelliSenseEngine` is set to `Disabled`. [#9277](https://github.com/microsoft/vscode-cpptools/issues/9277)
* Fix doxygen comments not being displayed for multiple adjacent `@brief` or `@return` tags. [#9316](https://github.com/microsoft/vscode-cpptools/issues/9316)
* Fix the code analysis "disable" option not automatically clearing the disabled diagnostics. [#9364](https://github.com/microsoft/vscode-cpptools/issues/9364)
* Fix `-isystem` not being used for system headers with code analysis. [#9366](https://github.com/microsoft/vscode-cpptools/issues/9366)
* Fix compiler querying for EDG-based compilers. [#9410](https://github.com/microsoft/vscode-cpptools/issues/9410)
* Fix hiding IntelliSense dependent commands when `C_Cpp.intelliSenseEngine` is `"Disabled"`. [#9451](https://github.com/microsoft/vscode-cpptools/issues/9451)
* Fix hiding IntelliSense dependent commands when `C_Cpp.intelliSenseEngine` is `Disabled`. [#9451](https://github.com/microsoft/vscode-cpptools/issues/9451)
* Fix cl.exe build tasks not showing for .c files and .c build tasks being cached for .cpp files (and vice versa). [PR #9544](https://github.com/microsoft/vscode-cpptools/pull/9544)
* Fix code analysis not detecting warnings with relative paths. [#9555](https://github.com/microsoft/vscode-cpptools/issues/9555)
* Fix `--header-filter` being used with clang-tidy when it shouldn't when a .clang-tidy file exists. [#9566](https://github.com/microsoft/vscode-cpptools/issues/9566)
@@ -434,7 +590,7 @@
## Version 1.10.6: June 14, 2022
### Bug Fixes
* Fix `@responseFile` in `compilerArgs` not being handled on Linux/Mac. [#9434](https://github.com/microsoft/vscode-cpptools/issues/9434)
* Fix debug preLaunchTask not working when `C_Cpp.intelliSenseEngine` is `"Disabled"`. [#9446](https://github.com/microsoft/vscode-cpptools/issues/9446)
* Fix debug preLaunchTask not working when `C_Cpp.intelliSenseEngine` is `Disabled`. [#9446](https://github.com/microsoft/vscode-cpptools/issues/9446)
* Make the `C_Cpp.legacyCompilerArgsBehavior` setting non-deprecated.
## Version 1.10.5: June 8, 2022
@@ -483,7 +639,7 @@
## Version 1.9.7: March 23, 2022
### New Features
* Add debugger support for Apple M1 (osx-arm64). [#7035](https://github.com/microsoft/vscode-cpptools/issues/7035)
* Resolves issue "[Big Sur M1] ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))". [#6779](https://github.com/microsoft/vscode-cpptools/issues/6779)
* Resolves issue "[Big Sur M1] ERROR: Unable to start debugging. Unexpected LLDB output from command "-exec-run". process exited with status -1 (attach failed ((os/kern) invalid argument))". [#6779](https://github.com/microsoft/vscode-cpptools/issues/6779)
* Add a build and debug button when `C_Cpp.debugShortcut` is `true`. [#7497](https://github.com/microsoft/vscode-cpptools/issues/7497)
* The "Build and Debug Active File" command has been split into "Debug C++ File" and "Run C++ File", and it has been removed from the context menu.
* Add Alpine Linux arm64 support (VSIX).
@@ -492,7 +648,7 @@
### Enhancements
* Reserved identifiers with characters that match typed characters in the correct order but not contiguously are initially filtered in the auto-completion list. Doing a `ctrl` + `space` in the same location will show all auto-complete suggestions. [#4939](https://github.com/microsoft/vscode-cpptools/issues/4939)
* Add `dotConfig` property to IntelliSense Configuration (c_cpp_properties.json) to use .config file created by Kconfig system.
* Matheus Castello (@microhobby) [PR #7845](https://github.com/microsoft/vscode-cpptools/pull/7845)
* Matheus Castello (@microhobby) [PR #7845](https://github.com/microsoft/vscode-cpptools/pull/7845)
* Rework how cancelation is processed for semantic tokens and folding operations. [PR #8739](https://github.com/microsoft/vscode-cpptools/pull/8739)
* Make SwitchHeaderSource use the `workbench.editor.revealIfOpen` setting.
* Joel Smith (@joelmsmith) [PR #8857](https://github.com/microsoft/vscode-cpptools/pull/8857)
@@ -719,7 +875,7 @@
* Fix `Build and Debug Active File` for certain file extensions (.cu, .cp, etc.).
* jogo- (@jogo-) [PR #7726](https://github.com/microsoft/vscode-cpptools/pull/7726)
* Fix `browse.path` being incorrect if an invalid `compileCommands` is set. [#7737](https://github.com/microsoft/vscode-cpptools/issues/7737)
* Fix an incorrect error message when `C_Cpp.errorSquiggles` is `"Enabled"`. [#7744](https://github.com/microsoft/vscode-cpptools/issues/7744)
* Fix an incorrect error message when `C_Cpp.errorSquiggles` is `Enabled`. [#7744](https://github.com/microsoft/vscode-cpptools/issues/7744)
* Fix compiler querying sometimes not working with Cygwin. [#7751](https://github.com/microsoft/vscode-cpptools/issues/7751)
* Fix a duplicate IntelliSense update when a new C/C++ file is opened and after switching from a non-C/C++ file and back.
* Fix a potential IntelliSense process crash on shutdown.
@@ -930,7 +1086,7 @@
* Fix compiler querying with compilers that do not output `__STD_VERSION__` by default (gcc <= 4.8.x). [#6792](https://github.com/microsoft/vscode-cpptools/issues/6792)
* Fix document symbols when nested symbols have the same name as a parent. [#6830](https://github.com/microsoft/vscode-cpptools/issues/6830)
* Fix automatic adding of header files to `files.associations` after `Go to Definition` on a `#include`. [#6845](https://github.com/microsoft/vscode-cpptools/issues/6845)
* Fix `"Insiders"` `updateChannel` for VS Code - Exploration. [#6875](https://github.com/microsoft/vscode-cpptools/issues/6875)
* Fix `Insiders` `updateChannel` for VS Code - Exploration. [#6875](https://github.com/microsoft/vscode-cpptools/issues/6875)
* Fix "D" command line warnings not appearing with cl.exe cppbuild build tasks.
* Fix cl.exe cppbuild tasks when `/nologo` is used (and make /nologo a default arg).
* Fix a cpptools crash and multiple deadlocks.
@@ -1281,7 +1437,7 @@
* Fix `launch.json` creation due to localized strings containing quotes. [#4526](https://github.com/microsoft/vscode-cpptools/issues/4526)
* Fix configuration error squiggles not being applied unless the setting was set in both `c_cpp_properties.json` and `settings.json`. [PR #4538](https://github.com/microsoft/vscode-cpptools/pull/4538)
* Fix document symbol for Outline view and breadcrumbs on Windows 7. [#4536](https://github.com/microsoft/vscode-cpptools/issues/4536)
* Add support for `"ms-vscode.cmake-tools"` `configurationProvider` id. [#4586](https://github.com/microsoft/vscode-cpptools/issues/4586)
* Add support for `ms-vscode.cmake-tools` `configurationProvider` id. [#4586](https://github.com/microsoft/vscode-cpptools/issues/4586)
* Fix cancellation of Find All References sometimes resulting in an exception. [#2710](https://github.com/microsoft/vscode-cpptools/issues/2710)
* Fix the sort order of files in the Find All References and Rename UI's. [#4615](https://github.com/microsoft/vscode-cpptools/issues/4615)
* Fix localized Chinese strings not displaying on systems with case-sensitive file systems. [#4619](https://github.com/microsoft/vscode-cpptools/issues/4619)
@@ -1435,7 +1591,7 @@
## Version 0.23.1: May 13, 2019
### Bug Fixes
* Fix `launch.json` creation when `intelliSenseEngine` is `"Disabled"`. [#3583](https://github.com/microsoft/vscode-cpptools/issues/3583)
* Fix `launch.json` creation when `intelliSenseEngine` is `Disabled`. [#3583](https://github.com/microsoft/vscode-cpptools/issues/3583)
* Fix C/C++ commands not working if the language service isn't activated. [#3615](https://github.com/microsoft/vscode-cpptools/issues/3615)
* Fix missing extension `"Details"` page. [#3621](https://github.com/microsoft/vscode-cpptools/issues/3621)
* Fix some random crashes related to IntelliSense inactive region processing.
@@ -1573,7 +1729,7 @@
* Fix problem with empty recursive include paths. [#2855](https://github.com/Microsoft/vscode-cpptools/issues/2855)
* Fix `NullReferenceException` on debugger launch with VS Code Insiders. [#2858](https://github.com/Microsoft/vscode-cpptools/issues/2858), [PR Microsoft/MIEngine#810](https://github.com/Microsoft/MIEngine/pull/810)
* Fix IntelliSense errors with template argument deduction. [#2907](https://github.com/Microsoft/vscode-cpptools/issues/2907), [#2912](https://github.com/Microsoft/vscode-cpptools/issues/2912)
* Retry Insider VSIX downloading with `http.proxySupport` `"off"`. [#2927](https://github.com/Microsoft/vscode-cpptools/issues/2927)
* Retry Insider VSIX downloading with `http.proxySupport` `off`. [#2927](https://github.com/Microsoft/vscode-cpptools/issues/2927)
* Fix snippet completions being offered when they shouldn't be. [#2942](https://github.com/Microsoft/vscode-cpptools/issues/2942)
* Set the `editor.wordBasedSuggestions` to `false` by default to prevent incorrect completions. [#2943](https://github.com/Microsoft/vscode-cpptools/issues/2943)
* Fix IntelliSense-based `Go to Definition` for functions with function pointer parameters. [#2981](https://github.com/Microsoft/vscode-cpptools/issues/2981)
@@ -2129,4 +2285,3 @@
## Version 0.5.0: April 14, 2016
* Usability and correctness bug fixes.
* Simplify installation experience.
* Usability and correctness bug fixes.
+358 -183
View File
@@ -332,6 +332,29 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------
---------------------------------------------------------
webidl-conversions 3.0.1 - BSD-2-Clause
https://github.com/jsdom/webidl-conversions#readme
Copyright (c) 2014, Domenic Denicola
# The BSD 2-Clause License
Copyright (c) 2014, Domenic Denicola
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---------------------------------------------------------
---------------------------------------------------------
@@ -921,7 +944,7 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
---------------------------------------------------------
@microsoft/1ds-core-js 3.2.12 - MIT
@microsoft/1ds-core-js 3.2.15 - MIT
https://github.com/microsoft/ApplicationInsights-JS#readme
copyright Microsoft 2018
@@ -956,7 +979,7 @@ SOFTWARE.
---------------------------------------------------------
@microsoft/1ds-post-js 3.2.12 - MIT
@microsoft/1ds-post-js 3.2.15 - MIT
https://github.com/microsoft/ApplicationInsights-JS#readme
copyright Microsoft 2018
@@ -993,7 +1016,7 @@ SOFTWARE.
---------------------------------------------------------
@microsoft/applicationinsights-core-js 2.8.14 - MIT
@microsoft/applicationinsights-core-js 2.8.16 - MIT
https://github.com/microsoft/ApplicationInsights-JS#readme
Copyright (c) Microsoft Corporation
@@ -1059,11 +1082,15 @@ SOFTWARE.
---------------------------------------------------------
@microsoft/dynamicproto-js 1.1.9 - MIT
@microsoft/dynamicproto-js 1.1.10 - MIT
https://github.com/microsoft/DynamicProto-JS#readme
Copyright (c) Microsoft Corporation
Copyright (c) Microsoft and contributors
Copyright jQuery Foundation and other contributors
Copyright 2013 jQuery Foundation, Inc. and other contributors
Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
Copyright 2006 Google Inc. https://code.google.com/p/google-diff-match-patch
The MIT License (MIT)
@@ -1126,7 +1153,7 @@ SOFTWARE.
---------------------------------------------------------
@xmldom/xmldom 0.8.8 - MIT
@xmldom/xmldom 0.8.10 - MIT
https://github.com/xmldom/xmldom
Copyright 2012 - 2017 jindw <[email protected]> and other contributors
@@ -1149,6 +1176,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
array-timsort 1.0.3 - MIT
https://github.com/kaelzhang/node-array-timsort
Copyright (c) 2015 Marco Ziccardi
The MIT License
@@ -1173,34 +1201,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
axios 1.6.1 - MIT
https://axios-http.com/
Copyright (c) 2014-present Matt Zabriskie & Collaborators
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@@ -1233,6 +1233,25 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
axios 1.6.5 - MIT
https://axios-http.com/
Copyright (c) 2024 Matt Zabriskie and contributors
Copyright (c) 2014-present Matt Zabriskie & Collaborators
# Copyright (c) 2014-present Matt Zabriskie & Collaborators
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@@ -1774,7 +1793,7 @@ THE SOFTWARE.
---------------------------------------------------------
follow-redirects 1.15.3 - MIT
follow-redirects 1.15.6 - MIT
https://github.com/follow-redirects/follow-redirects
Copyright 2014-present Olivier Lalonde <[email protected]> , James Talmage <[email protected]> , Ruben Verborgh
@@ -1833,7 +1852,7 @@ Copyright (c) 2012 Felix Geisendörfer ([email protected]) and contributors
---------------------------------------------------------
fsevents 2.3.2 - MIT
fsevents 2.3.3 - MIT
https://github.com/fsevents/fsevents
(c) 2020 by Philipp Dunkel, Ben Noordhuis, Elan Shankar, Paul Miller
@@ -2208,7 +2227,7 @@ THE SOFTWARE.
---------------------------------------------------------
nanoid 3.3.6 - MIT
nanoid 3.3.7 - MIT
https://github.com/ai/nanoid#readme
Copyright 2017 Andrey Sitnik <[email protected]>
@@ -2235,6 +2254,39 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
node-fetch 2.7.0 - MIT
https://github.com/bitinn/node-fetch
Copyright (c) 2016 David Frank
The MIT License (MIT)
Copyright (c) 2016 David Frank
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@@ -2622,7 +2674,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
ssh-config 4.2.1 - MIT
ssh-config 4.4.1 - MIT
https://github.com/cyjake/ssh-config#readme
Copyright (c) 2017 Chen Yangjian
@@ -2716,6 +2768,24 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
tr46 0.0.3 - MIT
https://github.com/Sebmaster/tr46.js#readme
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@@ -2856,6 +2926,39 @@ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
whatwg-url 5.0.0 - MIT
https://github.com/jsdom/whatwg-url#readme
(c) extraPathPercentEncodeSet.has
Copyright (c) 2015-2016 Sebastian Mayr
The MIT License (MIT)
Copyright (c) 20152016 Sebastian Mayr
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
---------------------------------------------------------
---------------------------------------------------------
@@ -2900,14 +3003,15 @@ The notices below are from non-npm sources.
- ANTLR (http://www.antlr2.org/)
- C++11 Sublime Text Snippets (https://github.com/Rapptz/cpp-sublime-snippet)
- Clang (https://clang.llvm.org/)
- gcc-9/libgcc (https://packages.ubuntu.com/focal/gcc-9-base)
- gcc-11/libgcc (https://packages.ubuntu.com/jammy/gcc-11-base)
- Guidelines Support Library (https://github.com/Microsoft/GSL)
- libc++ (https://libcxx.llvm.org/index.html)
- libexecinfo (https://github.com/ronchaine/libexecinfo)
- libuv (https://github.com/libuv/libuv)
- LLDB (https://lldb.llvm.org/)
- LLVM (http://llvm.org/)
- MI Debug Engine (https://github.com/Microsoft/MIEngine)
- Mono (https://github.com/mono/mono)
- musl (https://git.musl-libc.org/cgit/musl)
- SQLite (https://www.sqlite.org/)
Includes:functions (from fossil) (https://fossil-scm.org)
- SoftFloat (http://www.jhauser.us/arithmetic/SoftFloat.html)
@@ -3548,165 +3652,236 @@ THE SOFTWARE.
=========================================
END OF MI Debug Engine NOTICES AND INFORMATION
%% Mono NOTICES AND INFORMATION BEGIN HERE
%% musl NOTICES AND INFORMATION BEGIN HERE
=========================================
The Mono project may include other third party copyrights and notices, as listed in the
copyright.txt file included with the Mono project.
musl as a whole is licensed under the following standard MIT license:
The MIT License (MIT)
----------------------------------------------------------------------
Copyright © 2005-2020 Rich Felker, et al.
Copyright (c) .NET Foundation and its contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Authors/contributors include:
The following code is linked with the final Mono runtime, the libmono
embeddable runtime:
A. Wilcox
Ada Worcester
Alex Dowad
Alex Suykov
Alexander Monakov
Andre McCurdy
Andrew Kelley
Anthony G. Basile
Aric Belsito
Arvid Picciani
Bartosz Brachaczek
Benjamin Peterson
Bobby Bingham
Boris Brezillon
Brent Cook
Chris Spiegel
Clément Vasseur
Daniel Micay
Daniel Sabogal
Daurnimator
David Carlier
David Edelsohn
Denys Vlasenko
Dmitry Ivanov
Dmitry V. Levin
Drew DeVault
Emil Renner Berthing
Fangrui Song
Felix Fietkau
Felix Janda
Gianluca Anzolin
Hauke Mehrtens
He X
Hiltjo Posthuma
Isaac Dunham
Jaydeep Patil
Jens Gustedt
Jeremy Huntwork
Jo-Philipp Wich
Joakim Sindholt
John Spencer
Julien Ramseier
Justin Cormack
Kaarle Ritvanen
Khem Raj
Kylie McClain
Leah Neukirchen
Luca Barbato
Luka Perkov
M Farkas-Dyck (Strake)
Mahesh Bodapati
Markus Wichmann
Masanori Ogino
Michael Clark
Michael Forney
Mikhail Kremnyov
Natanael Copa
Nicholas J. Kain
orc
Pascal Cuoq
Patrick Oppenlander
Petr Hosek
Petr Skocik
Pierre Carrier
Reini Urban
Rich Felker
Richard Pennington
Ryan Fairfax
Samuel Holland
Segev Finer
Shiz
sin
Solar Designer
Stefan Kristiansson
Stefan O'Rear
Szabolcs Nagy
Timo Teräs
Trutz Behn
Valentin Ochs
Will Dietz
William Haddon
William Pitcock
* support/minizip: BSD license (modified).
* Copyright (C) 1998-2005 Gilles Vollant
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Portions of this software are derived from third-party works licensed
under terms compatible with the above MIT license:
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
The TRE regular expression implementation (src/regex/reg* and
src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
under a 2-clause BSD license (license text in the source files). The
included version has been heavily modified by Rich Felker in 2012, in
the interests of size, simplicity, and namespace cleanliness.
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Much of the math library code (src/math/* and src/complex/*) is
Copyright © 1993,2004 Sun Microsystems or
Copyright © 2003-2011 David Schultz or
Copyright © 2003-2009 Steven G. Kargl or
Copyright © 2003-2009 Bruce D. Evans or
Copyright © 2008 Stephen L. Moshier or
Copyright © 2017-2018 Arm Limited
and labelled as such in comments in the individual source files. All
have been licensed under extremely permissive terms.
* mono/utils/freebsd-dwarf.h.
* Copyright (c) 2007 John Birrell ([email protected])
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
*notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
*notice, this list of conditions and the following disclaimer in the
*documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED.IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008
The Android Open Source Project and is licensed under a two-clause BSD
license. It was taken from Bionic libc, used on Android.
* mono/utils/freebsd-elf_common.h, freebsd-elf64.h freebsd-elf32.h: BSD license.
* Copyright (c) 1998 John D. Polstra.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
The AArch64 memcpy and memset code (src/string/aarch64/*) are
Copyright © 1999-2019, Arm Limited.
* mono/utils/bsearch.c: BSD license.
* Taken from NetBSD with some minor modifications.
*
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
The implementation of DES for crypt (src/crypt/crypt_des.c) is
Copyright © 1994 David Burren. It is licensed under a BSD license.
The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was
originally written by Solar Designer and placed into the public
domain. The code also comes with a fallback permissive license for use
in jurisdictions that may not recognize the public domain.
The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
Valentin Ochs and is licensed under an MIT-style license.
The x86_64 port was written by Nicholas J. Kain and is licensed under
the standard MIT terms.
The mips and microblaze ports were originally written by Richard
Pennington for use in the ellcc project. The original code was adapted
by Rich Felker for build system and code conventions during upstream
integration. It is licensed under the standard MIT terms.
The mips64 port was contributed by Imagination Technologies and is
licensed under the standard MIT terms.
The powerpc port was also originally written by Richard Pennington,
and later supplemented and integrated by John Spencer. It is licensed
under the standard MIT terms.
All other files which have no copyright comments are original works
produced specifically for use as part of this library, written either
by Rich Felker, the main author of the library, or by one or more
contibutors listed above. Details on authorship of individual files
can be found in the git version control history of the project. The
omission of copyright and license comments in each file is in the
interest of source tree size.
In addition, permission is hereby granted for all public header files
(include/* and arch/*/bits/*) and crt files intended to be linked into
applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit
the copyright notice and permission notice otherwise required by the
license, and to use these files without any requirement of
attribution. These files include substantial contributions from:
Bobby Bingham
John Spencer
Nicholas J. Kain
Rich Felker
Richard Pennington
Stefan Kristiansson
Szabolcs Nagy
all of whom have explicitly granted such permission.
This file previously contained text expressing a belief that most of
the files covered by the above exception were sufficiently trivial not
to be subject to copyright, resulting in confusion over whether it
negated the permissions granted in the license. In the spirit of
permissive licensing, and of not having licensing issues being an
obstacle to adoption, that text has been removed.
* mono/io-layer/wapi_glob.h, wapi_glob.c: BSD license
* Copyright (c) 1989, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Guido van Rossum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
=========================================
END OF Mono NOTICES AND INFORMATION
END OF musl NOTICES AND INFORMATION
%% libexecinfo NOTICES AND INFORMATION BEGIN HERE
=========================================
libexecinfo is licensed for use as follows:
====
Copyright (c) 2003 Maxim Sobolev <[email protected]>
All rights reserved.
*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
*
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
=========================================
END OF libexecinfo NOTICES AND INFORMATION
%% libuv NOTICES AND INFORMATION BEGIN HERE
=========================================
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -4,11 +4,11 @@
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"1939",
"--pack_alignment",
"8",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_VER=1939",
"-D_MSC_FULL_VER=193933519",
"-D_MSC_BUILD=0",
"-D_M_ARM=7"
],
+3 -3
View File
@@ -4,12 +4,12 @@
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"1939",
"--pack_alignment",
"8",
"-D_CPPUNWIND=1",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_VER=1939",
"-D_MSC_FULL_VER=193933519",
"-D_MSC_BUILD=0",
"-D_M_ARM64=1"
],
+3 -3
View File
@@ -4,12 +4,12 @@
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"1939",
"--pack_alignment",
"8",
"-D_CPPUNWIND=1",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_VER=1939",
"-D_MSC_FULL_VER=193933519",
"-D_MSC_BUILD=0",
"-D_M_X64=100",
"-D_M_AMD64=100"
+3 -3
View File
@@ -4,11 +4,11 @@
"--microsoft",
"--microsoft_bugs",
"--microsoft_version",
"1935",
"1939",
"--pack_alignment",
"8",
"-D_MSC_VER=1935",
"-D_MSC_FULL_VER=193532215",
"-D_MSC_VER=1939",
"-D_MSC_FULL_VER=193933519",
"-D_MSC_BUILD=0",
"-D_M_IX86=600",
"-D_M_IX86_FP=2"
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "提供非上下文感知的“模糊”结果。",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "关闭 C/C++ 语言服务功能。",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "控制 IntelliSense 引擎是否将自动切换为包含 `#include` 错误的翻译单元的标记分析器。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自动完成提供程序。如果 `disabled`,且你想要基于字词的补全,则还需要设置 `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}`(对 `c` 和 `cuda-cpp` 语言同样执行此操作)。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自动完成提供程序。如果 `disabled`,且你想要基于字词的补全功能,则还需要设置 `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (`c` 和 `cuda-cpp` 语音也类似)。",
"c_cpp.configuration.autocomplete.default.description": "使用活动的 IntelliSense 引擎。",
"c_cpp.configuration.autocomplete.disabled.description": "使用 Visual Studio Code 提供的基于字词的补全。",
"c_cpp.configuration.errorSquiggles.description": "控制是否将 IntelliSense 引擎检测到的可疑编译错误报告回编辑器。还控制是否报告代码分析警告(如果找不到包含)。标记分析器引擎将忽略此设置。",
@@ -11,6 +11,8 @@
"use.compiler": "使用 {0}",
"configuration.providers": "配置提供程序",
"compilers": "编译器",
"selectIntelliSenseConfiguration.string": "选择 IntelliSense 配置...",
"setCompiler.message": "未配置编译器。除非设置自己的配置,否则 IntelliSense 可能无法正常工作。",
"use.provider": "使用 {0}",
"use.compileCommands": "使用 {0}",
"selectAnotherCompiler.string": "在我的计算机上选择另一个编译器...",
+4 -4
View File
@@ -43,7 +43,7 @@
"c_cpp.command.RemoveAllCodeAnalysisProblems.title": "清除所有程式碼分析問題",
"c_cpp.command.BuildAndDebugFile.title": "偵錯 C/C++ 檔案",
"c_cpp.command.BuildAndRunFile.title": "執行 C/C++ 檔案",
"c_cpp.command.AddDebugConfiguration.title": "新增偵錯設定",
"c_cpp.command.AddDebugConfiguration.title": "新增偵錯組態",
"c_cpp.command.GenerateDoxygenComment.title": "產生 Doxygen 註解",
"c_cpp.command.addSshTarget.title": "新增 SSH 目標",
"c_cpp.command.removeSshTarget.title": "移除 SSH 目標",
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "提供不屬於內容意識的 `模糊` 結果。",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "關閉 C/C++ 語言服務功能。",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "控制 IntelliSense 引擎是否會自動切換到包含 `#include` 錯誤之編譯單位的標籤剖析器。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自動完成提供者。若設為 `disabled` 且您想要以文字方式完成,您也必須設定 `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` ( `c` 及 `cuda-cpp` 語言類似)。",
"c_cpp.configuration.autocomplete.markdownDescription": "控制自動完成提供者。若設為 `disabled` 且您想要以文字方式完成,您也必須設定 `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` ( `c` 及 `cuda-cpp` 語言也相同)。",
"c_cpp.configuration.autocomplete.default.description": "使用作用中 IntelliSense 引擎。",
"c_cpp.configuration.autocomplete.disabled.description": "使用 Visual Studio Code 所提供的文字型完成。",
"c_cpp.configuration.errorSquiggles.description": "該設定會控制是否將 IntelliSense 引擎偵測到的可疑編譯錯誤回報給編輯器。其也會在找不到內容時,控制是否回報程式碼分析警告。標籤剖析器引擎已忽略此設定。",
@@ -266,7 +266,7 @@
"c_cpp.contributes.views.cppReferencesView.title": "C/C++: 其他參考結果",
"c_cpp.contributes.views.sshTargetsView.title": "Cpptools: SSH 目標",
"c_cpp.contributes.viewsWelcome.contents": "如需深入了解 launch.json,請參閱 [設定 C/C++ 偵錯](https://code.visualstudio.com/docs/cpp/launch-json-reference)。",
"c_cpp.configuration.debugShortcut.description": "在 C++ 檔案的編輯器標題列中顯示 [執行及偵錯] 播放按鈕和 [新增偵錯設定] 齒輪。",
"c_cpp.configuration.debugShortcut.description": "在 C++ 檔案的編輯器標題列中顯示 [執行及偵錯] 播放按鈕和 [新增偵錯組態] 齒輪。",
"c_cpp.debuggers.pipeTransport.description": "出現時,會指示偵錯工具使用另一個可執行檔來連線至遠端電腦,該管道會在 VS Code 與 MI 啟用偵錯工具後端可執行檔之間傳送標準輸入/輸出 (例如 gdb)。",
"c_cpp.debuggers.pipeTransport.default.pipeProgram": "輸入管道程式名稱的完整路徑,例如 '/usr/bin/ssh'。",
"c_cpp.debuggers.pipeTransport.default.debuggerPath": "目標機器的偵錯工具完整路徑,例如 /use/bin/gdb。",
@@ -434,7 +434,7 @@
"c_cpp.walkthrough.customize.debugging.mac.description": "若要自訂您的偵錯設定,請在活動列中選取 [檔案總管],然後開啟包含 C++ 檔案的資料夾。開啟 C++ 檔案,然後選取 [播放] 按鈕右邊的 [新增偵錯設定]。新的偵錯組態已儲存至專案的 launch.json 檔案。\n[深入了解](https://code.visualstudio.com/docs/cpp/config-linux#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.linux.description": "若要自訂您的偵錯設定,請在活動列中選取 [檔案總管],然後開啟包含 C++ 檔案的資料夾。開啟 C++ 檔案,然後選取 [播放] 按鈕右邊的 [新增偵錯設定]。新的偵錯組態已儲存至專案的 launch.json 檔案。\n[深入了解](https://code.visualstudio.com/docs/cpp/config-msvc#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.windows.description": "若要自訂您的偵錯設定,請在活動列中選取 [檔案總管],然後開啟包含 C++ 檔案的資料夾。開啟 C++ 檔案,然後選取 [播放] 按鈕右邊的 [新增偵錯設定]。新的偵錯組態已儲存至專案的 launch.json 檔案。\n[深入了解](https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp)",
"c_cpp.walkthrough.customize.debugging.altText": "影像顯示下拉式清單中 [新增偵錯設定]",
"c_cpp.walkthrough.customize.debugging.altText": "影像顯示下拉式清單中 [新增偵錯組態]",
"c_cpp.codeActions.refactor.inline.macro.title": "內嵌巨集",
"c_cpp.codeActions.refactor.inline.macro.description": "以展開程式碼取代巨集調用。",
"c_cpp.codeActions.refactor.extract.function.title": "擷取至函式",
@@ -4,8 +4,8 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"debugger.path.and.server.address.required": "偵錯設定中的 {0} 需要 {1} 和 {2}",
"no.pipetransport.useextendedremote": "選擇的偵錯設定未包含 {0} 或 {1}",
"debugger.path.and.server.address.required": "偵錯組態中的 {0} 需要 {1} 和 {2}",
"no.pipetransport.useextendedremote": "選擇的偵錯組態未包含 {0} 或 {1}",
"select.process.attach": "選取要附加至的目標處理序",
"process.not.selected": "未選取處理序。",
"pipe.failed": "管道傳輸無法取得 OS 和處理序。",
@@ -15,7 +15,7 @@
"running.deploy.steps": "正在執行部署步驟...",
"compiler.path.not.exists": "找不到 {0}。已略過 {1} 工作。",
"pre.Launch.Task": "preLaunchTask: {0}",
"debugger.path.not.exists": "找不到 {0} 偵錯工具。已略過 {1} 的偵錯設定。",
"debugger.path.not.exists": "找不到 {0} 偵錯工具。已略過 {1} 的偵錯組態。",
"build.and.debug.active.file": "建置及偵錯使用中的檔案",
"cl.exe.not.available": "只有從 VS 的開發人員命令提示字元執行 VS Code 時,才可使用 {0} 組建和偵錯。",
"lldb.find.failed": "缺少 lldb-mi 可執行檔的相依性 '{0}'。",
@@ -32,7 +32,7 @@
"detected.task": "偵測到的工作",
"cannot.build.non.cpp": "因為作用中的檔案不是 C 或 C++ 來源檔案,所以無法建立和偵錯。",
"no.compiler.found": "找不到任何編譯器",
"select.debug.configuration": "選取偵錯設定",
"select.debug.configuration": "選取偵錯組態",
"command.args.must.be.array": "命令部署步驟中的 \"args\" 必須是陣列。",
"missing.properties.copyFile": "{0} 步驟中需要 \"host\"、\"files\" 和 \"targetDir\"。",
"incorrect.files.type.copyFile": "\"files\" 必須是 {0} 步驟中的字串或字串陣列。",
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
// Do not edit this file. It is machine generated.
{
"add.debug.configuration.not.available.for.single.file": "新增偵錯設定無法用於單一檔案。",
"add.debug.configuration.not.available.for.single.file": "新增偵錯組態無法用於單一檔案。",
"cannot.modify.config.file": "無法修改 SSH 設定檔,因為剖析失敗「{0}」。",
"no.valid.ssh.config.file": "找不到有效的 SSH 設定檔。",
"enter.ssh.target.name": "輸入 SSH 目標名稱",
@@ -11,6 +11,8 @@
"use.compiler": "使用 {0}",
"configuration.providers": "設定提供者",
"compilers": "編譯器",
"selectIntelliSenseConfiguration.string": "選取 IntelliSense 設定...",
"setCompiler.message": "您尚未設定 IntelliSense。除非您自行加以設定,否則 IntelliSense 可能無法運作。",
"use.provider": "使用 {0}",
"use.compileCommands": "使用 {0}",
"selectAnotherCompiler.string": "在我的機器上選取另一個編譯器...",
@@ -14,5 +14,5 @@
"walkthrough.linux.choose.build.active.file": "選擇 {0}。",
"walkthrough.linux.build.and.debug.active.file": "建置及偵錯使用中的檔案",
"walkthrough.linux.after.running": "第一次執行並偵錯您的 C++ 檔案之後,您會注意到專案 {0} 資料夾中有兩個新檔案: {1} 及 {2}。",
"walkthrough.linux.for.more.complex": "如需更複雜的組建和偵錯案例,您可以在 {0} 及 {1} 中自訂群組建工作和偵錯設定。例如,如果您在從命令列組建時,通常會將引數傳遞給編譯器,可以使用 {3} 屬性在 {2} 中指定這些引數。類似地,您可以定義要傳遞給程式的引數,以便在 {4} 進行偵錯。"
"walkthrough.linux.for.more.complex": "如需更複雜的組建和偵錯案例,您可以在 {0} 及 {1} 中自訂群組建工作和偵錯組態。例如,如果您在從命令列組建時,通常會將引數傳遞給編譯器,可以在 {2} 中使用 {3} 屬性指定這些引數。類似地,您可以定義要傳遞給程式的引數,以便在 {4} 進行偵錯。"
}
@@ -14,5 +14,5 @@
"walkthrough.mac.choose.build.active.file": "選擇 {0}。",
"walkthrough.mac.build.and.debug.active.file": "建置及偵錯使用中的檔案",
"walkthrough.mac.after.running": "第一次執行並偵錯您的 C++ 檔案之後,您會注意到專案 {0} 資料夾中有兩個新檔案: {1} 及 {2}。",
"walkthrough.mac.for.more.complex": "如需更複雜的組建和偵錯案例,您可以在 {0} 及 {1} 中自訂群組建工作和偵錯設定。例如,如果您在從命令列組建時,通常會將引數傳遞給編譯器,可以使用 {3} 屬性在 {2} 中指定這些引數。類似地,您可以定義要傳遞給程式的引數,以便在 {4} 進行偵錯。"
"walkthrough.mac.for.more.complex": "如需更複雜的組建和偵錯案例,您可以在 {0} 及 {1} 中自訂群組建工作和偵錯組態。例如,如果您在從命令列組建時,通常會將引數傳遞給編譯器,可以在 {2} 中使用 {3} 屬性指定這些引數。類似地,您可以定義要傳遞給程式的引數,以便在 {4} 進行偵錯。"
}
@@ -14,5 +14,5 @@
"walkthrough.windows.choose.build.active.file": "選擇 {0}。",
"walkthrough.windows.build.and.debug.active.file": "建置及偵錯使用中的檔案",
"walkthrough.windows.after.running": "第一次執行並偵錯您的 C++ 檔案之後,您會注意到專案 {0} 資料夾中有兩個新檔案: {1} 及 {2}。",
"walkthrough.windows.for.more.complex": "如需更複雜的組建和偵錯案例,您可以在 {0} 及 {1} 中自訂群組建工作和偵錯設定。例如,如果您在從命令列組建時,通常會將引數傳遞給編譯器,可以使用 {3} 屬性在 {2} 中指定這些引數。類似地,您可以定義要傳遞給程式的引數,以便在 {4} 進行偵錯。"
"walkthrough.windows.for.more.complex": "如需更複雜的組建和偵錯案例,您可以在 {0} 及 {1} 中自訂群組建工作和偵錯組態。例如,如果您在從命令列組建時,通常會將引數傳遞給編譯器,可以在 {2} 中使用 {3} 屬性指定這些引數。類似地,您可以定義要傳遞給程式的引數,以便在 {4} 進行偵錯。"
}
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Poskytuje přibližné výsledky, které nejsou v kontextu.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Vypne funkce služby jazyka C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Určuje, jestli se modul IntelliSense automaticky přepne na analyzátor značek pro jednotky překladu, které obsahují chyby direktiv `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Určuje poskytovatele automatického dokončování. Pokud je hodnota `disabled` a chcete dokončování na základě slov, musíte nastavit také `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (a podobně také pro jazyky `c` a `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Určuje poskytovatele automatického dokončování. Pokud je hodnota `disabled` a chcete dokončování na základě slov, musíte nastavit také `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (a podobně také pro jazyky `c` a `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Používá aktivní modul IntelliSense.",
"c_cpp.configuration.autocomplete.disabled.description": "Používá dokončování na základě slov, které nabízí Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Určuje, jestli budou podezřelé chyby kompilace zjištěné modulem IntelliSense hlášeny zpět editoru. Také řídí, zda jsou hlášena upozornění na analýzu kódu, pokud nelze najít zahrnutí. Modul analyzátoru značek toto nastavení ignoruje.",
@@ -11,6 +11,8 @@
"use.compiler": "Použít {0}",
"configuration.providers": "poskytovatelé konfigurace",
"compilers": "kompilátory",
"selectIntelliSenseConfiguration.string": "Vybrat konfiguraci IntelliSense...",
"setCompiler.message": "Nemáte nakonfigurovaný technologii IntelliSense. Pokud nenastavíte vlastní konfigurace, IntelliSense nemusí být funkční.",
"use.provider": "Použít {0}",
"use.compileCommands": "Použít {0}",
"selectAnotherCompiler.string": "Vybrat jiný kompilátor na mém počítači...",
+6 -6
View File
@@ -26,7 +26,7 @@
"c_cpp.command.toggleDimInactiveRegions.title": "Farbgebung für inaktive Regionen umschalten",
"c_cpp.command.resetDatabase.title": "IntelliSense-Datenbank zurücksetzen",
"c_cpp.command.takeSurvey.title": "An Umfrage teilnehmen",
"c_cpp.command.restartIntelliSenseForFile.title": "IntelliSense für Active File neu starten",
"c_cpp.command.restartIntelliSenseForFile.title": "IntelliSense für \"Aktive Datei\" neu starten",
"c_cpp.command.logDiagnostics.title": "Diagnose protokollieren",
"c_cpp.command.referencesViewGroupByType.title": "Nach Verweistyp gruppieren",
"c_cpp.command.referencesViewUngroupByType.title": "Gruppierung nach Verweistyp aufheben",
@@ -37,10 +37,10 @@
"c_cpp.command.GoToNextDirectiveInGroup.title": "Zur nächsten Präprozessoranweisung in bedingter Gruppe wechseln",
"c_cpp.command.GoToPrevDirectiveInGroup.title": "Zur vorherigen Präprozessoranweisung in bedingter Gruppe wechseln",
"c_cpp.command.CreateDeclarationOrDefinition.title": "Deklaration/Definition erstellen",
"c_cpp.command.RunCodeAnalysisOnActiveFile.title": "Code Analysis auf \"Aktive Dateien\" ausführen",
"c_cpp.command.RunCodeAnalysisOnOpenFiles.title": "Code Analysis auf \"Dateien öffnen\" ausführen",
"c_cpp.command.RunCodeAnalysisOnAllFiles.title": "Code Analysis auf \"Alle Dateien\" ausführen",
"c_cpp.command.RemoveAllCodeAnalysisProblems.title": "Alle Code Analysis Probleme löschen",
"c_cpp.command.RunCodeAnalysisOnActiveFile.title": "Code Analyse auf \"Aktive Datei\" ausführen",
"c_cpp.command.RunCodeAnalysisOnOpenFiles.title": "Code Analyse auf \"Offene Dateien\" ausführen",
"c_cpp.command.RunCodeAnalysisOnAllFiles.title": "Code Analyse auf \"Alle Dateien\" ausführen",
"c_cpp.command.RemoveAllCodeAnalysisProblems.title": "Alle Code Analyse Probleme löschen",
"c_cpp.command.BuildAndDebugFile.title": "C/C++-Datei debuggen",
"c_cpp.command.BuildAndRunFile.title": "C/C++-Datei ausführen",
"c_cpp.command.AddDebugConfiguration.title": "Debugkonfiguration hinzufügen",
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Stellt „Fuzzy“-Ergebnisse bereit, die nicht kontextbezogen sind.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Deaktiviert die Features des C/C++-Sprachdiensts.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Steuert, ob das IntelliSense-Modul automatisch zum Tagparser für Übersetzungseinheiten wechselt, die `#include#`-Fehler enthalten.",
"c_cpp.configuration.autocomplete.markdownDescription": "Steuert den Anbieter für AutoVervollständigen. Wenn `disabled` festgelegt ist und Sie die wortbasierte Vervollständigung wünschen, müssen Sie auch `\"[cpp]\" festlegen: {\"editor.wordBasedSuggestions\": true}` (und ähnlich für die Sprachen `c` und `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Steuert den Anbieter für AutoVervollständigen. Wenn `disabled` festgelegt ist und Sie die wortbasierte Vervollständigung wünschen, müssen Sie auch `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` festlegen (und analog auch für die Sprachen `c` und `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Verwendet das aktive IntelliSense-Modul.",
"c_cpp.configuration.autocomplete.disabled.description": "Verwendet die von Visual Studio Code bereitgestellte wortbasierte Vervollständigung.",
"c_cpp.configuration.errorSquiggles.description": "Steuert, ob vermutete Kompilierungsfehler, die von der IntelliSense-Engine erkannt wurden, an den Editor zurückgegeben werden. Außerdem wird gesteuert, ob Codeanalysewarnungen gemeldet werden, wenn keine Enthaltenen gefunden werden können. Diese Einstellung wird von der Tagparser-Engine ignoriert.",
@@ -11,6 +11,8 @@
"use.compiler": "{0} verwenden",
"configuration.providers": "Konfigurationsanbieter",
"compilers": "Compiler",
"selectIntelliSenseConfiguration.string": "IntelliSense-Konfiguration auswählen...",
"setCompiler.message": "IntelliSense ist nicht konfiguriert. Wenn Sie keine eigenen Konfigurationen festlegen, ist IntelliSense möglicherweise nicht funktionsfähig.",
"use.provider": "{0} verwenden",
"use.compileCommands": "{0} verwenden",
"selectAnotherCompiler.string": "Anderen Compiler auf meinem Computer auswählen...",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Proporciona resultados \"fuzzy\" que no tienen en cuenta el contexto.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Desactiva las características del servicio de lenguaje C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Controla si el motor de IntelliSense cambiará automáticamente al Analizador de etiquetas para las unidades de traducción que contengan errores de `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Controla el proveedor de finalización automática. Si está establecido en `disabled` y desea la finalización basada en palabras, también tendrá que establecer `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (y de forma similar para los lenguajes `c` y `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Controla el proveedor de finalización automática. Si está `disabled` y desea completarse con palabras, también tendrá que establecer `\"[cpp]\": {\"editor.wordBasedSuggestions\": <valor>}` (y de forma similar para los lenguajes `c` y `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Usa el motor de IntelliSense activo.",
"c_cpp.configuration.autocomplete.disabled.description": "Usa la finalización basada en palabras proporcionada por Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Controla si los posibles errores de compilación detectados por el motor de IntelliSense se notificarán al editor. También controla si se notifican advertencias de análisis de código si no se encuentran las inclusiones. El motor del analizador de etiquetas omite esta configuración.",
@@ -11,6 +11,8 @@
"use.compiler": "Uso {0}",
"configuration.providers": "proveedores de configuración",
"compilers": "Compiladores",
"selectIntelliSenseConfiguration.string": "Seleccionar configuración de IntelliSense...",
"setCompiler.message": "No tiene configurado IntelliSense. A menos que establezca sus propias configuraciones, puede que IntelliSense no funcione.",
"use.provider": "Uso {0}",
"use.compileCommands": "Uso {0}",
"selectAnotherCompiler.string": "Seleccionar otro compilador en mi máquina...",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Fournit des résultats « flous » qui ne sont pas compatibles avec le contexte.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Désactive les fonctionnalités du service de langage C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Contrôle si le moteur IntelliSense bascule automatiquement vers l'analyseur de balises pour les unités de traduction qui contiennent des erreurs `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Contrôle le fournisseur de la saisie semi-automatique. Si la valeur est `disabled` et que vous voulez utiliser la saisie semi-automatique, vous devez également définir `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (et de la même manière pour les langages `c` et `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Contrôle le fournisseur de la saisie semi-automatique. Si `disabled` et que vous souhaitez une complétion basée sur les mots, vous devrez également définir `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (et de même pour `c` et `cuda-cpp` langues).",
"c_cpp.configuration.autocomplete.default.description": "Utilise le moteur IntelliSense actif.",
"c_cpp.configuration.autocomplete.disabled.description": "Utilise la saisie semi-automatique basée sur le mot fournie par Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Contrôle si les erreurs de compilation suspectes détectées par le moteur IntelliSense seront rapportées à l'éditeur. Il contrôle également si les avertissements d'analyse de code sont signalés si les includes ne peuvent pas être trouvés. Ce paramètre est ignoré par le moteur Tag Parser.",
@@ -11,6 +11,8 @@
"use.compiler": "Utiliser {0}",
"configuration.providers": "fournisseurs de configuration",
"compilers": "compilateurs",
"selectIntelliSenseConfiguration.string": "Sélectionner la configuration IntelliSense…",
"setCompiler.message": "Vous navez aucun IntelliSense configuré. À moins que vous ne définissiez vos propres configurations, IntelliSense risque de ne pas être fonctionnel.",
"use.provider": "Utiliser {0}",
"use.compileCommands": "Utiliser {0}",
"selectAnotherCompiler.string": "Sélectionner un autre compilateur sur ma machine…",
+2 -2
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Fornisce risultati 'fuzzy' che non sono compatibili con il contesto.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Disattiva le funzionalità del servizio di linguaggio C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Controlla se il motore IntelliSense passerà automaticamente al parser di tag per le unità di conversione contenenti errori `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Controlla il provider di completamento automatico. Se è `disabled` e vuoi il completamento basato su parole, sarà necessario impostare anche `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (e analogamente per i linguaggi `c` e `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Controlla il provider di completamento automatico. Se è `disabled` e si vuole il completamento basato sulle parole, sarà necessario impostare anche `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (e analogamente per i linguaggi `c` e `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Usa il motore IntelliSense attivo.",
"c_cpp.configuration.autocomplete.disabled.description": "Usa il completamento basato su parole fornito da Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Controlla se i possibili errori di compilazione rilevati dal motore IntelliSense verranno segnalati all'editor. Controlla inoltre se vengono segnalati avvisi di analisi del codice se non è possibile trovare le inclusioni. Questa impostazione viene ignorata dal motore del parser di tag.",
@@ -417,7 +417,7 @@
"c_cpp.walkthrough.set.up.title": "Configurare l'ambiente C++",
"c_cpp.walkthrough.activating.description": "Attivazione dell'estensione C++ per determinare se l'ambiente C++ è stato configurato.\nAttivazione dell'estensione...",
"c_cpp.walkthrough.no.compilers.windows.description": "Non è stato possibile trovare un compilatore C++ nel computer, necessario per usare l'estensione C++. Seguire le istruzioni a destra per installarne uno, quindi fare clic su “Trova il nuovo compilatore” di seguito.\n[Trova il nuovo compilatore](command:C_Cpp.RescanCompilers?%22walkthrough%22)",
"c_cpp.walkthrough.no.compilers.description": "Non è stato possibile trovare un compilatore C++ nel computer, necessario per usare l'estensione C++. Selezionare \"Installa un compilatore C++\" per installare automaticamente un compilatore, oppure seguire le istruzioni a destra per installarne uno, quindi fare clic su \"Trova il nuovo compilatore\" di seguito.\n[Installa un compilatore C++ ](command:C_Cpp.InstallCompiler?%22walkthrough%22)\n[Trova il nuovo compilatore](command:C_Cpp.RescanCompilers?%22walkthrough%22)",
"c_cpp.walkthrough.no.compilers.description": "Non è stato possibile trovare un compilatore C++ nel computer, necessario per usare l'estensione C++. Selezionare \"Installa un compilatore C++\" per installare automaticamente un compilatore, oppure seguire le istruzioni a destra per installarne uno, quindi fare clic su \"Trova il nuovo compilatore\" di seguito.\n[Installa un compilatore C++](command:C_Cpp.InstallCompiler?%22walkthrough%22)\n[Trova il nuovo compilatore](command:C_Cpp.RescanCompilers?%22walkthrough%22)",
"c_cpp.walkthrough.compilers.found.description": "L'estensione C++ funziona con un compilatore C++. Selezionare una delle opzioni già presenti nel computer facendo clic sul pulsante seguente.\n[Selezionare il compilatore predefinito](command:C_Cpp.SelectIntelliSenseConfiguration?%22walkthrough%22)",
"c_cpp.walkthrough.compilers.found.altText": "Immagine che mostra la selezione di un quickpick del compilatore predefinito e l'elenco dei compilatori trovati nel computer degli utenti, uno dei quali è selezionato.",
"c_cpp.walkthrough.create.cpp.file.title": "Creare un file C++",
@@ -11,6 +11,8 @@
"use.compiler": "Usa {0}",
"configuration.providers": "Provider di configurazione",
"compilers": "compilatori",
"selectIntelliSenseConfiguration.string": "Seleziona configurazione IntelliSense...",
"setCompiler.message": "Compilatore IntelliSense non configurato. A meno che non si impostino configurazioni personalizzate, IntelliSense potrebbe non funzionare.",
"use.provider": "Usa {0}",
"use.compileCommands": "Usa {0}",
"selectAnotherCompiler.string": "Seleziona un altro compilatore nel computer...",
+2 -2
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "コンテキストを認識しない\"あいまいな\"結果を提供します。 ",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "C/C++ 言語サービス機能をオフにします。",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "`#include` エラーを含む翻訳単位に対して、IntelliSense エンジンをタグ パーサーに自動的に切り替えるかどうかを制御します。",
"c_cpp.configuration.autocomplete.markdownDescription": "オートコンプリート プロバイダーを制御します。`disabled` になっていて、単語ベースの補完が必要な場合には、`\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` を設定する必要があります (`c` および `cuda-cpp` 言語でも同様です)。",
"c_cpp.configuration.autocomplete.markdownDescription": "オートコンプリート プロバイダーを制御します。`disabled` になっていて、単語ベースの補完が必要な場合には、`\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` を設定する必要があります (`c` および `cuda-cpp` 言語でも同様です)。",
"c_cpp.configuration.autocomplete.default.description": "アクティブな IntelliSense エンジンを使用します。",
"c_cpp.configuration.autocomplete.disabled.description": "Visual Studio Code によって提供される単語ベースの補完機能を使用します。",
"c_cpp.configuration.errorSquiggles.description": "IntelliSense エンジンによって検出されたコンパイル エラーの疑いをエディターに報告するかどうかを制御します。また、インクルードが見つからない場合にコード分析の警告を報告するかどうかを制御します。この設定は、タグ パーサー エンジンによって無視されます。",
@@ -443,4 +443,4 @@
"c_cpp.configuration.refactoring.includeHeader.always.description": "ヘッダー ファイルがソース ファイルに明示的に含まれていない場合は、常にヘッダー ファイルを含めます。",
"c_cpp.configuration.refactoring.includeHeader.ifNeeded.description": "ヘッダー ファイルがソース ファイルに明示的に含まれていない場合、または暗黙的にインクルードされていない場合にのみ、ヘッダー ファイルを含めます。",
"c_cpp.configuration.refactoring.includeHeader.never.description": "ヘッダー ファイルを含めることはありません。"
}
}
@@ -11,6 +11,8 @@
"use.compiler": "{0}を使用する",
"configuration.providers": "構成プロバイダー",
"compilers": "コンパイラ",
"selectIntelliSenseConfiguration.string": "IntelliSense 構成を選択...",
"setCompiler.message": "IntelliSense が構成されていません。独自の構成を設定しない限り、IntelliSense は機能しない可能性があります。",
"use.provider": "{0}を使用する",
"use.compileCommands": "{0}を使用する",
"selectAnotherCompiler.string": "コンピューター上の別のコンパイラを選択...",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "\"유사\" 결과를 제공합니다. 컨텍스트를 인식하지 않는 결과입니다.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "C/C++ 언어 서비스 기능을 해제합니다.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "IntelliSense 엔진이 `#include` 오류를 포함하는 변환 단위에 대해 태그 파서로 자동으로 전환되는지 여부를 제어합니다.",
"c_cpp.configuration.autocomplete.markdownDescription": "자동 완성 공급자를 제어합니다. `disabled`에서 단어 기반 완성을 원할 경우 `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}`를 설정해야 합니다(`c`와 `cuda-cpp` 언어도 동일).",
"c_cpp.configuration.autocomplete.markdownDescription": "자동 완성 공급자를 제어합니다. `disabled`에서 단어 기반 완성을 원할 경우 `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}`를 설정해야 합니다(`c`와 `cuda-cpp` 언어도 동일).",
"c_cpp.configuration.autocomplete.default.description": "활성 IntelliSense 엔진을 사용합니다.",
"c_cpp.configuration.autocomplete.disabled.description": "Visual Studio Code에서 제공하는 단어 기반 완성을 사용합니다.",
"c_cpp.configuration.errorSquiggles.description": "IntelliSense 엔진에서 감지한 의심스러운 컴파일 오류를 편집기에 다시 보고할지 여부를 제어합니다. 또한 포함 사항을 찾을 수 없는 경우 코드 분석 경고가 보고되는지 여부를 제어합니다. 이 설정은 태그 파서 엔진에서 무시됩니다.",
@@ -11,6 +11,8 @@
"use.compiler": "{0} 사용",
"configuration.providers": "구성 공급자",
"compilers": "컴파일러",
"selectIntelliSenseConfiguration.string": "IntelliSense 구성 선택...",
"setCompiler.message": "IntelliSense를 구성하지 않았습니다. 고유한 구성을 설정하지 않으면 IntelliSense가 작동하지 않을 수 있습니다.",
"use.provider": "{0} 사용",
"use.compileCommands": "{0} 사용",
"selectAnotherCompiler.string": "내 컴퓨터에서 다른 컴파일러 선택...",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Dostarcza wyników typu „wątpliwy”, które nie są oparte na kontekstach.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Wyłącza funkcje usługi języka C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Określa, czy aparat funkcji IntelliSense automatycznie przełączy się na parser znaczników dla jednostek translacji zawierających błędy dyrektywy `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Kontroluje dostawcę funkcji automatycznego uzupełniania. Jeśli ma wartość `disabled` i chcesz stosować uzupełnianie oparte na wyrazach, musisz również ustawić element `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (oraz podobnie w przypadku języków `c` i `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Kontroluje dostawcę funkcji automatycznego uzupełniania. Jeśli ma wartość `disabled` i chcesz stosować uzupełnianie oparte na wyrazach, musisz również ustawić element `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (oraz podobnie w przypadku języków `c` i `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Używa aktywnego aparatu funkcji IntelliSense.",
"c_cpp.configuration.autocomplete.disabled.description": "Używa uzupełnienia opartego na wyrazach zapewnianego przez program Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Określa, czy podejrzane błędy kompilacji wykryte przez aparat funkcji IntelliSense będą raportowane z powrotem do edytora. Określa również, czy ostrzeżenia dotyczące analizy kodu są zgłaszane, jeśli nie można znaleźć dołączeń. To ustawienie jest ignorowane przez aparat analizatora tagów.",
@@ -11,6 +11,8 @@
"use.compiler": "Użyj kompilatora {0}",
"configuration.providers": "dostawcy konfiguracji",
"compilers": "kompilatory",
"selectIntelliSenseConfiguration.string": "Wybierz konfigurację funkcji IntelliSense...",
"setCompiler.message": "Nie skonfigurowano funkcji IntelliSense. Jeśli nie ustawisz własnych konfiguracji, funkcja IntelliSense może nie działać.",
"use.provider": "Użyj kompilatora {0}",
"use.compileCommands": "Użyj kompilatora {0}",
"selectAnotherCompiler.string": "Wybierz inny kompilator na mojej maszynie...",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Fornece resultados \"difusos\" que não são sensíveis ao contexto.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Desabilita os recursos do serviço de linguagem C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Controla se o mecanismo IntelliSense mudará automaticamente para o Analisador de tags para unidades de tradução contendo erros `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Controla o provedor de preenchimento automático. Se `disabled` e você deseja completar com base em palavras, você também precisará definir `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (e similarmente para os idiomas `c` e `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Controla o provedor de preenchimento automático. Se estiver `disabled` e você quiser a conclusão baseada em palavras, também precisará definir `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (e da mesma forma para linguagens `c` e `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Usa o mecanismo IntelliSense ativo.",
"c_cpp.configuration.autocomplete.disabled.description": "Usa o preenchimento baseado em palavras fornecido pelo Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Controla se os erros de compilação suspeitos detectados pelo mecanismo do IntelliSense serão relatados de volta ao editor. Ele também controla se os avisos de análise de código são relatados se as inclusões não puderem ser encontradas. Essa configuração é ignorada pelo mecanismo do Analisador de Marca.",
@@ -11,6 +11,8 @@
"use.compiler": "Usar {0}",
"configuration.providers": "provedores de configuração",
"compilers": "compiladores",
"selectIntelliSenseConfiguration.string": "Selecione Configuração do IntelliSense...",
"setCompiler.message": "Você não tem o IntelliSense configurado. A menos que você defina suas próprias configurações, o IntelliSense pode não funcionar.",
"use.provider": "Usar {0}",
"use.compileCommands": "Usar {0}",
"selectAnotherCompiler.string": "Selecione outro compilador na minha máquina...",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Предоставляет \"нечеткие\" результаты, не зависящие от контекста.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "Отключает компоненты службы языка C/C++.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "Определяет, будет ли подсистема IntelliSense автоматически переключаться на анализатор тегов для единиц трансляции, содержащих ошибки `#include`.",
"c_cpp.configuration.autocomplete.markdownDescription": "Управляет поставщиком автозавершения. Если присвоено значение `disabled` и вам требуется завершение на основе слов, также настройте `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (и аналогично для языков `c` и `cuda-cpp`).",
"c_cpp.configuration.autocomplete.markdownDescription": "Управляет поставщиком автозавершения. Если присвоено значение `disabled`, и вам требуется завершение по словам, также настройте `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (и аналогично для языков `c` и `cuda-cpp`).",
"c_cpp.configuration.autocomplete.default.description": "Использует активную подсистему IntelliSense.",
"c_cpp.configuration.autocomplete.disabled.description": "Использует завершение на основе слов, предоставляемое Visual Studio Code.",
"c_cpp.configuration.errorSquiggles.description": "Определяет, будут ли обнаруженные подсистемой IntelliSense предполагаемые ошибки компиляции возвращены в редактор. Также определяет, будут ли отображаться предупреждения на этапе анализа кода, если не удается найти включаемые данные. Этот параметр игнорируется подсистемой синтаксического анализа тегов.",
@@ -11,6 +11,8 @@
"use.compiler": "Использовать {0}",
"configuration.providers": "поставщики конфигурации",
"compilers": "компиляторы",
"selectIntelliSenseConfiguration.string": "Выбрать конфигурацию IntelliSense…",
"setCompiler.message": "Нет настроенных функций IntelliSense. Если не настроить собственные конфигурации, IntelliSense может не работать.",
"use.provider": "Использовать {0}",
"use.compileCommands": "Использовать {0}",
"selectAnotherCompiler.string": "Выбрать другой компилятор на моем компьютере…",
+1 -1
View File
@@ -184,7 +184,7 @@
"c_cpp.configuration.intelliSenseEngine.tagParser.description": "Bağlama duyarlı olmayan \"belirsiz\" sonuçlar sağlar.",
"c_cpp.configuration.intelliSenseEngine.disabled.description": "C/C++ dil hizmeti özelliklerini kapatır.",
"c_cpp.configuration.intelliSenseEngineFallback.markdownDescription": "IntelliSense altyapısının `#include` hatalarını içeren çeviri birimleri için otomatik olarak Etiket Ayrıştırıcısı'na geçip geçmeyeceğini denetler.",
"c_cpp.configuration.autocomplete.markdownDescription": "Otomatik tamamlama sağlayıcısını denetler. `disabled` ise ve sözcük tabanlı tamamlama istiyorsanız, aynı zamanda `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (ve aynı şekilde `c` ve `cuda-cpp` dilleri için) ayarını da belirlemeniz gerekir. ",
"c_cpp.configuration.autocomplete.markdownDescription": "Otomatik tamamlama sağlayıcısını kontrol eder. `disabled` ise ve sözcük tabanlı tamamlama istiyorsanız, aynı zamanda `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (ve aynı şekilde `c` ve `cuda-cpp` dilleri için) ayarını da belirlemeniz gerekir.",
"c_cpp.configuration.autocomplete.default.description": "Etkin IntelliSense altyapısını kullanır.",
"c_cpp.configuration.autocomplete.disabled.description": "Visual Studio Code tarafından sağlanan sözcük tabanlı tamamlamayı kullanır.",
"c_cpp.configuration.errorSquiggles.description": "IntelliSense altyapısı tarafından algılanan şüpheli derleme hatalarının düzenleyiciye geri rapor edilip edilmeyeceğini kontrol eder. Ayrıca, içermeler bulunamazsa kod analizi uyarılarının raporlanıp raporlanmayacağını da kontrol eder. Bu ayar, Etiket Ayrıştırıcı motoru tarafından yok sayılır.",
@@ -11,6 +11,8 @@
"use.compiler": "{0} kullan",
"configuration.providers": "yapılandırma sağlayıcıları",
"compilers": "derleyiciler",
"selectIntelliSenseConfiguration.string": "IntelliSense Yapılandırmasını Seç...",
"setCompiler.message": "Yapılandırılmış IntelliSenseniz yok. Kendi yapılandırmalarınızı ayarlamazsanız IntelliSense çalışmayabilir.",
"use.provider": "{0} kullan",
"use.compileCommands": "{0} kullan",
"selectAnotherCompiler.string": "Makinem üzerinde başka bir derleyici seç...",
+186 -10
View File
@@ -2,7 +2,7 @@
"name": "cpptools",
"displayName": "C/C++",
"description": "C/C++ IntelliSense, debugging, and code browsing.",
"version": "1.18.3-main",
"version": "1.20.3-main",
"publisher": "ms-vscode",
"icon": "LanguageCCPP_color_128x.png",
"readme": "README.md",
@@ -313,12 +313,78 @@
"description": "%c_cpp.taskDefinitions.name.description%"
},
"command": {
"type": "string",
"description": "%c_cpp.taskDefinitions.command.description%"
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"value",
"quoting"
],
"properties": {
"value": {
"type": "string",
"description": "%c_cpp.taskDefinitions.args.value.description%"
},
"quoting": {
"type": "string",
"enum": [
"escape",
"strong",
"weak"
],
"enumDescriptions": [
"%c_cpp.taskDefinitions.args.quoting.escape.description%",
"%c_cpp.taskDefinitions.args.quoting.strong.description%",
"%c_cpp.taskDefinitions.args.quoting.weak.description%"
],
"default": "strong",
"description": "%c_cpp.taskDefinitions.args.quoting.description%"
}
}
}
]
},
"args": {
"type": "array",
"description": "%c_cpp.taskDefinitions.args.description%"
"description": "%c_cpp.taskDefinitions.args.description%",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"required": [
"value",
"quoting"
],
"properties": {
"value": {
"type": "string",
"description": "%c_cpp.taskDefinitions.args.value.description%"
},
"quoting": {
"type": "string",
"enum": [
"escape",
"strong",
"weak"
],
"enumDescriptions": [
"%c_cpp.taskDefinitions.args.quoting.escape.description%",
"%c_cpp.taskDefinitions.args.quoting.strong.description%",
"%c_cpp.taskDefinitions.args.quoting.weak.description%"
],
"default": "strong",
"description": "%c_cpp.taskDefinitions.args.quoting.description%"
}
}
}
]
}
},
"options": {
"type": "object",
@@ -458,7 +524,7 @@
},
"C_Cpp.intelliSenseUpdateDelay": {
"type": "number",
"default": 2000,
"default": 1000,
"description": "%c_cpp.configuration.intelliSenseUpdateDelay.description%",
"scope": "application",
"minimum": 500,
@@ -1785,7 +1851,11 @@
"bugprone-bad-signal-to-kill-thread",
"bugprone-bool-pointer-implicit-conversion",
"bugprone-branch-clone",
"bugprone-casting-through-void",
"bugprone-chained-comparison",
"bugprone-compare-pointer-to-member-virtual-function",
"bugprone-copy-constructor-init",
"bugprone-crtp-constructor-accessibility",
"bugprone-dangling-handle",
"bugprone-dynamic-static-initializers",
"bugprone-easily-swappable-parameters",
@@ -1796,6 +1866,9 @@
"bugprone-forwarding-reference-overload",
"bugprone-implicit-widening-of-multiplication-result",
"bugprone-inaccurate-erase",
"bugprone-inc-dec-in-conditions",
"bugprone-incorrect-*",
"bugprone-incorrect-enable-if",
"bugprone-incorrect-roundings",
"bugprone-infinite-loop",
"bugprone-integer-division",
@@ -1807,6 +1880,7 @@
"bugprone-misplaced-pointer-arithmetic-in-alloc",
"bugprone-misplaced-widening-cast",
"bugprone-move-forwarding-reference",
"bugprone-multi-level-implicit-pointer-conversion",
"bugprone-multiple-*",
"bugprone-multiple-new-in-one-expression",
"bugprone-multiple-statement-macro",
@@ -1814,6 +1888,7 @@
"bugprone-no-escape",
"bugprone-non-zero-enum-to-bool-conversion",
"bugprone-not-null-terminated-result",
"bugprone-optional-value-conversion",
"bugprone-parent-virtual-call",
"bugprone-posix-return",
"bugprone-redundant-branch-condition",
@@ -1840,6 +1915,7 @@
"bugprone-suspicious-realloc-usage",
"bugprone-suspicious-semicolon",
"bugprone-suspicious-string-compare",
"bugprone-suspicious-stringview-data-usage",
"bugprone-swapped-arguments",
"bugprone-switch-missing-default-case",
"bugprone-terminating-continue",
@@ -1852,6 +1928,9 @@
"bugprone-unhandled-exception-at-new",
"bugprone-unhandled-self-assignment",
"bugprone-unique-ptr-array-mismatch",
"bugprone-unsafe-functions",
"bugprone-unused-*",
"bugprone-unused-local-non-trivial-variable",
"bugprone-unused-raii",
"bugprone-unused-return-value",
"bugprone-use-after-move",
@@ -1888,6 +1967,7 @@
"cert-msc*",
"cert-msc30-c",
"cert-msc32-c",
"cert-msc33-c",
"cert-msc50-cpp",
"cert-msc51-cpp",
"cert-msc54-cpp",
@@ -1903,6 +1983,7 @@
"cert-str34-c",
"clang-analyzer-*",
"clang-analyzer-core.*",
"clang-analyzer-core.BitwiseShift",
"clang-analyzer-core.CallAndMessage",
"clang-analyzer-core.DivideZero",
"clang-analyzer-core.DynamicTypePropagation",
@@ -1915,6 +1996,7 @@
"clang-analyzer-core.uninitialized.Assign",
"clang-analyzer-core.uninitialized.Branch",
"clang-analyzer-core.uninitialized.CapturedBlockVariable",
"clang-analyzer-core.uninitialized.NewArraySize",
"clang-analyzer-core.uninitialized.UndefReturn",
"clang-analyzer-core.VLASize",
"clang-analyzer-cplusplus.*",
@@ -1922,7 +2004,11 @@
"clang-analyzer-cplusplus.Move",
"clang-analyzer-cplusplus.NewDelete",
"clang-analyzer-cplusplus.NewDeleteLeaks",
"clang-analyzer-cplusplus.PlacementNew",
"clang-analyzer-cplusplus.PureVirtualCall",
"clang-analyzer-cplusplus.StringChecker",
"clang-analyzer-deadcode.DeadStores",
"clang-analyzer-fuchsia.HandleChecker",
"clang-analyzer-nullablity.*",
"clang-analyzer-nullability.NullableDereferenced",
"clang-analyzer-nullability.NullablePassedToNonnull",
@@ -1930,6 +2016,7 @@
"clang-analyzer-nullability.NullPassedToNonnull",
"clang-analyzer-nullability.NullReturnedFromNonnull",
"clang-analyzer-optin.*",
"clang-analyzer-optin.core.EnumCastOutOfRange",
"clang-analyzer-optin.cplusplus.*",
"clang-analyzer-optin.cplusplus.UninitializedObject",
"clang-analyzer-optin.cplusplus.VirtualCall",
@@ -1978,11 +2065,13 @@
"clang-analyzer-osx.OSObjectRetainCount",
"clang-analyzer-osx.SecKeychainAPI",
"clang-analyzer-security.*",
"clang-analyzer-security.cert.env.InvalidPtr",
"clang-analyzer-security.FloatLoopCounter",
"clang-analyzer-security.insecureAPI.*",
"clang-analyzer-security.insecureAPI.bcmp",
"clang-analyzer-security.insecureAPI.bcopy",
"clang-analyzer-security.insecureAPI.bzero",
"clang-analyzer-security.insecureAPI.decodeValueOfObjCType",
"clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
"clang-analyzer-security.insecureAPI.getpw",
"clang-analyzer-security.insecureAPI.gets",
@@ -1997,14 +2086,19 @@
"clang-analyzer-unix.cstring.*",
"clang-analyzer-unix.cstring.BadSizeArg",
"clang-analyzer-unix.cstring.NullArg",
"clang-analyzer-unix.Errno",
"clang-analyzer-unix.Malloc",
"clang-analyzer-unix.MallocSizeof",
"clang-analyzer-unix.MismatchedDeallocator",
"clang-analyzer-unix.StdCLibraryFunctions",
"clang-analyzer-unix.Vfork",
"clang-analyzer-valist.*",
"clang-analyzer-valist.CopyToSelf",
"clang-analyzer-valist.Uninitialized",
"clang-analyzer-valist.Unterminated",
"clang-analyzer-webkit.NoUncountedMemberChecker",
"clang-analyzer-webkit.RefCntblBaseVirtualDtor",
"clang-analyzer-webkit.UncountedLambdaCapturesChecker",
"concurrency-*",
"concurrency-mt-unsafe",
"concurrency-thread-canceltype-asynchronous",
@@ -2027,7 +2121,13 @@
"cppcoreguidelines-misleading-capture-default-by-value",
"cppcoreguidelines-missing-std-forward",
"cppcoreguidelines-narrowing-conversions",
"cppcoreguidelines-no-*",
"cppcoreguidelines-no-malloc",
"cppcoreguidelines-no-suspend-with-lock",
"cppcoreguidelines-noexcept-*",
"cppcoreguidelines-noexcept-destructor",
"cppcoreguidelines-noexcept-move-operations",
"cppcoreguidelines-noexcept-swap",
"cppcoreguidelines-non-private-member-variables-in-classes",
"cppcoreguidelines-owning-memory",
"cppcoreguidelines-prefer-member-initializer",
@@ -2046,6 +2146,7 @@
"cppcoreguidelines-rvalue-reference-param-not-moved",
"cppcoreguidelines-slicing",
"cppcoreguidelines-special-member-functions",
"cppcoreguidelines-use-default-member-init",
"cppcoreguidelines-virtual-class-destructor",
"darwin-*",
"darwin-avoid-spinlock",
@@ -2094,6 +2195,7 @@
"hicpp-exception-baseclass",
"hicpp-explicit-conversions",
"hicpp-function-size",
"hicpp-ignored-remove-result",
"hicpp-invalid-access-moved",
"hicpp-member-init",
"hicpp-move-const-arg",
@@ -2139,6 +2241,7 @@
"misc-*",
"misc-confusable-identifiers",
"misc-const-correctness",
"misc-coroutine-hostile-raii",
"misc-definitions-in-headers",
"misc-header-include-cycle",
"misc-include-cleaner",
@@ -2189,7 +2292,9 @@
"modernize-use-auto",
"modernize-use-bool-literals",
"modernize-use-default",
"modernize-use-constraints",
"modernize-use-default-member-init",
"modernize-use-designated-initializers",
"modernize-use-emplace",
"modernize-use-equals-*",
"modernize-use-equals-default",
@@ -2198,6 +2303,9 @@
"modernize-use-noexcept",
"modernize-use-nullptr",
"modernize-use-override",
"modernize-use-starts-ends-with",
"modernize-use-std-*",
"modernize-use-std-numbers",
"modernize-use-std-print",
"modernize-use-trailing-return-type",
"modernize-use-transparent-functors",
@@ -2221,6 +2329,7 @@
"openmp-use-default-none",
"performance-*",
"performance-avoid-endl",
"performance-enum-size",
"performance-faster-string-find",
"performance-for-range-copy",
"performance-implicit-conversion-in-loop",
@@ -2250,6 +2359,8 @@
"readability-*",
"readability-avoid-*",
"readability-avoid-const-params-in-decls",
"readability-avoid-nested-conditional-operator",
"readability-avoid-return-with-void-value",
"readability-avoid-unconditional-preprocessor-if",
"readability-braces-around-statements",
"readability-const-return-type",
@@ -2280,15 +2391,18 @@
"readability-qualified-auto",
"readability-redundant-*",
"readability-redundant-access-specifiers",
"readability-redundant-casting",
"readability-redundant-control-flow",
"readability-redundant-declaration",
"readability-redundant-function-ptr-dereference",
"readability-redundant-inline-specifier",
"readability-redundant-member-init",
"readability-redundant-preprocessor",
"readability-redundant-smartptr-get",
"readability-redundant-string-*",
"readability-redundant-string-cstr",
"readability-redundant-string-init",
"readability-reference-to-constructed-temporary",
"readability-simplify-*",
"readability-simplify-boolean-expr",
"readability-simplify-subscript-expr",
@@ -2299,7 +2413,9 @@
"readability-suspicious-call-argument",
"readability-uniqueptr-delete-release",
"readability-uppercase-literal-suffix",
"readability-use-*",
"readability-use-anyofallof",
"readability-use-std-min-max",
"zircon-temporary-objects"
]
},
@@ -2371,7 +2487,11 @@
"bugprone-bad-signal-to-kill-thread",
"bugprone-bool-pointer-implicit-conversion",
"bugprone-branch-clone",
"bugprone-casting-through-void",
"bugprone-chained-comparison",
"bugprone-compare-pointer-to-member-virtual-function",
"bugprone-copy-constructor-init",
"bugprone-crtp-constructor-accessibility",
"bugprone-dangling-handle",
"bugprone-dynamic-static-initializers",
"bugprone-easily-swappable-parameters",
@@ -2382,6 +2502,9 @@
"bugprone-forwarding-reference-overload",
"bugprone-implicit-widening-of-multiplication-result",
"bugprone-inaccurate-erase",
"bugprone-inc-dec-in-conditions",
"bugprone-incorrect-*",
"bugprone-incorrect-enable-if",
"bugprone-incorrect-roundings",
"bugprone-infinite-loop",
"bugprone-integer-division",
@@ -2393,6 +2516,7 @@
"bugprone-misplaced-pointer-arithmetic-in-alloc",
"bugprone-misplaced-widening-cast",
"bugprone-move-forwarding-reference",
"bugprone-multi-level-implicit-pointer-conversion",
"bugprone-multiple-*",
"bugprone-multiple-new-in-one-expression",
"bugprone-multiple-statement-macro",
@@ -2400,6 +2524,7 @@
"bugprone-no-escape",
"bugprone-non-zero-enum-to-bool-conversion",
"bugprone-not-null-terminated-result",
"bugprone-optional-value-conversion",
"bugprone-parent-virtual-call",
"bugprone-posix-return",
"bugprone-redundant-branch-condition",
@@ -2426,6 +2551,7 @@
"bugprone-suspicious-realloc-usage",
"bugprone-suspicious-semicolon",
"bugprone-suspicious-string-compare",
"bugprone-suspicious-stringview-data-usage",
"bugprone-swapped-arguments",
"bugprone-switch-missing-default-case",
"bugprone-terminating-continue",
@@ -2438,6 +2564,9 @@
"bugprone-unhandled-exception-at-new",
"bugprone-unhandled-self-assignment",
"bugprone-unique-ptr-array-mismatch",
"bugprone-unsafe-functions",
"bugprone-unused-*",
"bugprone-unused-local-non-trivial-variable",
"bugprone-unused-raii",
"bugprone-unused-return-value",
"bugprone-use-after-move",
@@ -2474,6 +2603,7 @@
"cert-msc*",
"cert-msc30-c",
"cert-msc32-c",
"cert-msc33-c",
"cert-msc50-cpp",
"cert-msc51-cpp",
"cert-msc54-cpp",
@@ -2489,6 +2619,7 @@
"cert-str34-c",
"clang-analyzer-*",
"clang-analyzer-core.*",
"clang-analyzer-core.BitwiseShift",
"clang-analyzer-core.CallAndMessage",
"clang-analyzer-core.DivideZero",
"clang-analyzer-core.DynamicTypePropagation",
@@ -2501,6 +2632,7 @@
"clang-analyzer-core.uninitialized.Assign",
"clang-analyzer-core.uninitialized.Branch",
"clang-analyzer-core.uninitialized.CapturedBlockVariable",
"clang-analyzer-core.uninitialized.NewArraySize",
"clang-analyzer-core.uninitialized.UndefReturn",
"clang-analyzer-core.VLASize",
"clang-analyzer-cplusplus.*",
@@ -2508,7 +2640,11 @@
"clang-analyzer-cplusplus.Move",
"clang-analyzer-cplusplus.NewDelete",
"clang-analyzer-cplusplus.NewDeleteLeaks",
"clang-analyzer-cplusplus.PlacementNew",
"clang-analyzer-cplusplus.PureVirtualCall",
"clang-analyzer-cplusplus.StringChecker",
"clang-analyzer-deadcode.DeadStores",
"clang-analyzer-fuchsia.HandleChecker",
"clang-analyzer-nullablity.*",
"clang-analyzer-nullability.NullableDereferenced",
"clang-analyzer-nullability.NullablePassedToNonnull",
@@ -2516,6 +2652,7 @@
"clang-analyzer-nullability.NullPassedToNonnull",
"clang-analyzer-nullability.NullReturnedFromNonnull",
"clang-analyzer-optin.*",
"clang-analyzer-optin.core.EnumCastOutOfRange",
"clang-analyzer-optin.cplusplus.*",
"clang-analyzer-optin.cplusplus.UninitializedObject",
"clang-analyzer-optin.cplusplus.VirtualCall",
@@ -2564,11 +2701,13 @@
"clang-analyzer-osx.OSObjectRetainCount",
"clang-analyzer-osx.SecKeychainAPI",
"clang-analyzer-security.*",
"clang-analyzer-security.cert.env.InvalidPtr",
"clang-analyzer-security.FloatLoopCounter",
"clang-analyzer-security.insecureAPI.*",
"clang-analyzer-security.insecureAPI.bcmp",
"clang-analyzer-security.insecureAPI.bcopy",
"clang-analyzer-security.insecureAPI.bzero",
"clang-analyzer-security.insecureAPI.decodeValueOfObjCType",
"clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
"clang-analyzer-security.insecureAPI.getpw",
"clang-analyzer-security.insecureAPI.gets",
@@ -2583,14 +2722,19 @@
"clang-analyzer-unix.cstring.*",
"clang-analyzer-unix.cstring.BadSizeArg",
"clang-analyzer-unix.cstring.NullArg",
"clang-analyzer-unix.Errno",
"clang-analyzer-unix.Malloc",
"clang-analyzer-unix.MallocSizeof",
"clang-analyzer-unix.MismatchedDeallocator",
"clang-analyzer-unix.StdCLibraryFunctions",
"clang-analyzer-unix.Vfork",
"clang-analyzer-valist.*",
"clang-analyzer-valist.CopyToSelf",
"clang-analyzer-valist.Uninitialized",
"clang-analyzer-valist.Unterminated",
"clang-analyzer-webkit.NoUncountedMemberChecker",
"clang-analyzer-webkit.RefCntblBaseVirtualDtor",
"clang-analyzer-webkit.UncountedLambdaCapturesChecker",
"concurrency-*",
"concurrency-mt-unsafe",
"concurrency-thread-canceltype-asynchronous",
@@ -2613,7 +2757,13 @@
"cppcoreguidelines-misleading-capture-default-by-value",
"cppcoreguidelines-missing-std-forward",
"cppcoreguidelines-narrowing-conversions",
"cppcoreguidelines-no-*",
"cppcoreguidelines-no-malloc",
"cppcoreguidelines-no-suspend-with-lock",
"cppcoreguidelines-noexcept-*",
"cppcoreguidelines-noexcept-destructor",
"cppcoreguidelines-noexcept-move-operations",
"cppcoreguidelines-noexcept-swap",
"cppcoreguidelines-non-private-member-variables-in-classes",
"cppcoreguidelines-owning-memory",
"cppcoreguidelines-prefer-member-initializer",
@@ -2632,6 +2782,7 @@
"cppcoreguidelines-rvalue-reference-param-not-moved",
"cppcoreguidelines-slicing",
"cppcoreguidelines-special-member-functions",
"cppcoreguidelines-use-default-member-init",
"cppcoreguidelines-virtual-class-destructor",
"darwin-*",
"darwin-avoid-spinlock",
@@ -2680,6 +2831,7 @@
"hicpp-exception-baseclass",
"hicpp-explicit-conversions",
"hicpp-function-size",
"hicpp-ignored-remove-result",
"hicpp-invalid-access-moved",
"hicpp-member-init",
"hicpp-move-const-arg",
@@ -2725,6 +2877,7 @@
"misc-*",
"misc-confusable-identifiers",
"misc-const-correctness",
"misc-coroutine-hostile-raii",
"misc-definitions-in-headers",
"misc-header-include-cycle",
"misc-include-cleaner",
@@ -2775,7 +2928,9 @@
"modernize-use-auto",
"modernize-use-bool-literals",
"modernize-use-default",
"modernize-use-constraints",
"modernize-use-default-member-init",
"modernize-use-designated-initializers",
"modernize-use-emplace",
"modernize-use-equals-*",
"modernize-use-equals-default",
@@ -2784,6 +2939,9 @@
"modernize-use-noexcept",
"modernize-use-nullptr",
"modernize-use-override",
"modernize-use-starts-ends-with",
"modernize-use-std-*",
"modernize-use-std-numbers",
"modernize-use-std-print",
"modernize-use-trailing-return-type",
"modernize-use-transparent-functors",
@@ -2807,6 +2965,7 @@
"openmp-use-default-none",
"performance-*",
"performance-avoid-endl",
"performance-enum-size",
"performance-faster-string-find",
"performance-for-range-copy",
"performance-implicit-conversion-in-loop",
@@ -2836,6 +2995,8 @@
"readability-*",
"readability-avoid-*",
"readability-avoid-const-params-in-decls",
"readability-avoid-nested-conditional-operator",
"readability-avoid-return-with-void-value",
"readability-avoid-unconditional-preprocessor-if",
"readability-braces-around-statements",
"readability-const-return-type",
@@ -2866,15 +3027,18 @@
"readability-qualified-auto",
"readability-redundant-*",
"readability-redundant-access-specifiers",
"readability-redundant-casting",
"readability-redundant-control-flow",
"readability-redundant-declaration",
"readability-redundant-function-ptr-dereference",
"readability-redundant-inline-specifier",
"readability-redundant-member-init",
"readability-redundant-preprocessor",
"readability-redundant-smartptr-get",
"readability-redundant-string-*",
"readability-redundant-string-cstr",
"readability-redundant-string-init",
"readability-reference-to-constructed-temporary",
"readability-simplify-*",
"readability-simplify-boolean-expr",
"readability-simplify-subscript-expr",
@@ -2885,7 +3049,9 @@
"readability-suspicious-call-argument",
"readability-uniqueptr-delete-release",
"readability-uppercase-literal-suffix",
"readability-use-*",
"readability-use-anyofallof",
"readability-use-std-min-max",
"zircon-temporary-objects"
]
},
@@ -3012,6 +3178,14 @@
"maximum": 65536,
"scope": "machine"
},
"C_Cpp.maxSymbolSearchResults": {
"type": "integer",
"markdownDescription": "%c_cpp.configuration.maxSymbolSearchResults.markdownDescription%",
"default": 5000,
"minimum": 500,
"maximum": 10000,
"scope": "window"
},
"C_Cpp.intelliSense.maxCachedProcesses": {
"type": [
"integer",
@@ -5811,17 +5985,17 @@
},
"configurationDefaults": {
"[cpp]": {
"editor.wordBasedSuggestions": false,
"editor.wordBasedSuggestions": "off",
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
},
"[cuda-cpp]": {
"editor.wordBasedSuggestions": false,
"editor.wordBasedSuggestions": "off",
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
},
"[c]": {
"editor.wordBasedSuggestions": false,
"editor.wordBasedSuggestions": "off",
"editor.suggest.insertMode": "replace",
"editor.semanticHighlighting.enabled": true
}
@@ -6311,7 +6485,8 @@
"@types/minimatch": "^3.0.5",
"@types/mkdirp": "^0.5.2",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.9",
"@types/node": "^18.15.0",
"@types/node-fetch": "^2.6.9",
"@types/plist": "^3.0.2",
"@types/semver": "^7.1.0",
"@types/shell-quote": "^1.7.1",
@@ -6321,7 +6496,7 @@
"@typescript-eslint/eslint-plugin": "^6.1.0",
"@typescript-eslint/parser": "^6.1.0",
"eslint-plugin-header": "^3.1.1",
"@vscode/test-electron": "^2.3.3",
"@vscode/test-electron": "^2.3.8",
"@vscode/dts": "^0.4.0",
"async-child-process": "^1.1.1",
"await-notify": "^1.0.1",
@@ -6359,6 +6534,7 @@
"glob": "^7.1.6",
"minimatch": "^3.0.5",
"mkdirp": "^0.5.5",
"node-fetch": "^2.6.9",
"node-loader": "^2.0.0",
"node-stream-zip": "^1.15.0",
"plist": "^3.0.5",
+13 -2
View File
@@ -66,6 +66,12 @@
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
]
},
"c_cpp.configuration.maxSymbolSearchResults.markdownDescription": {
"message": "The maximum number of results to show for 'Go to Symbol in Workspace'. The default is `5000`.",
"comment": [
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
]
},
"c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": {
"message": "The maximum number of IntelliSense processes to keep running. The default of `null` (empty) uses value inherited from `#C_Cpp.maxCachedProcesses#`.",
"comment": [
@@ -470,9 +476,9 @@
]
},
"c_cpp.configuration.autocomplete.markdownDescription": {
"message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (and similarly for `c` and `cuda-cpp` languages).",
"message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (and similarly for `c` and `cuda-cpp` languages).",
"comment": [
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered -- except for text \"value\", which is a placeholder that should be translated."
]
},
"c_cpp.configuration.autocomplete.default.description": "Uses the active IntelliSense engine.",
@@ -928,6 +934,11 @@
"c_cpp.taskDefinitions.name.description": "The name of the task.",
"c_cpp.taskDefinitions.command.description": "The path to either a compiler or script that performs compilation.",
"c_cpp.taskDefinitions.args.description": "Additional arguments to pass to the compiler or compilation script.",
"c_cpp.taskDefinitions.args.value.description": "The actual argument value.",
"c_cpp.taskDefinitions.args.quoting.description": "How the argument value should be quoted.",
"c_cpp.taskDefinitions.args.quoting.escape.description": "Escapes characters using the shell's escape character (e.g. \\ under bash).",
"c_cpp.taskDefinitions.args.quoting.strong.description": "Quotes the argument using the shell's strong quote character (e.g. ' under bash).",
"c_cpp.taskDefinitions.args.quoting.weak.description": "Quotes the argument using the shell's weak quote character (e.g. \" under bash).",
"c_cpp.taskDefinitions.options.description": "Additional command options.",
"c_cpp.taskDefinitions.options.cwd.description": "The current working directory of the executed program or script. If omitted Code's current workspace root is used.",
"c_cpp.taskDefinitions.detail.description": "Additional details of the task.",
@@ -413,7 +413,7 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv
if (buildTasks.length !== 0) {
configs = (await Promise.all(buildTasks.map<Promise<CppDebugConfiguration | undefined>>(async task => {
const definition: CppBuildTaskDefinition = task.definition as CppBuildTaskDefinition;
const compilerPath: string = definition.command;
const compilerPath: string = util.isString(definition.command) ? definition.command : definition.command.value;
// Filter out the tasks that has an invalid compiler path.
const compilerPathExists: boolean = path.isAbsolute(compilerPath) ?
// Absolute path, just check if it exists
@@ -1162,16 +1162,16 @@ abstract class DefaultConfigurationProvider implements IConfigurationAssetProvid
class WindowsConfigurationProvider extends DefaultConfigurationProvider {
private executable: string = "a.exe";
private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe").replace(/\"/g, "\\\"") + ">";
private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe").replace(/"/g, '\\"') + ">";
private MIMode: string = 'gdb';
private setupCommandsBlock: string = `"setupCommands": [
{
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/\"/g, "\\\"")}",
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/"/g, '\\"')}",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/\"/g, "\\\"")}",
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/"/g, '\\"')}",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
@@ -1205,12 +1205,12 @@ class LinuxConfigurationProvider extends DefaultConfigurationProvider {
private MIMode: string = 'gdb';
private setupCommandsBlock: string = `"setupCommands": [
{
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/\"/g, "\\\"")}",
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/"/g, '\\"')}",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/\"/g, "\\\"")}",
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/"/g, '\\"')}",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
@@ -1228,7 +1228,7 @@ class LinuxConfigurationProvider extends DefaultConfigurationProvider {
}
function convertConfigurationSnippetToCompletionItem(snippet: IConfigurationSnippet): vscode.CompletionItem {
const item: vscode.CompletionItem = new vscode.CompletionItem(snippet.label, vscode.CompletionItemKind.Snippet);
const item: vscode.CompletionItem = new vscode.CompletionItem(snippet.label, vscode.CompletionItemKind.Module);
item.insertText = snippet.bodyText;
+19 -19
View File
@@ -92,7 +92,7 @@ function createLaunchString(name: string, type: string, executable: string): str
return `"name": "${name}",
"type": "${type}",
"request": "launch",
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/"/g, '\\"')}",
"args": [],
"stopAtEntry": false,
"cwd": "$\{fileDirname\}",
@@ -106,7 +106,7 @@ function createAttachString(name: string, type: string, executable: string): str
"name": "${name}",
"type": "${type}",
"request": "attach",{0}
`, [type === "cppdbg" ? `${os.EOL}"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",` : ""]);
`, [type === "cppdbg" ? `${os.EOL}"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/"/g, '\\"')}",` : ""]);
}
function createRemoteAttachString(name: string, type: string, executable: string): string {
@@ -114,7 +114,7 @@ function createRemoteAttachString(name: string, type: string, executable: string
"name": "${name}",
"type": "${type}",
"request": "attach",
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/"/g, '\\"')}",
"processId": "$\{command:pickRemoteProcess\}"
`;
}
@@ -158,7 +158,7 @@ abstract class Configuration implements IConfiguration {
export class MIConfigurations extends Configuration {
public GetLaunchConfiguration(): IConfigurationSnippet {
const name: string = `(${this.MIMode}) ${localize("launch.string", "Launch").replace(/\"/g, "\\\"")}`;
const name: string = `(${this.MIMode}) ${localize("launch.string", "Launch").replace(/"/g, '\\"')}`;
const body: string = formatString(`{
\t${indentJsonString(createLaunchString(name, this.miDebugger, this.executable))},
@@ -168,7 +168,7 @@ export class MIConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("launch.with", "Launch with {0}.", this.MIMode).replace(/\"/g, "\\\""),
"description": localize("launch.with", "Launch with {0}.", this.MIMode).replace(/"/g, '\\"'),
"bodyText": body.trim(),
"isInitialConfiguration": true,
"debuggerType": DebuggerType.cppdbg
@@ -176,7 +176,7 @@ export class MIConfigurations extends Configuration {
}
public GetAttachConfiguration(): IConfigurationSnippet {
const name: string = `(${this.MIMode}) ${localize("attach.string", "Attach").replace(/\"/g, "\\\"")}`;
const name: string = `(${this.MIMode}) ${localize("attach.string", "Attach").replace(/"/g, '\\"')}`;
const body: string = formatString(`{
\t${indentJsonString(createAttachString(name, this.miDebugger, this.executable))}
@@ -186,7 +186,7 @@ export class MIConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("attach.with", "Attach with {0}.", this.MIMode).replace(/\"/g, "\\\""),
"description": localize("attach.with", "Attach with {0}.", this.MIMode).replace(/"/g, '\\"'),
"bodyText": body.trim(),
"debuggerType": DebuggerType.cppdbg
};
@@ -197,7 +197,7 @@ export class MIConfigurations extends Configuration {
export class PipeTransportConfigurations extends Configuration {
public GetLaunchConfiguration(): IConfigurationSnippet {
const name: string = `(${this.MIMode}) ${localize("pipe.launch", "Pipe Launch").replace(/\"/g, "\\\"")}`;
const name: string = `(${this.MIMode}) ${localize("pipe.launch", "Pipe Launch").replace(/"/g, '\\"')}`;
const body: string = formatString(`
{
@@ -208,7 +208,7 @@ export class PipeTransportConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("pipe.launch.with", "Pipe Launch with {0}.", this.MIMode).replace(/\"/g, "\\\""),
"description": localize("pipe.launch.with", "Pipe Launch with {0}.", this.MIMode).replace(/"/g, '\\"'),
"bodyText": body.trim(),
"debuggerType": DebuggerType.cppdbg
};
@@ -216,7 +216,7 @@ export class PipeTransportConfigurations extends Configuration {
}
public GetAttachConfiguration(): IConfigurationSnippet {
const name: string = `(${this.MIMode}) ${localize("pipe.attach", "Pipe Attach").replace(/\"/g, "\\\"")}`;
const name: string = `(${this.MIMode}) ${localize("pipe.attach", "Pipe Attach").replace(/"/g, '\\"')}`;
const body: string = formatString(`
{
@@ -226,7 +226,7 @@ export class PipeTransportConfigurations extends Configuration {
}`, [this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalProperties)}` : ""]);
return {
"label": configPrefix + name,
"description": localize("pipe.attach.with", "Pipe Attach with {0}.", this.MIMode).replace(/\"/g, "\\\""),
"description": localize("pipe.attach.with", "Pipe Attach with {0}.", this.MIMode).replace(/"/g, '\\"'),
"bodyText": body.trim(),
"debuggerType": DebuggerType.cppdbg
};
@@ -237,7 +237,7 @@ export class PipeTransportConfigurations extends Configuration {
export class WindowsConfigurations extends Configuration {
public GetLaunchConfiguration(): IConfigurationSnippet {
const name: string = `(Windows) ${localize("launch.string", "Launch").replace(/\"/g, "\\\"")}`;
const name: string = `(Windows) ${localize("launch.string", "Launch").replace(/"/g, '\\"')}`;
const body: string = `
{
@@ -246,7 +246,7 @@ export class WindowsConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("launch.with.vs.debugger", "Launch with the Visual Studio C/C++ debugger.").replace(/\"/g, "\\\""),
"description": localize("launch.with.vs.debugger", "Launch with the Visual Studio C/C++ debugger.").replace(/"/g, '\\"'),
"bodyText": body.trim(),
"isInitialConfiguration": true,
"debuggerType": DebuggerType.cppvsdbg
@@ -255,7 +255,7 @@ export class WindowsConfigurations extends Configuration {
}
public GetAttachConfiguration(): IConfigurationSnippet {
const name: string = `(Windows) ${localize("attach.string", "Attach").replace(/\"/g, "\\\"")}`;
const name: string = `(Windows) ${localize("attach.string", "Attach").replace(/"/g, '\\"')}`;
const body: string = `
{
@@ -264,7 +264,7 @@ export class WindowsConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("attach.with.vs.debugger", "Attach to a process with the Visual Studio C/C++ debugger.").replace(/\"/g, "\\\""),
"description": localize("attach.with.vs.debugger", "Attach to a process with the Visual Studio C/C++ debugger.").replace(/"/g, '\\"'),
"bodyText": body.trim(),
"debuggerType": DebuggerType.cppvsdbg
};
@@ -277,7 +277,7 @@ export class WSLConfigurations extends Configuration {
public bashPipeProgram = process.arch === 'ia32' ? "${env:windir}\\\\sysnative\\\\bash.exe" : "${env:windir}\\\\system32\\\\bash.exe";
public GetLaunchConfiguration(): IConfigurationSnippet {
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.launch", "Bash on Windows Launch").replace(/\"/g, "\\\"")}`;
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.launch", "Bash on Windows Launch").replace(/"/g, '\\"')}`;
const body: string = formatString(`
{
@@ -287,14 +287,14 @@ export class WSLConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("launch.bash.windows", "Launch in Bash on Windows using {0}.", this.MIMode).replace(/\"/g, "\\\""),
"description": localize("launch.bash.windows", "Launch in Bash on Windows using {0}.", this.MIMode).replace(/"/g, '\\"'),
"bodyText": body.trim(),
"debuggerType": DebuggerType.cppdbg
};
}
public GetAttachConfiguration(): IConfigurationSnippet {
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.attach", "Bash on Windows Attach").replace(/\"/g, "\\\"")}`;
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.attach", "Bash on Windows Attach").replace(/"/g, '\\"')}`;
const body: string = formatString(`
{
@@ -304,7 +304,7 @@ export class WSLConfigurations extends Configuration {
return {
"label": configPrefix + name,
"description": localize("remote.attach.bash.windows", "Attach to a remote process running in Bash on Windows using {0}.", this.MIMode).replace(/\"/g, "\\\""),
"description": localize("remote.attach.bash.windows", "Attach to a remote process running in Bash on Windows using {0}.", this.MIMode).replace(/"/g, '\\"'),
"bodyText": body.trim(),
"debuggerType": DebuggerType.cppdbg
};
+1 -1
View File
@@ -12,7 +12,7 @@ export class ArchitectureReplacer {
public static checkAndReplaceWSLPipeProgram(pipeProgramStr: string, expectedArch: ArchType): string | undefined {
let replacedPipeProgram: string | undefined;
const winDir: string | undefined = process.env.WINDIR ? process.env.WINDIR.toLowerCase() : undefined;
const winDirAltDirSep: string | undefined = process.env.WINDIR ? process.env.WINDIR.replace('\\', '/').toLowerCase() : undefined;
const winDirAltDirSep: string | undefined = process.env.WINDIR ? process.env.WINDIR.replace(/\\/g, '/').toLowerCase() : undefined;
const winDirEnv: string = "${env:windir}";
if (winDir && winDirAltDirSep && (pipeProgramStr.indexOf(winDir) === 0 || pipeProgramStr.indexOf(winDirAltDirSep) === 0 || pipeProgramStr.indexOf(winDirEnv) === 0)) {
@@ -7,7 +7,6 @@ import * as vscode from 'vscode';
import { Position, Range, RequestType, TextDocumentIdentifier } from 'vscode-languageclient';
import * as Telemetry from '../../telemetry';
import { DefaultClient, workspaceReferences } from '../client';
import { processDelayedDidOpen } from '../extension';
import { CancellationSender } from '../references';
import { makeVscodeRange } from '../utils';
@@ -104,7 +103,7 @@ export class CallHierarchyProvider implements vscode.CallHierarchyProvider {
}
public async prepareCallHierarchy(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Promise<vscode.CallHierarchyItem | undefined> {
await this.client.enqueue(() => processDelayedDidOpen(document));
await this.client.ready;
workspaceReferences.cancelCurrentReferenceRequest(CancellationSender.NewRequest);
workspaceReferences.clearViews();
@@ -4,7 +4,7 @@
* ------------------------------------------------------------------------------------------ */
import * as vscode from 'vscode';
import { Client, DefaultClient, GetDocumentSymbolRequest, GetDocumentSymbolRequestParams, GetDocumentSymbolResult, LocalizeDocumentSymbol, SymbolScope } from '../client';
import { clients, processDelayedDidOpen } from '../extension';
import { clients } from '../extension';
import { getLocalizedString, getLocalizedSymbolScope } from '../localization';
import { makeVscodeRange } from '../utils';
@@ -57,7 +57,7 @@ export class DocumentSymbolProvider implements vscode.DocumentSymbolProvider {
const client: Client = clients.getClientFor(document.uri);
if (client instanceof DefaultClient) {
const defaultClient: DefaultClient = <DefaultClient>client;
await client.enqueue(() => processDelayedDidOpen(document));
await client.ready;
const params: GetDocumentSymbolRequestParams = {
uri: document.uri.toString()
};
@@ -3,28 +3,65 @@
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as vscode from 'vscode';
import { ManualPromise } from '../../Utility/Async/manualPromise';
import { CppFoldingRange, DefaultClient, FoldingRangeKind, GetFoldingRangesParams, GetFoldingRangesRequest, GetFoldingRangesResult } from '../client';
import { processDelayedDidOpen } from '../extension';
import { CppSettings } from '../settings';
interface FoldingRangeRequestInfo {
promise: ManualPromise<vscode.FoldingRange[] | undefined> | undefined;
}
export class FoldingRangeProvider implements vscode.FoldingRangeProvider {
private client: DefaultClient;
public onDidChangeFoldingRangesEvent = new vscode.EventEmitter<void>();
public onDidChangeFoldingRanges?: vscode.Event<void>;
// Mitigate an issue where VS Code sends us an inordinate number of requests
// 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(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 [];
}
const params: GetFoldingRangesParams = {
uri: document.uri.toString()
};
await this.client.enqueue(() => processDelayedDidOpen(document));
const pendingRequest: FoldingRangeRequestInfo | undefined = this.pendingRequests.get(document.uri.toString());
if (pendingRequest !== undefined) {
if (pendingRequest.promise === undefined) {
pendingRequest.promise = new ManualPromise<vscode.FoldingRange[] | undefined>();
}
console.log("Redundant folding ranges request received for: " + document.uri.toString());
return pendingRequest.promise;
}
const foldingRangeRequestInfo: FoldingRangeRequestInfo = {
promise: undefined
};
this.pendingRequests.set(document.uri.toString(), foldingRangeRequestInfo);
const promise: Promise<vscode.FoldingRange[] | undefined> = this.requestRanges(document.uri.toString(), token);
await promise;
this.pendingRequests.delete(document.uri.toString());
if (foldingRangeRequestInfo.promise !== undefined) {
promise.then(() => {
foldingRangeRequestInfo.promise?.resolve(promise);
}, () => {
foldingRangeRequestInfo.promise?.reject(new vscode.CancellationError());
});
}
return promise;
}
private async requestRanges(uri: string, token: vscode.CancellationToken): Promise<vscode.FoldingRange[] | undefined>
{
const params: GetFoldingRangesParams = {
uri
};
const response: GetFoldingRangesResult = await this.client.languageClient.sendRequest(GetFoldingRangesRequest, params, token);
if (token.isCancellationRequested || response.ranges === undefined) {
@@ -55,6 +92,14 @@ export class FoldingRangeProvider implements vscode.FoldingRangeProvider {
}
public refresh(): void {
// Consider all pending requests as being outdated. Cancel them all.
const oldPendingRequests: Map<string, FoldingRangeRequestInfo> = this.pendingRequests;
this.pendingRequests = new Map<string, FoldingRangeRequestInfo>();
this.onDidChangeFoldingRangesEvent.fire();
oldPendingRequests.forEach((value: FoldingRangeRequestInfo | undefined, _key: string) => {
if (value !== undefined && value.promise !== undefined) {
value.promise.reject(new vscode.CancellationError());
}
});
}
}
@@ -3,22 +3,29 @@
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as vscode from 'vscode';
import { Position, RequestType } from 'vscode-languageclient';
import { DefaultClient, openFileVersions } from '../client';
import { processDelayedDidOpen } from '../extension';
import { ManualPromise } from '../../Utility/Async/manualPromise';
import { CppSettings } from '../settings';
interface GetInlayHintsParams {
uri: string;
interface FileData
{
version: number;
promise: ManualPromise<vscode.InlayHint[]>;
typeHints: CppInlayHint[];
parameterHints: CppInlayHint[];
inlayHints: vscode.InlayHint[];
inlayHintsAutoDeclarationTypes?: boolean;
inlayHintsAutoDeclarationTypesShowOnLeft?: boolean;
inlayHintsParameterNames?: boolean;
inlayHintsParameterNamesHideLeadingUnderscores?: boolean;
inlayHintsParameterNamesSuppressName?: boolean;
inlayHintsReferenceOperator?: boolean;
inlayHintsReferenceOperatorShowSpace?: boolean;
}
enum InlayHintKind {
Type = 0,
Parameter = 1,
}
interface CppInlayHint {
position: Position;
export interface CppInlayHint {
line: number;
character: number;
label: string;
inlayHintKind: InlayHintKind;
isValueRef: boolean;
@@ -28,81 +35,178 @@ interface CppInlayHint {
identifierLength: number;
}
interface GetInlayHintsResult {
fileVersion: number;
inlayHints: CppInlayHint[];
enum InlayHintKind {
Type = 0,
Parameter = 1,
}
type InlayHintsCacheEntry = {
FileVersion: number;
TypeHints: CppInlayHint[];
ParameterHints: CppInlayHint[];
};
const GetInlayHintsRequest: RequestType<GetInlayHintsParams, GetInlayHintsResult, void> =
new RequestType<GetInlayHintsParams, GetInlayHintsResult, void>('cpptools/getInlayHints');
export class InlayHintsProvider implements vscode.InlayHintsProvider {
private client: DefaultClient;
public onDidChangeInlayHintsEvent = new vscode.EventEmitter<void>();
public onDidChangeInlayHints?: vscode.Event<void>;
private cache: Map<string, InlayHintsCacheEntry> = new Map<string, InlayHintsCacheEntry>();
public onDidChangeInlayHints?: vscode.Event<void> = this.onDidChangeInlayHintsEvent.event;
private allFileData: Map<string, FileData> = new Map<string, FileData>();
constructor(client: DefaultClient) {
this.client = client;
this.onDidChangeInlayHints = this.onDidChangeInlayHintsEvent.event;
}
public async provideInlayHints(document: vscode.TextDocument, range: vscode.Range,
token: vscode.CancellationToken): Promise<vscode.InlayHint[] | undefined> {
await this.client.enqueue(() => processDelayedDidOpen(document));
const uriString: string = document.uri.toString();
// Get results from cache if available.
let cacheEntry: InlayHintsCacheEntry | undefined = this.cache.get(uriString);
if (cacheEntry?.FileVersion === document.version) {
return this.buildVSCodeHints(document.uri, cacheEntry);
public async provideInlayHints(document: vscode.TextDocument, _range: vscode.Range, token: vscode.CancellationToken): Promise<vscode.InlayHint[]> {
const uri: vscode.Uri = document.uri;
const uriString: string = uri.toString();
let fileData: FileData | undefined = this.allFileData.get(uriString);
if (fileData) {
if (fileData.promise.isCompleted) {
// Make sure file hasn't been changed since the last set of results.
// If a complete promise is present, there should also be a cache.
if (fileData.version === document.version) {
const settings: CppSettings = new CppSettings(vscode.Uri.parse(uriString));
// Check if any of the settings changed.
if (fileData.inlayHintsAutoDeclarationTypes === settings.inlayHintsAutoDeclarationTypes &&
fileData.inlayHintsAutoDeclarationTypesShowOnLeft === settings.inlayHintsAutoDeclarationTypesShowOnLeft &&
fileData.inlayHintsParameterNames === settings.inlayHintsParameterNames &&
fileData.inlayHintsParameterNamesHideLeadingUnderscores === settings.inlayHintsParameterNamesHideLeadingUnderscores &&
fileData.inlayHintsParameterNamesSuppressName === settings.inlayHintsParameterNamesSuppressName &&
fileData.inlayHintsReferenceOperator === settings.inlayHintsReferenceOperator &&
fileData.inlayHintsReferenceOperatorShowSpace === settings.inlayHintsReferenceOperatorShowSpace) {
return fileData.promise;
}
fileData.inlayHints = [];
fileData.inlayHintsAutoDeclarationTypes = settings.inlayHintsAutoDeclarationTypes;
fileData.inlayHintsAutoDeclarationTypesShowOnLeft = settings.inlayHintsAutoDeclarationTypesShowOnLeft;
fileData.inlayHintsParameterNames = settings.inlayHintsParameterNames;
fileData.inlayHintsParameterNamesHideLeadingUnderscores = settings.inlayHintsParameterNamesHideLeadingUnderscores;
fileData.inlayHintsParameterNamesSuppressName = settings.inlayHintsParameterNamesSuppressName;
fileData.inlayHintsReferenceOperator = settings.inlayHintsReferenceOperator;
fileData.inlayHintsReferenceOperatorShowSpace = settings.inlayHintsReferenceOperatorShowSpace;
if (settings.inlayHintsAutoDeclarationTypes) {
const resolvedTypeHints: vscode.InlayHint[] = this.resolveTypeHints(settings, fileData.typeHints);
Array.prototype.push.apply(fileData.inlayHints, resolvedTypeHints);
}
if (settings.inlayHintsParameterNames || settings.inlayHintsReferenceOperator) {
const resolvedParameterHints: vscode.InlayHint[] = this.resolveParameterHints(settings, fileData.parameterHints);
Array.prototype.push.apply(fileData.inlayHints, resolvedParameterHints);
}
fileData.promise = new ManualPromise<vscode.InlayHint[]>();
fileData.promise.resolve(fileData.inlayHints);
this.onDidChangeInlayHintsEvent.fire();
return fileData.promise;
}
} else {
// A new request requires a new ManualPromise, as each promise returned needs
// to be associated with the cancellation token provided at the time.
fileData.promise.reject(new vscode.CancellationError());
}
}
// Get new results from the language server
const params: GetInlayHintsParams = { uri: uriString };
const inlayHintsResult: GetInlayHintsResult = await this.client.languageClient.sendRequest(GetInlayHintsRequest, params, token);
if (token.isCancellationRequested || inlayHintsResult.inlayHints === undefined || inlayHintsResult.fileVersion !== openFileVersions.get(uriString)) {
throw new vscode.CancellationError();
fileData = {
version: document.version,
promise: new ManualPromise<vscode.InlayHint[]>(),
typeHints: [],
parameterHints: [],
inlayHints: []
};
this.allFileData.set(uriString, fileData);
// Capture a local variable instead of referring to the member variable directly,
// to avoid race conditions where the member variable is changed before the
// cancallation token is triggered.
const currentPromise = fileData.promise;
token.onCancellationRequested(() => {
const fileData: FileData | undefined = this.allFileData.get(uriString);
if (fileData && currentPromise === fileData.promise) {
this.allFileData.delete(uriString);
currentPromise.reject(new vscode.CancellationError());
}
});
return currentPromise;
}
public deliverInlayHints(uriString: string, cppInlayHints: CppInlayHint[], startNewSet: boolean): void {
if (!startNewSet && cppInlayHints.length === 0) {
return;
}
cacheEntry = this.createCacheEntry(inlayHintsResult);
this.cache.set(uriString, cacheEntry);
return this.buildVSCodeHints(document.uri, cacheEntry);
const editor: vscode.TextEditor | undefined = vscode.window.visibleTextEditors.find(e => e.document.uri.toString() === uriString);
if (!editor) {
this.allFileData.get(uriString)?.promise.resolve([]);
return;
}
}
// Use a lambda to remove ambiguity about whether fileData may be undefined.
const [fileData, wasNewPromiseCreated]: [FileData, boolean] = (() => {
let fileData = this.allFileData.get(uriString);
let newPromiseCreated = false;
if (!fileData) {
fileData = {
version: editor.document.version,
promise: new ManualPromise<vscode.InlayHint[]>(),
typeHints: [],
parameterHints: [],
inlayHints: []
};
newPromiseCreated = true;
this.allFileData.set(uriString, fileData);
} else {
if (!fileData.promise.isPending) {
fileData.promise.reject(new vscode.CancellationError());
fileData.promise = new ManualPromise<vscode.InlayHint[]>();
newPromiseCreated = true;
}
if (fileData.version !== editor.document.version) {
fileData.version = editor.document.version;
fileData.typeHints = [];
fileData.parameterHints = [];
fileData.inlayHints = [];
}
}
return [fileData, newPromiseCreated];
})();
const settings: CppSettings = new CppSettings(vscode.Uri.parse(uriString));
if (startNewSet) {
fileData.inlayHints = [];
fileData.typeHints = [];
fileData.parameterHints = [];
fileData.inlayHintsAutoDeclarationTypes = settings.inlayHintsAutoDeclarationTypes;
fileData.inlayHintsAutoDeclarationTypesShowOnLeft = settings.inlayHintsAutoDeclarationTypesShowOnLeft;
fileData.inlayHintsParameterNames = settings.inlayHintsParameterNames;
fileData.inlayHintsParameterNamesHideLeadingUnderscores = settings.inlayHintsParameterNamesHideLeadingUnderscores;
fileData.inlayHintsParameterNamesSuppressName = settings.inlayHintsParameterNamesSuppressName;
fileData.inlayHintsReferenceOperator = settings.inlayHintsReferenceOperator;
fileData.inlayHintsReferenceOperatorShowSpace = settings.inlayHintsReferenceOperatorShowSpace;
}
public invalidateFile(uri: string): void {
this.cache.delete(uri);
this.onDidChangeInlayHintsEvent.fire();
}
const newTypeHints: CppInlayHint[] = cppInlayHints.filter(h => h.inlayHintKind === InlayHintKind.Type);
const newParameterHints: CppInlayHint[] = cppInlayHints.filter(h => h.inlayHintKind === InlayHintKind.Parameter);
Array.prototype.push.apply(fileData.typeHints, newTypeHints);
Array.prototype.push.apply(fileData.parameterHints, newParameterHints);
private buildVSCodeHints(uri: vscode.Uri, cacheEntry: InlayHintsCacheEntry): vscode.InlayHint[] {
let result: vscode.InlayHint[] = [];
const settings: CppSettings = new CppSettings(uri);
if (settings.inlayHintsAutoDeclarationTypes) {
const resolvedTypeHints: vscode.InlayHint[] = this.resolveTypeHints(uri, cacheEntry.TypeHints);
result = result.concat(resolvedTypeHints);
const resolvedTypeHints: vscode.InlayHint[] = this.resolveTypeHints(settings, newTypeHints);
Array.prototype.push.apply(fileData.inlayHints, resolvedTypeHints);
}
if (settings.inlayHintsParameterNames || settings.inlayHintsReferenceOperator) {
const resolvedParameterHints: vscode.InlayHint[] = this.resolveParameterHints(uri, cacheEntry.ParameterHints);
result = result.concat(resolvedParameterHints);
const resolvedParameterHints: vscode.InlayHint[] = this.resolveParameterHints(settings, newParameterHints);
Array.prototype.push.apply(fileData.inlayHints, resolvedParameterHints);
}
fileData?.promise.resolve(fileData.inlayHints);
if (wasNewPromiseCreated) {
this.onDidChangeInlayHintsEvent.fire();
}
return result;
}
private resolveTypeHints(uri: vscode.Uri, hints: CppInlayHint[]): vscode.InlayHint[] {
public removeFile(uriString: string): void {
const fileData: FileData | undefined = this.allFileData.get(uriString);
if (!fileData) {
return;
}
if (fileData.promise.isPending) {
fileData.promise.reject(new vscode.CancellationError());
}
this.allFileData.delete(uriString);
}
private resolveTypeHints(settings: CppSettings, hints: CppInlayHint[]): vscode.InlayHint[] {
const resolvedHints: vscode.InlayHint[] = [];
const settings: CppSettings = new CppSettings(uri);
for (const hint of hints) {
const showOnLeft: boolean = settings.inlayHintsAutoDeclarationTypesShowOnLeft && hint.identifierLength > 0;
const inlayHint: vscode.InlayHint = new vscode.InlayHint(
new vscode.Position(hint.position.line, hint.position.character +
new vscode.Position(hint.line, hint.character +
(showOnLeft ? 0 : hint.identifierLength)),
showOnLeft ? hint.label : ": " + hint.label,
vscode.InlayHintKind.Type);
@@ -113,9 +217,8 @@ export class InlayHintsProvider implements vscode.InlayHintsProvider {
return resolvedHints;
}
private resolveParameterHints(uri: vscode.Uri, hints: CppInlayHint[]): vscode.InlayHint[] {
private resolveParameterHints(settings: CppSettings, hints: CppInlayHint[]): vscode.InlayHint[] {
const resolvedHints: vscode.InlayHint[] = [];
const settings: CppSettings = new CppSettings(uri);
for (const hint of hints) {
// Build parameter label based on settings.
let paramHintLabel: string = "";
@@ -144,7 +247,7 @@ export class InlayHintsProvider implements vscode.InlayHintsProvider {
}
const inlayHint: vscode.InlayHint = new vscode.InlayHint(
new vscode.Position(hint.position.line, hint.position.character),
new vscode.Position(hint.line, hint.character),
refOperatorString + paramHintLabel + ":",
vscode.InlayHintKind.Parameter);
inlayHint.paddingRight = true;
@@ -152,15 +255,4 @@ export class InlayHintsProvider implements vscode.InlayHintsProvider {
}
return resolvedHints;
}
private createCacheEntry(inlayHintsResults: GetInlayHintsResult): InlayHintsCacheEntry {
const typeHints: CppInlayHint[] = inlayHintsResults.inlayHints.filter(h => h.inlayHintKind === InlayHintKind.Type);
const paramHints: CppInlayHint[] = inlayHintsResults.inlayHints.filter(h => h.inlayHintKind === InlayHintKind.Parameter);
const cacheEntry: InlayHintsCacheEntry = {
FileVersion: inlayHintsResults.fileVersion,
TypeHints: typeHints,
ParameterHints: paramHints
};
return cacheEntry;
}
}
@@ -3,55 +3,127 @@
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as vscode from 'vscode';
import { DefaultClient, GetSemanticTokensParams, GetSemanticTokensRequest, GetSemanticTokensResult, openFileVersions, semanticTokensLegend } from '../client';
import { processDelayedDidOpen } from '../extension';
import { ManualPromise } from '../../Utility/Async/manualPromise';
interface FileData
{
version: number;
promise: ManualPromise<vscode.SemanticTokens>;
tokenBuilder: vscode.SemanticTokensBuilder;
}
export interface SemanticToken {
line: number;
character: number;
length: number;
type: number;
modifiers?: number;
}
export class SemanticTokensProvider implements vscode.DocumentSemanticTokensProvider {
private client: DefaultClient;
public onDidChangeSemanticTokensEvent = new vscode.EventEmitter<void>();
public onDidChangeSemanticTokens?: vscode.Event<void>;
private tokenCaches: Map<string, [number, vscode.SemanticTokens]> = new Map<string, [number, vscode.SemanticTokens]>();
constructor(client: DefaultClient) {
this.client = client;
this.onDidChangeSemanticTokens = this.onDidChangeSemanticTokensEvent.event;
}
public onDidChangeSemanticTokens?: vscode.Event<void> = this.onDidChangeSemanticTokensEvent.event;
private allFileData: Map<string, FileData> = new Map<string, FileData>();
public async provideDocumentSemanticTokens(document: vscode.TextDocument, token: vscode.CancellationToken): Promise<vscode.SemanticTokens> {
const editor: vscode.TextEditor | undefined = vscode.window.visibleTextEditors.find(e => e.document === document);
const uri: vscode.Uri = document.uri;
const uriString: string = uri.toString();
let fileData: FileData | undefined = this.allFileData.get(uriString);
if (fileData) {
if (fileData.promise.isCompleted) {
// Make sure file hasn't been changed since the last set of results.
// If a complete promise is present, there should also be a cache.
if (fileData.version === document.version) {
return fileData.promise;
}
} else {
// A new request requires a new ManualPromise, as each promise returned needs
// to be associated with the cancellation token provided at the time.
fileData.promise.reject(new vscode.CancellationError());
}
}
fileData = {
version: document.version,
promise: new ManualPromise<vscode.SemanticTokens>(),
tokenBuilder: new vscode.SemanticTokensBuilder()
};
this.allFileData.set(uriString, fileData);
// Capture a local variable instead of referring to the member variable directly,
// to avoid race conditions where the member variable is changed before the
// cancallation token is triggered.
const currentPromise = fileData.promise;
token.onCancellationRequested(() => {
const fileData: FileData | undefined = this.allFileData.get(uriString);
if (fileData && currentPromise === fileData.promise) {
this.allFileData.delete(uriString);
currentPromise.reject(new vscode.CancellationError());
}
});
return currentPromise;
}
public deliverTokens(uriString: string, semanticTokens: SemanticToken[], startNewSet: boolean): void {
if (!startNewSet && semanticTokens.length === 0) {
return;
}
const editor: vscode.TextEditor | undefined = vscode.window.visibleTextEditors.find(e => e.document.uri.toString() === uriString);
if (!editor) {
// Don't provide document semantic tokens for files that aren't visible,
// which prevents launching a lot of IntelliSense processes from a find/replace.
const builder: vscode.SemanticTokensBuilder = new vscode.SemanticTokensBuilder();
const tokens: vscode.SemanticTokens = builder.build();
return tokens;
this.allFileData.get(uriString)?.promise.resolve(tokens);
return;
}
await this.client.enqueue(() => processDelayedDidOpen(document));
const uriString: string = document.uri.toString();
// First check the semantic token cache to see if we already have results for that file and version
const cache: [number, vscode.SemanticTokens] | undefined = this.tokenCaches.get(uriString);
if (cache && cache[0] === document.version) {
return cache[1];
// Use a lambda to remove ambiguity about whether fileData may be undefined.
const [fileData, wasNewPromiseCreated]: [FileData, boolean] = (() => {
let fileData = this.allFileData.get(uriString);
let newPromiseCreated = false;
if (!fileData) {
fileData = {
version: editor.document.version,
promise: new ManualPromise<vscode.SemanticTokens>(),
tokenBuilder: new vscode.SemanticTokensBuilder()
};
newPromiseCreated = true;
this.allFileData.set(uriString, fileData);
} else {
if (!fileData.promise.isPending) {
fileData.promise.reject(new vscode.CancellationError());
fileData.promise = new ManualPromise<vscode.SemanticTokens>();
newPromiseCreated = true;
}
if (fileData.version !== editor.document.version) {
fileData.version = editor.document.version;
fileData.tokenBuilder = new vscode.SemanticTokensBuilder();
}
}
return [fileData, newPromiseCreated];
})();
if (startNewSet) {
fileData.tokenBuilder = new vscode.SemanticTokensBuilder();
}
const params: GetSemanticTokensParams = {
uri: uriString
};
const tokensResult: GetSemanticTokensResult = await this.client.languageClient.sendRequest(GetSemanticTokensRequest, params, token);
if (token.isCancellationRequested || tokensResult.tokens === undefined || tokensResult.fileVersion !== openFileVersions.get(uriString)) {
throw new vscode.CancellationError();
}
const builder: vscode.SemanticTokensBuilder = new vscode.SemanticTokensBuilder(semanticTokensLegend);
tokensResult.tokens.forEach((semanticToken) => {
builder.push(semanticToken.line, semanticToken.character, semanticToken.length, semanticToken.type, semanticToken.modifiers);
semanticTokens.forEach((semanticToken) => {
fileData.tokenBuilder.push(semanticToken.line, semanticToken.character, semanticToken.length, semanticToken.type, semanticToken.modifiers);
});
const tokens: vscode.SemanticTokens = builder.build();
this.tokenCaches.set(uriString, [tokensResult.fileVersion, tokens]);
return tokens;
fileData?.promise.resolve(fileData.tokenBuilder.build());
if (wasNewPromiseCreated) {
this.onDidChangeSemanticTokensEvent.fire();
}
}
public invalidateFile(uri: string): void {
this.tokenCaches.delete(uri);
this.onDidChangeSemanticTokensEvent.fire();
public removeFile(uriString: string): void {
const fileData: FileData | undefined = this.allFileData.get(uriString);
if (!fileData) {
return;
}
if (fileData.promise.isPending) {
fileData.promise.reject(new vscode.CancellationError());
}
this.allFileData.delete(uriString);
}
}
@@ -3,6 +3,7 @@
* See 'LICENSE' in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import * as vscode from 'vscode';
import { isExperimentEnabled } from '../../telemetry';
import { DefaultClient, GetSymbolInfoRequest, LocalizeSymbolInformation, SymbolScope, WorkspaceSymbolParams } from '../client';
import { getLocalizedString, getLocalizedSymbolScope } from '../localization';
import { makeVscodeLocation } from '../utils';
@@ -14,8 +15,14 @@ export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider {
}
public async provideWorkspaceSymbols(query: string, token: vscode.CancellationToken): Promise<vscode.SymbolInformation[]> {
// if the query is empty, then return as quickly as possible
if (!query) {
return [];
}
const params: WorkspaceSymbolParams = {
query: query
query: query,
experimentEnabled: await isExperimentEnabled('CppTools1')
};
const symbols: LocalizeSymbolInformation[] = await this.client.languageClient.sendRequest(GetSymbolInfoRequest, params, token);
File diff suppressed because it is too large Load Diff
@@ -5,7 +5,6 @@
'use strict';
import * as vscode from 'vscode';
import { logAndReturn } from '../Utility/Async/returns';
import * as util from '../common';
import * as telemetry from '../telemetry';
import * as cpptools from './client';
@@ -67,12 +66,13 @@ export class ClientCollection {
this.disposables.push(vscode.workspace.onDidChangeWorkspaceFolders(e => this.onDidChangeWorkspaceFolders(e)));
}
public async activeDocumentChanged(document: vscode.TextDocument): Promise<void> {
this.activeDocument = document;
const activeClient: cpptools.Client = this.getClientFor(document.uri);
public async didChangeActiveEditor(editor?: vscode.TextEditor): Promise<void> {
this.activeDocument = editor?.document;
// Notify the active client that the document has changed.
await activeClient.activeDocumentChanged(document);
// If there is no active document, switch to the default client.
const activeClient: cpptools.Client = !editor ? this.defaultClient : this.getClientFor(editor.document.uri);
await activeClient.didChangeActiveEditor(editor);
// If the active client changed, resume the new client and tell the currently active client to deactivate.
if (activeClient !== this.activeClient) {
@@ -121,7 +121,10 @@ export class ClientCollection {
const client: cpptools.Client = pair[1];
const newClient: cpptools.Client = this.createClient(client.RootFolder, true);
client.TrackedDocuments.forEach(document => void this.transferOwnership(document, client).catch(logAndReturn.undefined));
for (const document of client.TrackedDocuments.values()) {
this.transferOwnership(document, client);
await newClient.sendDidOpen(document);
}
if (this.activeClient === client) {
// It cannot be undefined. If there is an active document, we activate it later.
@@ -137,9 +140,12 @@ export class ClientCollection {
if (this.activeDocument) {
this.activeClient = this.getClientFor(this.activeDocument.uri);
await this.activeClient.activeDocumentChanged(this.activeDocument);
this.activeClient.updateActiveDocumentTextOptions();
this.activeClient.activate();
await this.activeClient.didChangeActiveEditor(vscode.window.activeTextEditor);
}
const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
await this.defaultClient.onDidChangeVisibleTextEditors(cppEditors);
}
private async onDidChangeWorkspaceFolders(e?: vscode.WorkspaceFoldersChangeEvent): Promise<void> {
@@ -157,8 +163,7 @@ export class ClientCollection {
this.languageClients.delete(path); // Do this first so that we don't iterate on it during the ownership transfer process.
// Transfer ownership of the client's documents to another client.
// (this includes calling textDocument/didOpen on the new client so that the server knows it's open too)
client.TrackedDocuments.forEach(document => void this.transferOwnership(document, client).catch(logAndReturn.undefined));
client.TrackedDocuments.forEach(document => this.transferOwnership(document, client));
if (this.activeClient === client) {
this.activeClient.deactivate();
@@ -198,17 +203,17 @@ export class ClientCollection {
// Redundant deactivate should be OK.
this.activeClient.deactivate();
this.activeClient = newActiveClient;
await this.activeClient.activeDocumentChanged(this.activeDocument);
this.activeClient.updateActiveDocumentTextOptions();
this.activeClient.activate();
}
}
}
}
private async transferOwnership(document: vscode.TextDocument, oldOwner: cpptools.Client): Promise<void> {
private transferOwnership(document: vscode.TextDocument, oldOwner: cpptools.Client): void {
const newOwner: cpptools.Client = this.getClientFor(document.uri);
if (newOwner !== oldOwner) {
return newOwner.takeOwnership(document);
newOwner.takeOwnership(document);
}
}
+1 -1
View File
@@ -378,7 +378,7 @@ export function publishCodeAnalysisDiagnostics(params: PublishCodeAnalysisDiagno
docPage = `checks${checksGroup}/${checksPage}.html`;
}
// TODO: This should be checking the clang-tidy version used to better support usage of older versions.
const primaryDocUri: vscode.Uri = vscode.Uri.parse(`https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/${docPage}`);
const primaryDocUri: vscode.Uri = vscode.Uri.parse(`https://releases.llvm.org/18.1.1/tools/clang/tools/extra/docs/clang-tidy/${docPage}`);
diagnostic.code = { value: identifier.code, target: primaryDocUri };
if (new CppSettings().clangTidyCodeActionShowDocumentation) {
+153 -67
View File
@@ -289,8 +289,6 @@ export class CppProperties {
}
}
});
this.handleConfigurationChange();
}
public set CompilerDefaults(compilerDefaults: CompilerDefaults) {
this.defaultCompilerPath = compilerDefaults.trustedCompilerFound ? compilerDefaults.compilerPath : null;
@@ -427,6 +425,11 @@ export class CppProperties {
result["workspaceFolderBasename"] = this.rootUri ? path.basename(this.rootUri.fsPath) : "";
result["execPath"] = process.execPath;
result["pathSeparator"] = (os.platform() === 'win32') ? "\\" : "/";
result["/"] = (os.platform() === 'win32') ? "\\" : "/";
result["userHome"] = os.homedir();
if (util.getVcpkgRoot()) {
result["vcpkgRoot"] = util.getVcpkgRoot();
}
return result;
}
@@ -755,7 +758,7 @@ export class CppProperties {
return result;
}
private resolveAndSplit(paths: string[] | undefined, defaultValue: string[] | undefined, env: Environment, glob: boolean = false): string[] {
private resolveAndSplit(paths: string[] | undefined, defaultValue: string[] | undefined, env: Environment, assumeRelative: boolean = true, glob: boolean = false): string[] {
const resolvedVariables: string[] = [];
if (paths === undefined) {
return resolvedVariables;
@@ -767,7 +770,7 @@ export class CppProperties {
// Do not futher try to resolve a "${env:VAR}"
resolvedVariables.push(resolvedVariable);
} else {
const entries: string[] = resolvedVariable.split(path.delimiter).map(e => glob ? this.resolvePath(e, false) : e).filter(e => e);
const entries: string[] = resolvedVariable.split(path.delimiter).map(e => glob ? this.resolvePath(e, false, assumeRelative) : e).filter(e => e);
resolvedVariables.push(...entries);
}
});
@@ -806,8 +809,11 @@ export class CppProperties {
if (isGlobPattern) {
// fastGlob silently strips non-found paths. Limit that behavior to dynamic paths only.
const matches: string[] = fastGlob.isDynamicPattern(normalized) ?
fastGlob.sync(normalized, { onlyDirectories: true, cwd }) : [res];
fastGlob.sync(normalized, { onlyDirectories: true, cwd, suppressErrors: true, deep: 15 }) : [res];
resolvedGlob.push(...matches.map(s => s + suffix));
if (resolvedGlob.length === 0) {
resolvedGlob.push(normalized);
}
} else {
resolvedGlob.push(normalized + suffix);
}
@@ -835,12 +841,12 @@ export class CppProperties {
return property;
}
private updateConfigurationPathsArray(paths: string[] | undefined, defaultValue: string[] | undefined, env: Environment): string[] | undefined {
private updateConfigurationPathsArray(paths: string[] | undefined, defaultValue: string[] | undefined, env: Environment, assumeRelative: boolean = true): string[] | undefined {
if (paths) {
return this.resolveAndSplit(paths, defaultValue, env, true);
return this.resolveAndSplit(paths, defaultValue, env, assumeRelative, true);
}
if (!paths && defaultValue) {
return this.resolveAndSplit(defaultValue, [], env, true);
return this.resolveAndSplit(defaultValue, [], env, assumeRelative, true);
}
return paths;
}
@@ -931,7 +937,7 @@ export class CppProperties {
configuration.macFrameworkPath = this.updateConfigurationStringArray(configuration.macFrameworkPath, settings.defaultMacFrameworkPath, env);
configuration.windowsSdkVersion = this.updateConfigurationString(configuration.windowsSdkVersion, settings.defaultWindowsSdkVersion, env);
configuration.forcedInclude = this.updateConfigurationPathsArray(configuration.forcedInclude, settings.defaultForcedInclude, env);
configuration.forcedInclude = this.updateConfigurationPathsArray(configuration.forcedInclude, settings.defaultForcedInclude, env, false);
configuration.compileCommands = this.updateConfigurationString(configuration.compileCommands, settings.defaultCompileCommands, env);
configuration.compilerArgs = this.updateConfigurationStringArray(configuration.compilerArgs, settings.defaultCompilerArgs, env);
configuration.cStandard = this.updateConfigurationString(configuration.cStandard, settings.defaultCStandard, env);
@@ -1091,7 +1097,7 @@ export class CppProperties {
}
if (configuration.forcedInclude) {
configuration.forcedInclude = configuration.forcedInclude.map((path: string) => this.resolvePath(path));
configuration.forcedInclude = configuration.forcedInclude.map((path: string) => this.resolvePath(path, true, false));
}
if (configuration.includePath) {
@@ -1105,7 +1111,7 @@ export class CppProperties {
}
}
private compileCommandsFileWatcherTimer?: NodeJS.Timer;
private compileCommandsFileWatcherTimer?: NodeJS.Timeout;
private compileCommandsFileWatcherFiles: Set<string> = new Set<string>();
// Dispose existing and loop through cpp and populate with each file (exists or not) as you go.
@@ -1253,11 +1259,28 @@ export class CppProperties {
}
}
private trimPathWhitespace(paths: string[] | undefined): string[] | undefined {
if (paths === undefined) {
return undefined;
}
const trimmedPaths = [];
for (const value of paths) {
const fullPath = this.resolvePath(value);
if (fs.existsSync(fullPath.trim()) && !fs.existsSync(fullPath)) {
trimmedPaths.push(value.trim());
} else {
trimmedPaths.push(value);
}
}
return trimmedPaths;
}
private saveConfigurationUI(): void {
this.parsePropertiesFile(); // Clear out any modifications we may have made internally.
if (this.settingsPanel && this.configurationJson) {
const config: Configuration = this.settingsPanel.getLastValuesFromConfigUI();
this.configurationJson.configurations[this.settingsPanel.selectedConfigIndex] = config;
this.configurationJson.configurations[this.settingsPanel.selectedConfigIndex].includePath = this.trimPathWhitespace(this.configurationJson.configurations[this.settingsPanel.selectedConfigIndex].includePath);
this.settingsPanel.updateErrors(this.getErrorsForConfigUI(this.settingsPanel.selectedConfigIndex));
this.writeToJson();
}
@@ -1493,7 +1516,7 @@ export class CppProperties {
return success;
}
private resolvePath(input_path: string | undefined, replaceAsterisks: boolean = true): string {
private resolvePath(input_path: string | undefined, replaceAsterisks: boolean = true, assumeRelative: boolean = true): string {
if (!input_path || input_path === "${default}") {
return "";
}
@@ -1510,17 +1533,17 @@ export class CppProperties {
result = result.replace("${workspaceRoot}", this.rootUri.fsPath);
}
}
if (result.includes("${vcpkgRoot}") && util.getVcpkgRoot()) {
result = result.replace("${vcpkgRoot}", util.getVcpkgRoot());
}
if (replaceAsterisks && result.includes("*")) {
result = result.replace(/\*/g, "");
}
// Make sure all paths result to an absolute path.
// Do not add the root path to an unresolved env variable.
if (!result.includes("env:") && !path.isAbsolute(result) && this.rootUri) {
result = path.join(this.rootUri.fsPath, result);
if (assumeRelative) {
// Make sure all paths result to an absolute path.
// Do not add the root path to an unresolved env variable.
if (!result.includes("env:") && !path.isAbsolute(result) && this.rootUri) {
result = path.join(this.rootUri.fsPath, result);
}
}
return result;
@@ -1536,9 +1559,15 @@ export class CppProperties {
// Check if config name is unique.
errors.name = this.isConfigNameUnique(config.name);
let resolvedCompilerPath: string | undefined;
// Validate compilerPath
let resolvedCompilerPath: string | undefined = this.resolvePath(config.compilerPath);
if (config.compilerPath) {
resolvedCompilerPath = which.sync(config.compilerPath, { nothrow: true }) ?? undefined;
}
if (resolvedCompilerPath === undefined) {
resolvedCompilerPath = this.resolvePath(config.compilerPath);
}
const settings: CppSettings = new CppSettings(this.rootUri);
const compilerPathAndArgs: util.CompilerPathAndArgs = util.extractCompilerPathAndArgs(!!settings.legacyCompilerArgsBehavior, resolvedCompilerPath);
if (resolvedCompilerPath
@@ -1608,7 +1637,7 @@ export class CppProperties {
errors.browsePath = this.validatePath(config.browse ? config.browse.path : undefined);
// Validate files
errors.forcedInclude = this.validatePath(config.forcedInclude, {isDirectory: false, skipRelativePaths: true});
errors.forcedInclude = this.validatePath(config.forcedInclude, {isDirectory: false, assumeRelative: false});
errors.compileCommands = this.validatePath(config.compileCommands, {isDirectory: false});
errors.dotConfig = this.validatePath(config.dotConfig, {isDirectory: false});
errors.databaseFilename = this.validatePath(config.browse ? config.browse.databaseFilename : undefined, {isDirectory: false});
@@ -1624,7 +1653,7 @@ export class CppProperties {
return errors;
}
private validatePath(input: string | string[] | undefined, {isDirectory = true, skipRelativePaths = false, globPaths = false} = {}): string | undefined {
private validatePath(input: string | string[] | undefined, {isDirectory = true, assumeRelative = true, globPaths = false} = {}): string | undefined {
if (!input) {
return undefined;
}
@@ -1640,7 +1669,7 @@ export class CppProperties {
}
// Resolve and split any environment variables
paths = this.resolveAndSplit(paths, undefined, this.ExtendedEnvironment, globPaths);
paths = this.resolveAndSplit(paths, undefined, this.ExtendedEnvironment, assumeRelative, globPaths);
for (const p of paths) {
let pathExists: boolean = true;
@@ -1651,7 +1680,7 @@ export class CppProperties {
// Check if resolved path exists
if (!fs.existsSync(resolvedPath)) {
if (skipRelativePaths && !path.isAbsolute(resolvedPath)) {
if (assumeRelative && !path.isAbsolute(resolvedPath)) {
continue;
} else if (!this.rootUri) {
pathExists = false;
@@ -1809,9 +1838,9 @@ export class CppProperties {
curText = curText.substring(0, nextNameStart2);
}
if (this.prevSquiggleMetrics.get(currentConfiguration.name) === undefined) {
this.prevSquiggleMetrics.set(currentConfiguration.name, { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0, CompilerPathMissingQuotes: 0, CompilerModeMismatch: 0 });
this.prevSquiggleMetrics.set(currentConfiguration.name, { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0, CompilerPathMissingQuotes: 0, CompilerModeMismatch: 0, MultiplePathsNotAllowed: 0 });
}
const newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0, CompilerPathMissingQuotes: 0, CompilerModeMismatch: 0 };
const newSquiggleMetrics: { [key: string]: number } = { PathNonExistent: 0, PathNotAFile: 0, PathNotADirectory: 0, CompilerPathMissingQuotes: 0, CompilerModeMismatch: 0, MultiplePathsNotAllowed: 0 };
const isWindows: boolean = os.platform() === 'win32';
// TODO: Add other squiggles.
@@ -1838,7 +1867,7 @@ export class CppProperties {
}
// Check for path-related squiggles.
let paths: string[] = [];
const paths: string[] = [];
let compilerPath: string | undefined;
for (const pathArray of [ currentConfiguration.browse ? currentConfiguration.browse.path : undefined,
currentConfiguration.includePath, currentConfiguration.macFrameworkPath ]) {
@@ -1866,10 +1895,7 @@ export class CppProperties {
compilerPath = currentConfiguration.compilerPath;
}
// Resolve and split any environment variables
paths = this.resolveAndSplit(paths, undefined, this.ExtendedEnvironment);
compilerPath = util.resolveVariables(compilerPath, this.ExtendedEnvironment).trim();
compilerPath = this.resolvePath(compilerPath);
compilerPath = this.resolvePath(compilerPath).trim();
// Get the start/end for properties that are file-only.
const forcedIncludeStart: number = curText.search(/\s*\"forcedInclude\"\s*:\s*\[/);
@@ -1932,8 +1958,7 @@ export class CppProperties {
let dotConfigMessage: string | undefined;
dotConfigPath = currentConfiguration.dotConfig;
dotConfigPath = util.resolveVariables(dotConfigPath, this.ExtendedEnvironment).trim();
dotConfigPath = this.resolvePath(dotConfigPath);
dotConfigPath = this.resolvePath(dotConfigPath).trim();
// does not try resolve if the dotConfig property is empty
dotConfigPath = dotConfigPath !== '' ? dotConfigPath : undefined;
@@ -1972,35 +1997,65 @@ export class CppProperties {
continue;
}
let resolvedPath: string = this.resolvePath(curPath);
if (!resolvedPath) {
continue;
}
let pathExists: boolean = true;
if (this.rootUri) {
const checkPathExists: any = util.checkPathExistsSync(resolvedPath, this.rootUri.fsPath + path.sep, isWindows, false);
pathExists = checkPathExists.pathExists;
resolvedPath = checkPathExists.path;
}
// Normalize path separators.
if (path.sep === "/") {
resolvedPath = resolvedPath.replace(/\\/g, path.sep);
} else {
resolvedPath = resolvedPath.replace(/\//g, path.sep);
}
// Iterate through the text and apply squiggles.
// Escape the path string for literal use in a regular expression
// Need to escape any quotes to match the original text
let escapedPath: string = curPath.replace(/\"/g, '\\\"');
let escapedPath: string = curPath.replace(/"/g, '\\"');
escapedPath = escapedPath.replace(/[-\"\/\\^$*+?.()|[\]{}]/g, '\\$&');
// Create a pattern to search for the path with either a quote or semicolon immediately before and after,
// and extend that pattern to the next quote before and next quote after it.
const pattern: RegExp = new RegExp(`"[^"]*?(?<="|;)${escapedPath}(?="|;).*?"`, "g");
const configMatches: string[] | null = curText.match(pattern);
if (configMatches) {
const expandedPaths: string[] = this.resolveAndSplit([curPath], undefined, this.ExtendedEnvironment, true, true);
const incorrectExpandedPaths: string[] = [];
if (expandedPaths.length <= 0) {
continue;
}
if (this.rootUri) {
for (const [index, expandedPath] of expandedPaths.entries()) {
if (expandedPath.includes("${workspaceFolder}")) {
expandedPaths[index] = this.resolvePath(expandedPath, false);
} else {
expandedPaths[index] = this.resolvePath(expandedPath);
}
const checkPathExists: any = util.checkPathExistsSync(expandedPaths[index], this.rootUri.fsPath + path.sep, isWindows, false);
if (!checkPathExists.pathExists) {
// If there are multiple paths, store any non-existing paths to squiggle later on.
incorrectExpandedPaths.push(expandedPaths[index]);
}
}
}
const pathExists: boolean = incorrectExpandedPaths.length === 0;
for (const [index, expandedPath] of expandedPaths.entries()) {
// Normalize path separators.
if (path.sep === "/") {
expandedPaths[index] = expandedPath.replace(/\\/g, path.sep);
} else {
expandedPaths[index] = expandedPath.replace(/\//g, path.sep);
}
}
// Iterate through the text and apply squiggles.
let globPath: boolean = false;
const asteriskPosition = curPath.indexOf("*");
if (asteriskPosition !== -1) {
if (asteriskPosition !== curPath.length - 1 && asteriskPosition !== curPath.length - 2) {
globPath = true;
} else if (asteriskPosition === curPath.length - 2) {
if (curPath[asteriskPosition + 1] !== '*') {
globPath = true;
}
}
}
if (configMatches && !globPath) {
let curOffset: number = 0;
let endOffset: number = 0;
for (const curMatch of configMatches) {
@@ -2009,29 +2064,57 @@ export class CppProperties {
if (curOffset >= compilerPathStart && curOffset <= compilerPathEnd) {
continue;
}
let message: string;
let message: string = "";
if (!pathExists) {
if (curOffset >= forcedIncludeStart && curOffset <= forcedeIncludeEnd
&& !path.isAbsolute(resolvedPath)) {
&& !path.isAbsolute(expandedPaths[0])) {
continue; // Skip the error, because it could be resolved recursively.
}
message = localize('cannot.find2', "Cannot find \"{0}\".", resolvedPath);
let badPath = "";
if (incorrectExpandedPaths.length > 0) {
badPath = incorrectExpandedPaths.map(s => `"${s}"`).join(', ');
} else {
badPath = `"${expandedPaths[0]}"`;
}
message = localize('cannot.find2', "Cannot find {0}", badPath);
newSquiggleMetrics.PathNonExistent++;
} else {
// Check for file versus path mismatches.
if ((curOffset >= forcedIncludeStart && curOffset <= forcedeIncludeEnd) ||
(curOffset >= compileCommandsStart && curOffset <= compileCommandsEnd)) {
if (util.checkFileExistsSync(resolvedPath)) {
continue;
(curOffset >= compileCommandsStart && curOffset <= compileCommandsEnd)) {
if (expandedPaths.length > 1) {
message = localize("multiple.paths.not.allowed", "Multiple paths are not allowed.");
newSquiggleMetrics.MultiplePathsNotAllowed++;
} else {
const resolvedPath = this.resolvePath(expandedPaths[0]);
if (util.checkFileExistsSync(resolvedPath)) {
continue;
}
message = localize("path.is.not.a.file", "Path is not a file: {0}", expandedPaths[0]);
newSquiggleMetrics.PathNotAFile++;
}
message = localize("path.is.not.a.file", "Path is not a file: {0}", resolvedPath);
newSquiggleMetrics.PathNotAFile++;
} else {
if (util.checkDirectoryExistsSync(resolvedPath)) {
const mismatchedPaths: string[] = [];
for (const expandedPath of expandedPaths) {
const resolvedPath = this.resolvePath(expandedPath);
if (!util.checkDirectoryExistsSync(resolvedPath)) {
mismatchedPaths.push(expandedPath);
}
}
let badPath = "";
if (mismatchedPaths.length > 1) {
badPath = mismatchedPaths.map(s => `"${s}"`).join(', ');
message = localize('paths.are.not.directories', "Paths are not directories: {0}", badPath);
newSquiggleMetrics.PathNotADirectory++;
} else if (mismatchedPaths.length === 1) {
badPath = `"${mismatchedPaths[0]}"`;
message = localize('path.is.not.a.directory', "Path is not a directory: {0}", badPath);
newSquiggleMetrics.PathNotADirectory++;
} else {
continue;
}
message = localize("path.is.not.a.directory", "Path is not a directory: {0}", resolvedPath);
newSquiggleMetrics.PathNotADirectory++;
}
}
const diagnostic: vscode.Diagnostic = new vscode.Diagnostic(
@@ -2051,7 +2134,7 @@ export class CppProperties {
endOffset = curOffset + curMatch.length;
let message: string;
if (!pathExists) {
message = localize('cannot.find2', "Cannot find \"{0}\".", resolvedPath);
message = localize('cannot.find2', "Cannot find \"{0}\".", expandedPaths[0]);
newSquiggleMetrics.PathNonExistent++;
const diagnostic: vscode.Diagnostic = new vscode.Diagnostic(
new vscode.Range(document.positionAt(envTextStartOffSet + curOffset),
@@ -2087,6 +2170,9 @@ export class CppProperties {
if (newSquiggleMetrics.CompilerModeMismatch !== this.prevSquiggleMetrics.get(currentConfiguration.name)?.CompilerModeMismatch) {
changedSquiggleMetrics.CompilerModeMismatch = newSquiggleMetrics.CompilerModeMismatch;
}
if (newSquiggleMetrics.MultiplePathsNotAllowed !== this.prevSquiggleMetrics.get(currentConfiguration.name)?.MultiplePathsNotAllowed) {
changedSquiggleMetrics.MultiplePathsNotAllowed = newSquiggleMetrics.MultiplePathsNotAllowed;
}
if (Object.keys(changedSquiggleMetrics).length > 0) {
telemetry.logLanguageServerEvent("ConfigSquiggles", undefined, changedSquiggleMetrics);
}
@@ -21,8 +21,8 @@ const localize: nls.LocalizeFunc = nls.loadMessageBundle();
export interface CppBuildTaskDefinition extends TaskDefinition {
type: string;
label: string; // The label appears in tasks.json file.
command: string;
args: string[];
command: string | util.IQuotedString;
args: (string | util.IQuotedString)[];
options: cp.ExecOptions | cp.SpawnOptions | undefined;
}
@@ -166,14 +166,16 @@ export class CppBuildTaskProvider implements TaskProvider {
return result;
}
private getTask: (compilerPath: string, appendSourceToName: boolean, compilerArgs?: string[], definition?: CppBuildTaskDefinition, detail?: string) => Task = (compilerPath: string, appendSourceToName: boolean, compilerArgs?: string[], definition?: CppBuildTaskDefinition, detail?: string) => {
const compilerPathBase: string = path.basename(compilerPath);
private getTask: (compilerPath: string | util.IQuotedString, appendSourceToName: boolean, compilerArgs?: (string | util.IQuotedString)[], definition?: CppBuildTaskDefinition, detail?: string) => Task = (compilerPath: string | util.IQuotedString, appendSourceToName: boolean, compilerArgs?: (string | util.IQuotedString)[], definition?: CppBuildTaskDefinition, detail?: string) => {
const compilerPathString: string = util.isString(compilerPath) ? compilerPath : compilerPath.value;
const compilerPathBase: string = path.basename(compilerPathString);
const isCl: boolean = compilerPathBase.toLowerCase() === "cl.exe";
const isClang: boolean = !isCl && compilerPathBase.toLowerCase().includes("clang");
// Double-quote the command if it is not already double-quoted.
let resolvedcompilerPath: string = isCl ? compilerPathBase : compilerPath;
if (resolvedcompilerPath && !resolvedcompilerPath.startsWith("\"") && resolvedcompilerPath.includes(" ")) {
resolvedcompilerPath = "\"" + resolvedcompilerPath + "\"";
// Double-quote the command if needed.
const resolvedCompilerPathString: string = isCl ? compilerPathBase : compilerPathString;
let resolvedCompilerPath: string | util.IQuotedString = compilerPath;
if (isCl) {
resolvedCompilerPath = compilerPathBase;
}
if (!definition) {
@@ -181,7 +183,7 @@ export class CppBuildTaskProvider implements TaskProvider {
const taskLabel: string = ((appendSourceToName && !compilerPathBase.startsWith(ext.configPrefix)) ?
ext.configPrefix : "") + compilerPathBase + " " + localize("build.active.file", "build active file");
const programName: string = util.defaultExePath();
let args: string[] = isCl ?
let args: (string | util.IQuotedString)[] = isCl ?
['/Zi', '/EHsc', '/nologo', `/Fe${programName}`, '${file}'] :
isClang ?
['-fcolor-diagnostics', '-fansi-escape-codes', '-g', '${file}', '-o', programName] :
@@ -190,30 +192,38 @@ export class CppBuildTaskProvider implements TaskProvider {
if (compilerArgs && compilerArgs.length > 0) {
args = args.concat(compilerArgs);
}
const cwd: string = isWindows && !isCl && !process.env.PATH?.includes(path.dirname(compilerPath)) ? path.dirname(compilerPath) : "${fileDirname}";
const cwd: string = isWindows && !isCl && !process.env.PATH?.includes(path.dirname(compilerPathString)) ? path.dirname(compilerPathString) : "${fileDirname}";
const options: cp.ExecOptions | cp.SpawnOptions | undefined = { cwd: cwd };
definition = {
type: CppBuildTaskProvider.CppBuildScriptType,
label: taskLabel,
command: isCl ? compilerPathBase : compilerPath,
command: compilerPath,
args: args,
options: options
};
if (isCl) {
definition.command = compilerPathBase;
}
}
const editor: TextEditor | undefined = window.activeTextEditor;
const folder: WorkspaceFolder | undefined = editor ? workspace.getWorkspaceFolder(editor.document.uri) : undefined;
const taskUsesActiveFile: boolean = definition.args.some(arg => arg.indexOf('${file}') >= 0); // Need to check this before ${file} is resolved
const taskUsesActiveFile: boolean = definition.args.some(arg => {
if (util.isString(arg)) {
return arg.indexOf('${file}') >= 0;
}
return arg.value.indexOf('${file}') >= 0;
}); // Need to check this before ${file} is resolved
const scope: WorkspaceFolder | TaskScope = folder ? folder : TaskScope.Workspace;
const task: CppBuildTask = new Task(definition, scope, definition.label, ext.CppSourceStr,
new CustomExecution(async (resolvedDefinition: TaskDefinition): Promise<Pseudoterminal> =>
// When the task is executed, this callback will run. Here, we setup for running the task.
new CustomBuildTaskTerminal(resolvedcompilerPath, resolvedDefinition.args, resolvedDefinition.options, {taskUsesActiveFile, insertStd: isClang && os.platform() === 'darwin'})
new CustomBuildTaskTerminal(resolvedCompilerPath, resolvedDefinition.args, resolvedDefinition.options, { taskUsesActiveFile, insertStd: isClang && os.platform() === 'darwin' })
), isCl ? '$msCompile' : '$gcc');
task.group = TaskGroup.Build;
task.detail = detail ? detail : localize("compiler.details", "compiler:") + " " + resolvedcompilerPath;
task.detail = detail ? detail : localize("compiler.details", "compiler:") + " " + resolvedCompilerPathString;
return task;
};
@@ -356,7 +366,7 @@ class CustomBuildTaskTerminal implements Pseudoterminal {
public get onDidClose(): Event<number> { return this.closeEmitter.event; }
private endOfLine: string = "\r\n";
constructor(private command: string, private args: string[], private options: cp.ExecOptions | cp.SpawnOptions | undefined, private buildOptions: BuildOptions) {
constructor(private command: string | util.IQuotedString, private args: (string | util.IQuotedString)[], private options: cp.ExecOptions | undefined, private buildOptions: BuildOptions) {
}
async open(_initialDimensions: TerminalDimensions | undefined): Promise<void> {
@@ -382,22 +392,29 @@ class CustomBuildTaskTerminal implements Pseudoterminal {
private async doBuild(): Promise<any> {
// Do build.
let command: string = util.resolveVariables(this.command);
let activeCommand: string = command;
let resolvedCommand: string | util.IQuotedString | undefined;
if (util.isString(this.command)) {
resolvedCommand = util.resolveVariables(this.command);
} else {
resolvedCommand = {
value: util.resolveVariables(this.command.value),
quoting: this.command.quoting
};
}
// Create the exe folder path if it doesn't exist.
const exePath: string | undefined = util.resolveVariables(util.findExePathInArgs(this.args));
util.createDirIfNotExistsSync(exePath);
this.args.forEach((value, index) => {
value = util.normalizeArg(util.resolveVariables(value));
activeCommand = activeCommand + " " + value;
this.args[index] = value;
if (util.isString(value)) {
this.args[index] = util.resolveVariables(value);
} else {
value.value = util.resolveVariables(value.value);
}
});
if (this.options) {
this.options.shell = true;
} else {
this.options = { "shell": true };
if (this.options === undefined) {
this.options = { };
}
if (this.options.cwd) {
this.options.cwd = util.resolveVariables(this.options.cwd.toString());
@@ -427,15 +444,12 @@ class CustomBuildTaskTerminal implements Pseudoterminal {
}
};
if (os.platform() === 'win32') {
command = `cmd /c chcp 65001>nul && ${command}`;
}
const activeCommand: string = util.buildShellCommandLine(resolvedCommand, this.command, this.args);
this.writeEmitter.fire(activeCommand + this.endOfLine);
let child: cp.ChildProcess | undefined;
try {
child = cp.spawn(command, this.args, this.options ? this.options : {});
child = cp.exec(activeCommand, this.options);
let error: string = "";
let stdout: string = "";
let stderr: string = "";
@@ -6,7 +6,6 @@
import * as vscode from 'vscode';
import { CustomConfigurationProvider, SourceFileConfigurationItem, Version, WorkspaceBrowseConfiguration } from 'vscode-cpptools';
import * as ext from './extension';
import { CppSettings } from './settings';
/**
@@ -158,7 +157,8 @@ export class CustomConfigurationProviderCollection {
}
public add(provider: CustomConfigurationProvider, version: Version): boolean {
if (new CppSettings(ext.getActiveClient().RootUri).intelliSenseEngine === "disabled") {
const settings: CppSettings = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined);
if (settings.intelliSenseEngine === "disabled") {
console.warn("Language service is disabled. Provider will not be registered.");
return false;
}
+42 -5
View File
@@ -4,13 +4,37 @@
* ------------------------------------------------------------------------------------------ */
import * as vscode from 'vscode';
class Deferral {
private timer?: NodeJS.Timeout;
constructor(callback: () => void, timeout: number) {
this.timer = setTimeout(() => {
this.timer = undefined;
callback();
}, timeout);
}
public cancel() {
if (this.timer) {
clearTimeout(this.timer);
this.timer = undefined;
}
}
}
export class DataBinding<T> {
private value: T;
private valueChanged = new vscode.EventEmitter<T>();
private isActive: boolean = true;
private deferral?: Deferral;
constructor(value: T) {
this.value = value;
/**
* Bind an event to a value so that a data model can automatically update the UI when values change.
* Since values can change quickly and cause UI to flicker, an optional delay/trigger combination can
* be specified to prevent UI elements from appearing/disappearing too quickly.
* @param value The initial value in the binding.
* @param delay An optional delay (in milliseconds) for firing the value changed event.
* @param delayValueTrigger The value that triggers an event delay.
*/
constructor(private value: T, private delay: number = 0, private delayValueTrigger?: T) {
this.isActive = true;
}
@@ -20,8 +44,21 @@ export class DataBinding<T> {
public set Value(value: T) {
if (value !== this.value) {
this.value = value;
this.valueChanged.fire(this.value);
if (this.delay === 0 || value !== this.delayValueTrigger) {
this.value = value;
this.valueChanged.fire(this.value);
} else {
if (this.deferral) {
this.deferral.cancel();
}
this.deferral = new Deferral(() => {
this.value = value;
this.valueChanged.fire(this.value);
}, this.delay);
}
} else if (this.deferral) {
this.deferral.cancel();
this.deferral = undefined;
}
}
+227 -101
View File
@@ -5,6 +5,8 @@
'use strict';
import * as fs from 'fs';
// Node.js 18 fetch isn't available until VS 1.82.
import fetch from 'node-fetch';
import * as StreamZip from 'node-stream-zip';
import * as os from 'os';
import * as path from 'path';
@@ -12,8 +14,10 @@ import * as vscode from 'vscode';
import { Range } from 'vscode-languageclient';
import * as nls from 'vscode-nls';
import { TargetPopulation } from 'vscode-tas-client';
import * as which from 'which';
import { logAndReturn } from '../Utility/Async/returns';
import * as util from '../common';
import { getCrashCallStacksChannel } from '../logger';
import { PlatformInformation } from '../platform';
import * as telemetry from '../telemetry';
import { Client, DefaultClient, DoxygenCodeActionCommandArguments, openFileVersions } from './client';
@@ -26,21 +30,23 @@ import { PersistentState } from './persistentState';
import { NodeType, TreeNode } from './referencesModel';
import { CppSettings } from './settings';
import { LanguageStatusUI, getUI } from './ui';
import { makeCpptoolsRange, rangeEquals, shouldChangeFromCToCpp, showInstallCompilerWalkthrough } from './utils';
import { makeLspRange, rangeEquals, showInstallCompilerWalkthrough } from './utils';
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
export const CppSourceStr: string = "C/C++";
export const configPrefix: string = "C/C++: ";
let prevCrashFile: string;
let prevMacCrashFile: string;
let prevCppCrashFile: string;
let prevCppCrashCallStackData: string = "";
export let clients: ClientCollection;
let activeDocument: string;
let activeDocument: vscode.TextDocument | undefined;
let ui: LanguageStatusUI;
const disposables: vscode.Disposable[] = [];
const commandDisposables: vscode.Disposable[] = [];
let languageConfigurations: vscode.Disposable[] = [];
let intervalTimer: NodeJS.Timer;
let intervalTimer: NodeJS.Timeout;
let codeActionProvider: vscode.Disposable;
export const intelliSenseDisabledError: string = "Do not activate the extension when IntelliSense is disabled.";
@@ -141,8 +147,6 @@ function sendActivationTelemetry(): void {
* activate: set up the extension for language services
*/
export async function activate(): Promise<void> {
console.log("activating extension");
sendActivationTelemetry();
const checkForConflictingExtensions: PersistentState<boolean> = new PersistentState<boolean>("CPP." + util.packageJson.version + ".checkForConflictingExtensions", true);
if (checkForConflictingExtensions.Value) {
@@ -154,7 +158,6 @@ export async function activate(): Promise<void> {
}
}
console.log("starting language server");
clients = new ClientCollection();
ui = getUI();
@@ -165,10 +168,11 @@ export async function activate(): Promise<void> {
});
disposables.push(vscode.workspace.onDidChangeConfiguration(onDidChangeSettings));
disposables.push(vscode.window.onDidChangeActiveTextEditor(onDidChangeActiveTextEditor));
ui.activeDocumentChanged(); // Handle already active documents (for non-cpp files that we don't register didOpen).
disposables.push(vscode.window.onDidChangeTextEditorSelection(onDidChangeTextEditorSelection));
disposables.push(vscode.window.onDidChangeVisibleTextEditors(onDidChangeVisibleTextEditors));
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) => clients.ActiveClient.enqueue(async () => onDidChangeTextEditorSelection(e))));
disposables.push(vscode.window.onDidChangeVisibleTextEditors((e) => clients.ActiveClient.enqueue(async () => onDidChangeVisibleTextEditors(e))));
updateLanguageConfigurations();
@@ -242,6 +246,7 @@ export async function activate(): Promise<void> {
const activeEditor: vscode.TextEditor | undefined = vscode.window.activeTextEditor;
if (activeEditor) {
clients.timeTelemetryCollector.setFirstFile(activeEditor.document.uri);
activeDocument = activeEditor.document;
}
}
@@ -276,7 +281,13 @@ async function onDidChangeSettings(event: vscode.ConfigurationChangeEvent): Prom
let noActiveEditorTimeout: NodeJS.Timeout | undefined;
export function onDidChangeActiveTextEditor(editor?: vscode.TextEditor): void {
async function onDidChangeTextEditorVisibleRanges(event: vscode.TextEditorVisibleRangesChangeEvent): Promise<void> {
if (util.isCpp(event.textEditor.document)) {
await clients.getDefaultClient().onDidChangeTextEditorVisibleRanges(event.textEditor.document.uri);
}
}
function onDidChangeActiveTextEditor(editor?: vscode.TextEditor): void {
/* need to notify the affected client(s) */
console.assert(clients !== undefined, "client should be available before active editor is changed");
if (clients === undefined) {
@@ -287,93 +298,42 @@ export function onDidChangeActiveTextEditor(editor?: vscode.TextEditor): void {
clearTimeout(noActiveEditorTimeout);
noActiveEditorTimeout = undefined;
}
if (!editor) {
// When switching between documents, VS Code is setting the active editor to undefined
// temporarily, so this prevents the C++-related status bar items from flickering off/on.
noActiveEditorTimeout = setTimeout(() => {
activeDocument = "";
ui.activeDocumentChanged();
activeDocument = undefined;
ui.didChangeActiveEditor();
noActiveEditorTimeout = undefined;
}, 100);
return;
}
if (util.isCppOrRelated(editor.document)) {
// This is required for the UI to update correctly.
void clients.activeDocumentChanged(editor.document).catch(logAndReturn.undefined);
if (util.isCpp(editor.document)) {
activeDocument = editor.document.uri.toString();
clients.ActiveClient.selectionChanged(makeCpptoolsRange(editor.selection));
} else {
activeDocument = "";
}
void clients.didChangeActiveEditor(undefined).catch(logAndReturn.undefined);
} else {
activeDocument = "";
ui.didChangeActiveEditor();
if (util.isCppOrRelated(editor.document)) {
if (util.isCpp(editor.document)) {
activeDocument = editor.document;
void clients.didChangeActiveEditor(editor).catch(logAndReturn.undefined);
} else {
activeDocument = undefined;
void clients.didChangeActiveEditor(undefined).catch(logAndReturn.undefined);
}
//clients.ActiveClient.selectionChanged(makeLspRange(editor.selection));
} else {
activeDocument = undefined;
}
}
getUI().activeDocumentChanged();
}
function onDidChangeTextEditorSelection(event: vscode.TextEditorSelectionChangeEvent): void {
/* need to notify the affected client(s) */
if (!event.textEditor || !vscode.window.activeTextEditor || event.textEditor.document.uri !== vscode.window.activeTextEditor.document.uri ||
!util.isCpp(event.textEditor.document)) {
if (!util.isCpp(event.textEditor.document)) {
return;
}
if (activeDocument !== event.textEditor.document.uri.toString()) {
// For some unknown reason we don't reliably get onDidChangeActiveTextEditor callbacks.
activeDocument = event.textEditor.document.uri.toString();
void clients.activeDocumentChanged(event.textEditor.document).catch(logAndReturn.undefined);
ui.activeDocumentChanged();
}
clients.ActiveClient.selectionChanged(makeCpptoolsRange(event.selections[0]));
clients.ActiveClient.selectionChanged(makeLspRange(event.selections[0]));
}
export async function processDelayedDidOpen(document: vscode.TextDocument): Promise<boolean> {
const client: Client = clients.getClientFor(document.uri);
if (client) {
// Log warm start.
if (clients.checkOwnership(client, document)) {
if (!client.isInitialized()) {
// This can randomly get hit when adding/removing workspace folders.
await client.ready;
}
// Do not call await between TrackedDocuments.has() and TrackedDocuments.add(),
// to avoid sending redundant didOpen notifications.
if (!client.TrackedDocuments.has(document)) {
// If not yet tracked, process as a newly opened file. (didOpen is sent to server in client.takeOwnership()).
client.TrackedDocuments.add(document);
clients.timeTelemetryCollector.setDidOpenTime(document.uri);
// Work around vscode treating ".C" or ".H" as c, by adding this file name to file associations as cpp
if (document.languageId === "c" && shouldChangeFromCToCpp(document)) {
const baseFileName: string = path.basename(document.fileName);
const mappingString: string = baseFileName + "@" + document.fileName;
client.addFileAssociations(mappingString, "cpp");
client.sendDidChangeSettings();
document = await vscode.languages.setTextDocumentLanguage(document, "cpp");
}
await client.provideCustomConfiguration(document.uri, undefined);
// client.takeOwnership() will call client.TrackedDocuments.add() again, but that's ok. It's a Set.
client.onDidOpenTextDocument(document);
await client.takeOwnership(document);
return true;
}
}
}
return false;
}
function onDidChangeVisibleTextEditors(editors: readonly vscode.TextEditor[]): void {
// Process delayed didOpen for any visible editors we haven't seen before
// eslint-disable-next-line @typescript-eslint/no-misused-promises
editors.forEach(async (editor) => {
if (util.isCpp(editor.document)) {
const client: Client = clients.getClientFor(editor.document.uri);
await client.enqueue(() => processDelayedDidOpen(editor.document));
client.onDidChangeVisibleTextEditor(editor);
}
});
async function onDidChangeVisibleTextEditors(editors: readonly vscode.TextEditor[]): Promise<void> {
const cppEditors: vscode.TextEditor[] = editors.filter(e => util.isCpp(e.document));
await clients.getDefaultClient().onDidChangeVisibleTextEditors(cppEditors);
}
function onInterval(): void {
@@ -443,6 +403,7 @@ export function registerCommands(enabled: boolean): void {
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ExtractToFreeFunction', enabled ? () => onExtractToFunction(true, false) : onDisabledCommand));
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ExtractToMemberFunction', enabled ? () => onExtractToFunction(false, true) : onDisabledCommand));
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.ExpandSelection', enabled ? (r: Range) => onExpandSelection(r) : onDisabledCommand));
commandDisposables.push(vscode.commands.registerCommand('C_Cpp.getIncludes', enabled ? (maxDepth: number) => getIncludes(maxDepth) : onDisabledCommand));
}
function onDisabledCommand() {
@@ -669,7 +630,7 @@ async function onGoToPrevDirectiveInGroup(): Promise<void> {
}
async function onRunCodeAnalysisOnActiveFile(): Promise<void> {
if (activeDocument !== "") {
if (activeDocument) {
await vscode.commands.executeCommand("workbench.action.files.saveAll");
return getActiveClient().handleRunCodeAnalysisOnActiveFile();
}
@@ -956,15 +917,15 @@ function onShowRefCommand(arg?: TreeNode): void {
function reportMacCrashes(): void {
if (process.platform === "darwin") {
prevCrashFile = "";
prevMacCrashFile = "";
const home: string = os.homedir();
const crashFolder: string = path.resolve(home, "Library/Logs/DiagnosticReports");
fs.stat(crashFolder, (err) => {
const crashObject: Record<string, string> = {};
if (err?.code) {
// If the directory isn't there, we have a problem...
crashObject["fs.stat: err.code"] = err.code;
telemetry.logLanguageServerEvent("MacCrash", crashObject, undefined);
crashObject["errCode"] = err.code;
telemetry.logLanguageServerEvent("MacCrash", crashObject);
return;
}
@@ -974,10 +935,10 @@ function reportMacCrashes(): void {
if (event !== "rename") {
return;
}
if (!filename || filename === prevCrashFile) {
if (!filename || filename === prevMacCrashFile) {
return;
}
prevCrashFile = filename;
prevMacCrashFile = filename;
if (!filename.startsWith("cpptools")) {
return;
}
@@ -1000,17 +961,73 @@ function reportMacCrashes(): void {
}
}
let previousMacCrashData: string;
let previousMacCrashCount: number = 0;
export function usesCrashHandler(): boolean {
return process.platform !== "win32" && (process.platform === "darwin" || os.arch() === "x64");
}
function logMacCrashTelemetry(data: string): void {
export function watchForCrashes(crashDirectory: string): void {
if (crashDirectory !== "") {
prevCppCrashFile = "";
fs.stat(crashDirectory, (err) => {
const crashObject: Record<string, string> = {};
if (err?.code) {
// If the directory isn't there, we have a problem...
crashObject["errCode"] = err.code;
telemetry.logLanguageServerEvent("CppCrash", crashObject);
return;
}
// vscode.workspace.createFileSystemWatcher only works in workspace folders.
try {
fs.watch(crashDirectory, (event, filename) => {
if (event !== "rename") {
return;
}
if (!filename || filename === prevCppCrashFile) {
return;
}
prevCppCrashFile = filename;
if (!filename.startsWith("cpptools")) {
return;
}
const crashDate: Date = new Date();
// Wait 5 seconds to allow time for the crash log to finish being written.
setTimeout(() => {
fs.readFile(path.resolve(crashDirectory, filename), 'utf8', (err, data) => {
void handleCrashFileRead(crashDirectory, filename, crashDate, err, data);
});
}, 5000);
});
} catch (e) {
// The file watcher limit is hit (may not be possible on Mac, but just in case).
}
});
}
}
let previousCrashData: string;
let previousCrashCount: number = 0;
function logCrashTelemetry(data: string, type: string, offsetData?: string): void {
const crashObject: Record<string, string> = {};
const crashCountObject: Record<string, number> = {};
crashObject.CrashingThreadCallStack = data;
previousMacCrashCount = data === previousMacCrashData ? previousMacCrashCount + 1 : 0;
previousMacCrashData = data;
crashCountObject.CrashCount = previousMacCrashCount;
telemetry.logLanguageServerEvent("MacCrash", crashObject, crashCountObject);
if (offsetData !== undefined) {
crashObject.CrashingThreadCallStackOffsets = offsetData;
}
previousCrashCount = data === previousCrashData ? previousCrashCount + 1 : 0;
previousCrashData = data;
crashCountObject.CrashCount = previousCrashCount + 1;
telemetry.logLanguageServerEvent(type, crashObject, crashCountObject);
}
function logMacCrashTelemetry(data: string): void {
logCrashTelemetry(data, "MacCrash");
}
function logCppCrashTelemetry(data: string, offsetData?: string): void {
logCrashTelemetry(data, "CppCrash", offsetData);
}
function handleMacCrashFileRead(err: NodeJS.ErrnoException | undefined | null, data: string): void {
@@ -1103,9 +1120,111 @@ function handleMacCrashFileRead(err: NodeJS.ErrnoException | undefined | null, d
logMacCrashTelemetry(data);
}
async function handleCrashFileRead(crashDirectory: string, crashFile: string, crashDate: Date, err: NodeJS.ErrnoException | undefined | null, data: string): Promise<void> {
if (err) {
if (err.code === "ENOENT") {
return; // ignore known issue
}
return logCppCrashTelemetry("readFile: " + err.code);
}
const lines: string[] = data.split("\n");
let addressData: string = ".\n.";
const isCppToolsSrv: boolean = crashFile.startsWith("cpptools-srv");
const telemetryHeader: string = (isCppToolsSrv ? "cpptools-srv.txt" : crashFile) + "\n";
const filtPath: string | null = which.sync("c++filt", { nothrow: true });
const isMac: boolean = process.platform === "darwin";
const startStr: string = isMac ? " _" : "<";
const offsetStr: string = isMac ? " + " : "+";
const endOffsetStr: string = isMac ? " " : " <";
const dotStr: string = "…";
const signalType: string = lines[0];
let crashCallStack: string = "";
for (let lineNum: number = 2; lineNum < lines.length - 3; ++lineNum) { // skip first/last lines
crashCallStack += "\n";
addressData += "\n";
const line: string = lines[lineNum];
const startPos: number = line.indexOf(startStr);
if (startPos === -1 || line[startPos + (isMac ? 1 : 4)] === "+") {
crashCallStack += dotStr;
const startAddressPos: number = line.indexOf("0x");
const endAddressPos: number = line.indexOf(endOffsetStr, startAddressPos + 2);
if (startAddressPos === -1 || endAddressPos === -1 || startAddressPos >= endAddressPos) {
addressData += "Unexpected offset";
} else {
addressData += line.substring(startAddressPos, endAddressPos);
}
continue;
}
const offsetPos: number = line.indexOf(offsetStr, startPos + startStr.length);
if (offsetPos === -1) {
crashCallStack += "Missing offsetStr";
continue; // unexpected
}
const startPos2: number = startPos + 1;
let funcStr: string = line.substring(startPos2, offsetPos);
if (filtPath) {
let ret: util.ProcessReturnType | undefined = await util.spawnChildProcess(filtPath, ["--no-strip-underscore", funcStr], undefined, true).catch(logAndReturn.undefined);
if (ret?.output === funcStr) {
ret = await util.spawnChildProcess(filtPath, [funcStr], undefined, true).catch(logAndReturn.undefined);
}
if (ret !== undefined) {
funcStr = ret.output;
funcStr = funcStr.replace(/std::(?:__1|__cxx11)/g, "std"); // simplify std namespaces.
funcStr = funcStr.replace(/std::basic_/g, "std::");
funcStr = funcStr.replace(/ >/g, ">");
funcStr = funcStr.replace(/, std::(?:allocator|char_traits)<char>/g, "");
funcStr = funcStr.replace(/<char>/g, "");
funcStr = funcStr.replace(/, std::allocator<std::string>/g, "");
}
}
crashCallStack += funcStr + offsetStr;
const offsetPos2: number = offsetPos + offsetStr.length;
if (isMac) {
crashCallStack += line.substring(offsetPos2);
const startAddressPos: number = line.indexOf("0x");
if (startAddressPos === -1 || startAddressPos >= startPos) {
// unexpected
crashCallStack += "<Missing 0x>";
continue;
}
addressData += `${line.substring(startAddressPos, startPos)}`;
} else {
const endPos: number = line.indexOf(">", offsetPos2);
if (endPos === -1) {
crashCallStack += "<Missing > >";
continue; // unexpected
}
crashCallStack += line.substring(offsetPos2, endPos);
}
}
if (crashCallStack !== prevCppCrashCallStackData) {
prevCppCrashCallStackData = crashCallStack;
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
if (lines.length >= 6 && util.getNumericLoggingLevel(settings.get<string>("loggingLevel")) >= 1) {
const out: vscode.OutputChannel = getCrashCallStacksChannel();
out.appendLine(`\n${isCppToolsSrv ? "cpptools-srv" : "cpptools"}\n${crashDate.toLocaleString()}\n${signalType}${crashCallStack}`);
}
}
data = telemetryHeader + signalType + crashCallStack;
if (data.length > 8192) { // The API has an 8k limit.
data = data.substring(0, 8191) + "…";
}
logCppCrashTelemetry(data, addressData);
await util.deleteFile(path.resolve(crashDirectory, crashFile)).catch(logAndReturn.undefined);
if (crashFile === "cpptools.txt") {
void util.deleteDirectory(crashDirectory).catch(logAndReturn.undefined);
}
}
export function deactivate(): Thenable<void> {
clients.timeTelemetryCollector.clear();
console.log("deactivating extension");
telemetry.logLanguageServerEvent("LanguageServerShutdown");
clearInterval(intervalTimer);
commandDisposables.forEach(d => d.dispose());
@@ -1184,13 +1303,16 @@ export async function preReleaseCheck(): Promise<void> {
const response = await fetch('https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery', {
method: 'POST',
headers: {
Accept : 'application/json; api-version=3.0-preview',
'Content-Type' : 'application/json'
Accept: 'application/json; api-version=3.0-preview',
'Content-Type': 'application/json',
'User-Agent': 'vscode-cpptools'
},
body: '{"filters": [{"criteria": [{"filterType": 7, "value": "ms-vscode.cpptools"}]}], "flags": 529}'
}).catch(logAndReturn.undefined);
const data = await response?.json().catch(logAndReturn.undefined);
telemetry.logLanguageServerEvent("marketplaceFetch", undefined, { status: response?.status ?? 0 });
const data: any = await response?.json().catch(logAndReturn.undefined);
const preReleaseAvailable = data?.results[0].extensions[0].versions[0].properties.some((e: object) => Object.values(e).includes("Microsoft.VisualStudio.Code.PreRelease"));
@@ -1208,3 +1330,7 @@ export async function preReleaseCheck(): Promise<void> {
}
}
}
export async function getIncludes(maxDepth: number): Promise<any> {
return clients.ActiveClient.getIncludes(maxDepth);
}
+43 -25
View File
@@ -4,11 +4,15 @@
* ------------------------------------------------------------------------------------------ */
'use strict';
import * as path from 'path';
import * as vscode from 'vscode';
import { Middleware } from 'vscode-languageclient';
import * as util from '../common';
import { Client } from './client';
import { clients, onDidChangeActiveTextEditor, processDelayedDidOpen } from './extension';
import { clients } from './extension';
import { shouldChangeFromCToCpp } from './utils';
let anyFileOpened: boolean = false;
export function createProtocolFilter(): Middleware {
// Disabling lint for invoke handlers
@@ -18,29 +22,42 @@ export function createProtocolFilter(): Middleware {
const invoke4 = (a: any, b: any, c: any, d: any, next: (a: any, b: any, c: any, d: any) => any): any => clients.ActiveClient.enqueue(() => next(a, b, c, d));
return {
didOpen: async (document, _sendMessage) => {
if (util.isCpp(document)) {
util.setWorkspaceIsCpp();
didOpen: async (document, sendMessage) => clients.ActiveClient.enqueue(async () => {
if (!util.isCpp(document)) {
return;
}
const editor: vscode.TextEditor | undefined = vscode.window.visibleTextEditors.find(e => e.document === document);
if (editor) {
// If the file was visible editor when we were activated, we will not get a call to
// onDidChangeVisibleTextEditors, so immediately open any file that is visible when we receive didOpen.
// Otherwise, we defer opening the file until it's actually visible.
await clients.ActiveClient.enqueue(() => processDelayedDidOpen(document));
if (editor && editor === vscode.window.activeTextEditor) {
onDidChangeActiveTextEditor(editor);
util.setWorkspaceIsCpp();
const client: Client = clients.getClientFor(document.uri);
if (clients.checkOwnership(client, document)) {
const uriString: string = document.uri.toString();
if (!client.TrackedDocuments.has(uriString)) {
client.TrackedDocuments.set(uriString, document);
// Work around vscode treating ".C" or ".H" as c, by adding this file name to file associations as cpp
if (document.languageId === "c" && shouldChangeFromCToCpp(document)) {
const baseFileName: string = path.basename(document.fileName);
const mappingString: string = baseFileName + "@" + document.fileName;
client.addFileAssociations(mappingString, "cpp");
client.sendDidChangeSettings();
document = await vscode.languages.setTextDocumentLanguage(document, "cpp");
}
await client.provideCustomConfiguration(document.uri, undefined);
// client.takeOwnership() will call client.TrackedDocuments.add() again, but that's ok. It's a Set.
client.onDidOpenTextDocument(document);
client.takeOwnership(document);
await sendMessage(document);
// For a file already open when we activate, sometimes we don't get any notifications about visible
// or active text editors, visible ranges, or text selection. As a workaround, we trigger
// onDidChangeVisibleTextEditors here, only for the first file opened.
if (!anyFileOpened)
{
anyFileOpened = true;
const cppEditors: vscode.TextEditor[] = vscode.window.visibleTextEditors.filter(e => util.isCpp(e.document));
await client.onDidChangeVisibleTextEditors(cppEditors);
}
}
} else {
// NO-OP
// If the file is not opened into an editor (such as in response for a control-hover),
// we do not actually load a translation unit for it. When we receive a didOpen, the file
// may not yet be visible. So, we defer creation of the translation until we receive a
// call to onDidChangeVisibleTextEditors(), in extension.ts. A file is only loaded when
// it is actually opened in the editor (not in response to control-hover, which sends a
// didOpen), and first becomes visible.
}
},
}),
didChange: async (textDocumentChangeEvent, sendMessage) => clients.ActiveClient.enqueue(async () => {
const me: Client = clients.getClientFor(textDocumentChangeEvent.document.uri);
me.onDidChangeTextDocument(textDocumentChangeEvent);
@@ -52,7 +69,7 @@ export function createProtocolFilter(): Middleware {
// Don't use awaitUntilLanguageClientReady.
// Otherwise, the message can be delayed too long.
const me: Client = clients.getClientFor(event.document.uri);
if (me.TrackedDocuments.has(event.document)) {
if (me.TrackedDocuments.has(event.document.uri.toString())) {
return sendMessage(event);
}
return [];
@@ -60,9 +77,10 @@ export function createProtocolFilter(): Middleware {
didSave: invoke1,
didClose: async (document, sendMessage) => clients.ActiveClient.enqueue(async () => {
const me: Client = clients.getClientFor(document.uri);
if (me.TrackedDocuments.has(document)) {
const uriString: string = document.uri.toString();
if (me.TrackedDocuments.has(uriString)) {
me.onDidCloseTextDocument(document);
me.TrackedDocuments.delete(document);
me.TrackedDocuments.delete(uriString);
await sendMessage(document);
}
}),
@@ -70,7 +88,7 @@ export function createProtocolFilter(): Middleware {
resolveCompletionItem: invoke2,
provideHover: async (document, position, token, next: (document: any, position: any, token: any) => any) => clients.ActiveClient.enqueue(async () => {
const me: Client = clients.getClientFor(document.uri);
if (me.TrackedDocuments.has(document)) {
if (me.TrackedDocuments.has(document.uri.toString())) {
return next(document, position, token);
}
return null;
@@ -368,6 +368,10 @@ export class ReferencesManager {
this.referencesProgressBarStartTime = Date.now();
this.clearViews();
if (this.referencesDelayProgress) {
clearInterval(this.referencesDelayProgress);
}
this.referencesDelayProgress = setInterval(() => {
const progressTitle: string = referencesCommandModeToString(this.client.ReferencesCommandMode);
this.referencesProgressOptions = { location: vscode.ProgressLocation.Notification, title: progressTitle, cancellable: true };
+4 -1
View File
@@ -10,6 +10,7 @@ import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path';
import * as semver from 'semver';
import { quote } from 'shell-quote';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import * as which from 'which';
@@ -141,6 +142,7 @@ export interface SettingsParams {
maxConcurrentThreads: number | null | undefined;
maxCachedProcesses: number | null | undefined;
maxMemory: number | null | undefined;
maxSymbolSearchResults: number | undefined;
loggingLevel: string | undefined;
workspaceParsingPriority: string | undefined;
workspaceSymbols: string | undefined;
@@ -278,7 +280,7 @@ export class CppSettings extends Settings {
let clangVersion: string;
try {
const exePath: string = getExtensionFilePath(`./LLVM/bin/${clangName}`);
const output: string[] = execSync(`${exePath} --version`).toString().split(" ");
const output: string[] = execSync(quote([exePath, '--version'])).toString().split(" ");
if (output.length < 3 || output[0] !== clangStr || output[1] !== "version" || !semver.valid(output[2])) {
if (output.length === 3) {
return path;
@@ -312,6 +314,7 @@ export class CppSettings extends Settings {
public get maxConcurrentThreads(): number | undefined | null { return super.Section.get<number | null>("maxConcurrentThreads"); }
public get maxMemory(): number | undefined | null { return super.Section.get<number | null>("maxMemory"); }
public get maxSymbolSearchResults(): number | undefined { return super.Section.get<number>("maxSymbolSearchResults"); }
public get maxCachedProcesses(): number | undefined | null { return super.Section.get<number | null>("maxCachedProcesses"); }
public get intelliSenseMaxCachedProcesses(): number | undefined | null { return super.Section.get<number | null>("intelliSense.maxCachedProcesses"); }
public get intelliSenseMaxMemory(): number | undefined | null { return super.Section.get<number | null>("intelliSense.maxMemory"); }
@@ -103,7 +103,8 @@ export class SettingsTracker {
return val;
}
const curEnum: any[] = curSetting["enum"];
if (curEnum && curEnum.indexOf(val) === -1) {
if (curEnum && curEnum.indexOf(val) === -1
&& (key !== "loggingLevel" || util.getNumericLoggingLevel(val) === -1)) {
return "<invalid>";
}
return val;
+10 -30
View File
@@ -46,9 +46,6 @@ const commandArguments: string[] = []; // We report the sender of the command
export class LanguageStatusUI {
private currentClient: Client | undefined;
// Timer for icons from appearing too often and for too short of a time.
private readonly iconDelayTime: number = 1000;
// IntelliSense language status
private intelliSenseStatusItem: vscode.LanguageStatusItem;
private readonly updatingIntelliSenseText: string = localize("updating.intellisense.text", "IntelliSense: Updating");
@@ -58,7 +55,6 @@ export class LanguageStatusUI {
private isParsingWorkspace: boolean = false;
private isParsingWorkspacePaused: boolean = false;
private isParsingFiles: boolean = false;
private tagParseTimeout?: NodeJS.Timeout;
private readonly dataBaseIcon: string = "$(database)";
private readonly workspaceParsingInitializing: string = localize("initializing.tagparser.text", "Initializing Workspace");
private readonly workspaceParsingIndexing: string = localize("indexing.tagparser.text", "Indexing Workspace");
@@ -115,25 +111,15 @@ export class LanguageStatusUI {
return item;
}
private flameTimeout?: NodeJS.Timeout;
private setIsUpdatingIntelliSense(val: boolean): void {
this.intelliSenseStatusItem.busy = val;
if (this.flameTimeout) {
clearTimeout(this.flameTimeout);
}
if (val) {
this.intelliSenseStatusItem.text = "$(flame)";
this.intelliSenseStatusItem.detail = this.updatingIntelliSenseText;
this.flameTimeout = undefined;
} else {
this.flameTimeout = setTimeout(() => {
if (this.intelliSenseStatusItem) {
this.intelliSenseStatusItem.text = this.idleIntelliSenseText;
this.intelliSenseStatusItem.detail = "";
}
}, this.iconDelayTime);
this.intelliSenseStatusItem.text = this.idleIntelliSenseText;
this.intelliSenseStatusItem.detail = "";
}
this.intelliSenseStatusItem.command = {
command: "C_Cpp.RestartIntelliSenseForFile",
@@ -220,10 +206,6 @@ export class LanguageStatusUI {
private setTagParseStatus(): void {
// Set busy icon outside of timer for more real-time response
this.tagParseStatusItem.busy = (this.isParsingWorkspace && !this.isParsingWorkspacePaused) || this.isParsingFiles;
if (this.tagParseStatusItem.busy && this.tagParseTimeout) {
clearTimeout(this.tagParseTimeout);
this.tagParseTimeout = undefined;
}
if (this.isParsingWorkspace || this.isParsingFiles) {
this.tagParseStatusItem.text = this.dataBaseIcon;
@@ -251,15 +233,13 @@ export class LanguageStatusUI {
}
} else {
// Parsing completed.
this.tagParseTimeout = setTimeout(() => {
this.tagParseStatusItem.text = this.workspaceParsingDoneText;
this.tagParseStatusItem.detail = "";
this.tagParseStatusItem.command = {
command: "C_Cpp.RescanWorkspace",
title: this.workspaceRescanText,
arguments: commandArguments
};
}, this.iconDelayTime);
this.tagParseStatusItem.text = this.workspaceParsingDoneText;
this.tagParseStatusItem.detail = "";
this.tagParseStatusItem.command = {
command: "C_Cpp.RescanWorkspace",
title: this.workspaceRescanText,
arguments: commandArguments
};
}
}
//#endregion Tag parse language status
@@ -495,7 +475,7 @@ export class LanguageStatusUI {
}
}
public activeDocumentChanged(): void {
public didChangeActiveEditor(): void {
const activeEditor: vscode.TextEditor | undefined = vscode.window.activeTextEditor;
if (!activeEditor) {
this.ShowConfiguration = false;
+1 -1
View File
@@ -10,7 +10,7 @@ import { SessionState } from '../sessionState';
import { Location, TextEdit } from './commonTypes';
import { CppSettings } from './settings';
export function makeCpptoolsRange(vscRange: vscode.Range): Range {
export function makeLspRange(vscRange: vscode.Range): Range {
return {
start: { line: vscRange.start.line, character: vscRange.start.character },
end: { line: vscRange.end.line, character: vscRange.end.character }
+5 -5
View File
@@ -9,7 +9,7 @@ import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import { CppSettings } from '../LanguageServer/settings';
import { ManualPromise } from '../Utility/Async/manualPromise';
import { ISshHostInfo, ProcessReturnType, splitLines, stripEscapeSequences } from '../common';
import { ISshHostInfo, ProcessReturnType, getNumericLoggingLevel, splitLines, stripEscapeSequences } from '../common';
import { isWindows } from '../constants';
import { getSshChannel } from '../logger';
import {
@@ -254,7 +254,7 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
const disposables: vscode.Disposable[] = [];
const { systemInteractor, command, interactors, nickname, token } = args;
let logIsPaused: boolean = false;
const loggingLevel: string | undefined = new CppSettings().loggingLevel;
const loggingLevel: number = getNumericLoggingLevel(new CppSettings().loggingLevel);
const result = new ManualPromise<ProcessReturnType>();
let stdout: string = '';
@@ -344,7 +344,7 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
};
const handleTerminalOutput = async (dataWrite: vscode.TerminalDataWriteEvent): Promise<void> => {
if (loggingLevel !== 'None') {
if (loggingLevel > 0) {
handleOutputLogging(dataWrite.data);
}
@@ -396,7 +396,7 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
const logOutput: string = interaction.isPassword
? interaction.response.replace(/./g, '*')
: interaction.response;
if (loggingLevel === 'Debug' || loggingLevel === 'Information') {
if (loggingLevel >= 5) {
getSshChannel().appendLine(localize('ssh.wrote.data.to.terminal', '"{0}" wrote data to terminal: "{1}".', nickname, logOutput));
}
}
@@ -460,7 +460,7 @@ export function runInteractiveSshTerminalCommand(args: ITerminalCommandArgs): Pr
const sendText: string = terminalIsWindows ? `(${args.sendText})\nexit /b %ErrorLevel%` : `${args.sendText}\nexit $?`;
terminal.sendText(sendText);
if (loggingLevel === 'Debug' || loggingLevel === 'Information') {
if (loggingLevel >= 5) {
getSshChannel().appendLine(localize('ssh.wrote.data.to.terminal', '"{0}" wrote data to terminal: "{1}".', nickname, args.sendText));
}
}
+11 -4
View File
@@ -10,9 +10,10 @@ import * as path from 'path';
import {
Configuration, ConfigurationDirective,
ConfigurationEntry,
HostConfigurationDirective, parse,
Type as ConfigurationEntryType,
HostConfigurationDirective,
ResolvedConfiguration,
Type as ConfigurationEntryType
parse
} from 'ssh-config';
import { promisify } from 'util';
import * as vscode from 'vscode';
@@ -57,8 +58,14 @@ function extractHostNames(parsedConfig: Configuration): { [host: string]: string
const hostNames: { [host: string]: string } = Object.create(null);
extractHosts(parsedConfig).forEach(host => {
const resolvedConfig: ResolvedConfiguration = parsedConfig.compute(host);
if (resolvedConfig.HostName) {
let resolvedConfig: ResolvedConfiguration | undefined;
try {
resolvedConfig = parsedConfig.compute(host);
} catch (e) {
getSshChannel().appendLine(localize("failed.to.find.user.info.for.SSH",
"Failed to find user info for SSH. This could be caused by VS Code being installed using 'snap'. Please reinstall VS Code using the 'deb' package if you are planning to use SSH features."));
}
if (resolvedConfig?.HostName !== undefined) {
hostNames[host] = resolvedConfig.HostName;
} else {
hostNames[host] = host;
+1 -1
View File
@@ -12,7 +12,7 @@ import { isIdentifierPart, isIdentifierStart } from './characterCodes';
/** simple dynamic tagged literal implementation */
export function taggedLiteral(templateString: string, templateVars: Record<string, any>): string {
return safeEval(`\`${templateString.replace('\\', '\\\\').replace(/`/, '\`')}\`;`, templateVars) as string;
return safeEval(`\`${templateString.replace(/\\/g, '\\\\').replace(/`/g, '\`')}\`;`, templateVars) as string;
}
function parseTaggedLiteral(templateString: string) {
+295 -41
View File
@@ -11,7 +11,7 @@ import * as os from 'os';
import * as path from 'path';
import * as tmp from 'tmp';
import * as vscode from 'vscode';
import { DocumentFilter } from 'vscode-languageclient';
import { DocumentFilter, Range } from 'vscode-languageclient';
import * as nls from 'vscode-nls';
import { TargetPopulation } from 'vscode-tas-client';
import * as which from "which";
@@ -355,17 +355,6 @@ export function defaultExePath(): string {
return isWindows ? exePath + '.exe' : exePath;
}
export function findExePathInArgs(args: string[]): string | undefined {
const exePath: string | undefined = args.find((arg: string, index: number) => arg.includes(".exe") || (index > 0 && args[index - 1] === "-o"));
if (exePath?.startsWith("/Fe")) {
return exePath.substring(3);
}
if (exePath?.toLowerCase().startsWith("/out:")) {
return exePath.substring(5);
}
return exePath;
}
// Pass in 'arrayResults' if a string[] result is possible and a delimited string result is undesirable.
// The string[] result will be copied into 'arrayResults'.
export function resolveVariables(input: string | undefined, additionalEnvironment?: Record<string, string | string[]>, arrayResults?: string[]): string {
@@ -382,7 +371,7 @@ export function resolveVariables(input: string | undefined, additionalEnvironmen
}
// Replace environment and configuration variables.
const regexp: () => RegExp = () => /\$\{((env|config|workspaceFolder|file|fileDirname|fileBasenameNoExtension|execPath|pathSeparator)(\.|:))?(.*?)\}/g;
const regexp: () => RegExp = () => /\$\{((env|config|workspaceFolder)(\.|:))?(.*?)\}/g;
let ret: string = input;
const cycleCache = new Set<string>();
while (!cycleCache.has(ret)) {
@@ -677,6 +666,22 @@ export function deleteFile(filePath: string): Promise<void> {
});
}
export function deleteDirectory(directoryPath: string): Promise<void> {
return new Promise<void>((resolve, reject) => {
if (fs.existsSync(directoryPath)) {
fs.rmdir(directoryPath, (err) => {
if (err) {
reject(err);
} else {
resolve();
}
});
} else {
resolve();
}
});
}
export function getReadmeMessage(): string {
const readmePath: string = getExtensionFilePath("README.md");
const readmeMessage: string = localize("refer.read.me", "Please refer to {0} for troubleshooting information. Issues can be created at {1}", readmePath, "https://github.com/Microsoft/vscode-cpptools/issues");
@@ -736,14 +741,15 @@ export interface ProcessReturnType {
output: string;
}
export async function spawnChildProcess(program: string, args: string[] = [], continueOn?: string, cancellationToken?: vscode.CancellationToken): Promise<ProcessReturnType> {
export async function spawnChildProcess(program: string, args: string[] = [], continueOn?: string, skipLogging?: boolean, cancellationToken?: vscode.CancellationToken): Promise<ProcessReturnType> {
// Do not use CppSettings to avoid circular require()
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
const loggingLevel: string | undefined = settings.get<string>("loggingLevel");
if (loggingLevel === "Information" || loggingLevel === "Debug") {
getOutputChannelLogger().appendLine(`$ ${program} ${args.join(' ')}`);
if (skipLogging === undefined || !skipLogging) {
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
if (getNumericLoggingLevel(settings.get<string>("loggingLevel")) >= 5) {
getOutputChannelLogger().appendLine(`$ ${program} ${args.join(' ')}`);
}
}
const programOutput: ProcessOutput = await spawnChildProcessImpl(program, args, continueOn, cancellationToken);
const programOutput: ProcessOutput = await spawnChildProcessImpl(program, args, continueOn, skipLogging, cancellationToken);
const exitCode: number | NodeJS.Signals | undefined = programOutput.exitCode;
if (programOutput.exitCode) {
return { succeeded: false, exitCode, output: programOutput.stderr || programOutput.stdout || localize('process.exited', 'Process exited with code {0}', exitCode) };
@@ -765,12 +771,12 @@ interface ProcessOutput {
stderr: string;
}
async function spawnChildProcessImpl(program: string, args: string[], continueOn?: string, cancellationToken?: vscode.CancellationToken): Promise<ProcessOutput> {
async function spawnChildProcessImpl(program: string, args: string[], continueOn?: string, skipLogging?: boolean, cancellationToken?: vscode.CancellationToken): Promise<ProcessOutput> {
const result = new ManualPromise<ProcessOutput>();
// Do not use CppSettings to avoid circular require()
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
const loggingLevel: string | undefined = settings.get<string>("loggingLevel");
const loggingLevel: number = (skipLogging === undefined || !skipLogging) ? getNumericLoggingLevel(settings.get<string>("loggingLevel")) : 0;
let proc: child_process.ChildProcess;
if (await isExecutable(program)) {
@@ -796,7 +802,7 @@ async function spawnChildProcessImpl(program: string, args: string[], continueOn
if (proc.stdout) {
proc.stdout.on('data', data => {
const str: string = data.toString();
if (loggingLevel !== "None") {
if (loggingLevel > 0) {
getOutputChannelLogger().append(str);
}
stdout += str;
@@ -1318,7 +1324,7 @@ export function getCacheStoragePath(): string {
defaultCachePath = "vscode-cpptools/";
pathEnvironmentVariable = process.env.XDG_CACHE_HOME;
if (!pathEnvironmentVariable) {
pathEnvironmentVariable = os.homedir();
pathEnvironmentVariable = path.join(os.homedir(), ".cache");
}
break;
}
@@ -1360,25 +1366,55 @@ export function sequentialResolve<T>(items: T[], promiseBuilder: (item: T) => Pr
}, Promise.resolve());
}
export function normalizeArg(arg: string): string {
arg = arg.trim();
// Check if the arg is enclosed in backtick,
// or includes unescaped double-quotes (or single-quotes on Windows),
// or includes unescaped single-quotes on mac and linux.
if (/^`.*`$/g.test(arg) || /.*[^\\]".*/g.test(arg) ||
(process.platform.includes("win") && /.*[^\\]'.*/g.test(arg)) ||
(!process.platform.includes("win") && /.*[^\\]'.*/g.test(arg))) {
return arg;
export function quoteArgument(argument: string): string {
// Return the argument as is if it's empty
if (!argument) {
return argument;
}
// The special character double-quote is already escaped in the arg.
const unescapedSpaces: string | undefined = arg.split('').find((char, index) => index > 0 && char === " " && arg[index - 1] !== "\\");
if (!unescapedSpaces && !process.platform.includes("win")) {
return arg;
} else if (arg.includes(" ")) {
arg = arg.replace(/\\\s/g, " ");
return "\"" + arg + "\"";
if (os.platform() === "win32") {
// Windows-style quoting logic
if (!/[\s\t\n\v\"\\&%^]/.test(argument)) {
return argument;
}
let quotedArgument = '"';
let backslashCount = 0;
for (const char of argument) {
if (char === '\\') {
backslashCount++;
} else {
if (char === '"') {
quotedArgument += '\\'.repeat(backslashCount * 2 + 1);
} else {
quotedArgument += '\\'.repeat(backslashCount);
}
quotedArgument += char;
backslashCount = 0;
}
}
quotedArgument += '\\'.repeat(backslashCount * 2);
quotedArgument += '"';
return quotedArgument;
} else {
return arg;
// Unix-style quoting logic
if (!/[\s\t\n\v\"'\\$`|;&(){}<>*?!\[\]~^#%]/.test(argument)) {
return argument;
}
let quotedArgument = "'";
for (const c of argument) {
if (c === "'") {
quotedArgument += "'\\''";
} else {
quotedArgument += c;
}
}
quotedArgument += "'";
return quotedArgument;
}
}
@@ -1542,7 +1578,225 @@ export function getNumericLoggingLevel(loggingLevel: string | undefined): number
return 5;
case "debug":
return 6;
default:
case "none":
return 0;
default:
return -1;
}
}
export function mergeOverlappingRanges(ranges: Range[]): Range[] {
// Fix any reversed ranges. Not sure if this is needed, but ensures the input is sanitized.
const mergedRanges: Range[] = ranges.map(range => {
if (range.start.line > range.end.line || (range.start.line === range.end.line && range.start.character > range.end.character)) {
return Range.create(range.end, range.start);
}
return range;
});
// Merge overlapping ranges.
mergedRanges.sort((a, b) => a.start.line - b.start.line || a.start.character - b.start.character);
let lastMergedIndex = 0; // Index to keep track of the last merged range
for (let currentIndex = 0; currentIndex < ranges.length; currentIndex++) {
const currentRange = ranges[currentIndex]; // No need for a shallow copy, since we're not modifying the ranges we haven't read yet.
let nextIndex = currentIndex + 1;
while (nextIndex < ranges.length) {
const nextRange = ranges[nextIndex];
// Check for non-overlapping ranges first
if (nextRange.start.line > currentRange.end.line ||
(nextRange.start.line === currentRange.end.line && nextRange.start.character > currentRange.end.character)) {
break;
}
// Otherwise, merge the overlapping ranges
currentRange.end = {
line: Math.max(currentRange.end.line, nextRange.end.line),
character: Math.max(currentRange.end.character, nextRange.end.character)
};
nextIndex++;
}
// Overwrite the array in-place
mergedRanges[lastMergedIndex] = currentRange;
lastMergedIndex++;
currentIndex = nextIndex - 1; // Skip the merged ranges
}
mergedRanges.length = lastMergedIndex;
return mergedRanges;
}
// Arg quoting utility functions, copied from VS Code with minor changes.
export interface IShellQuotingOptions {
/**
* The character used to do character escaping.
*/
escape?: string | {
escapeChar: string;
charsToEscape: string;
};
/**
* The character used for string quoting.
*/
strong?: string;
/**
* The character used for weak quoting.
*/
weak?: string;
}
export interface IQuotedString {
value: string;
quoting: 'escape' | 'strong' | 'weak';
}
export type CommandString = string | IQuotedString;
export function buildShellCommandLine(originalCommand: CommandString, command: CommandString, args: CommandString[]): string {
let shellQuoteOptions: IShellQuotingOptions;
const isWindows: boolean = os.platform() === 'win32';
if (isWindows) {
shellQuoteOptions = {
strong: '"'
};
} else {
shellQuoteOptions = {
escape: {
escapeChar: '\\',
charsToEscape: ' "\''
},
strong: '\'',
weak: '"'
};
}
// TODO: Support launching with PowerShell
// For PowerShell:
// {
// escape: {
// escapeChar: '`',
// charsToEscape: ' "\'()'
// },
// strong: '\'',
// weak: '"'
// },
function needsQuotes(value: string): boolean {
if (value.length >= 2) {
const first = value[0] === shellQuoteOptions.strong ? shellQuoteOptions.strong : value[0] === shellQuoteOptions.weak ? shellQuoteOptions.weak : undefined;
if (first === value[value.length - 1]) {
return false;
}
}
let quote: string | undefined;
for (let i = 0; i < value.length; i++) {
// We found the end quote.
const ch = value[i];
if (ch === quote) {
quote = undefined;
} else if (quote !== undefined) {
// skip the character. We are quoted.
continue;
} else if (ch === shellQuoteOptions.escape) {
// Skip the next character
i++;
} else if (ch === shellQuoteOptions.strong || ch === shellQuoteOptions.weak) {
quote = ch;
} else if (ch === ' ') {
return true;
}
}
return false;
}
function quote(value: string, kind: 'escape' | 'strong' | 'weak'): [string, boolean] {
if (kind === "strong" && shellQuoteOptions.strong) {
return [shellQuoteOptions.strong + value + shellQuoteOptions.strong, true];
} else if (kind === "weak" && shellQuoteOptions.weak) {
return [shellQuoteOptions.weak + value + shellQuoteOptions.weak, true];
} else if (kind === "escape" && shellQuoteOptions.escape) {
if (isString(shellQuoteOptions.escape)) {
return [value.replace(/ /g, shellQuoteOptions.escape + ' '), true];
} else {
const buffer: string[] = [];
for (const ch of shellQuoteOptions.escape.charsToEscape) {
buffer.push(`\\${ch}`);
}
const regexp: RegExp = new RegExp('[' + buffer.join(',') + ']', 'g');
const escapeChar = shellQuoteOptions.escape.escapeChar;
return [value.replace(regexp, (match) => escapeChar + match), true];
}
}
return [value, false];
}
function quoteIfNecessary(value: CommandString): [string, boolean] {
if (isString(value)) {
if (needsQuotes(value)) {
return quote(value, "strong");
} else {
return [value, false];
}
} else {
return quote(value.value, value.quoting);
}
}
// If we have no args and the command is a string then use the command to stay backwards compatible with the old command line
// model. To allow variable resolving with spaces we do continue if the resolved value is different than the original one
// and the resolved one needs quoting.
if ((!args || args.length === 0) && isString(command) && (command === originalCommand as string || needsQuotes(originalCommand as string))) {
return command;
}
const result: string[] = [];
let commandQuoted = false;
let argQuoted = false;
let value: string;
let quoted: boolean;
[value, quoted] = quoteIfNecessary(command);
result.push(value);
commandQuoted = quoted;
for (const arg of args) {
[value, quoted] = quoteIfNecessary(arg);
result.push(value);
argQuoted = argQuoted || quoted;
}
let commandLine = result.join(' ');
// There are special rules quoted command line in cmd.exe
if (isWindows)
{
commandLine = `chcp 65001>nul && ${commandLine}`;
if (commandQuoted && argQuoted) {
commandLine = '"' + commandLine + '"';
}
commandLine = `cmd /c ${commandLine}`;
}
return commandLine;
}
export function findExePathInArgs(args: CommandString[]): string | undefined {
const isWindows: boolean = os.platform() === 'win32';
let previousArg: string | undefined;
for (const arg of args) {
const argValue = isString(arg) ? arg : arg.value;
if (previousArg === '-o') {
return argValue;
}
if (isWindows && argValue.includes('.exe')) {
if (argValue.startsWith('/Fe')) {
return argValue.substring(3);
} else if (argValue.toLowerCase().startsWith('/out:')) {
return argValue.substring(5);
}
}
previousArg = argValue;
}
return undefined;
}

Some files were not shown because too many files have changed in this diff Show More