Граф коммитов

532 Коммитов

Автор SHA1 Сообщение Дата
Garrett Campbell f47c79f5e0
Add expansion, inheritance, include tests (#4137)
* Move the presets tests to integration tests.

These tests aren't true 'unit' tests by definition, so moving them to
integration.
Also, added include and CMakePresets/CMakeUserPresets tests.

* add inheritance and expansion and override tests

* fix formatting of test file

* fix linter issues

* fix lint issues

* fix path

* make tests better across platform

* fix lint
2024-11-06 14:34:12 +00:00
Garrett Campbell 781a5a6e9b
Retire Options Moved notification (#4145) 2024-11-06 11:33:38 +00:00
0xemgy 220ac74783
Fix GCC linker errors not showing up in Problems View (#3950)
* gcc.ts: Replace single regex pattern with array

* CHANGELOG.md: Add GCC parsing fix

* Change parser from gnuLD to gcc for linker error diagnostics unit test

* Fix GNU LD diagnostics parser not being enabled due to inconsistency in config and in build.ts by_source strings

* Improve GCC and GNU LD diagnostics parsers

* Remove obsolete french linker error unit test

* Add gcc and gnuld diagnostics unit tests

* Clean up regexes, add unit tests

* Make gcc and gnuld parsers execution order agnostic

* Share the RegexPattern interface and the MatchType interface rather than doubly defining it

* Remove C++ template compiler error detection from gnu-ld, move common data types to util.ts

* fix extra line

* update changelog

* Remove obsolete return statement

* Add comments

---------

Co-authored-by: 0xemgy <0xemgy>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
2024-11-01 13:52:55 +00:00
Garrett Campbell 46f2d16e31
Refactor and improve test infrastructure, starting with automated version validation tests (#4126)
* renamed to end-to-end-tests and moved backend unit tests to unit-tests folder

* create folder for kits code, refactor imports to use @cmt and @test

* move variants into the kits folder

* refactor into better folder structure, still more to go

* Initial refactor making presets validation unit testing possible.

This seems to work well so far, I have v1-v3 presets tested, with some
more refactors regarding error reporting to come. However, the
design/infrastructure refactor seems to be allowing us to unit test
validation.

* implemented Presets version validation automated testing

* Added version testing for presets v1-9.

This adds testing for our version validation for all Presets versions
currently supported.
It creates presets on the fly and ensures that we correctly get errors,
or don't, depending on the setup and what fields are present with what
versions.

* fix workflows

* Ensure that we correctly initialize the presetsParser class

* refactor imports

* refactor imports

* more import fixes

* imports in projectStatus

* missed one

* workflow imports

* added comment about definite assignment

* add comments

* fix launch file to make sure breakpoints happen

* fix syntax error
2024-10-21 11:02:35 -07:00
Sandro Pedrett 9327d3c9ef
Add support to configure default ActiveProject (#3730)
* Implemented defaultActiveProject configuration to select default project during initialization (#1078)

* Updated docu

* Removed unused comment

* Fixed lint issues

* Fixed review findings

* Improved description of new defaultActiveFolder configuration

* Updated changelog

---------

Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-10-10 19:58:14 +00:00
Lin Hsu ed37b19f51
Add command substitutions `launchTargetName` and `getLaunchTargetName` (#3979)
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-10-07 08:01:40 -04:00
Garrett Campbell 36276c952e
xml2js cg (#4069)
* xml2js cg

* update tests as well

* try update partial

* switch kit?

* ninja is added to path so it should work, still investigating

* update action version with same tool versions

* changes to test

* test output

* more testing

* test macos-13

* remove logging

* remove logging

* try explicit macos-14

* go back to macos-13

* remove static version of vscode

* need to use 13

* comment
2024-09-17 05:40:09 -04:00
Garrett Campbell a4ff8d1716
Remove popups and update defaults for `configureOnOpen` (#3967)
* update defaults and remove popups

* update changelog

* fix types for configureOnOpen

* fix eslint
2024-08-13 05:28:34 -04:00
Garrett Campbell c779bf1fcd
Ensure we correctly inherit preset from UserPreset (#3958)
* fix

* analyze user presets first because it's the base if it exists

* more updates to fix include files and telemetry, still needs work and testing

* ensure telemetry and other uses of 'all..Presets' is right

* more fixes

* ensure we don't duplicate cmakepresets in userpresets includes

* remove unnecessary return

* unionWith consistency

* add test
2024-08-06 14:36:51 -04:00
Andreea Isac 27cb55e70e
Configure precondition handler to return boolean to signal a successful recovery case (#3776)
* Making configure precondition handler return a boolean helps to differentiate the successful recovery cases

* Fix pre-condition handler prototype errors in tests

* Experiment with prototypes to fix linter errors

* Add setting for building whole build dir when clean configure

* Remove anything related to deleteBuildDirOnCleanConfigure since it's in a different PR. Keep proper promise<bool> prototype for pre-configure handler return and fix appropriately compilation and lint errors in tests.

* Forgot one file to remove deleteBuildDirOnCleanConfigure from

* Remove forgotten comment

* Add changelog entry

* remove changes not needed

* removing more bad changes

* add logic to regenerate the driver after selecting cmakelists

* remove unused imports

* keep sanity check in _beforeConfigureOrBuild

* only ensure we set the variable so that on retry, it works

* switch return

* erroneous update

* fix

---------

Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-07-29 15:47:40 -04:00
fargies 97b36c94ad
Fix GitHub 1401, diagnostics relative to workspace folder (#3780)
* Fix GitHub 1401, diagnostics relative to workspace folder

 - relative diagnostics files are searched in build_dir and src_dir,
   first existing file is returned
 - defaults to old behavior : `path.resolve(build_dir, file)`
 - `resolveDiagnostics` has been made async to not slow down IDE when
   testing files

* update ChangeLog for #1401

* fix relative file resolution diagnostics test

 - diagnostics paths always use POSIX separators (see `normalizePath` in
   [src/util.ts](src/util.ts))

---------

Co-authored-by: Sylvain Fargier <sylvain.fargier@cern.ch>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-07-29 14:54:26 -04:00
Fatima Qarni 1eadb61980
Preset file expansion on open/save and expansion validation (#3905)
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
2024-07-24 15:52:00 +00:00
Garrett Campbell bdc9f5f0c4
Add setting to control how we use VS Dev Env (#3892)
* 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>
2024-07-16 19:35:40 +00:00
Andreea Isac 39f372b904
Add setting for deleting whole build dir when clean configuring (#3783)
* Add setting for deleting whole build dir when clean configuring

* Remove unnecessary tag in new setting in package.json

* Add changelog entry. Remove unnecessary | null from new boolean setting.

---------

Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-06-24 13:10:18 -04:00
vinocher-bc 734ffcbaba
Tree view for tests using test suite delimiter (#3759)
* Implement treeview for tests using test suite delimiter

* Support regular expressions for delimiters

* Improve UI string

* Improve UI string

* Address CR comments

* Fix spacing

* make sure to pass entry point through

---------

Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-06-21 16:57:32 -04:00
Fatima Qarni 91b0e8b858
Add option to disable kit scan by default (#3585)
* Adds option to disable kit scan by default

* Remove unused comment

* remove newline

* cleanup from comments

* remove string

* fix string and changelog

* move to 1.18

---------

Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
2024-03-08 15:24:19 -05:00
Andreea Isac aa46849ef6
Presets V6 support (package and workflow) (#3548)
* Draft incomplete - does not compile

* Remaining functionality, needs more cleanup and testing

* More bug fixes, not much cleanup

* More bug fixes and stabilization

* fix indentation issues, unused variables, etc.

* Implement first round of code review feedback

* Fix more subtle and complex merge conflicts

* Fix linter issues

* Forgot to dispose of package event subscription

* PR review round two

* Incomplete status bar support for V6 presets. Don't clear output when in workflow mode, regardless of cleanOutputBeforeBuild setting. More cleanup.

* Finish status bar UI support for package and workflow presets

* Add validation of presets structure (applies to all). Fix some bugs.

* Skip expanding strings when not necessary. Remember more presets associations in the workspace state when reseting configure preset. More cleanup.

---------

Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
2024-01-30 15:21:46 -08:00
Garrett Campbell b486c5a369
Add a setting to enable/disable the Test Explorer Integration (#3545)
* Add initial setting and use in runCTest

There is still work to be done to ensure that we cover all
cases/scenarios and code locations to ensure that our integration with
the test explorer doesn't happen based on this setting

* Hide commands, handle TestController state.

Hide the commands based on the Test Explorer when the testExplorer
integration is disabled. Ensure the TestController gets disposed when
the setting is dynamically changed.

* attempt to refresh the tests when re-enabling integration

* add changelog

* only dispose if needed
2024-01-23 19:43:51 +00:00
moyo1997 2bdf3bf239
add pinned cmake commands view (#3542)
* add pinned cmake commands view
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
2024-01-23 18:40:20 +00:00
Garrett Campbell 0864696a67
Improve when configure with debugger popup appears and allow disabling. (#3496)
* Make popup only show up when necessary and reasonable.

Modify the return value of the configure method so that we can better
evaluate whether we should be showing the "Configure failed. Configure
with debugger?" popup.

* add ability to not show again and have it controlled by a setting

* fix tests

* more test fixes

* more testing fixes

* more testing fixes

* more testing fixes

* another fix attempt

* semantic error

* revert slightly to investigate

* test

* test fix

* test

* test

* only return the result for the command API

* fix test

* try deep equal in driver-test

* update changelog

---------

Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
2024-01-02 07:58:24 +00:00
snehara99 c71f44b52a
Updated Notification and Settings Names (#3417)
* updated notification and settings descriptions

* added comment to not replace text between () for one setting description; it's a link

* changed setting name from cmake.status to cmake.options and updated notification
2023-11-01 21:33:07 +00:00
snehara99 58a1962bf4
Dev/snehara/transfer from sb to psv (#3407)
* initial commit updating settings (not working yet)

* fixed status bar

* project status view working (needs more testing tho)

* fixed check errors

* standardized tooltip capitalization in psv

* added button to open visibility settings and changed 'default' to 'visible' in psv and sb visibility settings

* added close issue reason on stale bots (might not work due to action bug), added a notification for the options moving, and fixed some visibility settings and strings

* updated notification

* updated test

* updated test and config.ts
2023-10-31 22:41:59 +00:00
Garrett Campbell eee8703a8e
ensure things get disposed and give time for resources to free (#3370) 2023-10-09 14:22:50 -04:00
snehara99 aa2139531f
allow a way to run jobs in parallel (#3271)
* allowed a way to run jobs in parallel

* updated changelog

* fixed extra command and description

* addressed Ben's comments (changelog linking to issue and setting scope to resource)
2023-08-01 12:30:07 -07:00
Garrett Campbell ce3ddedf8e
fix per folder provide browse configuration (#3249)
* fix per folder provide browse configuration

We were returning the most recent stored browse configuration, which may be incorrect.
Rather, we should return null if we don't have the browseConfiguration for the requested URI.

* fix test types

* edit changelog
2023-07-20 13:08:56 -04:00
snehara99 7aa4eaba88
Dev/snehara/sidebar ab testing (#3167)
* both sidebar and statusbar visible

* toggle is working

* updated description

* renamed sideBar.ts to projectStatus.ts

* changed name of projectOutlineProvider.ts to projectOutline.ts to match

* removed unused icons

* updated sidebar to use displayName whenever possible

* fixed issue with build/debug/launch presets when no kit is selected

* addressed some comments and fixed loc

* selecting kit refreshed all nodes

* fixed build error (unused variable)

* simplified code calling useProjectStatusView

* updated changelog

* updated changelog
2023-06-01 17:30:32 +00:00
Ben McMorran f1d849436d
Add trust to kit scanning paths (#3067)
* Add trust to kit scanning paths

* Update wording
2023-03-22 11:04:47 -07:00
philippewarren 39c7266562
Add default compiler search paths for msys2 default installation paths, fix mingw bugs (#3056)
* Add default compiler search paths for msys2 default installation paths, fix mingw bugs, fixes #2880, fixes #1064, might fix #460

* Fix linting errors

* Fix PR comments (keep config for backward compatibility, typo, changelog)

* Fix linting bug
2023-03-18 07:41:51 +00:00
xisui-MSFT 787937365e
Test Explorer - Part 1 (#3032)
* Need better multiroot

* Multi-root

* Show all projects path on init, and fix issues related to multi-proj folder

* Workaround test failures

---------

Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>
2023-03-17 21:34:05 +00:00
Bob Brown a3d7584b43
print the time it takes to complete a build (#3014) 2023-02-10 08:03:46 -08:00
maxmitti af36fb3098
Automatically configure CMake project directories when the kit or the configuration preset is changed (#2973) 2023-02-08 09:44:35 -08:00
Bob Brown 589906e08e
Added a setting to ignore unknown presets features from versions we don't support yet (#2945) 2023-01-13 20:28:21 +00:00
piomis 95a8adabb6
Calling build targets from CMake Project Outline always builds default target if useTasks option is set (#2780) 2023-01-10 17:23:04 +00:00
Bob Brown ec4c7d8e33
Warn the user if the build directory is not unique for multi-project (#2913) 2023-01-10 06:40:41 -08:00
Elaheh Rashedi a06a16a11d
update codeModel in the Second-phase async init (#2926) 2023-01-09 15:20:07 -08:00
Elaheh Rashedi 8bd64e8229
rename file (#2927) 2023-01-09 16:19:27 +00:00
Elaheh Rashedi 896f499b99
CMake Multi Root and Multi Project support (#2835) 2022-12-27 08:46:15 -08:00
Bob Brown 0b8d4be3c4
Support explicit typing in `cmake.configureSettings` (#2868) 2022-12-06 15:38:18 -08:00
Ben McMorran e7ed1b7dcd
Add public API (#2794) 2022-10-25 00:28:43 +00:00
Jochen Hilgers 9b21a18328
fix(presets): support optional generator for configure presets >= v3 (#2748) 2022-10-04 09:43:46 -07:00
Bob Brown (DEVDIV) e5eaf4ef30 Disable flaky test 2022-09-23 11:11:36 -07:00
Bob Brown 1628dceb51
Fix a race condition in the single-root-UI test (#2726) 2022-09-08 18:07:47 +00:00
暴躁暴躁最暴躁/Bigforce 5767a155e8
Add a setting to disable reading compile_commands.json for higher performance experience (#2609) 2022-09-06 12:04:40 -07:00
Elaheh Rashedi bed156735b
rename CMakeTools to CMake Project (#2730) 2022-09-06 18:15:32 +00:00
Bob Brown 802a794fc3
Fix some of our higher hitting crashes (#2719) 2022-09-01 09:37:43 -07:00
Bob Brown 86d0494174
Use the Warning severity for deprecation messages (#2710) 2022-08-26 09:31:19 -07:00
Elaheh Rashedi f5706beb53
Remove PowerShell script (#2651) 2022-08-22 10:51:24 -07:00
Bob Brown b25a028194
Stabilize flaky test (#2683) 2022-08-11 09:34:33 -07:00
Elaheh Rashedi 71bed0ca23
Use Ninja Generator to speed up tests (#2660) 2022-08-01 15:12:28 -07:00
Elaheh Rashedi e9a5885486
remove duplicated tests (#2663) 2022-08-01 09:54:41 -07:00