Skip to content

Use object for pack generation details#3260

Merged
charisk merged 1 commit intomainfrom
charisk/introduce-ql-pack-details
Jan 22, 2024
Merged

Use object for pack generation details#3260
charisk merged 1 commit intomainfrom
charisk/introduce-ql-pack-details

Conversation

@charisk
Copy link
Copy Markdown
Contributor

@charisk charisk commented Jan 22, 2024

The generateQueryPack function in run-remote-query.ts currently has logic to calculate a few things like the QL pack root, paths to the query files, the language, etc. In order to add multi-query support, a few of these calculations need to be moved further up the stack and then passed in to generateQueryPack as arguments.

In this PR, we're introducing a new type (QlPackDetails) in the /variant-analysis domain to hold such information so that a single object can be passed in to generateQueryPack and using that to include the queryFile. In follow up PRs, we'll also need to move the language, and other related information. We'll also transition from a singular queryFile to multiple ones.

I'm not 100% convinced on the QlPackDetails name, so open to suggestions! We can also rename this once it has been fleshed out a bit more.

Checklist

N/A:

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

@charisk charisk requested a review from a team as a code owner January 22, 2024 09:04
Copy link
Copy Markdown
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

LGTM

One question which maybe doesn't have to be answered right now, and could get answered on its own as we flesh out this object. But could be good to think about now anyway so we avoid creating incorrect documentation.

Comment thread extensions/ql-vscode/src/variant-analysis/run-remote-query.ts
@charisk charisk merged commit 28aadb1 into main Jan 22, 2024
@charisk charisk deleted the charisk/introduce-ql-pack-details branch January 22, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants