Commit 4e5a3c5
committed
Fix
When we added an extra optional param `isTutorialDatabase` to
`openDatabase` [1] , the tests all passed but there is at least one call
[2] where this triggers an `Unhandled arguments` error.
This is because the method call doesn't know which optional param
we're passing.
Let's revert back to the original method signature where we had just
one optional parameter (the database name) and set it to a special
"CodeQL Tutorial Database" value.
We can then use this to understand that the extension is running in
the codespace and we want to skip creating a skeleton pack for it
since it's the tutorial database.
[1]: https://github.com/github/vscode-codeql/blob/5e51bb57f5f76b57768fb6a3543f153f5752c23c/extensions/ql-vscode/src/local-databases.ts#L610
[2]: https://github.com/github/vscode-codeql/blob/5e51bb57f5f76b57768fb6a3543f153f5752c23c/extensions/ql-vscode/src/databaseFetcher.ts#L257-L262Unhandled arguments bug1 parent 396fdb8 commit 4e5a3c5
3 files changed
Lines changed: 1 addition & 7 deletions
File tree
- extensions/ql-vscode
- src
- test/vscode-tests/minimal-workspace
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
389 | | - | |
390 | 388 | | |
391 | 389 | | |
392 | 390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
611 | 610 | | |
612 | 611 | | |
613 | 612 | | |
| |||
631 | 630 | | |
632 | 631 | | |
633 | 632 | | |
634 | | - | |
| 633 | + | |
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
719 | | - | |
720 | 718 | | |
721 | 719 | | |
722 | 720 | | |
723 | 721 | | |
724 | 722 | | |
725 | | - | |
726 | 723 | | |
727 | 724 | | |
728 | 725 | | |
| |||
0 commit comments