Commit Graph

6261 Commits

Author SHA1 Message Date
Koen Vlaswinkel
688b9863da Merge pull request #2981 from github/koesie10/fix-failing-test
Fix failing test
2023-10-16 13:47:01 +02:00
Koen Vlaswinkel
c80641866c Fix failing test 2023-10-16 13:25:35 +02:00
Koen Vlaswinkel
6a7ce9f4d2 Merge pull request #2976 from github/koesie10/methods-usage-panel-parent
Introduce separate tree item types in the methods usage panel
2023-10-16 13:25:05 +02:00
Koen Vlaswinkel
d0e0237b9e Merge pull request #2965 from github/koesie10/modeled-method-validation-neutral
Fix neutral model validation to consider kind
2023-10-16 13:23:26 +02:00
Anders Starcke Henriksen
e57f04e6b1 Merge pull request #2975 from github/starcke/remove-old-language-filter
Remove old language context filter.
2023-10-16 13:06:40 +02:00
Charis Kyriakou
b87dfa4471 Show in-progress state in method modeling panel (#2979) 2023-10-16 11:47:31 +01:00
Robert
b1a4586791 Merge pull request #2977 from github/robertbrignull/fix_jump_to_usage
Revert changes to codeQLModelEditor.jumpToMethod to allow jumping to usages other than the first usage
2023-10-16 11:21:18 +01:00
Robert
aa8896e553 Merge pull request #2964 from github/robertbrignull/enable-add-multiple-models
Enable/disable the add/remove model buttons at the right times
2023-10-16 11:04:06 +01:00
Robert
9134e0e917 Add comment explaining caveats of setSelectedMethod 2023-10-16 11:03:19 +01:00
Robert
1259a3e61d Use 'import type' in commands.ts 2023-10-16 10:59:12 +01:00
Robert
7aa0fe32c2 Revert changes to codeQLModelEditor.jumpToMethod 2023-10-16 10:42:18 +01:00
Anders Starcke Henriksen
cc2eec78bd Merge branch 'main' into starcke/remove-old-language-filter 2023-10-16 11:27:56 +02:00
Koen Vlaswinkel
d715ceea10 Introduce separate tree item types in the methods usage panel
This creates new tree item types for methods and usages such that these
can contain references to their parent and children. This allows us to
easily find the parent of a usage and to find the children of a method.
This removes an expensive `find` call in `getParent`.
2023-10-16 11:18:27 +02:00
Anders Starcke Henriksen
8b3786c621 Remove old language context filter. 2023-10-16 10:30:26 +02:00
Koen Vlaswinkel
39a9f4ce1e Merge pull request #2974 from github/koesie10/changelog-install-workspace-packs
Add CHANGELOG entry for #2960
2023-10-16 10:09:48 +02:00
Koen Vlaswinkel
b2de9e94cd Add CHANGELOG entry for #2960 2023-10-16 09:53:22 +02:00
Charis Kyriakou
23dc8f16c3 Move in-progress methods state to modeling store (#2971) 2023-10-16 08:51:46 +01:00
Koen Vlaswinkel
d78a4d19eb Merge pull request #2960 from github/koesie10/install-workspace-packs
Do not show non-workspace packs when installing pack dependencies
2023-10-16 09:51:29 +02:00
Anders Starcke Henriksen
3cbaa5aa24 Merge pull request #2935 from github/starcke/language-selection-panel
Add language filter panel.
2023-10-16 09:42:35 +02:00
Anders Starcke Henriksen
e8e6c6bbc7 Update comment. 2023-10-13 16:28:14 +02:00
Anders Starcke Henriksen
d5388576b5 Apply suggestions from code review
Co-authored-by: Koen Vlaswinkel <koesie10@users.noreply.github.com>
2023-10-13 16:00:17 +02:00
Charis Kyriakou
a5139b7fbf Convert InProgressMethods to an interface (#2970) 2023-10-13 14:56:33 +01:00
Nora Dimitrijević
f5f5b398fe Merge pull request #2928 from github/d10c/trim-cache-command
Add "CodeQL: Trim Cache" command that calls `evaluation/trimCache`
2023-10-13 15:12:55 +02:00
Koen Vlaswinkel
5e8de88ee0 Merge pull request #2968 from github/koesie10/readonly-modeling-store
Improve immutability of modeling store state
2023-10-13 13:13:27 +02:00
Koen Vlaswinkel
6801a64148 Improve immutability of modeling store state
This improves the immutability of the modeling store state by using
TypeScript's readonly types to ensure that state can only be modified
from within the modeling store or when it's copied. This mostly consists
of adding `readonly` to properties and arrays, but this also adds a
`DeepReadonly` type to use in `postMessage` arguments to ensure that
readonly objects can be passed in. `postMessage` will never modify the
objects, so this is safe.
2023-10-13 11:20:54 +02:00
Nora
ee630b4a87 Merge pull request #2963 from github/nora/cancel-code-search
Improve code search cancelling
2023-10-13 10:23:02 +02:00
Anders Starcke Henriksen
a03e2c85f1 Address comments. 2023-10-13 10:03:34 +02:00
Koen Vlaswinkel
288f44e57d Merge remote-tracking branch 'origin/main' into koesie10/modeled-method-validation-neutral 2023-10-13 10:01:34 +02:00
Anders Starcke Henriksen
52d32a5051 Merge branch 'main' into starcke/language-selection-panel 2023-10-13 09:52:17 +02:00
Koen Vlaswinkel
fa9cc7c5f9 Merge pull request #2967 from github/koesie10/fix-multiple-models-method-panel-spec
Fix incorrect test for `MultipleModeledMethodsPanel`
2023-10-13 09:51:32 +02:00
Anders Starcke Henriksen
cc3feabe66 Apply suggestions from code review
Co-authored-by: Koen Vlaswinkel <koesie10@users.noreply.github.com>
2023-10-13 09:48:28 +02:00
Koen Vlaswinkel
1dbd5aa86e Fix test with non-conflicting neutral 2023-10-13 09:47:00 +02:00
Koen Vlaswinkel
19c30f1ee2 Fix incorrect test for MultipleModeledMethodsPanel
This was caused by a semantic merge conflict resulting in the wrong
`onChange` argument being used in the test.
2023-10-13 09:33:55 +02:00
Koen Vlaswinkel
3c505719f2 Merge pull request #2957 from github/koesie10/modeled-methods-panel-multiple-save
Use `SetMultipleModeledMethodsMessage` in modeled methods panel
2023-10-13 09:26:44 +02:00
Nora Dimitrijević
b097804ad7 Make the command conditional on a supported CLI version 2023-10-12 16:15:49 +00:00
Nora Dimitrijević
8b918bdb19 Add CHANGELOG.md entry 2023-10-12 16:15:49 +00:00
Nora Dimitrijević
d0f4188f3f Add "VSCode: Trim Cache" command that calls evaluation/trimCache
The purpose of this change is to add a command that clears the cache except for predicates marked `cached`.
In contrast, the existing "VSCode: Clear Cache" command clears everything (`--mode=brutal`).

This calls into the query server's `evaluation/trimCache` method;
however, its existing behaviour is to do a database cleanup with `--mode=gentle`.
This is not well documented, and `--mode=normal` would give the desired behaviour.

Accordingly, this approach is dependent on separately changing the backend behaviour to `--mode=normal`.

Other possible amendments to this commit would be to not touch the legacy client
(replacing required methods by failing promises, since the legacy server is fully deprecated already),
or to have less duplication (by introducing more arguments — however,
I'm applying the rule of thumb that >3 copy-pastes are required for the introduction of a deduplicating abstraction).
2023-10-12 16:15:49 +00:00
Robert
bf828bccb6 Correctly test when buttons are disabled 2023-10-12 17:10:25 +01:00
Robert
48732a817a Update test names 2023-10-12 16:59:04 +01:00
Koen Vlaswinkel
4ac21232cf Fix neutral model validation to consider kind
This fixes a bug where the validation of modeled methods would not
consider the kind of the modeled method, and would therefore give an
error when there was e.g. a neutral sink and a non-neutral summary.
2023-10-12 16:41:28 +02:00
Robert
fc9588a1ec Add tests for buttons 2023-10-12 15:31:35 +01:00
Robert
08522f9ae2 Enable/disable the add/remove model buttons in model editor 2023-10-12 15:31:34 +01:00
Robert
e50affeb56 Introduce shared methods for canAdd / canRemoveModeledMethod 2023-10-12 15:31:32 +01:00
Nora
43bc92e386 throw when cancelling 2023-10-12 13:52:56 +00:00
Kasper Svendsen
8ecc31fae7 Merge pull request #2955 from github/kaspersv/hash-result-set-in-bqrs-filename
Hash result set name in sorted result set path
2023-10-12 14:17:47 +02:00
Koen Vlaswinkel
d15c57ee29 Merge pull request #2961 from github/koesie10/storybook-a11y
Add @storybook/addon-a11y package
2023-10-12 14:08:40 +02:00
Nora
f4f799894e Merge pull request #2815 from github/nora/remove-unused-activation-events
Remove unnecessary `activationEvents` from extension's package.json
2023-10-12 14:03:43 +02:00
Kasper Svendsen
ee5b738e00 Hash result set name in sorted result set path 2023-10-12 13:58:55 +02:00
Koen Vlaswinkel
25ba9e436b Merge branch 'main' into koesie10/install-workspace-packs 2023-10-12 13:48:19 +02:00
Koen Vlaswinkel
b72e0352c4 Merge branch 'main' into koesie10/storybook-a11y 2023-10-12 13:48:17 +02:00