Skip to content

Run packInstall command for tutorial queries#10

Closed
elenatanasoiu wants to merge 1 commit intomainfrom
elena/use-command-here
Closed

Run packInstall command for tutorial queries#10
elenatanasoiu wants to merge 1 commit intomainfrom
elena/use-command-here

Conversation

@elenatanasoiu
Copy link
Copy Markdown
Contributor

Follow-up to: #6

This PR will trigger a codeql pack install command in order to install
real library dependencies for tutorial-queries, since we no longer
have the dummy library in tutorial-lib.

@elenatanasoiu elenatanasoiu changed the title Run packInstall for tutorial queries QL pack Run packInstall command for tutorial queries Feb 23, 2023
@elenatanasoiu elenatanasoiu requested review from a team and adityasharad February 23, 2023 15:50
"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"]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

@elenatanasoiu elenatanasoiu Feb 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take that back, it looks like you can provide params to commands: https://github.com/microsoft/codetour#command-links

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Give it a try. I had trouble getting that working originally but it is a feature we will likely need in many places.

@elenatanasoiu
Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants