diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 459a711f38..900b545c07 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,27 @@ # C/C++ for Visual Studio Code Changelog +## Version 1.21.1: July 15, 2024 +### Enhancements +* Add `see` and `sa` to the `C_Cpp.doxygen.sectionTags` setting. [#12384](https://github.com/microsoft/vscode-cpptools/issues/12384) +* Update the vcpkg header database. [PR #12430](https://github.com/microsoft/vscode-cpptools/pull/12430) +* Disable the pre-release prompt if the `extensions.ignoreRecommendations` setting is `true`. [#12438](https://github.com/microsoft/vscode-cpptools/issues/12438) +* Switch to an alternative workspace symbol search implementation (performance and results will be slightly different from previous versions). +* Various IntelliSense engine updates/fixes. + +### Bug Fixes +* Fix a crash if the Ryzen 3000 doesn't have updated drivers. [#12201](https://github.com/microsoft/vscode-cpptools/issues/12201) +* Fix relative paths in `compile_commands.json` to be relative to the `compile_commands.json`'s directory. [#12290](https://github.com/microsoft/vscode-cpptools/issues/12290) +* Fix a tag parser performance regression. [#12292](https://github.com/microsoft/vscode-cpptools/issues/12292) +* Fix code analysis, find all references, and rename from getting the wrong configuration for non-open files on the first run when using a configuration provider. [#12313](https://github.com/microsoft/vscode-cpptools/issues/12313) +* Fix potential crashes. [#12354](https://github.com/microsoft/vscode-cpptools/issues/12354) +* Fix the language status not showing it's busy while the tag parser is initializing. [#12403](https://github.com/microsoft/vscode-cpptools/issues/12403) +* Fix the vcpkg code action not appearing for missing headers available via vcpkg. [#12413](https://github.com/microsoft/vscode-cpptools/issues/12413) +* Fix custom configurations sometimes not getting used. [PR #12427](https://github.com/microsoft/vscode-cpptools/pull/12427) +* Fix a code analysis error when using gcc 14. [#12428](https://github.com/microsoft/vscode-cpptools/issues/12428) +* Fix a cause of colorization, inactive regions, and inlay hints getting cleared when an update is pending. +* Fix a cause of semantic tokens transiently being placed in the wrong location. +* Fix a potential deadlock when configured using compile commands. + ## Version 1.21.0: June 17, 2024 ### Bug Fixes * Stop logging file watch events for excluded files. [#11455](https://github.com/microsoft/vscode-cpptools/issues/11455) diff --git a/Extension/VCPkgHeadersDatabase.zip b/Extension/VCPkgHeadersDatabase.zip index c0b8dfe9df..107c8993eb 100644 Binary files a/Extension/VCPkgHeadersDatabase.zip and b/Extension/VCPkgHeadersDatabase.zip differ diff --git a/Extension/bin/messages/cs/messages.json b/Extension/bin/messages/cs/messages.json index 169e9be892..e69d4ee973 100644 --- a/Extension/bin/messages/cs/messages.json +++ b/Extension/bin/messages/cs/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "pro aktuální jednotku překladu se nepovedlo vytvořit jednotku hlavičky", "aktuální jednotka překladu používá jednu nebo více funkcí, které se v tuto chvíli nedají zapsat do jednotky hlavičky", - "explicit(bool) je funkcí C++20" + "explicit(bool) je funkcí C++20", + "musí být zadán název modulu pro mapování souboru modulu odkazující na soubor %sq" ] diff --git a/Extension/bin/messages/de/messages.json b/Extension/bin/messages/de/messages.json index 8dfe5a6553..917bf8a82b 100644 --- a/Extension/bin/messages/de/messages.json +++ b/Extension/bin/messages/de/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "für die aktuelle Übersetzungseinheit konnte keine Headereinheit erstellt werden", "Die aktuelle Übersetzungseinheit verwendet mindestens ein Feature, das derzeit nicht in eine Headereinheit geschrieben werden kann", - "\"explicit(bool)\" ist ein C++20-Feature" + "\"explicit(bool)\" ist ein C++20-Feature", + "Für die Moduldateizuordnung, die auf die Datei \"%sq\" verweist, muss ein Modulname angegeben werden." ] diff --git a/Extension/bin/messages/es/messages.json b/Extension/bin/messages/es/messages.json index dd570ba299..c280af10ec 100644 --- a/Extension/bin/messages/es/messages.json +++ b/Extension/bin/messages/es/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "no se pudo crear una unidad de encabezado para la unidad de traducción actual", "la unidad de traducción actual usa una o varias características que no se pueden escribir actualmente en una unidad de encabezado", - "'explicit(bool)' es una característica de C++20" + "'explicit(bool)' es una característica de C++20", + "se debe especificar un nombre de módulo para la asignación de archivos de módulo que hace referencia al archivo %sq" ] diff --git a/Extension/bin/messages/fr/messages.json b/Extension/bin/messages/fr/messages.json index 8b10190e5c..d30630e8b1 100644 --- a/Extension/bin/messages/fr/messages.json +++ b/Extension/bin/messages/fr/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "impossible de créer une unité d’en-tête pour l’unité de traduction actuelle", "l’unité de traduction actuelle utilise une ou plusieurs fonctionnalités qui ne peuvent actuellement pas être écrites dans une unité d’en-tête", - "'explicit(bool)' est une fonctionnalité C++20" + "'explicit(bool)' est une fonctionnalité C++20", + "un nom de module doit être spécifié pour la carte de fichiers de module référençant le fichier %sq" ] diff --git a/Extension/bin/messages/it/messages.json b/Extension/bin/messages/it/messages.json index 18ed7a08c7..ac5d0a035f 100644 --- a/Extension/bin/messages/it/messages.json +++ b/Extension/bin/messages/it/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "Non è possibile creare un'unità di intestazione per l'unità di conversione corrente", "l'unità di conversione corrente utilizza una o più funzionalità che attualmente non possono essere scritte in un'unità di intestazione", - "'explicit(bool)' è una funzionalità di C++20" + "'explicit(bool)' è una funzionalità di C++20", + "è necessario specificare un nome modulo per la mappa dei file del modulo che fa riferimento al file %sq" ] diff --git a/Extension/bin/messages/ja/messages.json b/Extension/bin/messages/ja/messages.json index 2ca1a449c8..d63a26d2da 100644 --- a/Extension/bin/messages/ja/messages.json +++ b/Extension/bin/messages/ja/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "現在の翻訳単位のヘッダー ユニットを作成できませんでした", "現在の翻訳単位は、現在ヘッダー ユニットに書き込むことができない 1 つ以上の機能を使用します", - "'explicit(bool)' は C++20 機能です" + "'explicit(bool)' は C++20 機能です", + "ファイル %sq を参照するモジュール ファイル マップにモジュール名を指定する必要があります" ] diff --git a/Extension/bin/messages/ko/messages.json b/Extension/bin/messages/ko/messages.json index 39c5b58592..6730d50063 100644 --- a/Extension/bin/messages/ko/messages.json +++ b/Extension/bin/messages/ko/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "현재 변환 단위에 대한 헤더 단위를 만들 수 없습니다.", "현재 변환 단위는 헤더 단위에 현재 쓸 수 없는 하나 이상의 기능을 사용합니다.", - "'explicit(bool)'는 C++20 기능입니다." + "'explicit(bool)'는 C++20 기능입니다.", + "%sq 파일을 참조하는 모듈 파일 맵에 대한 모듈 이름을 지정해야 합니다." ] diff --git a/Extension/bin/messages/pl/messages.json b/Extension/bin/messages/pl/messages.json index 7a4049e4af..f7e4172d72 100644 --- a/Extension/bin/messages/pl/messages.json +++ b/Extension/bin/messages/pl/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "nie można utworzyć jednostki nagłówka dla bieżącej jednostki translacji", "bieżąca jednostka translacji używa co najmniej jednej funkcji, których obecnie nie można zapisać w jednostce nagłówka", - "„explicit(bool)” jest funkcją języka C++20" + "„explicit(bool)” jest funkcją języka C++20", + "nazwa modułu musi być określona dla mapy pliku modułu odwołującej się do pliku %sq" ] diff --git a/Extension/bin/messages/pt-br/messages.json b/Extension/bin/messages/pt-br/messages.json index 069b890880..11090796ac 100644 --- a/Extension/bin/messages/pt-br/messages.json +++ b/Extension/bin/messages/pt-br/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "não foi possível criar uma unidade de cabeçalho para a unidade de tradução atual", "a unidade de tradução atual usa um ou mais recursos que não podem ser gravados atualmente em uma unidade de cabeçalho", - "'explicit(bool)' é um recurso do C++20" + "'explicit(bool)' é um recurso do C++20", + "um nome de módulo deve ser especificado para o mapa do arquivo de módulo que faz referência ao arquivo %sq" ] diff --git a/Extension/bin/messages/ru/messages.json b/Extension/bin/messages/ru/messages.json index 25f5968d30..3d88bc379b 100644 --- a/Extension/bin/messages/ru/messages.json +++ b/Extension/bin/messages/ru/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "не удалось создать единицу заголовка для текущей единицы трансляции", "текущая единица трансляции использует одну или несколько функций, которые в данный момент невозможно записать в единицу заголовка", - "\"explicit(bool)\" — это функция C++20" + "\"explicit(bool)\" — это функция C++20", + "необходимо указать имя модуля для сопоставления файла модуля, ссылающегося на файл %sq" ] diff --git a/Extension/bin/messages/tr/messages.json b/Extension/bin/messages/tr/messages.json index 298b6fac61..92f833b1ff 100644 --- a/Extension/bin/messages/tr/messages.json +++ b/Extension/bin/messages/tr/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "geçerli çeviri birimi için bir başlık birimi oluşturulamadı", "mevcut çeviri birimi şu anda bir başlık birimine yazılamayan bir veya daha fazla özellik kullanıyorsa", - "'explicit(bool)' bir C++20 özelliğidir" + "'explicit(bool)' bir C++20 özelliğidir", + "%sq dosyasına başvuran modül dosyası eşlemesi için bir modül adı belirtilmelidir" ] diff --git a/Extension/bin/messages/zh-cn/messages.json b/Extension/bin/messages/zh-cn/messages.json index 315ed0706d..a8f118b002 100644 --- a/Extension/bin/messages/zh-cn/messages.json +++ b/Extension/bin/messages/zh-cn/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "无法为当前翻译单元创建标头单元", "当前翻译单元使用当前无法写入标头单元的一个或多个功能", - "“explicit(bool)” 是 C++20 功能" + "“explicit(bool)” 是 C++20 功能", + "必须为引用文件 %sq 的模块文件映射指定模块名称" ] diff --git a/Extension/bin/messages/zh-tw/messages.json b/Extension/bin/messages/zh-tw/messages.json index 3ac0992a5a..8338705c3a 100644 --- a/Extension/bin/messages/zh-tw/messages.json +++ b/Extension/bin/messages/zh-tw/messages.json @@ -3600,5 +3600,6 @@ "EDG IFC", "無法為目前的編譯單位建立標頭單位", "目前的編譯單位使用一或多個目前無法寫入標頭單位的功能", - "'explicit(bool)' 是 C++20 功能" + "'explicit(bool)' 是 C++20 功能", + "必須為參照檔案的模組檔案對應指定模組名稱 %sq" ] diff --git a/Extension/i18n/chs/src/nativeStrings.i18n.json b/Extension/i18n/chs/src/nativeStrings.i18n.json index ef13108ac8..22ae6e7d02 100644 --- a/Extension/i18n/chs/src/nativeStrings.i18n.json +++ b/Extension/i18n/chs/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "结果:", "return_label": "返回:", "returns_label": "返回:", + "sa_label": "另请参阅:", "since_label": "开始日期:", "template_parameters_label": "模板参数:", "test_label": "测试:", diff --git a/Extension/i18n/cht/src/nativeStrings.i18n.json b/Extension/i18n/cht/src/nativeStrings.i18n.json index 95cc61d402..ac02497142 100644 --- a/Extension/i18n/cht/src/nativeStrings.i18n.json +++ b/Extension/i18n/cht/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "結果:", "return_label": "傳回:", "returns_label": "傳回:", + "sa_label": "另請參閱:", "since_label": "自:", "template_parameters_label": "範本參數:", "test_label": "測試:", diff --git a/Extension/i18n/csy/src/nativeStrings.i18n.json b/Extension/i18n/csy/src/nativeStrings.i18n.json index 424491bfe3..54cc7e5c70 100644 --- a/Extension/i18n/csy/src/nativeStrings.i18n.json +++ b/Extension/i18n/csy/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Výsledek:", "return_label": "Vrátit:", "returns_label": "Vrací:", + "sa_label": "Další informace:", "since_label": "Od:", "template_parameters_label": "Parametry šablony:", "test_label": "Test:", diff --git a/Extension/i18n/deu/src/nativeStrings.i18n.json b/Extension/i18n/deu/src/nativeStrings.i18n.json index e5339ba709..00418cfbfa 100644 --- a/Extension/i18n/deu/src/nativeStrings.i18n.json +++ b/Extension/i18n/deu/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Ergebnis:", "return_label": "Rückgabe:", "returns_label": "Rückgabe:", + "sa_label": "Siehe auch:", "since_label": "Seit:", "template_parameters_label": "Vorlagenparameter:", "test_label": "Test:", diff --git a/Extension/i18n/esn/src/nativeStrings.i18n.json b/Extension/i18n/esn/src/nativeStrings.i18n.json index c4e324a460..10bea9fa49 100644 --- a/Extension/i18n/esn/src/nativeStrings.i18n.json +++ b/Extension/i18n/esn/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Resultado:", "return_label": "Devolución:", "returns_label": "Devuelve:", + "sa_label": "Vea también:", "since_label": "Desde:", "template_parameters_label": "Parámetros de plantilla:", "test_label": "Prueba:", diff --git a/Extension/i18n/fra/src/nativeStrings.i18n.json b/Extension/i18n/fra/src/nativeStrings.i18n.json index 5ad7d5e8ab..8589b8b3cd 100644 --- a/Extension/i18n/fra/src/nativeStrings.i18n.json +++ b/Extension/i18n/fra/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Résultat :", "return_label": "Retour :", "returns_label": "Retourne :", + "sa_label": "Afficher aussi :", "since_label": "Depuis :", "template_parameters_label": "Paramètres du modèle :", "test_label": "Tester :", diff --git a/Extension/i18n/ita/src/nativeStrings.i18n.json b/Extension/i18n/ita/src/nativeStrings.i18n.json index 3b2bc49343..db129d2a77 100644 --- a/Extension/i18n/ita/src/nativeStrings.i18n.json +++ b/Extension/i18n/ita/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Risultati:", "return_label": "Restituisci:", "returns_label": "Restituisce:", + "sa_label": "Vedere anche:", "since_label": "Da:", "template_parameters_label": "Parametri del modello:", "test_label": "Test:", diff --git a/Extension/i18n/jpn/package.i18n.json b/Extension/i18n/jpn/package.i18n.json index bbe3dfd1d6..e72a180511 100644 --- a/Extension/i18n/jpn/package.i18n.json +++ b/Extension/i18n/jpn/package.i18n.json @@ -449,4 +449,4 @@ "c_cpp.configuration.refactoring.includeHeader.always.description": "ヘッダー ファイルがソース ファイルに明示的に含まれていない場合は、常にヘッダー ファイルを含めます。", "c_cpp.configuration.refactoring.includeHeader.ifNeeded.description": "ヘッダー ファイルがソース ファイルに明示的に含まれていない場合、または暗黙的にインクルードされていない場合にのみ、ヘッダー ファイルを含めます。", "c_cpp.configuration.refactoring.includeHeader.never.description": "ヘッダー ファイルを含めることはありません。" -} \ No newline at end of file +} diff --git a/Extension/i18n/jpn/src/nativeStrings.i18n.json b/Extension/i18n/jpn/src/nativeStrings.i18n.json index 30923edb20..3803780511 100644 --- a/Extension/i18n/jpn/src/nativeStrings.i18n.json +++ b/Extension/i18n/jpn/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "結果:", "return_label": "戻り値:", "returns_label": "戻り値:", + "sa_label": "関連項目:", "since_label": "次の日時以降:", "template_parameters_label": "テンプレート パラメーター:", "test_label": "テスト:", diff --git a/Extension/i18n/kor/src/nativeStrings.i18n.json b/Extension/i18n/kor/src/nativeStrings.i18n.json index 8a34941515..6307a0846f 100644 --- a/Extension/i18n/kor/src/nativeStrings.i18n.json +++ b/Extension/i18n/kor/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "결과:", "return_label": "반환:", "returns_label": "반환 값:", + "sa_label": "참고 항목:", "since_label": "다음 이후:", "template_parameters_label": "템플릿 매개 변수:", "test_label": "테스트:", diff --git a/Extension/i18n/plk/src/nativeStrings.i18n.json b/Extension/i18n/plk/src/nativeStrings.i18n.json index 41c3090d27..99d46898c6 100644 --- a/Extension/i18n/plk/src/nativeStrings.i18n.json +++ b/Extension/i18n/plk/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Wynik:", "return_label": "Zwrot:", "returns_label": "Zwraca:", + "sa_label": "Zobacz też:", "since_label": "Od:", "template_parameters_label": "Parametry szablonu:", "test_label": "Testowanie:", diff --git a/Extension/i18n/ptb/src/nativeStrings.i18n.json b/Extension/i18n/ptb/src/nativeStrings.i18n.json index b63644043a..1201657f2e 100644 --- a/Extension/i18n/ptb/src/nativeStrings.i18n.json +++ b/Extension/i18n/ptb/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Resultado:", "return_label": "Retornar:", "returns_label": "Retorna:", + "sa_label": "Consulte também:", "since_label": "Desde:", "template_parameters_label": "Parâmetros do Modelo:", "test_label": "Testar:", diff --git a/Extension/i18n/rus/src/nativeStrings.i18n.json b/Extension/i18n/rus/src/nativeStrings.i18n.json index 4f42e052bd..ad08527be8 100644 --- a/Extension/i18n/rus/src/nativeStrings.i18n.json +++ b/Extension/i18n/rus/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Результат:", "return_label": "Возврат:", "returns_label": "Возвращает:", + "sa_label": "См. также:", "since_label": "С:", "template_parameters_label": "Параметры шаблона:", "test_label": "Тест:", diff --git a/Extension/i18n/trk/src/nativeStrings.i18n.json b/Extension/i18n/trk/src/nativeStrings.i18n.json index f7f2620b77..fdabcb71aa 100644 --- a/Extension/i18n/trk/src/nativeStrings.i18n.json +++ b/Extension/i18n/trk/src/nativeStrings.i18n.json @@ -191,6 +191,7 @@ "result_label": "Sonuç:", "return_label": "Dönüş:", "returns_label": "Şunu döndürür:", + "sa_label": "Ayrıca bkz:", "since_label": "Dan beri:", "template_parameters_label": "Şablon Parametreleri:", "test_label": "Test et:", diff --git a/Extension/package.json b/Extension/package.json index f978613e3a..6c2e97d320 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "1.21.0-main", + "version": "1.21.1-main", "publisher": "ms-vscode", "icon": "LanguageCCPP_color_128x.png", "readme": "README.md", @@ -1577,6 +1577,8 @@ "result", "returns", "retval", + "sa", + "see", "since", "tparam", "test", diff --git a/Extension/src/Debugger/configurationProvider.ts b/Extension/src/Debugger/configurationProvider.ts index 272bb42bf6..2b9ce38ac2 100644 --- a/Extension/src/Debugger/configurationProvider.ts +++ b/Extension/src/Debugger/configurationProvider.ts @@ -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 } diff --git a/Extension/src/Debugger/configurations.ts b/Extension/src/Debugger/configurations.ts index a4730814db..96895c6da2 100644 --- a/Extension/src/Debugger/configurations.ts +++ b/Extension/src/Debugger/configurations.ts @@ -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 }; diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 95e11724ea..9479e3d597 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -577,6 +577,7 @@ const DidChangeTextEditorSelectionNotification: NotificationType = new No const ChangeCompileCommandsNotification: NotificationType = new NotificationType('cpptools/didChangeCompileCommands'); const ChangeSelectedSettingNotification: NotificationType = new NotificationType('cpptools/didChangeSelectedSetting'); const IntervalTimerNotification: NotificationType = new NotificationType('cpptools/onIntervalTimer'); +const CustomConfigurationHighPriorityNotification: NotificationType = new NotificationType('cpptools/didChangeCustomConfigurationHighPriority'); const CustomConfigurationNotification: NotificationType = new NotificationType('cpptools/didChangeCustomConfiguration'); const CustomBrowseConfigurationNotification: NotificationType = new NotificationType('cpptools/didChangeCustomBrowseConfiguration'); const ClearCustomConfigurationsNotification: NotificationType = new NotificationType('cpptools/clearCustomConfigurations'); @@ -1203,7 +1204,7 @@ export class DefaultClient implements Client { try { let isFirstClient: boolean = false; - if (!languageClient || languageClientCrashedNeedsRestart) { + if (firstClientStarted === undefined || languageClientCrashedNeedsRestart) { if (languageClientCrashedNeedsRestart) { languageClientCrashedNeedsRestart = false; // if we're recovering, the isStarted needs to be reset. @@ -2092,7 +2093,7 @@ export class DefaultClient implements Client { try { const configs: SourceFileConfigurationItem[] | undefined = await this.callTaskWithTimeout(provideConfigurationAsync, configProviderTimeout, tokenSource); if (configs && configs.length > 0) { - this.sendCustomConfigurations(configs, provider.version); + this.sendCustomConfigurations(configs, provider.version, requestFile !== undefined); } else { result = "noConfigurations"; } @@ -3019,7 +3020,7 @@ export class DefaultClient implements Client { util.isOptionalArrayOfString(input.configuration.forcedInclude); } - private sendCustomConfigurations(configs: any, providerVersion: Version): void { + private sendCustomConfigurations(configs: any, providerVersion: Version, wasRequested: boolean): void { // configs is marked as 'any' because it is untrusted data coming from a 3rd-party. We need to sanitize it before sending it to the language server. if (!configs || !(configs instanceof Array)) { console.warn("discarding invalid SourceFileConfigurationItems[]: " + configs); @@ -3085,6 +3086,9 @@ export class DefaultClient implements Client { workspaceFolderUri: this.RootUri?.toString() }; + if (wasRequested) { + void this.languageClient.sendNotification(CustomConfigurationHighPriorityNotification, params).catch(logAndReturn.undefined); + } void this.languageClient.sendNotification(CustomConfigurationNotification, params).catch(logAndReturn.undefined); } diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index fd2745af6e..02a76906f3 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -1539,11 +1539,19 @@ export class CppProperties { } if (assumeRelative) { + let quoted = false; + if (result.startsWith('"') && result.endsWith('"')) { + quoted = true; + result = result.slice(1, -1); + } // 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 (quoted) { + result = `"${result}"`; + } } return result; diff --git a/Extension/src/LanguageServer/extension.ts b/Extension/src/LanguageServer/extension.ts index 581f458473..76e5642d02 100644 --- a/Extension/src/LanguageServer/extension.ts +++ b/Extension/src/LanguageServer/extension.ts @@ -66,7 +66,7 @@ async function initVcpkgDatabase(): Promise { } const portName: string = portFilePair[0]; - const relativeHeader: string = portFilePair[1]; + const relativeHeader: string = portFilePair[1].trimEnd(); if (!database[relativeHeader]) { database[relativeHeader] = []; @@ -403,7 +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)); + commandDisposables.push(vscode.commands.registerCommand('C_Cpp.getIncludes', enabled ? (maxDepth: number) => getIncludes(maxDepth) : () => Promise.resolve())); } function onDisabledCommand() { diff --git a/Extension/src/LanguageServer/ui.ts b/Extension/src/LanguageServer/ui.ts index bcea62af1a..056645a299 100644 --- a/Extension/src/LanguageServer/ui.ts +++ b/Extension/src/LanguageServer/ui.ts @@ -91,6 +91,10 @@ export class LanguageStatusUI { constructor() { this.intelliSenseStatusItem = this.createIntelliSenseStatusItem(); this.tagParseStatusItem = this.createTagParseStatusItem(); + + // The tag parser is always busy when initializing. + // The detail text says "Initializing..." until the tag parser is ready. + this.tagParseStatusItem.busy = true; this.codeAnalysisStatusItem = this.createCodeAnalysisStatusItem(); this.referencesStatusBarItem = this.createReferencesStatusBarItem(); diff --git a/Extension/src/main.ts b/Extension/src/main.ts index 37106aab49..7379235277 100644 --- a/Extension/src/main.ts +++ b/Extension/src/main.ts @@ -70,7 +70,11 @@ export async function activate(context: vscode.ExtensionContext): Promise("ignoreRecommendations"); + if (ignoreRecommendations !== true) { + await LanguageServer.preReleaseCheck(); + } const settings: CppSettings = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined); let isOldMacOs: boolean = false; diff --git a/Extension/src/nativeStrings.json b/Extension/src/nativeStrings.json index 8e301c2d82..50e9e0ab01 100644 --- a/Extension/src/nativeStrings.json +++ b/Extension/src/nativeStrings.json @@ -214,6 +214,7 @@ "text": "Returns:", "hint": "This label is for the return value description for a function. Usage example: 'Returns: Area of a shape.'" }, + "sa_label": "See also:", "since_label": "Since:", "template_parameters_label": "Template Parameters:", "test_label": "Test:",