Run packInstall command for tutorial queries#10
Conversation
packInstall command for tutorial queries
| "directory": "codeql-tutorial-database", | ||
| "description": "To run a CodeQL query, we need to select a CodeQL database.\n\nWe have prepared a sample database for you to use in this tutorial.\nLook for the `codeql-tutorial-database` directory highlighted in the Explorer view in your left sidebar.\n\nWe have selected this as your current database. You can see this is selected by going to the CodeQL extension and checking that `codeql-tutorial-database` is present in the `Databases` panel. From here you are able to select a different database by right-clicking on it and choosing `Set Current Database`.", | ||
| "commands": ["codeQL.setDefaultTourDatabase"] | ||
| "commands": ["codeQL.setDefaultTourDatabase", "codeQL.packInstall"] |
There was a problem hiding this comment.
We are not providing a URI to the packInstall command here. This means it will create the usual user prompt box asking which pack to install dependencies for, and then the user must choose the tutorial-queries pack, and click OK. Can we make this less interactive, ideally by specifying the pack name / URI to the packInstall command?
There was a problem hiding this comment.
This was tricky to test because for some reason there's some caching lying around and I kept testing with this branch in the extension instead of main. I wasn't completely sure this works but hard to tell.
Can we make this less interactive, ideally by specifying the pack name / URI to the packInstall command?
I don't think we can do that without creating a custom command which goes back to doing what we did in this PR: github/vscode-codeql#2090.
There was a problem hiding this comment.
I take that back, it looks like you can provide params to commands: https://github.com/microsoft/codetour#command-links
There was a problem hiding this comment.
Yes. Give it a try. I had trouble getting that working originally but it is a feature we will likely need in many places.
|
Closing for now as we couldn't get this to work with parameters, even though the tour claims it can accept them. Possibly related issue: microsoft/codetour#117 |
Follow-up to: #6
This PR will trigger a
codeql pack installcommand in order to installreal library dependencies for
tutorial-queries, since we no longerhave the dummy library in
tutorial-lib.