This change changes the way we do preset file expansion. Expansion now occurs upfront on file open or save, and if there are no errors, the expanded presets will be cached so repeated expansion is not necessary every time getAll{type of preset}Presets() is called.
The only time expansion will happen again is on set preset, which will then also apply the VS developer environment as needed. This is avoided on the initial expansion for performance.
If there are errors in expansion, the errors are shown in the problems panel per file. The presets file will also be set to undefined, which will invalidate that file and not allow any presets in that file to be recognized/selected as valid presets. This is in line with the CMake command line experience.
Some notes:
- The ${generator} macro should not work for packagePresets, but should now expand correctly for all other presets and evaluate conditions correctly
- Tertiary preset cache was added (really its just the original presets cache but used in a new way) to account for included json files that wouldnt be in the original presets files
[kit] Found Kit (trusted): Clang 17.0.3 (MSVC CLI) for MSVC 17.10.35004.147 (Visual Studio Community 2022 Release - x86)
[kit] Found Kit (trusted): Clang 17.0.3 (GNU CLI) for MSVC 17.10.35004.147 (Visual Studio Community 2022 Release - x86)
[kit] Found Kit (trusted): Clang 17.0.3 (MSVC CLI) for MSVC 17.10.35004.147 (Visual Studio Community 2022 Release - amd64)
[kit] Found Kit (trusted): Clang 17.0.3 (GNU CLI) for MSVC 17.10.35004.147 (Visual Studio Community 2022 Release - amd64)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
* committing state, no progress, just thinking through
* fix how we apply and override devenv to ensure we don't accidentally delete preset environment modifications from user
* check if ninja exists and it's the generator, use that to determine if we should add vs devenv as well
* currently broken, but saving state for adding a setting
* this works well, but I need to add back code that prohibits repeated devenv searching with where.exe
* finalize implementation of the setting for useVsDeveloperEnvironment
* minimize branches
* fix import
* update comments
* fix comment
* remove unnecessary comment
* fallback to better architecture/toolset
* update devenv vars and tests
* fix test for mac
* fix tests
* update changelog
* fix test expand and where.exe env
* update test to explicitly test architecture unit test
---------
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
* if installDir is a relative path, I calculate it relative to the source dir
* updated location of checking and updating installDir
* combined with expansion check
* add unspecified build type and remove CMAKE_BUILD_TYPE prop when it's used
* reverted commenting out debugger
* let debugger stop on error again
* updated changelog
* updated the docs with the new option
* updated default kit build type
* fix failing tests
---------
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
* updated to allow no generator when using file api and cmake 3.15.0 or greater
* fixed kit name check
* updated changelog
* throw nogenerator error if kit isn't __unspec__
* telemetry check for trigger, also include trigger and folder in obj for debugger
* update origin telemetry
* add enum for debug origin
* pass in from command info and cleanup
* Update cmakeFileApiDriver.ts take out import
* move to 1.19 changelog
---------
Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
* Replace intra-repo absolute URLs with relative ones.
* Replace remaining pointers to `vector-of-bool` with `microsoft`
in the URLs than must remain absolute.
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>